plugwise / plugwise-beta

Custom-component / development version of the Plugwise Home Assistant platform
MIT License
24 stars 8 forks source link

Plugwise features loria extra entities #301

Closed Wishdoc closed 1 year ago

Wishdoc commented 2 years ago

Describe the solution you are looking for

Plugwise has released 2 features for the loria duo. The specific loria duo feature and the cooling feature. Loria feature

this allows the heating of the boiler water and also coolingfunction to be controlled. as well as some additional features. it would be nice if these features could be included as an entity in home assistant

Is your feature request related to a problem? (optional)

Not related to a problem

What type of installation are you running?

Home Assistant Core

How did you install plugwise-beta?

Cloned from GitHub

What kind of Plugwise device is having issues?

Smile: Anna

What firmware version is your Plugwise product at?

4.3.8

Your setup

Anna with Loria feature and cooling feature for Loria

Additional context

B865EF39-8BE2-43AB-BD3C-91EA6F822704 E5EC56A9-D8EA-4B9A-82E6-860139E520C0 A9FD50C6-3575-4197-8B1D-243336482A8F

bouwew commented 2 years ago

@Wishdoc thanks for your request. We were not in contact with a Loria owner yet :)

The coming v0.27.0-release of plugwise-beta should support the Loria cooling feature. This support was implemented with the help of Plugwise. Please install and test this release when it becomes available (soon).

For your request, please provide the xml-data from your system as described here: https://github.com/plugwise/python-plugwise/tree/main/userdata#sharing

Please send the xml-files to "bouwe at westerdijk point info" (please use a proper email-address format :) )

Wishdoc commented 2 years ago

Hi, I installed the latest version. And unfortunately the cooling is not working yet. see attached screenshot for the message

there doesn't seem to be a switch for turning on the cooling either. also added a screenshot of the entitiesimage imageimage

bouwew commented 2 years ago

@Wishdoc which other options do you see under "Werking"?

Wishdoc commented 2 years ago

image

Both cooling as auto I tried but don't work

bouwew commented 2 years ago

Ok, that clarifies it, this is not for switching to cooling, it is for switching between auto ( = schedule mode) and non-schedule mode (= koelen or verwarmen). I need to fix the code so that only auto and verwarmen or auto and koelen are shown.

Many Core users are confused by this :)

bouwew commented 2 years ago

@Wishdoc please update to plugwise-beta v0.30.a1 (make it visible in HACS via Plugwise Beta custom component --> 3 vertical dots --> Redownload --> toggle Show Beta to on) and test.

There should be a Cooling switch, there should be a DHW mode selector and under "Werking" there should only be two options: auto and verwarmen, or auto and koelen.

Please toggle the Cooling switch and select a few DHW modes to see if everything works correctly.

If there's anything out of order, please let me know.

Wishdoc commented 2 years ago

Hi Bouwe,

I have installed the update. with heating I do indeed have auto and heating. when i switch on cooling i have cooling and auto. both heating and cooling function well! I assume the Auto feature is on a schedule? I haven't tested this yet.

the dhw modes do not function correctly yet. the mode which is active by on the heat pump is displayed, however it is not possible to switch to another mode. see the print screen for this. setting maximum water temperature is working properly. I can't find the current water temperature (boiler) yet?image

so much progress has already been made👌

bouwew commented 2 years ago

@Wishdoc Thanks for the feedback, there is good progress I see :)

Regarding the select error, is there any detailed information in the LOGBOEK that can help me to find the cause of the error?

Wishdoc commented 2 years ago

Out of the logfile:

Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/plugwise/select.py:129 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 16:00:42 (17 occurrences) Last logged: 18:53:04

[547056218752] [547005046432] [547004573888] [547274508752] [546871708160] Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1775, 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 931, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/select/init.py", line 54, in async_select_option await entity.async_select_option(option) File "/config/custom_components/plugwise/select.py", line 129, in async_select_option await self.entity_description.command( File "/usr/local/lib/python3.10/site-packages/plugwise/smile.py", line 797, in set_dhw_mode await self._request(uri, method="put", data=data) File "/usr/local/lib/python3.10/site-packages/plugwise/helper.py", line 301, in _request return await self._request_validate(resp, method) File "/usr/local/lib/python3.10/site-packages/plugwise/helper.py", line 252, in _request_validate raise ResponseError plugwise.exceptions.ResponseError

Wishdoc commented 2 years ago

Deze fout is ontstaan door een aangepaste integratie.

