pbrunier/node-red-contrib-dyson-purelink

[Feature] SleepTimer Support

Closed this issue · 7 comments

Hi folks,

I am currently looking for a solution to integrate my Dyson Pure Cool Link Tower into my Node-RED instance. I already have a self-coded version running for a vanilla node server, but a node-red would just make my setup way easier. I have found this repository which looks awesome. The only thing I am missing is the ability to set the sleep timer.

According to the libpurecoollink python library it is set through the mqtt property sltm

So what we could do is adding the following method to device.ts:

  setSleepTimer(minutes) {
    this._setStatus({ sltm: minutes })
    // optionally also querying the set value of course
  }

The only thing I am not sure about is how this is done throughout the other models.

What do you think generally about it?

hi @thomas-br ,

sorry for the late response. I've added your suggestion. Other models will ignore the sleeptimer if they don't know it.

Unfortunatelly I can't test it right now, the dyson Api blocks my requests since a few weeks...

2021-02-21 08_52_40-Access denied _ appapi cp dyson com used Cloudflare to restrict access

I don't know how to fix this...

May you give v0.3.0 a try?

kind regards,
Benjamin

I will give it a try
Unfortunately I don't have access to my dyson right now, therefore it might take a while but I'll definitely test it 👍

@naimo84 tried to test it today. Unfortunately I wasn't able to configure the dyson-config.
When I click on get otp the requests ends with 404

Request URL: http://ccu3-webui/addons/red/dyson/authenticate
Request Method: POST
Status Code: 404 Not Found

I am running node-red with Redmatic in a Homematic CCU3.

Any idea what I am doing wrong?

@naimo84
Tried to test this one. In the source code a fixed number of minutes is provided. 10 minutes.
This does not seem to work. Looking at the app the Dyson fans only support specific values:
15m, 30m, 45m, 1h, 2h, 3h, 4h, 5h, 6h, 7h, 8h, 9h
Setting the fixed 10 to 15 seems to work on my DP04.

Hi @pbrunier ,

I've removed the fixed sleeptimer and replaced it with the node.value.
I merged your pull-requests also ;)

Sorry for the delay. Wife, Childs, main work, missing free time :/ Time's fleeding ;)

Greets,
Benjamin

@thomas-br: Unfortunately I have no homematic ccu3 to test this.
http://ccu3-webui/addons/red/dyson/authenticate looks good...

@thomas-br : I've installed Redmatic just for testing in a virtual machine.
The very first click on the otp button gave me the same error... After deploying the node/flow the error is gone. I think this is something I can't deal with, because it's a Node-RED functionality... I can only state a hint/tip before the button, to deploy the config before pressing the button

So, I'm closing this issue for now, because the SleepTimer Support is implemented. Feel free to open a new one, if needed :)

Regards,
Benjamin