Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

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

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

Commits on Jun 20, 2024

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

    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.
    Cymaphore committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    97ccfff View commit details
    Browse the repository at this point in the history
  2. devices.py: Configurable polling, schedule for specified minute of ev…

    …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.
    Cymaphore committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    0a6f4ae View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2024

  1. autodiscovery.py: Added state_class and entity_category

    Battery, Name and Last Updated report Entity Category 'diagnostic'.
    
    Battery and Temperature report State Class 'measurement' to make them
    available to the statistics system.
    Cymaphore committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    4970ada View commit details
    Browse the repository at this point in the history
  2. autodiscovery.py: Added suggested_display_precision

    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)
    Cymaphore committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    46f16f7 View commit details
    Browse the repository at this point in the history
  3. bugfix: devices.py: Unhandled exception on weak connections kills sch…

    …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).
    Cymaphore committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    92c2f6c View commit details
    Browse the repository at this point in the history
  4. devices.py: Option to retry polling for thermostats with weak connection

    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.
    Cymaphore committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    78912c3 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2024

  1. config.py: Adding Option 'retry_rerun'

    Sorry, this file was missed from the previous commit
    78912c3
    Cymaphore committed Jun 22, 2024
    Configuration menu
    Copy the full SHA
    8db8066 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. devices.py: Disable Bluetooth when idle (avoid battery draining)

    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.
    Cymaphore committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    45e3bfa View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2024

  1. mqtt.py: Option to retain device data

    Adding the configuration option 'device_data_retain' to allow published
    device data messages to retain in the broker similar to autodiscovery
    messages.
    
    Defaults to false for backward compatibility.
    Cymaphore committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    67d3a60 View commit details
    Browse the repository at this point in the history