Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Automatic continuous polling of Thermostat status #55

Open
elggem opened this issue Oct 1, 2020 · 3 comments
Open

Idea: Automatic continuous polling of Thermostat status #55

elggem opened this issue Oct 1, 2020 · 3 comments

Comments

@elggem
Copy link

elggem commented Oct 1, 2020

Hi, first of all thanks for all of your work and this code, it's working great over here! 🙏

If I am not mistaken in the current version the thermostat status is only being polled and the MQTT topic updated after a command is issued. I would like to add an automatic polling feature (every minute or every 30 seconds) that updates the MQTT topic. This would allow me to monitor certain things like valve state over time and also allow feedback if the valve is controlled in the automatic mode or manually via the dial.

I can do some work and get familiar with the code, but I wanted to ask the maintainers first if there is any obvious reason why this isn't currently implemented or might not work as I think it will. Any other pointers also highly appreciated.

All the best from Europe!

@elggem elggem changed the title Idea: Automatic continuous polling of Thermostat status and update of MQTT topic even if no command is issued. Idea: Automatic continuous polling of Thermostat status Oct 1, 2020
@softypit
Copy link
Owner

softypit commented Oct 3, 2020

Hi,
there are a couple of problems with continually polling the TRVs.

Firstly there is no 'poll' command to get a status response from the valve without changing some setting. So in order to poll the valve we would need to repeatedly set 'auto' or 'manual', 'lock' or 'unlock' or the desired temperature. In the past I tried using 'unboost' as a poll command but there seems to be a bug (or perhaps some un-documented feature) in the TRV software when using unboost when the valve is not already in boost mode. The valve goes into a strange boost state without any change to the LCD display.

The second problem is that continually polling the valve via bluetooth will likely affect the battery life. Each transfer requires the BLE radio to power up fully to exchange data whereas normally it will be in a low-power idle state.

My recommendation for repeatedly polling a valve would be to publish a command to set a value via MQTT each time you want to receive a status update. For example publishing a 'manual' mode command will repeatedly set the valve to manual mode and cause valve status to be published in response.

Regards.

@pmknowles
Copy link

I send an MQTT 'lock' command every 5 minutes to get the status. As the temperaure generally a is slow changing variable I suspect I could poll less frequently and not really lose functionality - I'm really turning radiators off in unoccupied rooms. Once the temperature is set the TRV does the job as it's supposed to.

@krmichal
Copy link

Don't those TRVs make some broadcast with status? Like some Mijia BLE Thermometers, AFAIK? Then you would not have to actively poll the device, just wait for them to send periodical information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants