hardillb / node-red-contrib-alexa-home-skill

A Node-RED node to control things via Amazon Alexa
https://alexa-node-red.bm.hardill.me.uk/
Apache License 2.0
89 stars 42 forks source link

Problem when setting temperature #131

Closed FrankGiesecke closed 2 years ago

FrankGiesecke commented 2 years ago

When setting the temperature using Alexa, I always get the message "Ich habe Schwierigkeiten NULL zu erreichen".

But the node in node red receives the request...

{
   "topic":"",
   "name":"Arbeitszimmer",
   "_messageId":"ee273f35-663b-44cd-afc9-ff41c2f2f406",
   "_applianceId":"180617",
   "_confId":"8d22537.d900bb",
   "command":"SetTargetTemperatureRequest",
   "extraInfo":{

   },
   "payload":21,
   "_msgid":"eede9d72.80522"
}

The flow is do the right thing and configures the target device. After all, the response is generated and sent to alexa...

{
   "topic":"",
   "name":"Arbeitszimmer",
   "_messageId":"ee273f35-663b-44cd-afc9-ff41c2f2f406",
   "_applianceId":"180617",
   "_confId":"8d22537.d900bb",
   "command":"SetTargetTemperatureRequest",
   "extraInfo":{

   },
   "payload":true,
   "_msgid":"eede9d72.80522",
   "_event":"node:a0799717.c98ca8",
   "extra":{
      "targetTemperature":{
         "value":21
      },
      "applianceResponseTimestamp":"2022-08-10T09:37:07.869Z",
      "temperatureMode":{
         "value":"AUTO"
      }
   }
}

But the Echo device say "Ich habe Schwierigkeiten NULL zu erreichen"

I've created a test device, configured as LIGHT and control a light bulb. In this case, everything works as expected. The light bulb is turned on/of and the Echo device responds with the typical sound.

Is there any mistake at my side?

device-config flow
[{"id":"79bc1923.199c68","type":"alexa-home","z":"5c746a9c.fd9d64","conf":"8d22537.d900bb","device":"180617","acknoledge":true,"name":"Arbeitszimmer","topic":"","x":230,"y":2060,"wires":[["558d4d36.d55144","a87a13a0.8acd1"]]},{"id":"558d4d36.d55144","type":"switch","z":"5c746a9c.fd9d64","name":"","property":"command","propertyType":"msg","rules":[{"t":"eq","v":"SetTargetTemperatureRequest","vt":"str"}],"checkall":"false","repair":false,"outputs":1,"x":390,"y":2060,"wires":[["253ba9da.b979b6","d97b37b4.67a3e8"]]},{"id":"a87a13a0.8acd1","type":"debug","z":"5c746a9c.fd9d64","name":"request","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":240,"y":2120,"wires":[]},{"id":"5588392e.5ad5f8","type":"alexa-home-resp","z":"5c746a9c.fd9d64","x":800,"y":2120,"wires":[]},{"id":"d97b37b4.67a3e8","type":"change","z":"5c746a9c.fd9d64","name":"prepare response","rules":[{"t":"set","p":"extra.targetTemperature.value","pt":"msg","to":"payload","tot":"msg"},{"t":"set","p":"extra.applianceResponseTimestamp","pt":"msg","to":"$now()","tot":"jsonata"},{"t":"set","p":"extra.temperatureMode.value","pt":"msg","to":"AUTO","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":2120,"wires":[["5588392e.5ad5f8","6bccfa61.c8b354"]]},{"id":"6bccfa61.c8b354","type":"debug","z":"5c746a9c.fd9d64","name":"response","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":560,"y":2180,"wires":[]},{"id":"253ba9da.b979b6","type":"ccu-value","z":"5c746a9c.fd9d64","name":"temperature control work room","iface":"VirtualDevices","channel":"INT0000002:1 Arbeitszimmer INT0000002:1","datapoint":"SET_POINT_TEMPERATURE","mode":"","start":true,"change":false,"cache":true,"queue":false,"on":0,"onType":"undefined","ramp":0,"rampType":"undefined","working":true,"ccuConfig":"38263145.35ea0e","topic":"${CCU}/${Interface}/${channel}/${datapoint}","x":610,"y":2060,"wires":[[]]},{"id":"8d22537.d900bb","type":"alexa-home-conf","username":"i4S9@KGcrgL&c?!6SG9C"},{"id":"38263145.35ea0e","type":"ccu-connection","name":"localhost","host":"localhost","regaEnabled":true,"bcrfEnabled":true,"iprfEnabled":true,"virtEnabled":true,"bcwiEnabled":false,"cuxdEnabled":true,"regaPoll":true,"regaInterval":"30","rpcPingTimeout":"60","rpcInitAddress":"127.0.0.1","rpcServerHost":"127.0.0.1","rpcBinPort":"2047","rpcXmlPort":"2048","tls":false,"inSecure":false,"authentication":false,"username":"","password":"","queueTimeout":"5000","queuePause":"250","contextStore":"default"}]
FrankGiesecke commented 2 years ago

I found my mistake... I have to disable Auto Acknowledge in the request mode. ow, every thing is working as expected.

cibernox commented 1 year ago

@FrankGiesecke I'm having the same problem getting my "fake thermostat" (in reality I'm using it to control my oven) to aknowledge commands like "Turn on the oven at 220 degrees" or "Set the oven to 195 degrees". Simple on/off commands work but I'm not sure what kind of payload should I sent the the Alexa Home Response node to make it think the device is responding.

hardillb commented 1 year ago

@cibernox Please do not add comments to closed issues, what you are looking for is in the docs I pointed you to yesterday.