dib0 / elro_connects

The ELRO Connects uses a propriety protocol on the local network over UDP. This is the reversed engineered python implementation of the protocol.
MIT License
16 stars 7 forks source link

Allow changes to the devices/hub through MQTT #20

Closed Skons closed 2 years ago

Skons commented 2 years ago

This update allows for changes to the hub or devices through MQTT, to facilitate that a few changes had to be made. There are also other improvements. These are all the changes in this PR

One thing that i could not do was to write a proper test for the handle_device_messages, because I do not know how to do that properly.

I believe the following issues are addresses (maybe partially)

12

18

7

depuits commented 2 years ago

This looks amazing. The only thing we wouldn't be able to do which is possible in the app is removing/replacing a device.

When enabling a test alarm can it then also be disabled through the hub like a normal alarm?

Skons commented 2 years ago

Replacing and/or removing can be done (i think), but i did not want to make this change to big. I was planning on implementing after this PR was approved.

I do not know about a real alarm, but as far as i know when you send a test alarm to your device with the app, you cannot silence the device. You can only silence the hub. The implementation of this PR is equal to that.

I have seen that the state of a device can be changed, but i did not take a deep dive into that, also because i could not really find that in the app. The only state that is set by the app, is the test alarm state.

hildensia commented 2 years ago

Sorry. I think that solution is fine.