Releases: plugwise/python-plugwise
Releases · plugwise/python-plugwise
Energy support and bugfixes
- Stick: Add new properties
energy_consumption_todaycounter andenergy_consumption_today_last_resettimestamp. These properties
can be used to properly measure the used energy. Very useful for the 'Energy' capabilities introduced in Home Assistant 2021.8. - Stick: Synchronize clock of all plugwise devices once a day
- Stick: Reduced local clock drift from 30 to 5 seconds
- Stick: Optimized retrieval and handling of energy history
- Smile: add the required sensor attributes for Energy support
- Smile: add last_reset timestamps for interval-sensors and cumulative sensors
- Smile: fix the unit_of_measurement of electrical-cumulative-sensors (Wh --> kWh)
Fix new and remaining pylint warnings
Merge pull request #91 from plugwise/fix_act_dev_pr_init Fix new/remaining pylint warnings
Code improvements
- Smile: improve use of protection for functions and parameter
- Fix pylint warnings and errors
Move functionality into backend, rearrange data in output
Rearrange data: the outputs of get_all_devices() and get_device_data() are combined into self.gw_devices. Binary_sensors, sensors and switches are included with all their attributes, in lists.
Two classes have been added (entities.py), one for master_thermostats and one for binary_sensors, these classes now handle the processing of data previously done in plugwise-beta (climate.py and binary_sensor.py).
Stick: bugfix, general: quality improvements.
Stick: quality improvements and fixing plugwise-beta bug #168
Smile: many quality-related improvements, no changes in functionality
Add lock-state switches
- Support for getting and setting the lock-state of Plugs-, Circles-, Stealth-switches. A set lock-state prevents a switch from being turned off.
- There is no lock_state available for the following special Plugwise classes:
central heating pumpandvalue actuator.
Smile optimize
- Functions not called by the plugwise(-beta) code have been moved to helper.py in which they are part of the subclass SmileHelper
- All for-loops are now executed only once, the results are stored in self-parameters.
- Added fw, model and vendor information into the output of get_device_data(), for future use in the HA Core Plugwise(-beta) Integration
- Split off HEATER_CENTRAL_MEASUREMENTS from DEVICE_MEASUREMENTS so they can be blocked when there is no Auxiliary device present
- Collect only the data from the Smile that is needed: full_update_device() for initialization, update-device() for updating of live data
- Adapt test_smile.py to the new code, increase test-coverage further
Add DHW Comfort Mode switch
Implements #63
API change for stick
- Improvement: Debounce relay state
- Improvement: Prioritize request so requests like switching a relay get send out before power measurement requests.
- Improvement: Dynamically change the refresh interval based on the actual discovered nodes with power measurement capabilities
- Added: New property attributes for USB-stick.
The old methods are still available but will give a deprecate warning- Stick
devices(dict) - All discovered and supported plugwise devices with the MAC address as their keyjoined_nodes(integer) - Total number of registered nodes at Plugwise Circle+mac(string) - The MAC address of the USB-Sticknetwork_state(boolean) - The state (on-line/off-line) of the Plugwise network.network_id(integer) - The ID of the Plugwise network.port(string) - The port connection string
- All plugwise devices
available(boolean) - The current network availability state of the devicebattery_powered(boolean) - Indicates if device is battery poweredfeatures(tuple) - List of supported attribute IDsfirmware_version(string) - Firmware version device is runninghardware_model(string) - Hardware model namehardware_version(string) - Hardware version of devicelast_update(datetime) - Date/time stamp of last received update from devicemac(string) - MAC address of devicemeasures_power(boolean) - Indicates if device supports power measurementname(string) - Name of device based om hardware model and MAC addressping(integer) - Network roundtrip time in millisecondsrssi_in(integer) - Inbound RSSI level in DBmrssi_out(integer) - Outbound RSSI level based on the received inbound RSSI level of the neighbor node in DBm
- Scan devices
motion(boolean) - Current detection state of motion.
- Sense devices
humidity(integer) - Last reported humidity value.temperature(integer) - Last reported temperature value.
- Circle/Circle+/Stealth devices
current_power_usage(float) - Current power usage (Watts) during the last secondcurrent_power_usage_8_sec(float) - Current power usage (Watts) during the last 8 secondspower_consumption_current_hour(float) - Total power consumption (kWh) this running hourpower_consumption_previous_hour(float) - Total power consumption (kWh) during the previous hourpower_consumption_today(float) - Total power consumption (kWh) of todaypower_consumption_yesterday(float) - Total power consumption (kWh) during yesterdaypower_production_current_hour(float) - Total power production (kWh) this hourrelay_state(boolean) - State of the output power relay. Setting this property will operate the relay
- Switch devices
switch(boolean) - Last reported state of switch
- Stick
Code quality improvements for stick
- Bug-fix: Power history was not reported (0 value) during last week of the month
- Improvement: Validate message checksums
- Improvement: Do a single ping request to validate if node is on-line
- Improvement: Guard Scan sensitivity setting to medium
- Improvement: Move general module code of messages, nodes, connection to the init.py files.
- Improvement: Do proper timeout handling while sequence counter resets (once every 65532 messages)
- Improvement: Better code separation. All logic is in their designated files:
- Connection (connection/*.py)
- Data parsing (parser.py)
- Data encoding/decoding of message (messages/*.py)
- Message handling - Initialization & transportation (controller.py)
- Message processing - Do the required stuff (stick.py & nodes/*.py)
- Improvement: Resolves all flake8 comments