--> PUBLISH received, TOPIC:domoticz/out, QoS:0, Retained:false DATA:{ "Battery" : 100, "RSSI" : 12, "dtype" : "Temp + Humidity", "id" : "513", "idx" : 8, "name" : "Unknown", "nvalue" : 0, "stype" : "WTGR800", "svalue1" : "25.3", "svalue2" : "54", "svalue3" : "1", "unit" : 0}
--> PUBLISH received, TOPIC:domoticz/out, QoS:0, Retained:false DATA:{ "Battery" : 100, "RSSI" : 12, "dtype" : "Lighting 2", "id" : "0000200", "idx" : 6, "name" : "Sensor", "nvalue" : 1, "stype" : "ZWave", "svalue1" : "255", "unit" : 1}
--> PUBLISH received, TOPIC:domoticz/out, QoS:0, Retained:false DATA:{ "Battery" : 100, "RSSI" : 7, "dtype" : "Lighting 2", "id" : "0000301", "idx" : 10, "name" : "SwitchPump02", "nvalue" : 1, "stype" : "ZWave", "svalue1" : "0", "unit" : 1}
--> PUBLISH received, TOPIC:domoticz/out, QoS:0, Retained:false DATA:{ "Battery" : 100, "RSSI" : 7, "dtype" : "Lighting 2", "id" : "0000301", "idx" : 10, "name" : "SwitchPump02", "nvalue" : 0, "stype" : "ZWave", "svalue1" : "0", "unit" : 1}{"command": "switchlight", "idx": 10, "switchcmd": "Off"}
{"command": "switchlight", "idx": 10, "switchcmd": "On"}
{"command": "getdeviceinfo", "idx": 8 }Switch<>Dishwasher<---->"Switch 1"<----><bedroom><----->{ mqtt=">[localbroker:domoticz/in:command:on:0],>[localbroker:domoticz/in:command:off:default]" }
--> PUBLISH received, TOPIC:domoticz/in, QoS:0, Retained:false DATA:0 --> PUBLISH received, TOPIC:domoticz/in, QoS:0, Retained:false DATA:OFF
--> PUBLISH sent, TOPIC:domoticz/in, QoS:0, Retained:false DATA:{"command": "switchlight", "idx": 10, "switchcmd": "Off"} --> PUBLISH received, TOPIC:domoticz/in, QoS:0, Retained:false DATA:{"command": "switchlight", "idx": 10, "switchcmd": "Off"}
--
You received this message because you are subscribed to the Google Groups "openhab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.
To view this discussion on the web visit https://groups.google.com/d/msgid/openhab/c8c34bef-78db-4034-a28f-f49426e2dc6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Switch<>Dishwasher<---->"Switch 1"<----><bedroom><----->{ mqtt=">[localbroker:domoticz/in:command:*:MAP(test.map)],<[localbroker:/domoticz/out:state:default]"}
ON={"command": "switchlight", "idx": 10, "switchcmd": "On"}OFF={"command": "switchlight", "idx": 10, "switchcmd": "Off"}
Sorry a couple of typos in my previous mail. Looks like you found them.
I'm no expert buy as far as I know you would need a separate map file per switch.
For the status updates take a look at the jsonpath example in the wiki
https://github.com/openhab/openhab/wiki/Transformations
Matt
To view this discussion on the web visit https://groups.google.com/d/msgid/openhab/c24263a8-742f-4fd8-b5cc-f7515c37e915%40googlegroups.com.
import org.openhab.core.library.types.DecimalType
rule "Pump01 Status"when Item StringTest received updatethen //Kitchen_Coffee_Watts.value ="Test" var String json = StringTest.state.toString var test = transform("JSONPATH","$.idx",json) if test=="10" then { var test = (transform("JSONPATH","$.nvalue",json) if test=="1" then { postUpdate(Dishwasher, ON) } else { postUpdate(Dishwasher, OFF) } } //DishwasherendSwitch<>Dishwasher<---->"Switch 1"<----><bedroom><----->{ mqtt=">[localbroker:domoticz/in:command:*:MAP(test.map)]" }String<>StringTest<---->(mqtt)<><------>{ mqtt="<[localbroker:domoticz/out:state:default]" }