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

Add support to read demand control data #268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Matze2
Copy link

@Matze2 Matze2 commented Mar 13, 2024

Closes #267

For now only the minimum needed for later control is exposed:

  • enabled: to be able to activate or deactivate demand control
  • mode: to be able to change the modes MANUAL, AUTO (, SCHEDULE)
  • max_power: to be able to change maximum power percentage of demand control

Not exposed:

  • type: meaning unknown; and must be always 1
  • schedule information: support is complex and not really an automation use case in my opinion

Note: DemandControl class is currently trivial, but will be extended later for write support.

@Matze2
Copy link
Author

Matze2 commented May 1, 2024

@Apollon77

I know you are very busy but maybe you find a little bit of time to check the first two PRs (this one and the corresponding one in iobroker.daikin).

I just would like to know if I need to improve something or if they are already in a mergeable quality.

These two PRs cover the "read" part for demand control. The other two (#269 and Apollon77/ioBroker.daikin#185) cover the "write" part and are implemented on top.

The code runs since since six weeks successfully in my iobroker environment with two Stylish devices. Using this enhancement I was able to switch off the daikin-cloud adapter.

@Apollon77
Copy link
Owner

Hi @Matze2, sorry for the very late review. One question: Do all devices have this option? Do you know what devices that do not have it return?

ok i checked mine ... I get

curl http://192.168.178.49/aircon/get_demand_control
ret=OK,type=0 

Seems like it always gets returned but "type=0" means not supported?

In fact you now added it in a way that - in case of an error being returned - the sensor infos (which all have) would not be returned. Can you please adjust the order of the calls (put demand control latest and make sure it does not fail the whole chain? So maybe ignore errors there or such?)

@Matze2
Copy link
Author

Matze2 commented May 25, 2024

Hi @Apollon77 , I think I understood.
I will check and revise the code when I am back from vacation. Thanks for the feedback so far!

@Apollon77
Copy link
Owner

Perfect, no hurries, I'm also on vacation next week :-)

I try to be faster afterwards with reviews :-)

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

Successfully merging this pull request may close these issues.

Expose demand control data
2 participants