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

Demand control #127

Closed
Safs opened this issue Oct 12, 2023 · 22 comments
Closed

Demand control #127

Safs opened this issue Oct 12, 2023 · 22 comments

Comments

@Safs
Copy link

Safs commented Oct 12, 2023

Demand control still not working. Now I can move slider, but nothing to happening. Slider always return to 100% after some time and is not possible to set back to 100%, because it is already on 100%...
I tred to get some logs:

2023-10-12 08:28:48.457 DEBUG (MainThread) [custom_components.aquarea.number] Changing Demand Control to 72.0 (sent to panasonic_heat_pump/commands/SetDemandControl)
2023-10-12 08:28:49.313 DEBUG (MainThread) [custom_components.aquarea.number] Changing Demand Control to 40.0 (sent to panasonic_heat_pump/commands/SetDemandControl)

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:762
First occurred: 08:15:30 (1 occurrences)
Last logged: 08:15:30

Entity number.panasonic_heat_pump_main_fakedemandcontrol (<class 'custom_components.aquarea.number.HeishaMonMQTTNumber'>) does not have a platform, this may be caused by adding it manually instead of with an EntityComponent helper, please report it to the custom integration author
@kamaradclimber
Copy link
Owner

I think there are two issues here:

  • the first one is because the mqtt topic prefix for PCB command seems to be optional instead of commands (which is used for regular commands). I'll fix this.
  • the second one is a warning that appear when we initialize the entity, for some reason the platform is not setup yet (it is later but the warning is configured to display once). I'll check how to fix this

@giedriuskilcauskas
Copy link
Contributor

I've also noticed that Demand Control entity id is: number.panasonic_heat_pump_main_none
which doesn't sound right

@kamaradclimber
Copy link
Owner

It's a hack I've used in previous version because there is no mqtt topic to read the data. Recent version of the integration have a more meaningful name but HA does not change entity_id once it has been created. New users of the integration will have a better naming.

@Safs
Copy link
Author

Safs commented Oct 13, 2023

When I publish topic "panasonic_heat_pump/commands/SetDemandControl", it is working...
According to Heisamon, it is correct syntax...

@kamaradclimber
Copy link
Owner

kamaradclimber commented Oct 13, 2023

Documentation is not super clear for me (commands are used for regular commands but documentation for optionalpcb topics is less clear regarding commands).
You are correct, from the doc:

You can publish mqtt messages towards the 'topic base/commands/pcb_topic', so for example "panasonic_heat_pump/commands/SetSolarTemp".

My guess is that we send incorrect value to the topic, which are ignored by heishamon.
How do you compute the value you put manually in "panasonic_heat_pump/commands/SetDemandControl" topic?

The current implementation I've added is https://github.com/kamaradclimber/heishamon-homeassistant/blob/main/custom_components/aquarea/definitions.py#L257

kamaradclimber added a commit that referenced this issue Oct 13, 2023
We cannot set native value in entity constructor because the entity has
not been added to its platform yet.
It leads to:
> Entity number.panasonic_heat_pump_main_fakedemandcontrol (<class 'custom_components.aquarea.number.HeishaMonMQTTNumber'>) does not have a platform, this may be caused by adding it manually instead of with an EntityComponent helper, please report it to the custom integration author

Solution is to set the value in the entity added to hass callback

This is a partial fix for #127
kamaradclimber added a commit that referenced this issue Oct 13, 2023
@Safs
Copy link
Author

Safs commented Oct 13, 2023

As I can see, commands sends correctly and working, but that demand control slider does not stay on position that is set.

@Safs
Copy link
Author

Safs commented Oct 13, 2023

image
After refresh, slider is go back to 100%

@geduxas
Copy link
Contributor

geduxas commented Oct 13, 2023

@Safs yes, it's because heishamon don't report back of demand control. it's only one way communication.. so you send to heishamon, and don't get any feadback. it's hard to implement it in home assistant. Also, heishamon saves demand control set-point only once in 5min. so if in that period heishamon will be rebooted, it will not be saved in flash rom. After reboot heishamon pickups last saved demand control value, and use it for heatpump.. so it's not possible to determinate which value heishamon is using.