Logger: plugwise.constants Source: custom_components/plugwise/select.py:129 Integration: Plugwise Beta (documentation) First occurred: 16:00:42 (17 occurrences) Last logged: 18:53:04

Smile response empty or error in <?xml version="1.0" encoding="UTF-8"?> 400 Bad Request Resource path for URI '/appliances;id=bfb5ee0a88e14e5f97bfa725a760cc49/actuator_functionalities/domestic_hot_water_mode_control_functionality' is invalid: 'actuator_functionalities' not expected at position 3.

Wishdoc commented 2 years ago

Logger: frontend.js.latest.202209072 Source: components/system_log/init.py:227 First occurred: 15:27:33 (11 occurrences) Last logged: 18:53:11

:0:0 Script error.

Wishdoc commented 2 years ago

the functionality was still disabled after the update. it manually enabled and updated.

bouwew commented 2 years ago

Ah yes, now I remember, I was not sure about the exact data to put in the PUT/POST-request the is part of the select-option.

Are you able to capture http-traffic using Wireshark or some similar software? If you can change the dhw_mode on the Anna via a computer with Wireshark installed, you will be able to capture the command sent from your computer to the Anna. I can then update the plugwise code based on what you have captured.

Wishdoc commented 2 years ago

Just installed wireshark. If you can tell me what to do.

bouwew commented 2 years ago

Ok great.

1) Configure Wireshark for the correct wired or wireless interface 2) Open the Anna website in a browser: http:// 3) Find in Instellingen when you can change the DHW-mode 4) Start Wireshark, you should already see traffic-messages pass by in the Wireshark window. 5) Change the DHW-mode and press Save 6) Stop the caputuring of Wireshark. 7) Find the corresponding line, it should be a PUT or a POST command.

I see this when I change the regulation-mode on my Adam: image

Double-click on that line, a separate window opens. Press on the + in front of the line Hypertext Transfer Protocol, I'm interested in the 1st line below the line Hypertext Transfer Protocol, what does it show?

Wishdoc commented 2 years ago

this is a PUT line image

PUT /core/appliances;type=heater_central/domestic_hot_water_mode_control HTTP/1.1\r\n

bouwew commented 2 years ago

Thanks!

Please update to v0.30.0a2 and report back.

bouwew commented 2 years ago

"I assume the Auto feature is on a schedule?": Yes, auto means in HA climate that for instance a schedule with various setpoints that change at certain times, is managing the heating/cooling operation. Verwarmen/koelen means there's no schedule active. It means the heating/cooling is based on a fixed setpoint.

"I can't find the current water temperature (boiler) yet?": I think you mean the domestic hot water temperature? This one would be a new sensor that I haven't seen before. I see the corresponding xml-key in the provided data, adding this sensor should be quick.

Wishdoc commented 2 years ago

Thanks!

Please update to v0.30.0a2 and report back.

Hi Bouwe,

the dhw works very well. awesome

bouwew commented 2 years ago

Nice, good to hear :) I'll add the missing sensor tonight.

Wishdoc commented 2 years ago

"I assume the Auto feature is on a schedule?": Yes, auto means in HA climate that for instance a schedule with various setpoints that change at certain times, is managing the heating/cooling operation. Verwarmen/koelen means there's no schedule active. It means the heating/cooling is based on a fixed setpoint.

"I can't find the current water temperature (boiler) yet?": I think you mean the domestic hot water temperature? This one would be a new sensor that I haven't seen before. I see the corresponding xml-key in the provided data, adding this sensor should be quick.

Yes it's the DHW temperature.

bouwew commented 2 years ago

Please update to v0.30.0a3, the Opentherm DHW Temperature sensor has been added.

Wishdoc commented 2 years ago

This is indeed the sensor I'm talking about. functions perfectly. thanks

Wishdoc commented 2 years ago

Now I'll try to automate some stings like use the solar energy to heat the dhw.

bouwew commented 2 years ago

This is indeed the sensor I'm talking about. functions perfectly. thanks

Great, so now everything is working as intended?

I still need to make some changes to the plugwise-backend (I think), related to other types of systems. So there will be one or two more alpha releases that I might ask you to test. When that's all done I'll make a formal v0.30.0 release.

Wishdoc commented 2 years ago

yes it works as expected. I wonder if there is a possibility to adjust the reading frequency of the dhw temperature.

Of course I would like to test more things if necessary.

Hans

bouwew commented 2 years ago

