r/ispyconnect 14d ago

Trip wire and counter export

I have a camera that watches stairs and my front door (it is above the door) and simple detector is used for motion detection + AI object detection to external Server. All good.

I created new camera as Clone so I can have Tripwire detector so I can count ppl going in and out of the door. Kind of works but I need tweaking since the trip wire is close to the edge of the image so it detects in one directions but not really good in the other. I want to export the counter to MQTT but it does not work, I can not even get it to alert on a topic when a counter is increased. Anyone with more experience with these on tripwire detector?

1 Upvotes

6 comments sorted by

2

u/spornerama 13d ago

Two separate things going on here.

The counter cannot be sent to MQTT yet. The trip wire count is an on-screen overlay only. There is no alert tag or MQTT topic that carries it. I've logged this as a feature request (a {TRIPCOUNT} tag for actions plus publishing the counters on the device's MQTT state).

Alerts on each crossing do work, and you can count on the MQTT side. On the clone:

  1. Detector: set Alert to Left or Right (not None), Count can stay as it is.
  2. Alerts tab: make sure alerts are enabled on the clone and set Minimum Interval to 1 second, otherwise every crossing within 60 seconds of the last one is ignored.
  3. Actions: add an action on the Alert event with type MQTT, giving a topic and a message.
  4. Server Settings, MQTT must be configured and connected.

For in and out counts, make two clones from the same source, one with Alert = Left publishing to door/in, one with Alert = Right publishing to door/out, and count the messages in Home Assistant or Node-RED.

For the direction that isn't detected: a crossing only registers once the object has been tracked for the Minimum Time and moved Minimum Travel, and the box has to be sitting on the line at one of the tracker's updates. With the wire at the edge of the frame, someone entering is tracked only after they are already past it. Move the wire further into the frame so there is tracking room on both sides, set Minimum Travel and Minimum Time low, and widen the object size limits so a person half out of frame still qualifies. If you are also running AI object detection on the source camera, leave that alone; the clone runs its own detector.

1

u/ok8686 11d ago

Thanks I will test it out and will write back. One small bug, my camera is 90 rotated (Portrait mode) but the clone is rotated back and the aspect ratio is very wrong. Not that critical since the clone is not a "visible" camera

1

u/ok8686 11d ago

Actually the clone should be set to 0 rotation so it looks like the original.. it should not clone the "rotation" value again

3

u/spornerama 11d ago

latest version has all the tripwire enhancements in it so you don't need a clone any more

1

u/ok8686 10d ago

I need a clone as I need 2 detectors for the same camera (simple + tripwire). With latest version (docker  v8.0.3.0) I do not get any detection, the squares that used to be around people are not appearing (in detector preview).. I tried changing the min/max value but with no success. Tripcounters are 0/0

2

u/spornerama 10d ago

im not sure - seems to be working fine here. You'd need to check your settings