Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Ilikepeanuts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Ilikepeanuts

    @Ilikepeanuts

    1
    Reputation
    3
    Posts
    266
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Ilikepeanuts Follow

    Best posts made by Ilikepeanuts

    • sending battery voltage - openhab mysensors binding

      Hello
      hope someone can help me with a problem I spent many hours on meanwhile.
      I'm using a MySensors serial gateway which is connected to a Rasberry Pi running Openhab. The connection to the nodes is realized by nrf24.
      The nodes report temperature and humidity to the gateway . These values are forwarded to Openhab and displayed - which works pretty well.
      Now I would like to send the value of the nodes' battery voltage to Openhab in the same way. I believe the value is sent out properly because of the debug output of my node:

      1.PNG

      but only temperature and humidity seem to be received by openhab:

      2.PNG

      The relevant parts of my sketch are:

      #define CHILD_ID_TEMP    0 
      #define CHILD_ID_HUM     1
      #define CHILD_ID_VOLT    2
      ....
      
      MyMessage msgTemp (CHILD_ID_TEMP, V_TEMP);
      MyMessage msgHum  (CHILD_ID_HUM,  V_HUM);
      MyMessage msgVolt (CHILD_ID_VOLT, V_VOLTAGE);
      ....
      
      present(CHILD_ID_TEMP, S_TEMP);
      present(CHILD_ID_HUM,  S_HUM);
      present(CHILD_ID_VOLT, S_MULTIMETER);
      ....
      
      send(msgTemp.set(temperature, 1));
      send(msgHum.set(humidity, 1));
      send(msgVolt.set(batteryV,1));
      
      

      things defined in Openhab:

      	Thing temperature	tempe_N01	[ nodeId=1, childId=0 ]				
      	Thing humidity		humid_N01	[ nodeId=1, childId=1 ]
      	Thing multimeter	batVol_N01	[ nodeId=1, childId=2 ]
      

      items defined in Openhab:

      Number tempe_N01		" Temperature [%.1f °C]"	    		<temperature>	    { channel="mysensors:temperature:gateway:tempe_N01:temp"}
      Number humid_N01		"Humidity[%.1f %%]"       <temperature>		    { channel="mysensors:humidity:gateway:humid_N01:hum"}
      Number batVol_N01		"Node 01 - Batterie/Volt [%.2f V]"			<battery>				    { channel="mysensors:multimeter:gateway:batVol_N01:volt"}
      

      Any help would be greatly appreciated
      Eric

      posted in OpenHAB
      Ilikepeanuts
      Ilikepeanuts

    Latest posts made by Ilikepeanuts

    • RE: sending battery voltage - openhab mysensors binding

      OK got it !!! It was a combination of more failures - with the main one not having read the name of the status message carefully enough : ItemStateChanged(!!!)Event. So as long as battery level is the same ...

      posted in OpenHAB
      Ilikepeanuts
      Ilikepeanuts
    • sending battery voltage - openhab mysensors binding

      Hello
      hope someone can help me with a problem I spent many hours on meanwhile.
      I'm using a MySensors serial gateway which is connected to a Rasberry Pi running Openhab. The connection to the nodes is realized by nrf24.
      The nodes report temperature and humidity to the gateway . These values are forwarded to Openhab and displayed - which works pretty well.
      Now I would like to send the value of the nodes' battery voltage to Openhab in the same way. I believe the value is sent out properly because of the debug output of my node:

      1.PNG

      but only temperature and humidity seem to be received by openhab:

      2.PNG

      The relevant parts of my sketch are:

      #define CHILD_ID_TEMP    0 
      #define CHILD_ID_HUM     1
      #define CHILD_ID_VOLT    2
      ....
      
      MyMessage msgTemp (CHILD_ID_TEMP, V_TEMP);
      MyMessage msgHum  (CHILD_ID_HUM,  V_HUM);
      MyMessage msgVolt (CHILD_ID_VOLT, V_VOLTAGE);
      ....
      
      present(CHILD_ID_TEMP, S_TEMP);
      present(CHILD_ID_HUM,  S_HUM);
      present(CHILD_ID_VOLT, S_MULTIMETER);
      ....
      
      send(msgTemp.set(temperature, 1));
      send(msgHum.set(humidity, 1));
      send(msgVolt.set(batteryV,1));
      
      

      things defined in Openhab:

      	Thing temperature	tempe_N01	[ nodeId=1, childId=0 ]				
      	Thing humidity		humid_N01	[ nodeId=1, childId=1 ]
      	Thing multimeter	batVol_N01	[ nodeId=1, childId=2 ]
      

      items defined in Openhab:

      Number tempe_N01		" Temperature [%.1f °C]"	    		<temperature>	    { channel="mysensors:temperature:gateway:tempe_N01:temp"}
      Number humid_N01		"Humidity[%.1f %%]"       <temperature>		    { channel="mysensors:humidity:gateway:humid_N01:hum"}
      Number batVol_N01		"Node 01 - Batterie/Volt [%.2f V]"			<battery>				    { channel="mysensors:multimeter:gateway:batVol_N01:volt"}
      

      Any help would be greatly appreciated
      Eric

      posted in OpenHAB
      Ilikepeanuts
      Ilikepeanuts
    • MySensors binding - confusion with things configuration

      I'm using mysensors hardware for quite a while now. I've got a mysensors serial gateway connected to the GPIO port (serial pins) of my raspberry pie and some nrf24 nodes distributed in my appartment. The nodes are mainly sending temperature, humidity, battery voltage and a message counter to the gateway which passes on these values to OPENHAB (+mysensors binding) running on my raspi. At the current stage everything is working fine, but each time I like to expand my network with an additional node I'm running into major problems.
      I'm trying to configure my openhab only by .things,.items and .sitemap files however sometimes I have a short look to the devices which were found automatically by the paper UI (in order to get the channel string). And that's where the confusion begins.
      Automatically some things of my nodes are simply named "Temperature Sensor" or "Humidity Sensor" others are named for example "MySensors Device (11;0)". Apart from the different naming format some things are listed twice. Take a look at the screenshot: Mysensors Device (21;1) is the same as the last temperature sensor.
      0_1536406062431_1.png

      Of course I noticed the different channel strings in the example above. It looks like the Paper UI got the device "Mysensors Device (21;1)" from the presentation message of node 21 and "Temperature Sensor" is automatically derived from my code in the .things file. Here it is:
      0_1536406117529_2.PNG

      and that's what it looks like in Visual Studio Code (where things are listed like in paper UI and not like configured in the code window next to the shown list):
      0_1536406183326_3.PNG

      When removing one of the duplicate devices in the paper UI the other one isn't working on as well. When removing my code in the .things file some of the sensors won't be detected at all.

      Anyone facing the same problems?
      Maybe someone has found a better way in dealing with automatic/manual configuration of mysensors things in OPENHAB?

      Thanks in advance
      Eric

      posted in OpenHAB
      Ilikepeanuts
      Ilikepeanuts