My gas meter is with magnet
Posts made by nikos1671
-
Gas meter sensor
Hi,
I am trying to build my first sensor a gas meter sensor. My hardware,arduino nano and a reed sensor.
Can someone share his sketch?Thanks
Nikos -
RE: openHAB 2.0 binding
Hi TimO
Can you please add support for gas meter S_GAS like the water meter.Thanks
Nikos -
RE: My Gateway
@NBM I don't remember exactly the size of the resistors I think 300R. Something between 270-330R will be OK.
The other legs are connected on the +5v. -
RE: Sensebender Micro
Hi. What case you all using for the sensebender ?Any good idea.
-
RE: openHAB binding
@andredts I also notice this with the door sensors. Normal the item must be contact and not switch.
-
My Gateway
Hi community.
I would like to show my serial gateway,it's connected with openhab and at the moment with 5 sensebender. Everything working ok. -
RE: My Slim 2AA Battery Node
If I order the 10 pieces for 14$ how many sensor I can build? They mean 10 panels with 3 boards each one?
-
RE: [Tutorial] openHAB with serial gateway
Hi ,
I think the problem is this msg 3;255;4;0;0;FFFFFFFFFFFFFFFF0300 is this something with the OTA firmware? i think the rule dont recognise this msg and give an error (Error during the execution of rule 'Decode incoming MySensors data': 5). Can the author of the rule please confirm if this it the problem of the error??
-
RE: [Tutorial] openHAB with serial gateway
Hi @Dave-Dan ,
i think i found the problem. i have 2 sensebender micro one with the original shiped firmaware 1.1 (node1) and one with the new one 1.3 (node3) as you can see in the logs of openhab the node1 its parsing the data on the openhab very good but the node3 throwing an error( Error during the execution of rule 'Decode incoming MySensors data': 5)
here is the rule that i use
// CONTRIBUTE: Feel free to fork, enhance, pull reqest // // SiLeX <gersilex@gmail.com> // // // IMPORTS ////////////////////////////////////////////////////////////////////////////////////////////////////////// import org.openhab.core.library.types.* import org.openhab.core.persistence.* import org.openhab.model.script.actions.* import java.util.HashMap import org.eclipse.xtext.xbase.lib.* import org.openhab.core.items.* // VARS ///////////////////////////////////////////////////////////////////////////////////////////////////////////// // MySensors 1.5 //////////////////////////////////////////////////////////////////////////////////////////////////// // MessageTypes // val int M_PRESENTATION = 0 // Sent by a node when they present attached sensors. This is usually done in setup() at startup. val int M_SET = 1 // This message is sent from or to a sensor when a sensor value should be updated val int M_REQ = 2 // Requests a variable value (usually from an actuator destined for controller). val int M_INTERNAL = 3 // This is a special internal message. See table below for the details val int M_STREAM = 4 // Used for OTA firmware updates // SubTypes for MessageType M_PRESENTATION // // (Not used for now, as automatic configuration is not possible in OpenHAB 1.) // val int S_DOOR = 0 // Door and window sensors // val int S_MOTION = 1 // Motion sensors // val int S_SMOKE = 2 // Smoke sensor // val int S_LIGHT = 3 // Light Actuator (on/off) // val int S_BINARY = 3 // Binary device (on/off), Alias for S_LIGHT // val int S_DIMMER = 4 // Dimmable device of some kind // val int S_COVER = 5 // Window covers or shades // val int S_TEMP = 6 // Temperature sensor // val int S_HUM = 7 // Humidity sensor // val int S_BARO = 8 // Barometer sensor (Pressure) // val int S_WIND = 9 // Wind sensor // val int S_RAIN = 10 // Rain sensor // val int S_UV = 11 // UV sensor // val int S_WEIGHT = 12 // Weight sensor for scales etc. // val int S_POWER = 13 // Power measuring device, like power meters // val int S_HEATER = 14 // Heater device // val int S_DISTANCE = 15 // Distance sensor // val int S_LIGHT_LEVEL = 16 // Light sensor // val int S_ARDUINO_NODE = 17 // Arduino node device // val int S_ARDUINO_REPEATER_NODE = 18 // Arduino repeating node device // val int S_LOCK = 19 // Lock device // val int S_IR = 20 // Ir sender/receiver device // val int S_WATER = 21 // Water meter // val int S_AIR_QUALITY = 22 // Air quality sensor e.g. MQ-2 // val int S_CUSTOM = 23 // Use this for custom sensors where no other fits. // val int S_DUST = 24 // Dust level sensor // val int S_SCENE_CONTROLLER = 25 // Scene controller device // val int S_RGB_LIGHT = 26 // RGB light // val int S_RGBW_LIGHT = 27 // RGBW light (with separate white component) // val int S_COLOR_SENSOR = 28 // Color sensor // val int S_HVAC = 29 // Thermostat/HVAC device // val int S_MULTIMETER = 30 // Multimeter device // val int S_SPRINKLER = 31 // Sprinkler device // val int S_WATER_LEAK = 32 // Water leak sensor // val int S_SOUND = 33 // Sound sensor // val int S_VIBRATION = 34 // Vibration sensor // val int S_MOISTURE = 35 // Moisture sensor // SubTypes for MessageType M_SET // val int V_TEMP = 0 // Temperature val int V_HUM = 1 // Humidity val int V_STATUS = 2 // Binary status. 0=off 1=on val int V_LIGHT = 2 // Deprecated. Alias for V_STATUS. Light status. 0=off 1=on val int V_PERCENTAGE = 3 // Percentage value. 0-100 (%) val int V_DIMMER = 3 // Deprecated. Alias for V_PERCENTAGE. Dimmer value. 0-100 (%) val int V_PRESSURE = 4 // Atmospheric Pressure val int V_FORECAST = 5 // Whether forecast. One of "stable", "sunny", "cloudy", "unstable", "thunderstorm" or "unknown" val int V_RAIN = 6 // Amount of rain val int V_RAINRATE = 7 // Rate of rain val int V_WIND = 8 // Windspeed val int V_GUST = 9 // Gust val int V_DIRECTION = 10 // Wind direction val int V_UV = 11 // UV light level val int V_WEIGHT = 12 // Weight (for scales etc) val int V_DISTANCE = 13 // Distance val int V_IMPEDANCE = 14 // Impedance value val int V_ARMED = 15 // Armed status of a security sensor. 1=Armed, 0=Bypassed val int V_TRIPPED = 16 // Tripped status of a security sensor. 1=Tripped, 0=Untripped val int V_WATT = 17 // Watt value for power meters val int V_KWH = 18 // Accumulated number of KWH for a power meter val int V_SCENE_ON = 19 // Turn on a scene val int V_SCENE_OFF = 20 // Turn of a scene val int V_HVAC_FLOW_STATE = 21 // Mode of header. One of "Off", "HeatOn", "CoolOn", or "AutoChangeOver" val int V_HVAC_SPEED = 22 // HVAC/Heater fan speed ("Min", "Normal", "Max", "Auto") val int V_LIGHT_LEVEL = 23 // Uncalibrated light level. 0-100%. Use V_LEVEL for light level in lux. val int V_VAR1 = 24 // Custom value val int V_VAR2 = 25 // Custom value val int V_VAR3 = 26 // Custom value val int V_VAR4 = 27 // Custom value val int V_VAR5 = 28 // Custom value val int V_UP = 29 // Window covering. Up. val int V_DOWN = 30 // Window covering. Down. val int V_STOP = 31 // Window covering. Stop. val int V_IR_SEND = 32 // Send out an IR-command val int V_IR_RECEIVE = 33 // This message contains a received IR-command val int V_FLOW = 34 // Flow of water (in meter) val int V_VOLUME = 35 // Water volume val int V_LOCK_STATUS = 36 // Set or get lock status. 1=Locked, 0=Unlocked val int V_LEVEL = 37 // Used for sending level-value val int V_VOLTAGE = 38 // Voltage level val int V_CURRENT = 39 // Current level val int V_RGB = 40 // RGB value transmitted as ASCII hex string (I.e "ff0000" for red) val int V_RGBW = 41 // RGBW value transmitted as ASCII hex string (I.e "ff0000ff" for red + full white) val int V_ID = 42 // Optional unique sensor id (e.g. OneWire DS1820b ids) val int V_UNIT_PREFIX = 43 // Allows sensors to send in a string representing the unit prefix to be displayed in GUI. This is not parsed by controller! E.g. cm, m, km, inch. val int V_HVAC_SETPOINT_COOL = 44 // HVAC cold setpoint val int V_HVAC_SETPOINT_HEAT = 45 // HVAC/Heater setpoint val int V_HVAC_FLOW_MODE = 46 // Flow mode for HVAC ("Auto", "ContinuousOn", "PeriodicOn") // SubTypes for MessageType M_INTERNAL // val int I_BATTERY_LEVEL = 0 // Use this to report the battery level (in percent 0-100). val int I_TIME = 1 // Sensors can request the current time from the Controller using this message. The time will be reported as the seconds since 1970 val int I_VERSION = 2 // Used to request gateway version from controller. val int I_ID_REQUEST = 3 // Use this to request a unique node id from the controller. val int I_ID_RESPONSE = 4 // Id response back to sensor. Payload contains sensor id. val int I_INCLUSION_MODE = 5 // Start/stop inclusion mode of the Controller (1=start, 0=stop). val int I_CONFIG = 6 // Config request from node. Reply with (M)etric or (I)mperal back to sensor. val int I_FIND_PARENT = 7 // When a sensor starts up, it broadcast a search request to all neighbor nodes. They reply with a I_FIND_PARENT_RESPONSE. val int I_FIND_PARENT_RESPONSE = 8 // Reply message type to I_FIND_PARENT request. val int I_LOG_MESSAGE = 9 // Sent by the gateway to the Controller to trace-log a message val int I_CHILDREN = 10 // A message that can be used to transfer child sensors (from EEPROM routing table) of a repeating node. val int I_SKETCH_NAME = 11 // Optional sketch name that can be used to identify sensor in the Controller GUI val int I_SKETCH_VERSION = 12 // Optional sketch version that can be reported to keep track of the version of sensor in the Controller GUI. val int I_REBOOT = 13 // Used by OTA firmware updates. Request for node to reboot. val int I_GATEWAY_READY = 14 // Send by gateway to controller when startup is complete. val int I_REQUEST_SIGNING = 15 // Used between sensors when initialting signing. val int I_GET_NONCE = 16 // Used between sensors when requesting nonce. val int I_GET_NONCE_RESPONSE = 17 // Used between sensors for nonce response. // MySensors 1.5 Configuration /////////////////////////////// // Use the HashMap "sensorToItemsMap" to create a relation between the nodeID // within MySensors and the item name in OpenHAB. // // Please note that you must map in both directions, so we can resolve both. // Mappings var HashMap<String, String> sensorToItemsMap = newLinkedHashMap( "3;1;" -> "Temp", "Temp" -> "3;1;", "3;2;" -> "Hum", "Hum" -> "3;2;", "3;255;" -> "Batt", "Batt" -> "3;255;", "1;1;" -> "Temp1", "Temp1" -> "1;1;", "1;2;" -> "Hum1", "Hum1" -> "1;2;", "1;255;" -> "Battery1", "Battery1" -> "1;255;", ) //////////////////////////////////////////////////////////////////////////////////////////////////// val org.eclipse.xtext.xbase.lib.Functions$Function4 mysensors = [ String IDs, int subType, String data, org.openhab.core.library.items.StringItem gw | if(!(data instanceof String)) println("\nERROR: data must be String but has " + data.getClass() + "\n") var String new_data if(data == "ON"){ new_data = new String("1") } else if (data == "OFF"){ new_data = new String("0") } else { new_data = new String(data) } var String output = IDs + "1;0;" + subType + ";" + new_data + "\n" gw.sendCommand(output) ] // Notes for this rule // This is all you need to have MySensors set your items. // It's better to hardcode the nodeID on your MySensors sensors, // because openHAB will not assign them nodeIDs. rule "Decode incoming MySensors data" when Item Arduino changed then var String lineBuffer = Arduino.state.toString.split("\n") for (String line : lineBuffer) { var String[] message = line.split(";") var Integer nodeId = new Integer(message.get(0)) var Integer childId = new Integer(message.get(1)) var Integer msgType = new Integer(message.get(2)) var Integer ack = new Integer(message.get(3)) var Integer subType = new Integer(message.get(4)) var String msg = message.get(5) var String openhab_item = sensorToItemsMap.get( nodeId + ";" + childId + ";" ) if (nodeId != 0){ // internal messages have nodeId 0, but are not used for now if (openhab_item == null){ println("No item matches nodeId=" + nodeId + ", childId=" + childId + ". Data received: " + msg) } else { // openhab_item != null print("openhab_item=" + openhab_item + "\t") print("msgType=" + msgType + " ") var String newState = msg if (msgType == M_SET){ // Set Command from or to node println("(SET)\t subType=" + subType + " ") if (subType == V_STATUS ){ if ( new Integer(msg) == 1 ) newState = "ON" else newState = "OFF" } if (subType == V_ARMED ){ if ( new Integer(msg) == 1 ) newState = "ON" else newState = "OFF" } else if (subType == V_TRIPPED){ if ( new Integer(msg) == 1 ) newState = "OPEN" else newState = "CLOSED" } else println("No special handler for subType=" + subType + " found. Simply using data as String.") postUpdate(openhab_item, newState) } if(msgType == M_INTERNAL){ // Internal Command print("(INTERNAL)\t") if(subType == I_SKETCH_NAME){ println("Sketch name: " + msg ) } if(subType == I_SKETCH_VERSION){ println("Sketch version: " + msg ) } if(subType == I_BATTERY_LEVEL){ postUpdate(sensorToItemsMap.get( nodeId + ";" + childId + ";"), msg) println ("Battery1 item: " + sensorToItemsMap.get( nodeId + ";" + childId + ";") + " Battery1: " + msg ) } if(subType == I_BATTERY_LEVEL){ postUpdate(sensorToItemsMap.get( nodeId + ";" + childId + ";"), msg) println ("Batt item: " + sensorToItemsMap.get( nodeId + ";" + childId + ";") + " Batt: " + msg ) } } } // openhab_item != null } } } end
and here is the logs of openhhab
10:37:09.294 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;gateway started, id=0, parent=0, distance=0 0;0;3;0;14;Gateway startup complete. ' on serial port COM13 10:37:10.764 [DEBUG] [o.o.i.s.i.DiscoveryServiceImpl:66 ] - Registering new service _openhab-server-ssl._tcp.local. at port 8443 10:37:12.060 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model 'demo.rules' 10:37:13.305 [DEBUG] [.i.LoggingPersistenceActivator:31 ] - Logging persistence bundle has been started. 10:37:13.316 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:37:13.347 [DEBUG] [.p.internal.PersistenceManager:147 ] - Initializing logging persistence service. 10:37:13.369 [DEBUG] [.zwave.internal.ZWaveActivator:36 ] - Z-Wave binding started. Version 1.7.1 10:37:13.424 [DEBUG] [.z.internal.ZWaveActiveBinding:175 ] - ConverterHandler not initialised. Polling disabled. 10:37:13.424 [INFO ] [.z.internal.ZWaveActiveBinding:317 ] - ZWave 'updated' with null config 10:37:14.156 [DEBUG] [riptExtensionClassNameProvider:63 ] - Script actions have changed: PingActionService, AudioActionService, HTTPActionService, TransformationActionService, ExecActionService, 10:37:34.145 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=255,c=0,t=17,pt=0,l=5,sg=0:1.4.1 1;255;0;0;17;1.4.1 0;0;3;0;9;read: 1-1-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0 1;255;3;0;6;0 ' on serial port COM13 10:37:34.145 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:37:36.179 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=255,c=3,t=11,pt=0,l=17,sg=0:Sensebender Micro 1;255;3;0;11;Sensebender Micro 0;0;3;0;9;read: 1-1-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.1 1;255;3;0;12;1.1 0;0;3;0;9;read: 1-1-0 s=1,c=0,t=6,pt=0,l=5,sg=0:1.4.1 1;1;0;0;6;1.4.1 0;0;3;0;9;read: 1-1-0 s=2,c=0,t=7,pt=0,l=5,sg=0:1.4.1 1;2;0;0;7;1.4.1 0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:80 1;255;3;0;0;80 0;0;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:22.2 1;1;1;0;0;22.2 0;0;3;0;9;read: 1-1-0 s=2,c=1,t=1,pt=2,l=2,sg=0:47 1;2;1;0;1;47 ' on serial port COM13 10:37:36.179 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:37:47.968 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 3-3-0 s=255,c=0,t=17,pt=0,l=3,sg=0:1.5 3;255;0;0;17;1.5 0;0;3;0;9;read: 3-3-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0 3;255;3;0;6;0 ' on serial port COM13 10:37:47.968 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:37:50.078 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 3-3-0 s=255,c=4,t=0,pt=6,l=10,sg=0:FFFFFFFFFFFFFFFF03 3;255;4;0;0;FFFFFFFFFFFFFFFF0300 0;0;3;0;9;read: 3-3-0 s=255,c=3,t=11,pt=0,l=17,sg=0:Sensebender Micro 3;255;3;0;11;Sensebender Micro 0;0;3;0;9;read: 3-3-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.3 3;255;3;0;12;1.3 0;0;3;0;9;read: 3-3-0 s=1,c=0,t=6,pt=0,l=0,sg=0: 3;1;0;0;6; 0;0;3;0;9;read: 3-3-0 s=2,c=0,t=7,pt=0,l=0,sg=0: 3;2;0;0;7; 0;0;3;0;9;read: 3-3-0 s=1,c=1,t=0,pt=7,l=5,sg=0:22.2 3;1;1;0;0;22.2 0;0;3;0;9;read: 3-3-0 s=2,c=1,t=1,pt=2,l=2,sg=0:48 3;2;1;0;1;48 0;0;3;0;9;read: 3-3-0 s=255,c=3,t=0,pt=1,l=1,sg=0:75 3;255;3;0;0;75 ' on serial port COM13 10:37:50.078 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:37:50.158 [ERROR] [o.o.c.s.ScriptExecutionThread :50 ] - Error during the execution of rule 'Decode incoming MySensors data': 5 10:38:42.965 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:82 1;255;3;0;0;82 0;0;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:22.1 1;1;1;0;0;22.1 0;0;3;0;9;read: 1-1-0 s=2,c=1,t=1,pt=2,l=2,sg=0:46 1;2;1;0;1;46 ' on serial port COM13 10:38:42.965 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:39:49.716 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:22.1 1;1;1;0;0;22.1 0;0;3;0;9;read: 1-1-0 s=2,c=1,t=1,pt=2,l=2,sg=0:46 1;2;1;0;1;46 ' on serial port COM13 10:40:40.851 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:40:56.432 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:22.2 1;1;1;0;0;22.2 0;0;3;0;9;read: 1-1-0 s=2,c=1,t=1,pt=2,l=2,sg=0:48 1;2;1;0;1;48 ' on serial port COM13 10:40:56.432 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:41:04.095 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 3-3-0 s=1,c=1,t=0,pt=7,l=5,sg=0:24.2 3;1;1;0;0;24.2 0;0;3;0;9;read: 3-3-0 s=2,c=1,t=1,pt=2,l=2,sg=0:76 3;2;1;0;1;76 ' on serial port COM13 10:41:04.095 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:42:03.228 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:22.2 1;1;1;0;0;22.2 ' on serial port COM13 10:42:03.230 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:42:03.437 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=2,c=1,t=1,pt=2,l=2,sg=0:47 1;2;1;0;1;47 ' on serial port COM13 10:42:03.437 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:42:08.798 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 3-3-0 s=1,c=1,t=0,pt=7,l=5,sg=0:23.5 3;1;1;0;0;23.5 0;0;3;0;9;read: 3-3-0 s=2,c=1,t=1,pt=2,l=2,sg=0:50 3;2;1;0;1;50 ' on serial port COM13 10:42:08.798 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:43:10.504 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:22.1 1;1;1;0;0;22.1 0;0;3;0;9;read: 1-1-0 s=2,c=1,t=1,pt=2,l=2,sg=0:46 1;2;1;0;1;46 ' on serial port COM13 10:43:10.504 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:43:13.496 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 3-3-0 s=1,c=1,t=0,pt=7,l=5,sg=0:23.2 3;1;1;0;0;23.2 0;0;3;0;9;read: 3-3-0 s=2,c=1,t=1,pt=2,l=2,sg=0:48 3;2;1;0;1;48 ' on serial port COM13 10:43:13.496 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:44:17.497 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:22.0 1;1;1;0;0;22.0 ' on serial port COM13 10:44:17.500 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:44:18.176 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 3-3-0 s=1,c=1,t=0,pt=7,l=5,sg=0:22.8 3;1;1;0;0;22.8 0;0;3;0;9;read: 3-3-0 s=2,c=1,t=1,pt=2,l=2,sg=0:46 3;2;1;0;1;46 ' on serial port COM13 10:44:18.176 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:45:24.715 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:22.0 1;1;1;0;0;22.0 0;0;3;0;9;read: 1-1-0 s=2,c=1,t=1,pt=2,l=2,sg=0:46 1;2;1;0;1;46 ' on serial port COM13 10:45:24.717 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:46:31.704 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:21.9 1;1;1;0;0;21.9 ' on serial port COM13 10:46:31.706 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:47:32.139 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 3-3-0 s=1,c=1,t=0,pt=7,l=5,sg=0:22.3 3;1;1;0;0;22.3 0;0;3;0;9;read: 3-3-0 s=2,c=1,t=1,pt=2,l=2,sg=0:46 3;2;1;0;1;46 ' on serial port COM13 10:47:32.141 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:47:38.937 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:21.9 1;1;1;0;0;21.9 0;0;3;0;9;read: 1-1-0 s=2,c=1,t=1,pt=2,l=2,sg=0:46 1;2;1;0;1;46 ' on serial port COM13 10:47:38.939 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:48:46.058 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=2,c=1,t=1,pt=2,l=2,sg=0:46 1;2;1;0;1;46 ' on serial port COM13 10:48:46.060 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:49:53.042 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:21.9 1;1;1;0;0;21.9 ' on serial port COM13 10:49:53.044 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:51:00.209 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:82 1;255;3;0;0;82 0;0;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:22.0 1;1;1;0;0;22.0 ' on serial port COM13 10:51:00.211 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:51:00.424 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=2,c=1,t=1,pt=2,l=2,sg=0:46 1;2;1;0;1;46 ' on serial port COM13 10:51:00.426 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:52:07.248 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:82 1;255;3;0;0;82 ' on serial port COM13 10:52:07.249 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data' 10:52:07.640 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:21.9 1;1;1;0;0;21.9 0;0;3;0;9;read: 1-1-0 s=2,c=1,t=1,pt=2,l=2,sg=0:46 1;2;1;0;1;46 ' on serial port COM13 10:52:07.640 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data'
The rule react fast and fill all the data (temp,hum,bat) on the openhab site for the node with the old firmware but with the new frimware i connect the batteries on the sensor and i must wait some minutes until the temp and hum appear on th site but the battery percent not,only after hours
Thanks
Nikos -
RE: [Tutorial] openHAB with serial gateway
What i am doing wrong??
i am using the last rules from silex and i can parse the data from my sensebender temp and hum on openhab but i cannot make it with battery. here is my setup// Mappings
var HashMap<String, String> sensorToItemsMap = newLinkedHashMap("3;1;" -> "Temp", "Temp" -> "3;1;", "3;2;" -> "Hum", "Hum" -> "3;2;", "3;255;" -> "Batt", "Batt" -> "3;255;",
the rule
if(msgType == M_INTERNAL){ // Internal Command
print("(INTERNAL)\t")
if(subType == I_SKETCH_NAME){
println("Sketch name: " + msg )
}
if(subType == I_SKETCH_VERSION){
println("Sketch version: " + msg )
}
if(subType == I_BATTERY_LEVEL){
postUpdate(sensorToItemsMap.get( nodeId + ";" + childId + ";"), msg)
println ("Batt item: " + sensorToItemsMap.get( nodeId + ";" + childId + ";") + " Batt: " + msg )
}}
my.items
String Arduino "Arduino" { serial="COM3@115200" }Number Temp "Temperatur [%.1f °C]" <temperature>
Number Hum "Feuchtigkeit [%.1f %%]" <temperature>
Number Batt "bataria [%.1f %%]" <energy>and this is the logs of openhab
20:02:58.954 [DEBUG] [b.serial.internal.SerialDevice:194 ] - Received message '0;0;3;0;9;read: 3-3-0 s=255,c=4,t=0,pt=6,l=10,sg=0:FFFFFFFFFFFFFFFF03
3;255;4;0;0;FFFFFFFFFFFFFFFF0300
0;0;3;0;9;read: 3-3-0 s=255,c=3,t=11,pt=0,l=17,sg=0:Sensebender Micro
3;255;3;0;11;Sensebender Micro
0;0;3;0;9;read: 3-3-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.3
3;255;3;0;12;1.3
0;0;3;0;9;read: 3-3-0 s=1,c=0,t=6,pt=0,l=0,sg=0:
3;1;0;0;6;
0;0;3;0;9;read: 3-3-0 s=2,c=0,t=7,pt=0,l=0,sg=0:
3;2;0;0;7;
0;0;3;0;9;read: 3-3-0 s=1,c=1,t=0,pt=7,l=5,sg=0:23.6
3;1;1;0;0;23.6
0;0;3;0;9;read: 3-3-0 s=2,c=1,t=1,pt=2,l=2,sg=0:53
3;2;1;0;1;53
0;0;3;0;9;read: 3-3-0 s=255,c=3,t=0,pt=1,l=1,sg=0:113
3;255;3;0;0;113
' on serial port COM3
20:02:58.960 [DEBUG] [o.b.f.i.h.FritzahaWebInterface:336 ] - Sending update to item Power_FritzDECTv
20:02:58.977 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'Decode incoming MySensors data'
20:02:59.101 [ERROR] [o.o.c.s.ScriptExecutionThread :50 ] - Error during the execution of rule 'Decode incoming MySensors data': 5Can someone help me please??
-
RE: [Tutorial] openHAB with serial gateway
Hi,
I am new with mysensors and i am trying to make it work with openhab.
I have a soil sensor and with same copy paste from the forum i manage to sent the value on the openhab, now i am trying to translate the battery level on the opnehab side but i dont know how to do it. can someone help me please?? this is what i get on the openhab 0;0;3;0;9;read: 254-254-0 s=255,c=3,t=0,pt=1,l=1,sg=0:68
254;255;3;0;0;68 this is the battery value.
But i am lost on the rule how to decode the message.Thanks
Nikos -
RE: Sensebender Micro
I vote for one cheap Sensebender version without the temp/hum sensor on it. It will be the perfect door/window sensor.