This is the output from the serial monitor when starting the sensor:
sensor started, id=105, parent=0, distance=1
send: 105-105-0-0 s=255,c=3,t=11,pt=0,l=12,sg=0,st=ok:Energy Meter
send: 105-105-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=fail:1.0
send: 105-105-0-0 s=1,c=0,t=13,pt=0,l=0,sg=0,st=ok:
send: 105-105-0-0 s=1,c=2,t=24,pt=0,l=0,sg=0,st=ok:
send: 105-105-0-0 s=1,c=2,t=24,pt=0,l=0,sg=0,st=ok:
I'm not storing any pulse count yet, still trying to figure out how everything works together.
My rules, still based on your code, where I've just added another if for now to log the request
if(msgType == 1 ){
if (subType == V_TEMP){
postUpdate(sensorToItemsMap.get( nodeId + ";" + childId + ";"), msg)
println ("Temp item: " + sensorToItemsMap.get( nodeId + ";" + childId + ";") + " temp: " + msg )
}
if (subType == V_HUM){
postUpdate(sensorToItemsMap.get( nodeId + ";" + childId + ";"), msg)
println ("Hum item: " + sensorToItemsMap.get( nodeId + ";" + childId + ";") + " hum: " + msg )
}
}
// Message Request
if(msgType == 2){
logInfo("TestCheck", "Request, SubType: " + subType)
}