Comments (8)
What event is being triggered? Cameraevents on posts a snapshot upon an event (videomotion, ivs etc)
Is it a videomotion on cardriveway?
I need to check that send images to mqtt setting
from cameraevents.
events=CrossLineDetection,CrossRegionDetection,ParkingDetection,AlarmLocal,VideoLoss,VideoBlind,FaceDetection
I've also hade VideoMotion, but turned it off. Still getting IVS messages on MQTT.
Example message:
CrossLineDetection With Human in LeftToRight direction for Tripwire region
from cameraevents.
So i justpulled the latest for image for mine. And set that SendImagesToMQTT option you had as well.
Heres the MQTT Output CameraEvents/#:
CameraEvents/$online True
CameraEvents/$version 0.2.3
CameraEvents/NVR/alerts/state ON
CameraEvents/$heartbeat 2021-01-29 08:18:06.185433
CameraEvents/VideoMotion/NVR:5 ON
CameraEvents/NVR:5/event ON
CameraEvents/NVR:5/Image {"message": "Motion Detected: NVR:5", "imagebase64": <binary data here>
CameraEvents/VideoMotion/NVR:5 OFF
CameraEvents/NVR:5/event OFF
I mean there's not much in my logging
2021-01-29 08:18:56,329 - __main__ - DEBUG - Heartbeat: 2021-01-29 08:18:56.329489
2021-01-29 08:18:56,630 - __main__ - DEBUG - [NVR]: --myboundary
Content-Type: text/plain
Content-Length:37
Code=VideoMotion;action=Start;index=5
2021-01-29 08:18:56,631 - __main__ - INFO - Video Motion received: NVR Index: NVR:5 Code: VideoMotion
2021-01-29 08:18:56,631 - __main__ - INFO - Snapshot Url: http://<url>:80/cgi-bin/snapshot.cgi?channel=6
2021-01-29 08:19:07,060 - __main__ - DEBUG - [NVR]: --myboundary
Content-Type: text/plain
Content-Length:36
Code=VideoMotion;action=Stop;index=5
2021-01-29 08:19:07,060 - __main__ - INFO - Video Motion received: NVR Index: NVR:5 Code: VideoMotion
2021-01-29 08:19:46,461 - __main__ - DEBUG - Heartbeat: 2021-01-29 08:19:46.461175
For your entry, right before the url is posted is the event, can yo post that, to make sure it's being picked up....it looks like it is if it's firing a snapshot....and some of the cameras can be picky. What is the auth mode for your camera? Basic or digest?
from cameraevents.
2021-01-28T09:39:36.721337864Z 2021-01-28 10:39:36,721 - __main__ - INFO - CrossLineDetection received: {
2021-01-28T09:39:36.721361144Z "Class" : "Normal",
2021-01-28T09:39:36.721370587Z "CountInGroup" : 1,
2021-01-28T09:39:36.721378739Z "DetectLine" : [
2021-01-28T09:39:36.721386505Z [ 455, 7924 ],
2021-01-28T09:39:36.721394336Z [ 7263, 8053 ],
2021-01-28T09:39:36.721401720Z [ 8118, 2668 ],
2021-01-28T09:39:36.721409120Z [ 4150, 24 ],
2021-01-28T09:39:36.721416545Z [ 1092, 540 ]
2021-01-28T09:39:36.721423992Z ],
2021-01-28T09:39:36.721431611Z "Direction" : "RightToLeft",
2021-01-28T09:39:36.721439241Z "EventID" : 10253,
2021-01-28T09:39:36.721446657Z "GroupID" : 88,
2021-01-28T09:39:36.721454045Z "Name" : "Tripwire",
2021-01-28T09:39:36.721461530Z "Object" : {
2021-01-28T09:39:36.721468993Z "Action" : "Appear",
2021-01-28T09:39:36.721476615Z "BoundingBox" : [ 4096, 0, 4544, 416 ],
2021-01-28T09:39:36.721484421Z "BrandYear" : 0,
2021-01-28T09:39:36.721491848Z "CarLogoIndex" : 0,
2021-01-28T09:39:36.721499083Z "CarWindow" : {
2021-01-28T09:39:36.721506692Z "BoundingBox" : [ 0, 0, 0, 0 ]
2021-01-28T09:39:36.721514303Z },
2021-01-28T09:39:36.721521539Z "Category" : "Unknown",
2021-01-28T09:39:36.721529102Z "Center" : [ 4320, 208 ],
2021-01-28T09:39:36.721536994Z "Confidence" : 0,
2021-01-28T09:39:36.721544646Z "MainColor" : [ 0, 0, 0, 0 ],
2021-01-28T09:39:36.721552268Z "ObjectID" : 8855,
2021-01-28T09:39:36.721559793Z "ObjectType" : "Vehicle",
2021-01-28T09:39:36.721567314Z "RelativeID" : 0,
2021-01-28T09:39:36.721575727Z "Speed" : 0,
2021-01-28T09:39:36.721584198Z "SubBrand" : 0,
2021-01-28T09:39:36.721589484Z "Text" : "Unknown",
2021-01-28T09:39:36.721597014Z "carLenMode" : 0,
2021-01-28T09:39:36.721604383Z "carLength" : 0
2021-01-28T09:39:36.721611823Z },
2021-01-28T09:39:36.721618949Z "PTS" : 43329609620.0,
2021-01-28T09:39:36.721627590Z "RuleID" : 5,
2021-01-28T09:39:36.721649720Z "Track" : [],
2021-01-28T09:39:36.721659008Z "UTC" : 1611830378,
2021-01-28T09:39:36.721663289Z "UTCMS" : 620
2021-01-28T09:39:36.721670018Z }
2021-01-28T09:39:36.721677316Z
2021-01-28T09:39:36.722272118Z 2021-01-28 10:39:36,721 - __main__ - INFO - Snapshot Url: http://X.X.X.X:80/cgi-bin/snapshot.cgi?channel=1
2021-01-28T09:39:39.040760549Z 2021-01-28 10:39:39,040 - __main__ - DEBUG - [CarDriveway]: --myboundary
2021-01-28T09:39:39.040814667Z Content-Type: text/plain
2021-01-28T09:39:39.040829252Z Content-Length:958
auth basic.
from cameraevents.
What type of camera? I didn't think any where using auto basic for a long time. Maybe try digest.
from cameraevents.
You could be right. Basic was my first guess and it works with detection event. I'll try tomorrow with digest. The other thing I've found is that my camera were set to make snapshot in 8MP or 4MP resolution. It might be just too big. I've changed one to digest and 720p and will try tomorrow.
from cameraevents.
Seems digest partially solved issue. Partially, because I can see now image topic being published, but when I take base64 and decode it I get only like 5% of top of picture and rest is just grey.
Can you please tell me what would be send if in line 211 I would replace msgpayload with image?
So instead of
self.client.publish(self.basetopic +"/{0}/Image".format(channelName),msgpayload)
I would send
self.client.publish(self.basetopic +"/{0}/Image".format(channelName),image)
Would it just send jpeg/jpg image? It would suit better my need as I could directly display this image in HA without further processing of payload.
from cameraevents.
I’m not sure in binary data be an be transmitted in matt, that’s why I used the base 64 encoding.
maybe another option is to use camerevrnts for the motion detection/its but get ha to get the snap shot?
from cameraevents.
Related Issues (20)
- Can not find config file when executet from another directory HOT 1
- [enhancement] Patch to add auth support for MQTT HOT 20
- Add Dahua VTO support HOT 1
- Invalid Syntax on Raspbian HOT 3
- Question: Names of the IVS configurations HOT 7
- AlarmLocal on NVR HOT 49
- Configuration: channels index range HOT 1
- Configure Home Assistant to receive image HOT 5
- NetAlarm HOT 7
- IP Camera unreachable after a while
- Invalid authority HOT 4
- Supporting additional audio events HOT 17
- Cannot connect to Amcrest NVR HOT 4
- "alerts" config parameter ignored HOT 10
- Never sends snapshot images HOT 1
- No issue: Learn Python; how does this script actually work? HOT 6
- Payload error in event VideoMotion when stop. HOT 5
- Travis Build failing for armv6/7 arm64 images
- small bug fixes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cameraevents.