cakebake / node-red-contrib-alexa-remote-cakebaked

Forked for me and the community to keep dependencies up to date :)
MIT License
42 stars 6 forks source link

InvalidOperationName when setting FanSpeed #16

Open koshisan opened 3 years ago

koshisan commented 3 years ago

Hi,

I am trying to control a Dyson fan. Unfortunately the reverse engineered Dyson API for node-red does no longer work for me, so Alexa was my only option.

After some struggeling getting it to work (I am using a Japanese Amazon Account so the Servers were not provided as examples), I can finally turn my fan on and off. However, setting the speed is not possible:

Firstly I dont exactly understand the documentation at this point. You can select Appliance and Property in the Node settings - but no value. Is the value read from msg.payload or do we to leave all fields empty in that case and build the object from scratch?

Whatever I try, setting the Fanspeed ultimately fails with ""FAILURE_TO_SEND","message":"Validation failed with the following error(s): [InvalidOperationName: setRangeValue@a3b6b91a-32d5-4de7-96b8-82671e6bea1a_FanSpeed]","data":null"

Note that the Action is displayed like this in the GUI "Set Range Value A 3 B 6 (the complete Entity ID) Fan Speed".

Trying to build the object by function like this:

var blubb = { entity : "a3b6b91a-32d5-4de7-96b8-82671e6bea1a", action : "FanSpeed", value: "2" }

return [blubb];

Also fails with "action: input must be an array of objects with the string properties "entity" and "action""

Am I missing something here?