As of yet I haven’t been able to expose the motion sensor to HA. It would be great it we could because then I’ d setup a script to record and forward myself the video via my Telegram Bot.
I haven’t used the ONVIF Integration. Please let me know if you’ve tried and if it worked.
Thanks, @MikeF9. I just ordered the camera on Ali and it will arrive first week of June. Been researching on how to expose the camera’s motion sensor to HA and found this:
Have you tried this? Looks like a possible solution with no risk of bricking the camera.
I did, yes. From memory it was something to do with the trailing slash - also it didn’t show up a preview straight away. So leave it a few minutes when you change something to check if it actually works.
Hi Mike,
my I bother you with a quick question?
I followed the setup that you described, using @alexxIT 's awesome integration as seen on github.
When I click on the control buttons in the card, I get Failed to call service sonoff/send_command. Service not found.
I assume I need to define the sonoff/send_command somewhere?
Thoughts ?
thanks,
chrisV
Hi @MikeF9
yes, I am using AlexxIT’s WebRTC HASS integration as well.
The reaction of the camera is a lot better.
The Picture Element Card has too long delays on my camera (close to 10 seconds)
So, the video part of the WebRTC HASS integration works, but I can’t get the controls to work (see screenshot below)
BTW, this is how my scripts.yaml looks like
(and it is “included” in configuration.yaml")
left:
sequence:
- service: sonoff.send_command
data:
device: 'my 6 digit device id' # use quotes, this is important
cmd: left
right:
sequence:
- service: sonoff.send_command
data:
device: 'my 6 digit device id' # use quotes, this is important
cmd: right
up:
sequence:
- service: sonoff.send_command
data:
device: 'my 6 digit device id' # use quotes, this is important
cmd: up
down:
sequence:
- service: sonoff.send_command
data:
device: 'my 6 digit device id' # use quotes, this is important
cmd: down
Hi, but the PTZ controls of webrtc lovelace card are for sonorr LAN component, right? how to have controls with the cxamera running sonoff-hack firm? thanks (my only idea is accomodate that calls to the restAPI calls to the webportal of sonoff-hack like http://192.168.1.XX/cgi-bin/ptz.sh?dir=down
Approach 2- Enable the ONVIF integration in the sonoff-hack web UI.
Next add the ONVIF integration for your camera in the home assistant integrations UI.
Finally- replace the pan/tilt service call in your love lace card of choice with the ONVIF service call data model for your camera.
Onvif service call:
service: onvif.ptz
service_data:
pan: LEFT # or tilt: UP
distance: 0.31
speed: 1
move_mode: RelativeMove
entity_id: camera.backdoor_profile_0
Bonus: you can set the speed and other variables in both the yi-camera-custom as well as the ONVIF integration that I don’t believe is in the https://github.com/AlexxIT/SonoffLAN integration.
Between using Yi Hack or ONVIF… any advantages or disaadvantages? Im using only YiHack and deactivated the ONVIF server on the camera with sonoff-hack (and deactivated cloud also). But im not sure what I’m missing
Yes I’m just coming to this and seems like the two options are YiHack/SonoffHack or the webRTC/SonoffLAN combo. Would appreciate any pros/cons from those who have tried both?
I’m using 4 of them with the SonoffHack with Frigate NVR for detection and recording and webRTC for the Lovelace interface. I also have the Frigate NVR debug MJPEG stream in Lovelace. The MJPEG stream has about a 2 second lag but low framerate. The webRTC stream latency is under 1 second for sure.
Not really… I did the same. I did findthat the YiHack pan/tilt API responded faster than the ONVIF pan tilt commands and since the ONVIF API is additional load for the SoC in the camera I also disabled ONVIF and Cloud, then used the YiHack addon for the pan/tilt commands. Using Frigate NVR for recording and WebRTC for viewing live in Lovelace.
I have the Sonoff GK-200MP2-B IP Camera in my cottage and the HA server in my house. How can I access the camera stream(add to the HA) from a different LAN?