dermotduffy / hass-motioneye Goto Github PK
View Code? Open in Web Editor NEWmotionEye Home Assistant Component
License: MIT License
motionEye Home Assistant Component
License: MIT License
I am running the latest core version of the motioneye integration component. I am aware that the core version does not support binary sensors by default, but I am required to manually turn an event into a binary sensor.
Just wondering, how to differentiate motion events from multiple cameras in motioneye since the event_type will be the same for the motion events, event_type: "motioneye.motion_detected"
?
custom_component v0.0.17
home assistant os 6.5, core-2021.10.5
motioneye add-on 0.15.1
Using this custom component alongside with the add-on, configured as described here (http://localhost:28765): in ha media browser the files recorded by motioneye add-on are listed but empty respectively cannot be found and be shown. Perhaps, the provided links are wrong.
The link provided by the motioneye add-on is "http://IP:8123/api/hassio_ingress/iDB5QusbLldmMd9prHTLDmQPbjUuEG_IExHsFrVtOzo/picture/1/preview/2021-10-15/15-13-16.jpg?_username=admin&_signature=4a6d3febaeee74b2be907b2bd033be06fb5d7073" while the link to the same picture offered by ha media browser is "http://localhost:28765/picture/1/download/2021-10-15/15-13-16.jpg?_username=admin&_signature=4fdbe4d26c37c2f0720a82e41af2f4d6beb47e73".
It would be highly useful to have a "hello world" example of the following use case:
Maybe this example exists somewhere already, and if so, I apologize. But I couldn't find it.
Thanks for the good work on this integration!
Hi,
I'm currently stuggeling to enable motion detection with the integration. So far, I have both "Home Assistant Community Add-on: motionEye" and this "Add-on MotionEye" integration installed (confusing names, btw). I added a bunch of entities to lovelace
- binary_sensor.livingroom_file_stored
- binary_sensor.livingroom_motion
- switch.livingroom_motion_detection
- switch.livingroom_movies
- switch.livingroom_still_images
motionEye has motion detection enabled and shows detected motion nicely with a square. I can turn detection on and off in lovelace. Motion Notifications is configured to call a web hook
http://homeassistant-eth.local:8123/api/motioneye/device/fdefe9c73721d9319c69131c474ba711/motion_detected?camera_id=%t&changed_pixels=%D&despeckle_labels=%Q&event=%v&fps=%{fps}&frame_number=%q&height=%h&host=%{host}&motion_center_x=%K&motion_center_y=%L&motion_height=%J&motion_version=%{ver}&motion_width=%i&noise_level=%N&threshold=%o&width=%w&src=hass-motioneye
However, binary_sensor.livingroom_motion
never changes and if I listen to events (motioneye.motion_detected)
using HA's Developer Tools it never fires.
Any idea, what I am missing?
v0.0.17
The file_url field contains admin account credentials (at least hashed) but i'm sure that for file download purposes is more that enough user level account
{
"payload":{
"event_type":"motioneye.file_stored",
"event":{
"device_id":"7900c194a82bc11dd42654b1efa51310",
"name":"DoorCam",
"camera_id":"1",
"event":"03",
"file_path":"/share/motioneye/DoorCam/2021-11-03/09-30-50.jpg",
"file_type":"2",
"fps":"2",
"frame_number":"00",
"height":"720",
"host":"a0d7b954-motioneye",
"motion_version":"4.3.2",
"noise_level":"11",
"threshold":"9216",
"width":"1280",
"src":"hass-motioneye",
"media_content_id":"media-source://motioneye/a988e81aa4ac9f2cd4c86fb8de90b359#7900c194a82bc11dd42654b1efa51310#images#/2021-11-03/09-30-50.jpg",
"file_url":"http://{!irrelevant}/picture/2/download/2021-11-03/09-30-50.jpg?_username=admin&_signature={!who_cares}"
},
"origin":"LOCAL",
"time_fired":"2021-11-03T04:30:50.632407+00:00",
"context":{
"id":"e7e7c7d1612e9161261c0adaa2554b75",
"parent_id":null,
"user_id":null
}
},
"topic":"motioneye.file_stored",
"_msgid":"9d4213e77ff707ea"
}
I have enabled motion detection in the add on, but the integration does not seem to include binary sensor for the motion detection. Do I need to enable web hook in the add on, if so, where should the web hook point to?
Might be nice to directly expose motion/file events as binary sensors.
v0.0.17
A clear and concise description of what the bug is.
Motion webhooks are not being sent all the time. I can walk into a room and watch the motioneye camera show me in lovelace, but the motion sensor does not turn on. I know motion detection is working because motioneye records me walking in, it just doesn't update the binary sensor. Testing the webhook, I can enter the url into my browser and the sensor triggers so the communication between the two works fine. It just seems that sometimes the webhook doesn't get sent.
Is your feature request related to a problem? Please describe.
I run Home Assistant with two network interfaces: one for connecting to an isolated IoT network, and another one for the outside world. It would be really hard for Home Assistant or this component to guess which one of those is the right one for MotionEye to send API calls to. In fact the call to homeassistant.helpers.network.get_url actually returns a third address which doesn't even exist on my system, but that's another problem. The point is, webhooks configured in MotionEye for things like Motion Notification don't point to the correct address of my Home Assistant instance.
Describe the solution you'd like
An option to manually configure the address that will be used in webhooks from config file or UI
Describe alternatives you've considered
Getting get_url fixed in core might help some, but because of the multiple network interfaces it's probably not a complete solution. Only one of the interfaces can be used to dial out to the MotionEye instance, so there might be some way to use that to determine which of the multiple interfaces is the correct one, but as mentioned above, automatically working out the correct interface and address seems like more of a "nice to have" feature.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
There is no audio in motioneye recordings or live streams
Describe the solution you'd like
A clear and concise description of what you want to happen.
There to be audio in motioneye recordings or live streams
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
I use Wyze v2 Cameras with the RTSP firmware but there doesn't seem to be any audio in either the motioneye dashboard or in HA.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.