Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Controllers
  3. OpenHAB
  4. sending battery voltage - openhab mysensors binding

sending battery voltage - openhab mysensors binding

Scheduled Pinned Locked Moved OpenHAB
2 Posts 1 Posters 622 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Ilikepeanuts
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    1
    • I Offline
      I Offline
      Ilikepeanuts
      wrote on last edited by
      #2

      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 ...

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      16

      Online

      12.0k

      Users

      11.2k

      Topics

      113.4k

      Posts


      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • MySensors
      • OpenHardware.io
      • Categories
      • Recent
      • Tags
      • Popular