@Safs
Copy link
Author

Safs commented Oct 13, 2023

I understand. It would be nice to just keep the slider at the last set position HA.

@kamaradclimber
Copy link
Owner

#130 should do it

@kamaradclimber
Copy link
Owner

@geduxas
Copy link
Contributor

geduxas commented Oct 13, 2023

also could anyone of you confirm that demand control is working better than setting pump in desired silent mode?
@Safs @giedriuskilcauskas

@Safs
Copy link
Author

Safs commented Oct 14, 2023

Hard to say, I did not compare demand control with silent modes, because for me demand control working well. I define four modes in my automations, 25, 50, 75, and 100% power. Automations is configured to send commands depend on prices of electricity. In my opinion, demand control working well.

@geduxas
Copy link
Contributor

geduxas commented Oct 14, 2023

Hard to say, I did not compare demand control with silent modes, because for me demand control working well. I define four modes in my automations, 25, 50, 75, and 100% power. Automations is configured to send commands depend on prices of electricity. In my opinion, demand control working well.

And did you try to set values for 20, 40, 60% does they match same 25, 50, 75 modes? :) i think demand control is not so sensitive.. and i almost 80% shure that values ar tied to silent mode setting.. silent 1 (around 75%) silent 2 (around 50%) silent 3 (around 25%) , ant that value gives feedback.. so os there any reason to use direct demand control? I have external PCB with 0-10V control.. i tried to test different values, and unable to get that precision.

@Safs
Copy link
Author

Safs commented Oct 16, 2023

Yes, you are right, demad control can set not lower than 30% of power. Seems use silent mode is more useful than demand control.

@Safs
Copy link
Author

Safs commented Oct 19, 2023

I was try to play around demand control. No all so bad.
I set heatpump to "powerful" mode, and then I playing with demand contro slider.
As info for power I take current. From the manual, max current is 11.9A, so, this value corresponds to 100% of power.
The min power with demand control what I can set is 25%. After that, I was able to increase the power in 5% increments to the power actually needed at the time.
So, it woud be nice, if that slider will be with resolution of 5%. Is it possible to implement that?

@geduxas
Copy link
Contributor

geduxas commented Oct 19, 2023

5% is default step for demand control, so you successfully managed to step by 5%?
Screenshot_2023-10-11-22-22-47-12_e2d5b3f32b79de1d45acd1fad96fbb0f

@Safs
Copy link
Author

Safs commented Oct 19, 2023

Yes, starting from 25%. If I set for example 45%, power is remine same, (from current) 45%.

@geduxas
Copy link
Contributor

geduxas commented Oct 19, 2023

Yes, starting from 25%. If I set for example 45%, power is remine same, (from current) 45%.

Ok so 10/15/25% are truly not used? Maybe do you have some graphs by increasing demand control? Smi have tested with mine too, but didn't notice'd 5% precision, maybe my tests was too short. I only noticed 3 or 5 different behavior, but as result i watched only frequency of compressor. Yes current would be better choice for that :) also powerful mode! As i tested only on heating DWH.

Also what's are drawbacks of using demand control, if i leave 25% for demand control and heat DWH to 52° it's impossible to reach that value.. so pump will try to heat till reaches its timeout. Also from (if i remember right) from around 40° (dwh) cop drastically falls to 0.2 :D which could bring a lot of troubles for someone.. i think there should also be implemented some control logic fir that too

@Safs
Copy link
Author

Safs commented Oct 19, 2023

First, you need to get the heat pump working with a high power demand, then you can play with the demand control, otherwise, if the pump does not need power, it does not respond to power reduction commands either...
I created automation, when heatpump is in DHW mode, then damand control is set to 100%., because of problem that you mention.
And yes, is not possible set power below 25%
There is graph, I changed power by 5%... I started at 35%, then 30, 25, 40%
image

@Safs
Copy link
Author

Safs commented Oct 23, 2023

So, it woud be nice, if that slider will be with resolution of 5%. Is it possible to implement that?

Can anybody do this?

@kamaradclimber
Copy link
Owner

#142 should do it but I don’t have time to test it at the moment.

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

No branches or pull requests

4 participants