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

autodiscovery.py: Change thermostat mode from 'heat' to 'auto' #21

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Cymaphore
Copy link

@Cymaphore Cymaphore commented Jun 20, 2024

Change to cause the Thermostat to report mode 'auto'. This is done by setting auto as the only available mode, using the state topic as mode state topic and providing a static mode state topic enforcing state auto.

This way the thermostat is properly visualised and not assumed to be always off.

[edit] Additional commit added by push: Configurable polling, schedule for specified minute of every hour

Change to cause the Thermostat to report mode 'auto'. This is done
by setting auto as the only available mode, using the state topic
as mode state topic and providing a static mode state topic
enforcing state auto.

This way the thermostat is properly visualised and not assumed to be always
off.
…ery hour

In order to get sensor readings at a more regular interval an option
for polling at a certain minute of every hour was added. The polling
strategy can be configured (option poll_schedule) and defaults to
interval.

Option poll_interval now only applies if poll_schedule=interval
Option poll_hour_minute accepts a numeric minute

For example, when configuring poll_schedule=hour_minute, poll_hour_minute=0
the thermostats will be polled every hour at minute 0.

Further options can be added to poll_schedule in future to allow other
scheduling strategies (like every two hours or at minute 0,30 or something)
or even cron-like config.
Battery, Name and Last Updated report Entity Category 'diagnostic'.

Battery and Temperature report State Class 'measurement' to make them
available to the statistics system.
Added suggested display precision to improve default display behaviour.

temperature: 1 decimal (device resolution is 0.5K)
battery: 0 decimals (not an accurate measurement, doesn't require decimals)
thermostat: 1 decimal (same as temperature reading, res 0.5K)
…eduler

Very weak connections can cause bluepy-helper to semi-crash and stop the
scheduler. This commit catches the exception and tries to close the
remaining connection (will fail gracefully in case it was completely
broken).
Sometimes thermostats with weak connection can be sucessfully polled
after a short while. This commit adds the option 'retry_rerun' for
such an instance.

In case polling retries fail at the first attempt, another attempt is
started after finishing all other sensors. The option effectively
doubles the number of retry attempts.

The option defaults to 'False' for backward compatibility.
Sorry, this file was missed from the previous commit
78912c3
Bad connections can cause bluetooth connections to stay open even when
the polling run is finished. Seemingly the valves can be forced to
timeout and disconnect by disabling BT alltogether. This commit
provides a crude and simple approach by calling rfkill bind/unbind.

Not the best way, but seems to work. Marked as experimental due to the
lack of long term results (yet).

New config option:
idle_block_ble (default false) can be used to enable bluetooth disabling
between polling cycles.
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

Successfully merging this pull request may close these issues.

None yet

1 participant