mecks52 / openhab2-dyson475

Files to integrate Dyson Pure Cool Link (475) air purifier into openHAB 2
9 stars 4 forks source link

Introduce Dyson 469 #2

Closed Deamon closed 6 years ago

Deamon commented 6 years ago

The Dyson 469 pure cool link should also be supported by the script and the code.

actually working on it, it seems that it is quite the same as the 475 for commands but not to get the current state.

I'll come back as soon as I have more info but here is some outputs :

{"msg":"CURRENT-STATE","time":"2018-07-19T21:53:58.000Z","mode-reason":"LAPP","state-reason":"MODE","dial":"OFF","product-state":{"fmod":"FAN","fnst":"FAN","fnsp":"0010","qtar":"0003","oson":"OFF","rhtm":"ON","filf":"4278","ercd":"02C9","nmod":"OFF","wacd":"NONE"},"scheduler":{"srsc":"ce9c","dstv":"0001","tzid":"0001"}}
{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2018-07-19T21:54:29.000Z","data":{"tact":"3017","hact":"0041","pact":"0003","vact":"0000","sltm":"OFF"}}
Deamon commented 6 years ago

something else that could help, i finally manage to extract messages send by the dyson app to control the off scheduling : send to the /command topic to schedule off in 3h

{
  "data": {
    "sltm": "0180"
  },
  "mode-reason": "LAPP",
  "time": "2018-07-19T22:01:31Z",
  "msg": "STATE-SET"
}

send to cancel the schedule :

{
  "data": {
    "sltm": "OFF"
  },
  "mode-reason": "LAPP",
  "time": "2018-07-19T22:02:02Z",
  "msg": "STATE-SET"
}

asking to reset filter time :

{
  "data": {
    "rstf": "RSTF"
  },
  "mode-reason": "LAPP",
  "time": "2018-07-19T22:06:23Z",
  "msg": "STATE-SET"
}

and the answer :

{"msg":"STATE-CHANGE","time":"2018-07-19T22:06:23.000Z","mode-reason":"LAPP","state-reason":"MODE","product-state":{"fmod":["FAN","FAN"],"fnst":["FAN","FAN"],"fnsp":["0010","0010"],"qtar":["0003","0003"],"oson":["OFF","OFF"],"rhtm":["ON","ON"],"filf":["4278","4300"],"ercd":["02C9","02C9"],"nmod":["OFF","OFF"],"wacd":["NONE","NONE"]},"scheduler":{"srsc":"ce9c","dstv":"0001","tzid":"0001"}}
mecks52 commented 6 years ago

Is the 469 the "small" Pure Cool Link?

mecks52 commented 6 years ago

Brought in some code. The scheduler implementation is still missing, i would prefer to handle it within another issue if functionality is needed.
Please provide feedback how the implementation works and if anything is missing. If it works fine I could close the issue.

Deamon commented 6 years ago

Hi @mecks52 , sorry for the delay, just got back from holidays. The 469 is the small Pure Cool Link.

I created the issue just before leaving and verry soon after bought in order to keep info about it. I orginaly planned to work on it during the month :)

But thank you to have look into it. I'll try it soon and keep you in touch.

I'll also look into the scheduling and I agree that it should be move to another issue.

Deamon commented 6 years ago

Ok, I found few minutes to try your files, it looks like it's not working.

here are the logs :

2018-08-08 13:57:00.037 [ome.event.ItemCommandEvent] - Item 'Dyson469_Request' received command {"msg":"REQUEST-CURRENT-STATE", "time":"2018-08-08T11:57:00.019Z"}

2018-08-08 13:57:00.057 [vent.ItemStateChangedEvent] - Dyson469_Request changed from {"msg":"REQUEST-CURRENT-STATE", "time":"2018-08-08T11:56:30.019Z"} to {"msg":"REQUEST-CURRENT-STATE", "time":"2018-08-08T11:57:00.019Z"}

2018-08-08 13:57:00.234 [vent.ItemStateChangedEvent] - Dyson469_Topic_Status_Current changed from {"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2018-08-08T11:56:28.001Z","data":{"tact":"2988","hact":"0049","pact":"0002","vact":"0000","sltm":"OFF"}} to {"msg":"CURRENT-STATE","time":"2018-08-08T11:56:58.000Z","mode-reason":"PRC","state-reason":"ENV","dial":"OFF","rssi":"-33","product-state":{"fmod":"AUTO","fnst":"OFF","fnsp":"AUTO","qtar":"0003","oson":"OFF","rhtm":"ON","filf":"4149","ercd":"02C9","nmod":"ON","wacd":"NONE"},"scheduler":{"srsc":"ce9c","dstv":"0001","tzid":"0001"}}

2018-08-08 13:57:00.331 [vent.ItemStateChangedEvent] - Dyson469_Topic_Status_Current changed from {"msg":"CURRENT-STATE","time":"2018-08-08T11:56:58.000Z","mode-reason":"PRC","state-reason":"ENV","dial":"OFF","rssi":"-33","product-state":{"fmod":"AUTO","fnst":"OFF","fnsp":"AUTO","qtar":"0003","oson":"OFF","rhtm":"ON","filf":"4149","ercd":"02C9","nmod":"ON","wacd":"NONE"},"scheduler":{"srsc":"ce9c","dstv":"0001","tzid":"0001"}} to {"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2018-08-08T11:56:58.001Z","data":{"tact":"2988","hact":"0049","pact":"0002","vact":"0000","sltm":"OFF"}}

no items are updated.

I got time to add some logs and it appears that msg contains all the message :

2018-08-08 14:05:30.255 [INFO ] [marthome.model.script.dyson469.rules] - msg = {"msg":"CURRENT-STATE","time":"2018-08-08T12:05:28.000Z","mode-reason":"PRC","state-reason":"MODE","dial":"OFF","rssi":"-33","product-state":{"fmod":"AUTO","fnst":"OFF","fnsp":"AUTO","qtar":"0003","oson":"OFF","rhtm":"ON","filf":"4149","ercd":"02C9","nmod":"OFF","wacd":"NONE"},"scheduler":{"srsc":"ce9c","dstv":"0001","tzid":"0001"}}

so I went in my transformations list and see that my jsonpath was not installed !

I installed it previously but I might have forgotten to add it to my services/addons.cfg.

I add it back and the rule works well!

Thank you for your action!