I have problems to integrate an Amcrest IP2M-841B-EGD-DE in HA. Of course I’ve searched the forum for a solution but without success. The topic “Can not get Amcrest IP2M-841B to work” seems similar but I get another error message.
The error message is
Fri Jan 03 2020 21:59:27 GMT+0100 (CET)
required key not provided @ data['media_player']
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 133, in handle_call_service
connection.context(msg),
File "/usr/src/homeassistant/homeassistant/core.py", line 1213, in async_call
processed_data = handler.schema(service_data)
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)
voluptuous.error.MultipleInvalid: required key not provided @ data['media_player']
Well its there.
Those errors aren’t related to the amcrest
There related to the stream component.
So you need to fix that
The docs do say to use low instead of high for newer firmware.
Did you add the sensors?
If you can get rtsp on vlc then setup an additional generic up camera.
But you will need to fix the stream issue
Make sure you’ve read the ffmpeg docs about system requirements as the can be related
What makes you think the camera isn’t working?
That error message has nothing to do with your camera it’s referencing some kinda of media_player entry.
Yes, I agree that the error doesn’t seem to be directly related to your Amcrest camera or its configuration.
The error seems to be indicating that you tried to call a service (probably via the UI) that requires a media_player parameter. Do you know exactly what you tried to do at Fri Jan 03 2020 21:59:27 GMT+0100 (CET) that might have resulted in that error?
EDIT:
BTW, you do not need the following in your config (it will be ignored anyway):
To be honest - I should read more of the documentation…
Thx for the help. I’ve corrected the relevant sections in configuration.yaml and the integration of the Amcrest works. Not sure everything is necessary but I use the following:
# ffmpeg integration, see https://www.home-assistant.io/integrations/ffmpeg/
ffmpeg:
# Stream integration, see https://www.home-assistant.io/integrations/stream
stream:
# Amcrest integration, see https://www.home-assistant.io/integrations/amcrest/
amcrest:
- host: 192.168.1.140
username: !secret amcrest_user
password: !secret amcrest_pass
resolution: high
stream_source: rtsp
binary_sensors:
- motion_detected
Clicking on it shows of course the video stream from the Amcrest.
Now I’m searching how to get the video stream directly on the GUI. Should be just a matter of reading the documentation
Thx for the invaluable help. I’m sure this topic was not the last one from me
I switched Lovelace to YAML mode and used your code snippet - it simply works.