oyooyo / nixfilter-rtble

Filter for controlling the target temperature of a eqiva eQ-3 Bluetooth Smart Radiator Thermostat
7 stars 0 forks source link

Connect to multiple thermostats from one host device #1

Open niklasfink opened 5 years ago

niklasfink commented 5 years ago

Hey oyooyo,

nice little plugin you wrote here. I'm already successfully using it for one thermostat which is now integrated in HomeAssistant. In order to add a couple more thermostats, I want to run the filter multiple times on one device (= raspberry).

If I have one active filter connected to MQTT, I cannot use another one. Neither a different thermostat, nor the same thermostat responds to set commands. It's like the one filter is blocking the bluetooth module.

Is that an expected behaviour at the moment? If so, do you have capacities to add parallelization functionality or maybe point me to the right direction so I might be able to extend that?

Thanks!

oyooyo commented 5 years ago

No, that is not expected behaviour. But instantly I have no idea what might be causing that problem. And so far I only own one thermostat, so I cannot easily test and debug a two thermostat setup.

If you own two thermostats, you might be able to get a hint at what is causing the problem by running two nixfilter-rtble instances in two separate command line shells, turning debug output on and looking in what way the debug output of the first/working instance differs from the second/non-working instance. To turn debug output on, simply prepend the nixfilter-rtble-temperature command with DEBUG=*, for example:

DEBUG=* nixfilter-rtble-temperature -a 00:11:22:33:44:55 -sut 300
niklasfink commented 5 years ago

Thanks for your quick response. I got two log files, one with the raspberry just connecting to one thermostat (and therefore working) and one with the raspberry already having an active filter and then trying to set the temperature on another one (but not working).

Could you take a look at them, please? It's not something I could quickly recognize problems at and debug it.

debug_broken.log debug_working.log

If you need more information, please let me know.

oyooyo commented 5 years ago

Thanks for the logs, Niklas. Unfortunately, the logs didn't really help me that much as well. But at first sight it seems to me as if the non-working device fails after the connection was established, during the process of service and characteristics discovery.

I need to spend some time investigating this issue. But I cannot tell yet when I'll be finding the time, so please be patient, it may a few weeks.

But thanks a lot already for pointing this out, this is quite an important issue I think.