plugwise / python-plugwise Goto Github PK
View Code? Open in Web Editor NEWPlugwise python module for Smiles (Anna, Adam, P1) and Stretch
Home Page: https://pypi.org/project/plugwise
License: MIT License
Plugwise python module for Smiles (Anna, Adam, P1) and Stretch
Home Page: https://pypi.org/project/plugwise
License: MIT License
Is your feature request related to a problem? Please describe.
I really like plugwise thermostat I have, but I really dislike the web interface it has, so when I'm always a bit frustrated when I have to use it to change the temperature value of a preset I have.
Describe the solution you'd like
I would really like to be able to update presets using this library (and hopefully in the future also from home assistant).
Describe alternatives you've considered
I could probably also simply stop using the presets all together, but that would make operating the Anna I have a bit more complicated, and would require quite some changes to my home assistant configuration (although that is probably less work then adding the updating of presets to the library 🙂)
Home Assistant (please complete the following information):
Plugwise product and setup (please complete the following information):
Additional context
I just want to say that I really appreciate the extensive library that you guys make as a company. Really awesome to see!
As per / following plugwise/plugwise-beta#540
Still contains links to Python-Plugwise as a project + some user data that isn't available anymore, see also #273
I'm trying to setup extra repeaters because the Adam is in the basement and my Tom's are on the first floor and the zigbee signal doesn't reach there.
I'm using custom flashed CC2531 and CC2530+CC2591. At this moment I'm checking the core/modules xml document and comparing them with a previous version before I tried to connect the CCxxxx device to see if it connected.
Would be nice if I can query the Adam to see what zigbee device's are connected and what their neighbors are.
The CC stick looks like this in the xml:
<module id="fef68e8b0ace4e369ba7c76a00bbc8f9">
<vendor_name/>
<vendor_model/>
<hardware_version/>
<firmware_version/>
<upgrade/>
<created_date>2022-03-02T15:31:22.616+01:00</created_date>
<modified_date>2022-03-02T15:31:22.666+01:00</modified_date>
<deleted_date/>
<services/>
<protocols>
<zig_bee_node id="d2365aa43b0a4e8b9e3a60364d983403">
<mac_address>00124B001938CDFB</mac_address>
<type>router</type>
<reachable>true</reachable>
<zig_bee_coordinator id="7e8af5e986214a429011774db820dae7"/>
<neighbors>
<zig_bee_node id="0f3ea7a23026449da097c29a35d90c19"/>
<zig_bee_node id="8690706ba92f4a0e9af0b2cbf3800448"/>
</neighbors>
</zig_bee_node>
</protocols>
</module>
If this is out of scope I will try to make myself something :)
Describe the improvement
Linter checks bring to light more complexity that we should solve. They are marked as TODO
in #24 and onwards and disabled for linting using # noqa: 901
! Some have a complexity of over 40.
While it's not a necessity it would be best to at least have a look at why their complexity is marked high. For reference see https://www.flake8rules.com/rules/C901.html
From findings during #24
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
Warning
These dependencies are deprecated:
Datasource | Name | Replacement PR? |
---|---|---|
npm | package.json |
This repository currently has no open or pending branches.
.github/workflows/codeql-analysis.yml
actions/checkout v4
github/codeql-action v3
github/codeql-action v3
github/codeql-action v3
.github/workflows/merge.yml
actions/checkout v4
actions/setup-python v5
.github/workflows/verify.yml
actions/checkout v4
actions/setup-python v5
actions/cache v4
actions/cache v4
actions/checkout v4
actions/setup-python v5
actions/cache v4
actions/checkout v4
actions/setup-python v5
actions/cache v4
actions/cache v4
actions/checkout v4
actions/setup-python v5
actions/cache v4
actions/checkout v4
actions/setup-python v5
actions/cache v4
actions/upload-artifact v4
actions/checkout v4
actions/setup-python v5
actions/cache v4
actions/checkout v4
actions/checkout v4
actions/checkout v4
actions/setup-python v5
actions/cache v4
actions/download-artifact v4
codecov/codecov-action v4
actions/checkout v4
actions/setup-python v5
actions/cache v4
actions/checkout v4
actions/setup-python v5
actions/cache v4
package.json
package.json ^2.0.0
prettier ^3.0.3
pyproject.toml
setuptools ~=71.0
wheel ~=0.43.0
requirements_commit.txt
pylint_strict_informational ==0.1
requirements_test.txt
radon ==6.0.1
nodeenv ==1.9.1
.pre-commit-config.yaml
astral-sh/ruff-pre-commit v0.5.4
pre-commit/pre-commit-hooks v4.6.0
asottile/pyupgrade v3.16.0
codespell-project/codespell v2.3.0
PyCQA/bandit 1.7.9
adrienverge/yamllint v1.35.1
cdce8p/python-typing-update v0.6.0
pre-commit/mirrors-prettier v4.0.0-alpha.8
igorshubovych/markdownlint-cli v0.41.0
This is what HA Core mypy-checking shows when PR-ing plugwise v0.25.4
No errors.
Core latest dev
Home Assistant Container
Home Assistant Core
Smile: Adam (including Lisa, Tom, Floor)
Not applicable
No response
No response
No response
I get the following error in the log (both in the Sep (2022.9.4) and Nov (2022.11.1) version of HA):
Logger: homeassistant.components.select
Source: components/plugwise/select.py:113
Integration: Selecteer (documentation, issues)
First occurred: 10:00:35 (2 occurrences)
Last logged: 10:00:35
Error adding entities for domain select with platform plugwise
Error while setting up plugwise platform for select
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 692, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 788, in add_to_platform_finish
await self.async_added_to_hass()
File "/usr/src/homeassistant/homeassistant/components/plugwise/entity.py", line 81, in async_added_to_hass
self._handle_coordinator_update()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 348, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 97, in state
if self.current_option is None or self.current_option not in self.options:
File "/usr/src/homeassistant/homeassistant/components/plugwise/select.py", line 113, in current_option
return self.device[self.entity_description.current_option_key]
KeyError: 'regulation_mode'
In addition, I have the feeling that the sync of information is not "near perfect" anymore. For example, if I set a new mode (e.g. no_frost, away, ...) from HA then the temperature is not always properly synchronized back to HA. In my example, I first set the thermostat in HA to no_frost (configured as 10C in Plugwise) and afterwards to away (configured as 17.5C in Plugwise). In the Plugwise app this both shows fine, but the thermostat eventually shows away / 10C. Restarting HA fixes the desync temporarily. Obviously there might be a relation hence I propose to first fix the error in the log :).
No errors and a good sync between Plugwise and HA.
2022.11.1
Home Assistant Container
Home Assistant Core
Smile: Adam (including Lisa, Tom, Floor)
3.7.0
2022-11-06 10:14:54.308 ERROR (MainThread) [homeassistant.components.select] Error adding entities for domain select with platform plugwise
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 692, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 788, in add_to_platform_finish
await self.async_added_to_hass()
File "/usr/src/homeassistant/homeassistant/components/plugwise/entity.py", line 81, in async_added_to_hass
self._handle_coordinator_update()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 348, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/select/init.py", line 97, in state
if self.current_option is None or self.current_option not in self.options:
File "/usr/src/homeassistant/homeassistant/components/plugwise/select.py", line 113, in current_option
return self.device[self.entity_description.current_option_key]
KeyError: 'regulation_mode'
2022-11-06 10:14:54.312 ERROR (MainThread) [homeassistant.components.select] Error while setting up plugwise platform for select
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 289, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 692, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 788, in add_to_platform_finish
await self.async_added_to_hass()
File "/usr/src/homeassistant/homeassistant/components/plugwise/entity.py", line 81, in async_added_to_hass
self._handle_coordinator_update()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 348, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/select/init.py", line 97, in state
if self.current_option is None or self.current_option not in self.options:
File "/usr/src/homeassistant/homeassistant/components/plugwise/select.py", line 113, in current_option
return self.device[self.entity_description.current_option_key]
KeyError: 'regulation_mode'
In case additional information is required, please let me know.
Running Plugwise with an Adam, 4x Smile and 1x Anna. They are connected to a Intergas Kombi Kompakt HRE 36/30A
CW5.
Describe the improvement
Todo:
Verify _LOGGER statements validity:
f"Some {var1} into {var2}"
from "Some %s into %s."
From findings during #24
A python error occurs in getting thermostat presets when using Plugwise beta component.
Edit: This seems to be only happening when the "Opentherm thermostat" (main thermostat) is not placed in a zone.
Logger: homeassistant.config_entries
Source: custom_components/plugwise/gateway.py:144
Integration: Plugwise Beta (documentation)
First occurred: 12:09:23 (1 occurrences)
Last logged: 12:09:23
Error setting up entry Adam for plugwise
Traceback (most recent call last):
File "/home/homeassistant/lib/python3.8/site-packages/homeassistant/config_entries.py", line 293, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/home/homeassistant/.homeassistant/custom_components/plugwise/__init__.py", line 21, in async_setup_entry
return await async_setup_entry_gw(hass, entry)
File "/home/homeassistant/.homeassistant/custom_components/plugwise/gateway.py", line 144, in async_setup_entry_gw
api.get_all_devices()
File "/home/homeassistant/lib/python3.8/site-packages/plugwise/smile.py", line 288, in get_all_devices
self.all_device_data()
File "/home/homeassistant/lib/python3.8/site-packages/plugwise/smile.py", line 248, in all_device_data
data = self.get_device_data(dev_id)
File "/home/homeassistant/lib/python3.8/site-packages/plugwise/smile.py", line 391, in get_device_data
device_data = self.device_data_climate(details, device_data)
File "/home/homeassistant/lib/python3.8/site-packages/plugwise/smile.py", line 343, in device_data_climate
device_data["presets"] = self.presets(details["location"])
File "/home/homeassistant/lib/python3.8/site-packages/plugwise/helper.py", line 535, in presets
for rule_id in rule_ids:
TypeError: 'NoneType' object is not iterable
Home Assistant Core:
2021.6.2
py-venv
plugwise-beta
HACS
Plugwise product:
3.2.8
Find a different solution to re-enable negative testing in this testcase, as was done in the v0.22.1
Check util.py coverage after 0.30 / #287
That was a quick fix for this:
... pylint-ing ...
************* Module Command line or configuration file
Command line or configuration file:1:0: E0013: Plugin 'pylint_strict_informational' is impossible to load, is it installed ? ('No module named 'pylint_strict_informational'') (bad-plugin-value)
Originally posted by @bouwew in #206 (comment)
Running flake8 manually vs through pre-commit vs through pre-commit --all-files yields different results (most clearly in #253 ignoring any excludes set in setup.cfg
).
Ignoring of excluded files
Describe the bug
This message is shown in HA Core Logs:
Logger: root
Source: custom_components/plugwise/usb.py:94
Integration: Plugwise Beta (documentation)
First occurred: 11:33:49 (1 occurrences)
Last logged: 11:33:49
Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/threading.py", line 1254, in run
self.function(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/site-packages/plugwise/stick.py", line 329, in scan_timeout_expired
self.scan_callback()
File "/config/custom_components/plugwise/usb.py", line 94, in discover_finished
if config_entry.system_options.disable_new_entities:
AttributeError: 'ConfigEntry' object has no attribute 'system_options'
Home Assistant Core (please complete the following information):
Plugwise product (please complete the following information):
After upgrade HA version 2022.11.1 or 2011.11.2 the Plugwise integration stopt working, and this error: Failed to set up
Log message:
Logger: homeassistant.config_entries
Source: components/plugwise/gateway.py:59
First occurred: 19:38:24 (1 occurrences)
Last logged: 19:38:24
Error setting up entry Adam for plugwise
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/plugwise/init.py", line 13, in async_setup_entry
return await async_setup_entry_gw(hass, entry)
File "/usr/src/homeassistant/homeassistant/components/plugwise/gateway.py", line 59, in async_setup_entry_gw
api.get_all_devices()
File "/usr/local/lib/python3.10/site-packages/plugwise/smile.py", line 160, in get_all_devices
self._all_device_data()
File "/usr/local/lib/python3.10/site-packages/plugwise/smile.py", line 114, in _all_device_data
self.update_for_cooling(self.gw_devices[device_id])
File "/usr/local/lib/python3.10/site-packages/plugwise/smile.py", line 80, in update_for_cooling
max_setpoint = self._sched_setpoints[1]
IndexError: list index out of range
no errors and working integration
Home Assistant 2022.11.2 Supervisor 2022.10.2 Operating System 9.3 Frontend 20221108.0 - latest
Home Assistant OS
Home Assistant Core
Smile: Adam (including Lisa, Tom, Floor)
3.6.7
No response
No response
No response
Check
python-plugwise/plugwise/helper.py
Line 878 in 79b64b0
if self._outdoor_temp
to ensure validity (HA-core issue 67919). Some special auxiliary unit and/or unset zipcode?I.e. not doing this via pre-commit to prevent looping
Describe the bug
User CoHoAppel reports errors when trying to add the Core Plugwise integration for his Stretch with firmware v2.7.15
Evidence
Logger: plugwise.smile
Source: /usr/local/lib/python3.8/site-packages/plugwise/smile.py:125
First occurred: January 27, 2021, 11:43:09 AM (8 occurrences)
Last logged: 8:20:49 PM
Connected but expected text not returned, we got <Element ‘domain_objects’ at 0xabc40488>
Connected but expected text not returned, we got <Element ‘domain_objects’ at 0xac363668>
Connected but expected text not returned, we got <Element ‘domain_objects’ at 0xac29fb40>
Connected but expected text not returned, we got <Element ‘domain_objects’ at 0xabc41ed8>
Connected but expected text not returned, we got <Element ‘domain_objects’ at 0xada2f848>
Home Assistant Core (please complete the following information):
Plugwise product (please complete the following information):
Hi @brefra,
Could you please check plugwise/nodes/__init__py
L183. While scanning with bandit
it correctly flags accordingly:
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
Location: plugwise/nodes/__init__.py:183:8
More Info: https://bandit.readthedocs.io/en/1.7.4/plugins/b101_assert_used.html
182 """Process received message."""
183 assert isinstance(message, NodeResponse)
184 if message.mac == self._mac:
Describe the improvement
Rewrite print-statements to _LOGGER statements
From findings during #24
Describe the bug
See the topic.
On the Plugwise App/local website the heating-icon is shown as active and the active thermostat has a yellow color instead of an orange color.
Home Assistant Core (please complete the following information):
Plugwise product (please complete the following information):
Additional context
Add any other context about the problem here.
This is when using the Simple Thermostat card. It means that setting the schedule state to off a 2nd time causes the error.
No error.
core-2022.8.7
Home Assistant Supervised
HACS
Smile: Adam (including Lisa, Tom, Floor)
3.6.7
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/plugwise/climate.py:161
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 15:16:04 (3 occurrences)
Last logged: 15:23:15
[140517305040032] list.remove(x): x not in list
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 930, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call
await result
File "/config/custom_components/plugwise/util.py", line 30, in handler
return await func(self, *args, **kwargs)
File "/config/custom_components/plugwise/climate.py", line 161, in async_set_hvac_mode
self.device["location"],
File "/usr/local/lib/python3.10/site-packages/plugwise/smile.py", line 582, in set_schedule_state
contexts.remove(subject)
ValueError: list.remove(x): x not in list
No response
Plugwise-beta v0.27.0a2
Describe the bug
Lots of Access to a protected member _(...)_thread of a client class
Evidence
pylint plugwise/*py
(and/or subdirectories)W0212: Access to a protected member _(...)_thread of a client class (protected-access)
Additional context
Found as part of codefactor improvements and refactoring.
Should be handled with care since we don't have the appropriate tests for the stick part.
Is your feature request related to a problem? Please describe.
As requested by @frenck: Expose available data from Plugwise hardware through the module
Describe the solution you'd like
Add (eventually through integration) a binary sensor for firmware update
Additional context
Sifting through what the 'firmware status page' on a Anna looks like shown below, unfortunately mine is in 'auto-update' mode and as such 'locked' (can't change it), maybe because of its beta-status.
<enabled>true</enabled>
<firmware_locked>false</firmware_locked>
<prevent_default_update>false</prevent_default_update>
Type hints are in the code, but they are not seen by mypy
in Home Assistant
I think mypy
is not getting the type hints through because the library is missing a py.typed
file
Hi,
Not sure if this is even a plugwise related issue, or something with my Elga heatpump/boiler combination, but only since I have integrated it in HA I'm seeing these errors. Of course, before I didn't have anywhere to see it, yet maybe someone could shed some light on what is happening.
I am getting a lot of notifications about issues between the Elga and my (Remeha Quinta 35c) boiler. This is over a period of 5 days, the errors seem to pop up randomly:
Error: The Techneco Elga cannot read its NTC2 supply temperature sensor.
Error: The Techneco Elga cannot communicate with its slave OpenTherm boiler.
Error: The OpenTherm boiler slaved to the Techneco Elga has a fault.
Error: The Techneco Elga cannot read its NTC1 return temperature sensor.
Error: There is no OpenTherm communication with the boiler.
Error: The Techneco Elga cannot communicate with its slave OpenTherm boiler.
Error: The OpenTherm boiler slaved to the Techneco Elga has a fault.
Error: The OpenTherm boiler slaved to the Techneco Elga has a fault.
Error: The Techneco Elga's pump cannot generate sufficient water flow.
Error: The Techneco Elga cannot read its additional external temperature sensor.
Error: The Techneco Elga cannot read its NTC2 supply temperature sensor.
Error: The Techneco Elga cannot read its NTC1 return temperature sensor.
Error: The boiler indicates something is wrong.
Error: The Toshiba board used by the Techneco Elga has a fault.
Occasionally I see in the log entries like below, but these do not map to the times when the notifications are sent:
2021-04-26 14:58:09 ERROR (MainThread) [custom_components.plugwise.gateway] Timeout fetching Smile Anna data
2021-04-22 18:10:04 ERROR (MainThread) [plugwise.helper] Smile response empty or error in <?xml version="1.0" encoding="UTF-8"?> <error> <code>400 Bad Request</code> <message>XML validation failed: Extra element setpoint in interleave (document):1: Element thermostat_functionality failed to validate content </message> </error>
2021-04-22 18:10:04 ERROR (MainThread) [custom_components.plugwise.climate] Error while communicating to device
Interestingly, the Elga hasn't been heating all that time as the indoor temperature was > setpoint all the time.
I'm on Home Assistant OS, core-2021.4.6, using plugwise-beta 1.11.3 (I'm now updating to 1.12.3 to see if it makes any difference).
Maybe @bouwew you recognise any of this?
Many thanks!
When starting Home Assistant, I get a type error in the Anna plugin log. The integration is not set up. For exact error message, see the error log below.
I have been using the integration for a long time. In the 2022.3 release, it is not working anymore.
A working system.
2022.3
Home Assistant Supervised
Home Assistant Core
Smile: Anna
4.2.1?
No response
No response
Logfile of Anna integration:
Logger: homeassistant.config_entries
Source: components/plugwise/gateway.py:53
First occurred: March 8, 2022, 10:35:28 PM (1 occurrences)
Last logged: March 8, 2022, 10:35:28 PM
Error setting up entry Anna for plugwise
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/plugwise/init.py", line 13, in async_setup_entry
return await async_setup_entry_gw(hass, entry)
File "/usr/src/homeassistant/homeassistant/components/plugwise/gateway.py", line 53, in async_setup_entry_gw
api.get_all_devices()
File "/usr/local/lib/python3.9/site-packages/plugwise/smile.py", line 106, in get_all_devices
self._all_device_data()
File "/usr/local/lib/python3.9/site-packages/plugwise/smile.py", line 60, in _all_device_data
data = self._get_device_data(device_id)
File "/usr/local/lib/python3.9/site-packages/plugwise/smile.py", line 201, in _get_device_data
device_data = self._get_appliance_data(dev_id)
File "/usr/local/lib/python3.9/site-packages/plugwise/helper.py", line 897, in _get_appliance_data
and self._outdoor_temp > data["cooling_activation_outdoor_temperature"]
TypeError: '>' not supported between instances of 'NoneType' and 'float'
Describe the bug
isort in pre-commit
(.pre-commit-config.yaml
) seems broken, not locally but it does break in Github actions. See #112
Evidence
https://github.com/plugwise/python-plugwise/runs/4650984392?check_suite_focus=true
Expected behavior
"It used to work" and "works on my laptop" as per usual, seems only github is (suddenly) acting up
Additional context
Removed isort from the verify
github action and from .pre-commit-config.yaml
With regards to forthcoming from #65 and smile.py
: (i.e. things I didn't cover not to cover
) in #65
full_update_device
) towards L206' except XMLDataMissingError:
with async_io timeout
not excepting to L246 asyncio.TimeoutError (either fix test or fix code)rule_ids is None:
should get an indication of how/why (left it for now as uncovered)Evaluate
full_update_device
as commented #65 (comment)Things we might already have but need validation on userdata and then testing of:
Fix for Adam + Anna: heating_state also present under Anna, remove
should be something for userdata testing (if we can generate such)self.get_open_valves
on city-heating, same thinguri
on if stretch_v2:
I've been using https://github.com/SevenW/Plugwise-2-py for years with about a dozen Circles and one Circle+, but I'd like to switch to this. However, I get the following:
2022-12-15 23:03:36.500 DEBUG (MainThread) [custom_components.plugwise.usb] Connect to USB-Stick
2022-12-15 23:03:37.320 ERROR (MainThread) [custom_components.plugwise.usb] Connecting to Plugwise USBstick communication failed
2022-12-15 23:03:37.320 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Stick' for plugwise integration not ready yet; Retrying in background
2022-12-15 23:03:46.955 DEBUG (MainThread) [custom_components.plugwise.usb] Connect to USB-Stick
2022-12-15 23:03:46.973 ERROR (MainThread) [custom_components.plugwise.usb] Connecting to Plugwise USBstick communication failed
``
This just loops, no matter how long I wait.
Stick is a `Bus 001 Device 005: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC`
I'm passing this into the docker container with `--device=/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A9003tBk-if00-port0` and i'm setting it privilegd, but to no avail.
### Expected behavior
Connect to the circle+ and actually work. Or at least be more verbose about what isn't working.
### What version of Home Assistant Core has the issue?
2022.12
### What type of installation are you running?
Home Assistant Container
### How and which version of the integration do you have installed?
HACS
### What kind of Plugwise device is having issues?
USB: Stick
### What firmware version is your Plugwise product at?
unsure, no mobile app. definitely very old.
### Home Assistant Logging (optional)
2022-12-15 23:03:36.500 DEBUG (MainThread) [custom_components.plugwise.usb] Connect to USB-Stick
2022-12-15 23:03:37.320 ERROR (MainThread) [custom_components.plugwise.usb] Connecting to Plugwise USBstick communication failed
2022-12-15 23:03:37.320 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Stick' for plugwise integration not ready yet; Retrying in background
2022-12-15 23:03:46.955 DEBUG (MainThread) [custom_components.plugwise.usb] Connect to USB-Stick
2022-12-15 23:03:46.973 ERROR (MainThread) [custom_components.plugwise.usb] Connecting to Plugwise USBstick communication failed
2022-12-15 23:03:56.976 DEBUG (MainThread) [custom_components.plugwise.usb] Connect to USB-Stick
2022-12-15 23:03:56.977 ERROR (MainThread) [custom_components.plugwise.usb] Connecting to Plugwise USBstick communication failed
### Diagnostics information
3.10 or whatever is in the HA core docker image
### Additional information
Switching back to SevenW Plugwise works immediately after i remove plugwise-beta.
Describe the improvement
Evaluate rewriting if something_somewhere is True:
to if something
. This goes for None
, False
and True
(hence trilean). It won't be possible everywhere (we have a specific case in plugwise-beta
where we needed it like that, but most of them should be rewritable in python-plugwise
.
From findings during #24
Buying the adam I was under the impression that I would be able to control my heater directly. Currently I can only control it through my Lisa though. I'd like to be able to set the requested temperature for my heater directly, mostly to improve my floor heating. I've been unable to find any way to do it. In the end I would love to have a service call in home assistant that I could use to change the opentherm intended temperature of my heater.
It is unclear to me if the heating logic is inside the Lisa or the Adam, but I assume it is in the Lisa. In this case it shouldn't be a problem to add my own 'zone' that tries to control the heater as well.
No response
I've checked if there's any way to create a 'custom' climate device in home assistant that I would be able to control.
Home Assistant Container
plugwise
) for shortHome Assistant Core
Smile: Adam (including Lisa, Tom, Floor)
Firmware: 3.2.8
Lisa, Adam and an aqara plug. I have a standard CV with floor heating and radiators.
No response
Also see #565 comment on rewriting the if statements to match/cases
Just an idea that came up
Leaving as be - there is no harm in the current set up
Home Assistant OS
plugwise
) for shortHA using HACS
Smile: Anna
n/a
n/a
n/a
I just experienced a power grid outage @ my home, when it returned, I noticed that Plugwise didn't recover. The reason is that Home Assistant was faster in starting up than Plugwise and the connection failed.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/plugwise/__init__.py", line 13, in async_setup_entry
return await async_setup_entry_gw(hass, entry)
File "/usr/src/homeassistant/homeassistant/components/plugwise/gateway.py", line 43, in async_setup_entry_gw
connected = await api.connect()
File "/usr/local/lib/python3.9/site-packages/plugwise/smile.py", line 260, in connect
result = await self._request(DOMAIN_OBJECTS)
File "/usr/local/lib/python3.9/site-packages/plugwise/helper.py", line 259, in _request
resp = await self._websession.get(url, headers=headers, auth=self._auth)
File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 535, in _request
conn = await self._connector.connect(
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 542, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 907, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 10.10.11.200:80 ssl:default [Connect call failed ('10.10.11.200', 80)]
Did a patch upstream: home-assistant/core#71642
However, the library should handle connection issues (as its purpose is handling the connection).
...
2022.6.0dev0
Home Assistant Core
Home Assistant Core
Smile: Adam (including Lisa, Tom, Floor)
3.6.7
No response
No response
No response
Describe the bug
Error when adding the integration for the Stretch.
Evidence
2020-08-21 23:20:18 ERROR (MainThread) [custom_components.plugwise.config_flow] Unexpected exception
Traceback (most recent call last):
File "/config/custom_components/plugwise/config_flow.py", line 130, in async_step_user
api = await validate_input(self.hass, user_input)
File "/config/custom_components/plugwise/config_flow.py", line 74, in validate_input
await api.connect()
File "/usr/local/lib/python3.8/site-packages/Plugwise_Smile/Smile.py", line 161, in connect
result = await resp.text()
File "/usr/local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1009, in text
await self.read()
File "/usr/local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 973, in read
self._body = await self.content.read()
File "/usr/local/lib/python3.8/site-packages/aiohttp/streams.py", line 358, in read
block = await self.readany()
File "/usr/local/lib/python3.8/site-packages/aiohttp/streams.py", line 380, in readany
await self._wait('readany')
File "/usr/local/lib/python3.8/site-packages/aiohttp/streams.py", line 296, in _wait
await waiter
aiohttp.client_exceptions.ClientPayloadError: 400, message='Can not decode content-encoding: deflate'
Home Assistant Core (please complete the following information):
Smile (please complete the following information):
Additional context
Adding this: headers = {'Accept-Encoding': 'gzip'}
make the error go away.
Lisa and Tom/Floor allow setting the temperature offset:
No response
None.
Home Assistant Supervised
plugwise
) for shortHA using HACS
Smile: Adam (including Lisa, Tom, Floor)
3.7.3
Adam, Anna, Lisa, Tom, Plugs, Intergas CV-ketel.
No response
Both the Plugwise App and the local website don't show this preset anymore as a settable option.
Not as a preset:
@CoMPaTech Shall we remove it from the plugwise output for the Adam?
I have a hybrid setup with an Elga heatpump connected to a Remeha Quinta boiler for central heating, and a Plugwise Anna.
Now the integration in HA only shows when the boiler is heating. When the Elga is working (I’m monitoring its power draw separately) but the boiler isn’t, then the card shows that it’s idle.
Is this a matter of configuration or maybe a limitation of the integration? Anna is connected (using OpenTherm) to the Elga, which is connected to the gas boiler, so I would expect Anna to understand that Elga is ‘burning’ as well? Is this setup, without Adam, supported? I'd rather not shell out again for an Adam, whose further functionality I have no need of, just to get the monitoring right in HA :)
XMLs attached, many thanks for any assistance!
Showing an OpenTherm device.
2022.4.0
Home Assistant Core
Home Assistant Core
Smile: Adam (including Lisa, Tom, Floor)
TBD
No response
No response
No response
First of all, thank you very much for the great integration, all your hard work and time. Really appreciated 👏
Is your feature request related to a problem? Please describe.
I have a stupid opentherm boiler (Remeha Calenta) that doesn't heat the domestic hot water on demand. Only option to have the hot water is to turn on DHW Comfort mode on the boiler (via an opentherm thermostat). If I keep DHW Comfort on, it uses a lot of gas and keeps the water warm all the time, even though I don't need it which costs money and not good for the environment.
Describe the solution you'd like
On the Plugwise Adam interface, there is a toggle under Settings -> Heating System -> Heating -> Advanced Settings to turn on DHW Comfort mode on or off. A good way is to have a switch on HA to turn this on and off instead of going to Plugwise interface every time. This will also allow me to set up reminders if I leave hot water on for a long time and use smart assistants with voice to turn on/off. After we have the switch in HA, the possibilities are endless.
Home Assistant (please complete the following information):
Plugwise product and setup (please complete the following information):
Additional context
I did a bit research, the status of the switch can be get from
GET: {APPLIANCES}/core/appliances;id={appl_id}
endpoint from the following element
<domestic_hot_water_toggle id="XXXXX"/>
<updated_date>2021-02-11T02:46:42.165+01:00</updated_date>
<type>domestic_hot_water_comfort_mode</type>
<state>off</state>
</toggle_functionality>
and the status get be set with
PUT: {APPLIANCES};id= {appl_id}/toggle;type=domestic_hot_water_comfort_mode
with the following XML as data
<toggle><state>{state}</state></toggle>
possible states are off and on
Thank you very much again and have a great day!
Describe the bug
It would be very helpful if you could tag releases as well. This would enable distributions to use the source tarball from GitHub instead of PyPI.
Was done in the past could be a glitch in the workflow.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.