Eufy Camera Integration

Hi Bropat, thanks for all the work. After forcing eufy to use the h264 codec I have been able to make quite some progress. The audio stream is not compatible with HA but that does not impact the streaming. Still there are a few odd issues which pop up:

  1. I keep getting this error in the iobroker log, any idea what it means?

eufy-security.0 2021-03-14 14:38:10.588 warn (484) P2PClientProtocol.handleDataControl(): Not implemented - CONTROL message with commandId: SUB1G_REP_UNPLUG_POWER_LINE (2111) channel: 2 - data: 0300000000000000

  1. My doorbell adapter does not save a “Last captured video URL” under its own camera serial. The item remains blank. Oddly though the video related to the doorbell is saved under one of the other camera serials. Not sure how / where this would be visible in the log but all other items (livestream, last pic etc) are saved in the right place.

Hi @RT1080,

  1. This is not an error, it’s just a warning that I’m getting an event through the P2P interface that I haven’t implemented yet. :slight_smile:
  2. The state “Last captured video URL” isn’t used anymore by the adapter (since version 0.4.0 i handle the upgrade process deleting old states etc., before they simply remained :stuck_out_tongue: ) . The correct state is “last_livestream_video_url”. Try to look.

Hi @MaxW,

I have now made the request to be included in the central repository. :slight_smile:

4 Likes

Awesome :star_struck:
Makes updating so much easier!

3 Likes

Hi, any progress? I’m stuck at the exact place. I could at one pont see the stream in VLC, but never in HA.

I’m also a bit confused on how HA could extract the live-stram url from that response…

Maybe you could exert more pressure here: Add audio to stream by uvjustin · Pull Request #38846 · home-assistant/core · GitHub :wink:

None, unfortunately. At one point opening the m3u8 file in VLC worked, but then when I tried it again right after, it stopped (after confirming the livestream URL was “active” in iobroker). So I’m not sure where I went wrong.

Thanks, on “issue 1” noted, will ignore the log messages :slight_smile:

On the other one, that sounds logical but is not the observed behaviour. I will try to reset my connection but currently the “last live stream video url” only updates/saves a file after I manually triggered the button “start stream” from iobroker. This does not do anything on external triggers (doorbell press / motion).

Last captured video url however does show a recent video based on a trigger of the camera (person motion detection or doorbell press) - weirdly though the most recent video made by the doorbell cam is saved/shown under the serial number of one of the other regular cams.

Will try to emulate with log in debug mode to see if I can trace the issue.

I am also still struggling with the live stream, this is also partly caused by HA i think - get lots of errors around demuxing, sound aac etc. The -1 stream (eg. saved stream once livestreaming has stopped) however does consistently work. Am focusing on getting that right prior to enabling the live stream again.

In this case the state should be last_event_video_url.

you are right that is the tag, name is still “captured video url” - might be my instance though with legacy settings. Issue remains that my T8210 video is visible under one of the two T8113 cameras.

@bropat, did you say you are able to get all functions working with your iobroker module and MQTT with no delay? I was able to get some MQTT functionality using @MaxW’s guide above but I can’t get thumbnail or streaming. I did get battery temperature and capacity/charge working in a sensor card.

No I said it was possible to configure it that way, but that I don’t use HomeAssistant. I primarily use ioBroker.
But I also said that if I find the time I would write a manual on how to integrate ioBroker with HA via MQTT. Unfortunately, I haven’t had time for that until today.

1 Like

Understood. No worries. I was experimenting, but running into some snags. If you could write up a manual, that would be great.

Using Max’s guide above, I was able to set up Mosquitto through Addons as a broker, then the MQTT adapter in iobroker as the client/subscriber. This allowed me to add some sensors to my configuration yaml in HA. That’s where I get stuck. I can’t figure out how to add the thumbnail or live feed or doorbell functionality. Would all this be possible?

Also, I’m still relying on REST commands to start and stop the livestream. Can this be “converted” to MQTT?

Thumbnail and feeds are best serviced by using the webserver functionality. You could define a sensor with mqtt (instead of rest) to communicate from iobroker to ha. Have not yet figured out how to communicate from ha to iobroker but should be feasible.

I’m not sure what you mean. I have the REST commands set up via the guide above. It’s hit or miss with it working properly, which is why I wanted to look into MQTT. REST also has a delay, I think.

Hi all
I’m sorry to ask you all in this manner but I’m new to HA and the interface and way the system is built is still cumbersome for me;
I have HA Supervised setup on my RPi4 in a docker container (plus Pi-hole and PiVPN outside). I have HACS in HA installed also.

I have read the OP, and it surely leads to great repositories, but since I’m a new guy, I kinda need more assistance here…

I also have a Homebase 2, with two 2C Pro and one 2C camera from Eufycam.

  • If someone want to point me to a tutorial on how to add repositories and setup everything for me to be able to receive notifications including the linked recorded video to that notification I would gladly buy that Someone a coffe!

And if there is no such tutorial, I would also buy You a coffee if You would be so kind to write one up for this kind of setup.

Best regards from a new HA-guy in Sweden

Does anyone know how to stop below? I mean 136 occurrences?

Logger: eufy_security.camera
Source: /usr/local/lib/python3.8/site-packages/eufy_security/camera.py:58
First occurred: 12:57:53 PM (136 occurrences)
Last logged: 1:02:22 PM

Unable to process parameter "1013", value "1"
Unable to process parameter "1243", value "2"
Unable to process parameter "1414", value "0"
Unable to process parameter "1210", value "76"
Unable to process parameter "1250", value "15"

suggest to start at the top of this topic, a link is included there to a blog written by @fuzzymistborn

this will get you started on the basics.

2 Likes

Hi @MaxW, @bropat and all the ones who contribute to this great amazing work.

I’m totally new to HA , MQTT and all the stuff… but I’m trying to follow the Eufy Home Assistant MQTT Bridge way to use my just taken eufy doorbell.
I installed the MQTT bridge, configured with username/pwd of secondary not 2FA account of eufy home security, IP, username and pwd taken from HQTT reconfigure window, restarted the HA… but I fase this error… is there anyone who can tell me which error I’m doing or what I miss? I hope this was not already fixed in the previous 1000 posts…

[21:45:54] INFO: starting original stuff…

[email protected] start /app
NODE_ENV=production node --unhandled-rejections=strict index.js
info: Migrating the database… {“timestamp”:“2021-03-18T20:45:57.099Z”}
info: Stored device: Doorbell (T8222P00204313D0 - type: T8222) {“timestamp”:“2021-03-18T20:46:01.501Z”}
info: No credentials found → register new… {“timestamp”:“2021-03-18T20:46:07.414Z”}
(node:355) UnhandledPromiseRejectionWarning: HTTPError: Response code 401 (Unauthorized)
at Request. (/app/node_modules/got/dist/source/as-promise/index.js:117:42)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use node --trace-warnings ... to show where the warning was created)
(node:355) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see Command-line API | Node.js v21.6.2 Documentation). (rejection id: 1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: NODE_ENV=production node --unhandled-rejections=strict index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-03-18T20_46_13_951Z-debug.log
[cmd] /run.sh exited 1
[cont-finish.d] executing container finish scripts…
[cont-finish.d] 99-message.sh: executing…


            Oops! Something went wrong.

We are so sorry, but something went terribly wrong when
starting or running this add-on.

Be sure to check the log above, line by line, for hints.

[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.