Open rfaelens opened 6 years ago
As far as I remember that code is functionally equivalent to the code in python-eq3bt. It is just using a different API to communicate over BTLE.
I don't really know how (well) it works when one has multiple btle devices which are listened for notifications (as this library currently does), I have just had bad experiences with connecting to multiple devices at the same time (the new connections fail, this probably depends on your chipset), and also holding those connections open (allows no one else to access them).
In that jannau's the bluez is used for that, which is probably the better way to do it as done here (leaving bluez in control of all the connectivity), but someone with more knowledge on how the bluetooth is supposed to work will know better what's the correct approach.
Shortly put, I think @jannau knows better than I do how these thermostats work / what would be the best approach.
Beautiful library! Using it to push EQ3BT state to MQTT (and subsequently couple this to OpenHAB). Thank you for the development. I am currently polling the Valve state every 10 minutes, and activating my central boiler based on this. This means the system takes some time to respond to changes. I could poll more frequently, but I am worried about battery usage of the EQ3BT.
If I understand correctly, the library currently connects to the device via GATT and sends raw requests. It connects and disconnects each time. There is also the possibility to connect to the Eq3bt BLE services (NOTIFY, WRITE) and get data that way. See https://gist.github.com/jannau/2e77b4379f6a0bacc7f518080ae4aee7
Has the author ever considered this alternative method of communicating? Does the thermostat ever advertise e.g. valve state changes, or is polling definitely required? Would battery usage be improved?