Regarding the component error: did you reboot after you installed the component? And do you have a separate binary_sensors.yaml file or is it all in the configuration.yaml? Please check the indentation. https://www.home-assistant.io/components/binary_sensor.template/
haha. forgot to reboot HA before doing the config. As for the binary sensor, I missed the first line platform: template
. It all validates now. Iām feeling rather dumb now. Youād think after 2 years of using HA Iād know to reboot after adding the component.
Hmm, seems to be working, but the services are working. Clicking on the email, ftp, or IR switches have an error saying Unable to find the service camera/enable_email
ftp
or ir
, depending on which I pick.
Also, you settings for the email notifications are not working. Maybe cause Iām running hassio in docker, maybe it canāt reach the port. Iām not sureā¦
Please take a look here. All Reolink cameras could support the Profile S and all our cameras (except B800 and D400) support the onvif 2.1.
Now if you look at this table, youāll find āMotion alarm eventsā only available in ONVIF profile T.
Strangeā¦ If you look under HA developer tools, services. Do you see the camera.disable_email, camera.disable_ftp etc services? Regarding the port issue you describe: Iām also running hassio in docker. I think I fixed this by restarting my whole device, but Iām not sureā¦
Hi,
Great work!
Is it possible to select the āsubā stream with low resolution?
I have installed your component and the basic functionality works fine. Have not tested the motion detection part for now.
And I second the request to be able to select either main stream or substream. Judging from code, it is not a problem.
Nice work, thank you.
Hi,
excellent work but Iām motion detection with RLC-410 5MP doesnāt seem to work. It seems HA never picks up the motion from the camera. HA doesnāt return any errors. I can see motion being detected in Reolink software but not by binary sensor in HA.
Any ideas?
Hmm. I donāt get the motion alarm. It says itās mandatory in T, but I used an ONVIF program on my PC and it could see all the motion events. I just canāt work out how to get them.
I donāt see any of those services listed in dev tools.
As for the port, Iāll try reboot the whole system tomorrow and see what happens.
@sloma Iām also running the RLC-410-5MP.
Iāve already done some preparations for stream options, this will be included in a future release. Please be patient.
@fwestenberg Iāve just had a look through my logs. I get this error when HA starts and tries to load the component.
Error while setting up platform reolink
10:20 AM custom_components/reolink/ReolinkCamera.py (ERROR)
Clicking on that shows the following:
Error while setting up platform reolink
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/asyncio/coroutines.py", line 120, in coro
res = func(*args, **kw)
File "/config/custom_components/reolink/camera.py", line 52, in async_setup_platform
reolinkCameraDevice = ReolinkCamera(hass, config)
File "/config/custom_components/reolink/camera.py", line 130, in __init__
self._reolink_session = Camera(self._host, self._username, self._password)
File "/config/custom_components/reolink/ReolinkCamera.py", line 163, in __init__
super(Camera, self).login(self.username, self.password)
File "/config/custom_components/reolink/ReolinkCamera.py", line 27, in login
data = json.loads(response.text)[0]
File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
@fwestenberg Have you seen this link?
According to this link, there is a GetMdState field you may be able to use for motion detection?
Really glad someone is working on thisā¦ Ive been trying to get motioneye to play with my systemā¦ but it seems to bog downā¦ and is an either or proposition.
I have three cameras defined and they work fine in an picture entity cardā¦ but if motioneye is running things donāt work well in either environment.
Candiā¦ my system is nearly identical as yoursā¦ Iām rinningh the RLC-420-5MPās have you tried motioneye?
Eeeeeediot your on the right trackā¦ I got the 8 port version of that switchā¦ it works great and I have a ~15 second delayā¦ so thatās ānormalā
Look a few posts down in the other thread youāre in and youāll see my post on motioneyeā¦ Post I got it workingā¦BUT it has problems. Most likely a configuration problem but as in all things HA relatedā¦ its a work in progress. An I haven t touched anything in the Reolink app with regards to streamingā¦
So fwestenberg is your code working or is it still in development?
Andā¦ with respect to your insttructions
SMTP Server: 192.168.1.100 --> Your Home Assistant IP
SMTP Port: 1026 --> Can be changed to something else
Sender Address: [email protected] --> Just something
Receipient Address 1: [email protected] --> This should match the camera device name in Home Assistant (before the @)
Attachment: No Attachment
Interval: 30 Seconds
Can gmail be used instead as your SMTP providerā¦ I have that already up and working
Hey!
I think it broke with last update of HA.
Yep, it broke, but the component was already broken for me and wouldnāt work. Loaded in HA fine, but had errors. The creator hasnāt responded to my errors posted above, so for now, this will be disabled.
If anyone is looking to get motion sensing working on their Reolink POE cameraās, the following worked for me. Add this to you config.yaml
Reolink Motion Detection
binary_sensor:
- platform: rest
resource: !secret reolink1
name: Motion Reolink
scan_interval: 5
value_template: ā{{ value_json[0].value.state }}ā
device_class: motion
The āresourceā field takes the following form:
http://camera's IP/api.cgi?cmd=GetMdState&user=admin&password=your_password
binary_sensor:
- platform: rest
resource: !secret reolink1
name: Motion Reolink
scan_interval: 5
value_template: ā{{ value_json[0].value.state }}ā
device_class: motion
The āresourceā field takes the following form:
http://My camera's IP/api.cgi?cmd=GetMdState&user=admin&password=My_passwor
Tried itā¦ didnt workā¦ do I need anything elseā¦ I do NOT have the component loadedā¦is that required?
The camera is configured to report motionā¦ and it did
Alsoā¦ the state is reporting 'Clear" vs On or Off
-A
I donāt know if it helps but I tested it only in the browser so far, I had no time to do it in HA.
Mine seems to be working if I replace http with https.
Not sure who your responding toā¦
How / whatā¦ did you test in a browser