I’ve two camera set up a Xiaomi Xiaofang 1S and a Xiaomi Dafang. MQTT has been set up and is working for both camera. I want to have an automation, which saves the snapshot on a PI when motion is detected, but for some reason the state of the motions sensors are always off.
I’ve verified, that the motion detection service is running on the cameras, since a red dot is show in the picture, when motion takes place.
These are the services, I got running
I’m looking for help on how to make motion state working.
Next issue.
I realised I’m missing sensors for motion_snapshot. In the log I got this.
Log Details (ERROR)
Sun Oct 20 2019 12:39:00 GMT+0200 (Central European Summer Time)
Exception in async_discover when dispatching 'mqtt_discovery_new_camera_mqtt': ({'name': 'LilleDafang motion snapshot', 'unique_id': '7811dc76ea1e-motion-snapshot', 'device': {'identifiers': '7811dc76ea1e', 'connections': [['mac', '78:11:dc:76:ea:1e']], 'manufacturer': 'Xiaomi', 'model': 'Dafang', 'name': 'Xiaomi Dafang', 'sw_version': 'Dafang Hacks'}, 'topic': 'Kaelder/LilleDafang/motion/snapshot', 'platform': 'mqtt'},)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/mqtt/camera.py", line 47, in async_discover
config = PLATFORM_SCHEMA(discovery_payload)
File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
raise er.MultipleInvalid(errors)
[u]voluptuous.error.MultipleInvalid: extra keys not allowed @ data['device'[/u]
I guess the last line is the important. Anybody know how to fix this?
Thanks