Eufy Camera Integration

Het,
You’re absolutely right.
It was an eufy registration issue.
Fixed it now

Thx!
I now have 3 entities

Binary sensor for doorbell pressed (eureka !)
camera.doorbell_last event
and binary sensor for doorbel motion detected

The eufycam 2 i is not recognized, but i saw today its already supported in new version, so cant wait :wink:

Good job everyone!

Will changing “modi” be also supported with this addon?
Any change for the future? No haste tough

Eufy Home Assistant MQTT Bridge Add-on v.0.5.0

Version 0.5.0 is out in the wild. Again, more background stuff. I think i found some caching layer issue, now it should always fetch the latest sources.
It is visible via a new log line:

[17:07:22] INFO: Build with sources downloaded on: 2021-01-02 16:55:52.492768762 +0100
3 Likes

Superb ! Thx for the quick release, now i have the eyfcam 2 support too ! Great !

Do you guys already made automations in HA based on these entities?
Willing to share em, maybe i can use some …

Anyone succeeded in casting for example the thumbnail to a google home device?
I cant find it…
Or any tips in which direction i should look?

(casting the live stream would even be better but not sure that can be done)

@MaxW , thank you for your efforts to migrate Iobroker into HASS add-on. Seems in general to work very well. However, I have a small DNS issue with rest-api from HA as it can’t reach iobroker via internal docker name, but only IP-adr. So wonder if you have experience similar problem.

i.e. ping and curl do work with hostname from HA-bash , but rest will only work with internal ip.

Obviously, I would prefer to use the docker name.

> # from ha-bash 
> config $ ping addon_f1c878cb_iobroker
> PING addon_f1c878cb_iobroker (172.30.33.14): 56 data bytes
> 64 bytes from 172.30.33.14: seq=0 ttl=64 time=0.449 ms
> 64 bytes from 172.30.33.14: seq=1 ttl=64 time=0.454 ms
> config $ curl -X GET "http://addon_f1c878cb_iobroker:8087/set/eufy-security.0.T8010N2319490648.station.guard_mode?value=1&ack=false"
> {"id":"eufy-security.0.T8010N2319490648.station.guard_mode","value":1,"val":1}config $ 
> config $ 
> 
> 2021-01-02 20:33:23 ERROR (MainThread) [homeassistant.components.rest.data] Error fetching data: http://addon_f1c878cb_iobroker:8087/getPlainValue/eufy-security.0.T8010N2319xxxxxx.station.guard_mode failed with [Errno -3] Try again
> 
> 2021-01-02 20:41:50 DEBUG (MainThread) [homeassistant.components.rest.data] Updating from http://172.30.33.14:8087/getPlainValue/eufy-security.0.T8010N2319xxxxxx.station.guard_mode
> 2021-01-02 20:41:50 DEBUG (MainThread) [homeassistant.components.rest.sensor] Data fetched from resource: 1

tried

image
?

Thx, but does not work, I may need to read a bit more about docker network. In my env homeassistant is resolved to def. gtw in docker hassio network.

~ $ curl -X GET "http://homeassistant:8087/set/eufy-security.0.T8010N2319490648.station.guard_mode?value=1&ack=false"
curl: (7) Failed to connect to homeassistant port 8087: Connection refused
~ $ dig homeassistant +short
172.30.32.1


2021-01-02 22:10:49 ERROR (MainThread) [homeassistant.components.rest.data] Error fetching data: http://homeassistant:8087/getPlainValue/eufy-security.0.T8010N231xxxxxxx.station.guard_mode failed with [Errno 111] Connect call failed ('172.30.32.1', 8087). 

...
        "Name": "hassio",
        "Id": "f64777652d7dbd1a6f5a8ff79b69c4515ccab160630cf57c75abfb35668b0228",
        "Created": "2020-04-06T00:06:20.626058225+02:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.30.32.0/23",
                    "IPRange": "172.30.33.0/24",
                    "Gateway": "172.30.32.1"
                }
            ]
        },

I can’t seem to set GuardMode on my HomeBase using the ioBroker adapter. It works fine for my powered doorbell but I get this when trying the same for HomeBase:

