Alexa to read Domoticz Temperature sensors
This flow, by using NodeRed Skill for Alexa, is able to read temperature sensors from domoticz by asking: "Alexa, what is the temperature in ..."
You will need to enable NodeRed Skill and subribe the account (free), then create your device ad add the Domoticz IDX configuration to the flow
Create an Alexa Device for each Temp device you want to read.
Hope you will enjoy it!
[{"id":"27daba02.e77f66","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"5e0f7390.ac76fc","type":"debug","z":"27daba02.e77f66","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":649.9826393127441,"y":204.26743507385254,"wires":[]},{"id":"6ccd7195.dcac4","type":"alexa-home-resp","z":"27daba02.e77f66","x":872.9825706481934,"y":247.26727485656738,"wires":[]},{"id":"fdda0bd5.945698","type":"http request","z":"27daba02.e77f66","name":"dz HTTP API","method":"GET","ret":"obj","url":"","tls":"","x":660.9823989868164,"y":102.26733589172363,"wires":[["f0fb24bf.331568"]]},{"id":"f0fb24bf.331568","type":"function","z":"27daba02.e77f66","name":"create extra info key","func":"var tDev = msg.payload.result[0].Temp;\n\nvar msg = {};\nmsg.extra = {\n \"temperatureReading\": {\n \"value\": tDev\n },\n \"applianceResponseTimestamp\": new Date().toISOString()\n};\n\nmsg.complete = true ;\nreturn msg; \n","outputs":1,"noerr":0,"x":881.9824600219727,"y":102.26729965209961,"wires":[["1c5583e8.3c4fec"]]},{"id":"7dff1d0a.f67854","type":"join","z":"27daba02.e77f66","name":"join Alexa msg with Domoticz reply","mode":"custom","build":"merged","property":"","propertyType":"full","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":377.05187797546387,"y":204.54857444763184,"wires":[["5e0f7390.ac76fc","9ccab27b.fd141"]]},{"id":"1c5583e8.3c4fec","type":"delay","z":"27daba02.e77f66","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":380.0520439147949,"y":154.85762977600098,"wires":[["7dff1d0a.f67854"]]},{"id":"9ccab27b.fd141","type":"function","z":"27daba02.e77f66","name":"fix payload key","func":"delete msg.payload;\nmsg.payload = true;\nreturn msg; \n","outputs":1,"noerr":0,"x":642.9998550415039,"y":247.27776908874512,"wires":[["6ccd7195.dcac4"]]},{"id":"ab118bdb.dfa258","type":"function","z":"27daba02.e77f66","name":"convert Alexa Name ==> Domoticz IDX","func":"var lnkUrl = \"http://127.0.0.1:8080/json.htm?type=devices&rid=\" ;\nvar reqRoom = msg.name;\n\n/*\nmap temp devices together using syntax:\n\n\"Device name\" (the same used in Alexa Definition) : Domoticz IDX\nexample\nvar map = {\n \"Kitchen\" : 999,\n \"Bedroom\" : 888\n}\n*/\n\nvar map = {\n \"Device Name\" : 1\n}\n\nvar msg = {};\nmsg.url = lnkUrl + map[reqRoom];\nreturn msg;","outputs":1,"noerr":0,"x":384.0626220703125,"y":103.14242935180664,"wires":[["fdda0bd5.945698"]]},{"id":"e10fdf6f.0e978","type":"alexa-home","z":"27daba02.e77f66","conf":"","device":"36724","acknoledge":false,"name":"","topic":"","x":83,"y":102.26736164093018,"wires":[["7dff1d0a.f67854","ab118bdb.dfa258"]]},{"id":"2ad8fc62.0363f4","type":"comment","z":"27daba02.e77f66","name":"TEMPERATURE","info":"","x":152.05902099609375,"y":47,"wires":[]}]