matijse / eufy-ha-mqtt-bridge

Receive Eufy alerts and thumbnails in Home Assistant via MQTT
124 stars 25 forks source link

Migrate to eufy-security-client #105

Open skrobul opened 3 years ago

skrobul commented 3 years ago

Main driver behind this change are issues with Firebase registration - see

78 for details. Also, the eufy-node-client has been deprecated.

Aside from a different name, the main change is how the registration is handled. Eufy-security-client's new PushNotificationService class handles the registration itself if needed and emits the 'credential' event when it happens. On our side, we just listen to this event and persist credentials to disk.

In future, we may want to stop listening to raw events and use normalized messages provided by PushNotificationService instead. This would potentially allow supporting more devices.

The new library supposedly supports the 2FA as well, but I have not tried it yet.

matijse commented 3 years ago

Thanks for this contribution!

I've decided to no longer actively develop this script, because I don't have enough time and a better alternative for Home Assistant is developed already (see https://github.com/fuatakgun/eufy_security)

I am still open to contributions from others, so this PR can still be merged. But before merging I want to try it out... I can't do that right now, but will try to do it this week. However, glancing over the code, it looks good to me.

gpbenton commented 2 years ago

Would using this PR also make it possible to use the enable/disable device notifications feature in the eufy-security-client library? It would be useful to stop these when I need to.