eufy-security.0	2021-01-02 17:48:45.339	error	(473) EufySecurity.stationP2PCommandResult(): Station: T8010P1320122A10 command CMD_SET_ARMING failed with error: ERROR_PPCS_NOT_INITIALIZED (-1)
eufy-security.0	2021-01-02 17:48:45.338	warn	(473) EufyP2PClientProtocol.handleMsg(): Result data for command not received - message: {"sequence":2,"command_type":1350,"nested_command_type":1224,"channel":255,"data":{"type":"Buffer","data":[209,
eufy-security.0	2021-01-02 17:48:30.362	warn	(473) EufyP2PClientProtocol.handleData(): data_type: DATA sequence: 1 not present!!!
eufy-security.0	2021-01-02 17:48:30.320	info	(473) state eufy-security.0.T8010P1320122A10.station.guard_mode changed: 0 (ack = false)

Any thoughts would be appreciated.

mhm, dig shows me the same result. You’re sure about the ports thing? Does curl at port :8081 work?

best guess here is to create an issue at https://github.com/bropat/ioBroker.eufy-security/issues as this seems like some issue at his side

There have just been an update to 0.1.3 for eufy-adaptor , at least that resolved my problem with set guard mode via iobroker.

yeah, even though I am using 8881. but curl http://homeassistant:8881 to actually redirect me to iobroker. Maybe I am missing an external port mapping in docker for 8087 (iobroker API)

mhm, weird.

But, as stated in the documentation:

Names/aliases are used for communication inside Home Assistant. The name is generated using the following format: {REPO}_{SLUG} , e.g., local_xy or 3283fh_myaddon . In this example, {SLUG} is defined in an add-on’s config.json file. You can use this name as the DNS name also, but you need replace any _ with - to have a valid hostname. If an add-on is installed locally, {REPO} will be local . If the add-on is installed from a Github repository, {REPO} is a hashed identifier generated from the GitHub repository’s URL (ex: https://github.com/xy/my_hassio_addons )

The container name of iobroker should be stable at least :wink:

but that is actually my initial issue, seems I can resolve iobroker container name addon_f1c878cb_iobroker from bash , but not from within HA/Rest component. But maybe if I have an external NAT port 8087->8087 for iobroker will resolve (like the 8081/8881). My concern is if RPI4 will be rebooted iobroker might get another docker ip-adr.

ubuntu@ubuntu:~$ sudo docker ps | egrep "CONTAIN|iobro"
CONTAINER ID        IMAGE                                                   COMMAND                  CREATED             STATUS                 PORTS                                                                      NAMES
8d08eafa2134        f1c878cb/aarch64-addon-iobroker:0.4.0                   "/bin/bash -c /opt/s…"   8 hours ago         Up 8 hours (healthy)   0.0.0.0:8881->8081/tcp                                                     addon_f1c878cb_iobroker

oh, you are not running this on hass.io! Well, then i guess setting some external port (i prepared 5 additionally for a usecase like this) should be a working idea.

I believe I am running hass.io on RPI4, just with ubuntu host o/s - And have installed your plug-on via add-on - But to be honest I am not aware about how these internal HA add-ons are communicating, I assumed they used standard Docker network.

-----                       ENV                        -----
-----               SETGID:    1000                    -----
-----               SETUID:    1000                    -----
------------------------------------------------------------
 
------------------------------------------------------------
-----         Step 1 of 5: Preparing container         -----
------------------------------------------------------------
 
Registering maintenance script as command.
Done.
 
------------------------------------------------------------
-----   Step 2 of 5: Detecting ioBroker installation   -----
------------------------------------------------------------
 
Existing installation of ioBroker detected in /opt/iobroker.
 
------------------------------------------------------------
-----   Step 3 of 5: Checking ioBroker installation    -----
------------------------------------------------------------
 
(Re)Setting folder permissions (This might take a while! Please be patient!)...
Done.
 
Fixing "sudo-bug" by replacing sudo in iobroker with gosu...
Done.
 
------------------------------------------------------------
-----      Step 4 of 5: Applying special settings      -----
------------------------------------------------------------
 
Some adapters have special requirements/ settings which can be activated by the use of environment variables.
For more information take a look at readme.md on Github!
 
------------------------------------------------------------
-----          Step 5 of 5: ioBroker startup           -----
------------------------------------------------------------
 
Starting ioBroker...
 
================================== > LOG REDIRECT system.adapter.admin.0 => true [starting]
host.f1c878cb-iobroker check instance "system.adapter.admin.0" for host "f1c878cb-iobroker"
host.f1c878cb-iobroker check instance "system.adapter.discovery.0" for host "f1c878cb-iobroker"
host.f1c878cb-iobroker check instance "system.adapter.info.0" for host "f1c878cb-iobroker"
host.f1c878cb-iobroker check instance "system.adapter.mqtt.0" for host "f1c878cb-iobroker"
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
Send diag info: {"uuid":"7abd3182-d399-f7bd-da19-9550d8babede","language":"en","country":"Denmark","hosts":[{"version":"3.1.6","platform":"Javascript/Node.js","type":"linux"}],"node":"v12.20.0","arch":"arm64","adapters":{"admin":{"version":"4.1.11","platform":"Javascript/Node.js"},"discovery":{"version":"2.4.1","platform":"Javascript/Node.js"},"info":{"version":"1.7.10","platform":"Javascript/Node.js"},"mqtt":{"version":"2.1.14","platform":"Javascript/Node.js"},"eufy-security":{"version":"0.1.2","platform":"Javascript/Node.js"}},"statesType":"file","objectsType":"file","model":"unknown","cpus":4,"mem":3975602176,"ostype":"Linux","city":"Bjæverskov"}
hash unchanged, use cached sources
Send diag info: {"uuid":"7abd3182-d399-f7bd-da19-9550d8babede","language":"en","country":"Denmark","hosts":[{"version":"3.1.6","platform":"Javascript/Node.js","type":"linux"}],"node":"v12.20.0","arch":"arm64","adapters":{"admin":{"version":"4.1.11","platform":"Javascript/Node.js"},"discovery":{"version":"2.4.1","platform":"Javascript/Node.js"},"info":{"version":"1.7.10","platform":"Javascript/Node.js"},"mqtt":{"version":"2.1.14","platform":"Javascript/Node.js"},"eufy-security":{"version":"0.1.2","platform":"Javascript/Node.js"}},"statesType":"file","objectsType":"file","model":"unknown","cpus":4,"mem":3975602176,"ostype":"Linux","city":"Bjæverskov"}
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
Send diag info: {"uuid":"7abd3182-d399-f7bd-da19-9550d8babede","language":"en","country":"Denmark","hosts":[{"version":"3.1.6","platform":"Javascript/Node.js","type":"linux"}],"node":"v12.20.0","arch":"arm64","adapters":{"admin":{"version":"4.1.11","platform":"Javascript/Node.js"},"discovery":{"version":"2.4.1","platform":"Javascript/Node.js"},"info":{"version":"1.7.10","platform":"Javascript/Node.js"},"mqtt":{"version":"2.1.14","platform":"Javascript/Node.js"},"eufy-security":{"version":"0.1.2","platform":"Javascript/Node.js"}},"statesType":"file","objectsType":"file","model":"unknown","cpus":4,"mem":3975602176,"ostype":"Linux","city":"Bjæverskov"}
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
Send diag info: {"uuid":"7abd3182-d399-f7bd-da19-9550d8babede","language":"en","country":"Denmark","hosts":[{"version":"3.1.6","platform":"Javascript/Node.js","type":"linux"}],"node":"v12.20.0","arch":"arm64","adapters":{"admin":{"version":"4.1.11","platform":"Javascript/Node.js"},"discovery":{"version":"2.4.1","platform":"Javascript/Node.js"},"info":{"version":"1.7.10","platform":"Javascript/Node.js"},"mqtt":{"version":"2.1.14","platform":"Javascript/Node.js"},"eufy-security":{"version":"0.1.2","platform":"Javascript/Node.js"},"simple-api":{"version":"2.4.8","platform":"Javascript/Node.js"}},"statesType":"file","objectsType":"file","model":"unknown","cpus":4,"mem":3975602176,"ostype":"Linux","city":"Bjæverskov"}
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
Send diag info: {"uuid":"7abd3182-d399-f7bd-da19-9550d8babede","language":"en","country":"Denmark","hosts":[{"version":"3.1.6","platform":"Javascript/Node.js","type":"linux"}],"node":"v12.20.0","arch":"arm64","adapters":{"admin":{"version":"4.1.11","platform":"Javascript/Node.js"},"discovery":{"version":"2.4.1","platform":"Javascript/Node.js"},"info":{"version":"1.7.10","platform":"Javascript/Node.js"},"mqtt":{"version":"2.1.14","platform":"Javascript/Node.js"},"eufy-security":{"version":"0.1.2","platform":"Javascript/Node.js"},"simple-api":{"version":"2.4.8","platform":"Javascript/Node.js"}},"statesType":"file","objectsType":"file","model":"unknown","cpus":4,"mem":3975602176,"ostype":"Linux","city":"Bjæverskov"}
hash unchanged, use cached sources
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
Send diag info: {"uuid":"7abd3182-d399-f7bd-da19-9550d8babede","language":"en","country":"Denmark","hosts":[{"version":"3.1.6","platform":"Javascript/Node.js","type":"linux"}],"node":"v12.20.0","arch":"arm64","adapters":{"admin":{"version":"4.1.11","platform":"Javascript/Node.js"},"discovery":{"version":"2.4.1","platform":"Javascript/Node.js"},"info":{"version":"1.7.10","platform":"Javascript/Node.js"},"mqtt":{"version":"2.1.14","platform":"Javascript/Node.js"},"eufy-security":{"version":"0.1.2","platform":"Javascript/Node.js"},"simple-api":{"version":"2.4.8","platform":"Javascript/Node.js"},"javascript":{"version":"4.8.4","platform":"Javascript/Node.js"}},"statesType":"file","objectsType":"file","model":"unknown","cpus":4,"mem":3975602176,"ostype":"Linux","city":"Bjæverskov"}
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
Send diag info: {"uuid":"7abd3182-d399-f7bd-da19-9550d8babede","language":"en","country":"Denmark","hosts":[{"version":"3.1.6","platform":"Javascript/Node.js","type":"linux"}],"node":"v12.20.0","arch":"arm64","adapters":{"admin":{"version":"4.1.11","platform":"Javascript/Node.js"},"discovery":{"version":"2.4.1","platform":"Javascript/Node.js"},"info":{"version":"1.7.10","platform":"Javascript/Node.js"},"mqtt":{"version":"2.1.14","platform":"Javascript/Node.js"},"eufy-security":{"version":"0.1.2","platform":"Javascript/Node.js"},"simple-api":{"version":"2.4.8","platform":"Javascript/Node.js"},"javascript":{"version":"4.8.4","platform":"Javascript/Node.js"}},"statesType":"file","objectsType":"file","model":"unknown","cpus":4,"mem":3975602176,"ostype":"Linux","city":"Bjæverskov"}
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
Send diag info: {"uuid":"7abd3182-d399-f7bd-da19-9550d8babede","language":"en","country":"Denmark","hosts":[{"version":"3.1.6","platform":"Javascript/Node.js","type":"linux"}],"node":"v12.20.0","arch":"arm64","adapters":{"admin":{"version":"4.1.11","platform":"Javascript/Node.js"},"discovery":{"version":"2.4.1","platform":"Javascript/Node.js"},"info":{"version":"1.7.10","platform":"Javascript/Node.js"},"mqtt":{"version":"2.1.14","platform":"Javascript/Node.js"},"eufy-security":{"version":"0.1.3","platform":"Javascript/Node.js"},"simple-api":{"version":"2.4.8","platform":"Javascript/Node.js"},"javascript":{"version":"4.8.4","platform":"Javascript/Node.js"}},"statesType":"file","objectsType":"file","model":"unknown","cpus":4,"mem":3975602176,"ostype":"Linux","city":"Bjæverskov"}
hash unchanged, use cached sources
Send diag info: {"uuid":"7abd3182-d399-f7bd-da19-9550d8babede","language":"en","country":"Denmark","hosts":[{"version":"3.1.6","platform":"Javascript/Node.js","type":"linux"}],"node":"v12.20.0","arch":"arm64","adapters":{"admin":{"version":"4.1.11","platform":"Javascript/Node.js"},"discovery":{"version":"2.4.1","platform":"Javascript/Node.js"},"info":{"version":"1.7.10","platform":"Javascript/Node.js"},"mqtt":{"version":"2.1.14","platform":"Javascript/Node.js"},"eufy-security":{"version":"0.1.3","platform":"Javascript/Node.js"},"simple-api":{"version":"2.4.8","platform":"Javascript/Node.js"},"javascript":{"version":"4.8.4","platform":"Javascript/Node.js"}},"statesType":"file","objectsType":"file","model":"unknown","cpus":4,"mem":3975602176,"ostype":"Linux","city":"Bjæverskov"}
hash unchanged, use cached sources
Send diag info: {"uuid":"7abd3182-d399-f7bd-da19-9550d8babede","language":"en","country":"Denmark","hosts":[{"version":"3.1.6","platform":"Javascript/Node.js","type":"linux"}],"node":"v12.20.0","arch":"arm64","adapters":{"admin":{"version":"4.1.11","platform":"Javascript/Node.js"},"discovery":{"version":"2.4.1","platform":"Javascript/Node.js"},"info":{"version":"1.7.10","platform":"Javascript/Node.js"},"mqtt":{"version":"2.1.14","platform":"Javascript/Node.js"},"eufy-security":{"version":"0.1.3","platform":"Javascript/Node.js"},"simple-api":{"version":"2.4.8","platform":"Javascript/Node.js"},"javascript":{"version":"4.8.4","platform":"Javascript/Node.js"}},"statesType":"file","objectsType":"file","model":"unknown","cpus":4,"mem":3975602176,"ostype":"Linux","city":"Bjæverskov"}
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
Send diag info: {"uuid":"7abd3182-d399-f7bd-da19-9550d8babede","language":"en","country":"Denmark","hosts":[{"version":"3.1.6","platform":"Javascript/Node.js","type":"linux"}],"node":"v12.20.0","arch":"arm64","adapters":{"admin":{"version":"4.1.11","platform":"Javascript/Node.js"},"discovery":{"version":"2.4.1","platform":"Javascript/Node.js"},"info":{"version":"1.7.10","platform":"Javascript/Node.js"},"mqtt":{"version":"2.1.14","platform":"Javascript/Node.js"},"eufy-security":{"version":"0.1.3","platform":"Javascript/Node.js"},"simple-api":{"version":"2.4.8","platform":"Javascript/Node.js"},"javascript":{"version":"4.8.4","platform":"Javascript/Node.js"}},"statesType":"file","objectsType":"file","model":"unknown","cpus":4,"mem":3975602176,"ostype":"Linux","city":"Bjæverskov"}
hash unchanged, use cached sources
Send diag info: {"uuid":"7abd3182-d399-f7bd-da19-9550d8babede","language":"en","country":"Denmark","hosts":[{"version":"3.1.6","platform":"Javascript/Node.js","type":"linux"}],"node":"v12.20.0","arch":"arm64","adapters":{"admin":{"version":"4.1.11","platform":"Javascript/Node.js"},"discovery":{"version":"2.4.1","platform":"Javascript/Node.js"},"info":{"version":"1.7.10","platform":"Javascript/Node.js"},"mqtt":{"version":"2.1.14","platform":"Javascript/Node.js"},"eufy-security":{"version":"0.1.3","platform":"Javascript/Node.js"},"simple-api":{"version":"2.4.8","platform":"Javascript/Node.js"},"javascript":{"version":"4.8.4","platform":"Javascript/Node.js"}},"statesType":"file","objectsType":"file","model":"unknown","cpus":4,"mem":3975602176,"ostype":"Linux","city":"Bjæverskov"}
hash unchanged, use cached sources
================================== > LOG REDIRECT system.adapter.admin.0 => false [system.adapter.admin.0.logging]
 
REFRESH

okay, found the host file with dns entries and these works from within HA, so assume these will be persistent.

72.30.33.14 f1c878cb-iobroker f1c878cb-iobroker.local.hass.io

2021-01-03 01:02:21 DEBUG (MainThread) [homeassistant.components.rest.data] Updating from http://f1c878cb-iobroker:8087/getPlainValue/eufy-security.0.T8010N2319xxxxxxx.station.guard_mode
2021-01-03 01:02:21 DEBUG (MainThread) [homeassistant.components.rest.sensor] Data fetched from resource: 3

I have eufy added to IOBroker and that part is up and running. For the Eufy Home Assistant MQTT Bridge, where do I get the mqtt username and password? (I have the url)

Just create a new user with admin rights

Ah thanks, I have done that but I keep getting a parse error… I’ve tried using http:// before my url 192… as well.

parse error: Expected string key before ':' at line 1, column 4
[00:07:19] ERROR: Unknown HTTP error occured
 System:   (armv7 / raspberrypi4)
 Home Assistant Core: 2020.12.2
 Home Assistant Supervisor: 2020.12.7


My config is set up like:

eufy:
  username: username
  password: password
mqtt:
  url: '192.168.x.x:8081/'
  username: username
  password: password
log_level: info