The reading frequency of the dhw-temp is first determined by the Plugwise software in the Smile. Also, you can change the update-interval of the plugwise-beta integration in HA. It is as a default set to 60 seconds. Via the CONFIGUREER button in the integration tile you can change that interval to for instance 30 seconds.

Wishdoc commented 2 years ago

Ok thanks, I'll try

bouwew commented 2 years ago

Implemented via #304

bouwew commented 2 years ago

Released in v0.30.0

bouwew commented 2 years ago

@Wishdoc I have put pw-beta v0.31.0a0 online, as a pre/beta release. Can you please test this version?

What has been changed is how heating and cooling is represented: with this version the climate card will show two setpoints, the heating-setpoint and the cooling-setpoint. Also, there is now one hvac_mode heat_cool instead of two, heat and cool. I know, this is not how Plugwise represents this but this is how Home Assistant Core represents it. And I cannot deviate from that in the HA Core Plugwise Integration. And we want to keep Plugwise-beta mostly the same as HA Core Plugwise.

Please note: when changing the cooling setpoint in HA when in heating mode, and vice versa, you will see an error.

Wishdoc commented 2 years ago

I will update now, I'll let you know the findings

Wishdoc commented 2 years ago

image

Hi Bouwe, something is wrong with setting the temperature. when I want to adjust the heating temperature during heating I get an error message, and when I adjust the cooling temp no error. so something seems wrong By cooling the same problem.

Hans

bouwew commented 2 years ago

Ok thanks. I'll have a look at what could be wrong. Is there any extra information in the LOGBOEK available?

bouwew commented 2 years ago

I'm not sure why this happens. But I made a small change in v0.31.0a1. Please install and test. Does that change help?

bouwew commented 2 years ago

Wait, I suddenly see in a picture that you posted, what is wrong. I will try to fix this tomorrowmorning.

Wishdoc commented 2 years ago

OkAy, for now I will install v0.30.0

bouwew commented 2 years ago

@Wishdoc v0.31.0a2 is available for testing.

Wishdoc commented 2 years ago

Later this day I'll try.

Wishdoc commented 2 years ago

Just installed, a quick check:

The desired temperature cannot be set via cooling, but via heating. also the setpoint temperature is displayed in “Anna heating setpoint "

bouwew commented 2 years ago

Nice!

Yes, the cooling-setpoint cannot change when the system is in heating-mode. Only the heating-setpoint. And vice versa in the cooling-mode. The way the Plugwise software works, does not really support that. We could probably create some kind of work-around. Or show a warning on the screen.

bouwew commented 2 years ago

With the above information, does this mean that the reported bug is solved? And you don't see any other bugs?

Wishdoc commented 2 years ago

No, the problem I meant, is already in cooling mode. imageimage

bouwew commented 2 years ago

Ok I see what you mean. Apparently the heating-setpoint becomes the cooling-setpoint when you enable cooling and there is no schedule active. Does the cooling become active with this setpoint?

Wishdoc commented 2 years ago

As far as I see in the plugwise app. It would be activated. But the outside temperature is to cold now for activating. I will try tomorrow.

bouwew commented 2 years ago

Ah Ok so that's how you avoid the cooling from becoming active.

Anyway, the problem is clear. I'll rework the code to make it work like shown in the Plugwise App.

Wishdoc commented 2 years ago

tested again today. when the cooling is switched on nothing changes on the hass thermostat. when cooling becomes active, the thermostat with the values ​​also changes as you expectimage

how do i interpret the high and low temperature of the thermostat. with cooling the "highest" temperature is leading I see and with heating the "lowest" temperature. what is the function of the other temperature that can be set?

bouwew commented 2 years ago

Ok, good and correct: when the cooling becomes active, then the setpoints become updated as well. Please note, in a next update, the cooling- and heating-setpoint will be the same when there is no schedule active. I will change the code so HA Plugwise-beta behaves in the same way as is shown in the Plugwise App.

Yes, correct. the highest is normally the cooling setpoint, the lowest the heating setpoint.

Which other temperature do you mean? The number 21.4? That is the current temperature of the room, it's not settable.

Wishdoc commented 2 years ago

I meant the 4 degrees( heating setpoint). I didn't see the advantage of it. As I understand in the next update this will be one temperature.

bouwew commented 2 years ago

Please install and test v0.31.0a5.

Without an active schedule the heating- and cooling-setpoints should be equal. If there is a schedule active then the setpoints will already switch when the cooling function is enabled/disabled. And not when cooling/heating becomes active.