New eufy-camera add-on on HomeAssistant ... any perspective for openHAB

Hello,

Reviving one of the many

“Why does eufy not provide an API”

topics. There is an interesting development on the … dare I say the H word …

This is definitely beyond my developers pay grade, but can the openhab community consider getting this sorted for our platform, too?

Wow, super nice!

I tried it quick with “doorbell pressed” as example.

Here is what I did:

  • created a new folder /opt/eufy-gateway

  • cloned the git repo GitHub - mscodemonkey/eufy-mega-security: Event-first Eufy camera gateway and Home Assistant integration · GitHub

  • created a data-directory inside /opt/eufy-gateway

  • created a options.json:
    *

    {
    
      "username": "account@domain.com",
    
      "password": "mypassword",
    
      "country": "DE",
    
      "verification_code": ""
    
    }
    
    
    
  • created a docker-compose.yml:

    • services:
        eufy-gateway:
          build:
            context: ./eufy-mega-security/eufy_event_gateway
          container_name: eufy_event_gateway
          restart: unless-stopped
          network_mode: "host"
          volumes:
            - ./data:/data
      
  • docker compose up -d --build

Maybe you have to look into your mails, copy the verification code, paste it into the options.json and restart the container.
Now have a look in the data directory for the api_token

Than I created a HTTP-Thing:

Base-URL: http://localhost:3218/api/cameras
Refresh Time: 1s
Advanced Options the Authentication to Token/Bearer and paste the Token into the password field.
Create a new channel, type Switch for “doorbell pressed”

Status-Transformation:
JSONPATH:$.cameras[?(@.serial==‘MY_DOORBELL_SERIAL_NO’)].doorbellPressed

On-Value: true
Off-Value: false

That’s it, working like a charm. Can’t wait to test more things with this Gateway.

To get all status items and the correct serial number you can use this curl command to request it from the API:

curl -H "Authorization: Bearer YOUR_API_TOKEN" -s http://localhost:3218/api/cameras | jq

An alternative solution:

cheers !!! that also worked for me, mostly.

Any idea, on how we get a livefeed?

or - as an addition - replay the the event video recordings from teh camera ?