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. Node battery voltage in openHAB iOS

Node battery voltage in openHAB iOS

Scheduled Pinned Locked Moved OpenHAB
3 Posts 2 Posters 1.9k Views 2 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.
  • B Offline
    B Offline
    ben999
    wrote on last edited by ben999
    #1

    Hi all
    I have a question regarding this topic :
    battery powered arduino without resistors
    I have just implemented this in a motion/temp/humidity sensor
    -> Arduino Pro Mini with NRF24, DHT22 and SR501 (converted to 3.3V as per "Build" instruction)
    I inserted this bit of code into mysensor code :

    #include <Vcc.h>
    const float VccExpected   = 3.0;
    const float VccCorrection = 2.860/2.92; 
    Vcc vcc(VccCorrection);
    
    void loop()
    {
        int batteryPcnt = (int)vcc.Read_Perc(VccExpected);
       sendBatteryLevel(batteryPcnt);
    }
    

    I am pretty happy with the result, as i can now see voltage within PaperUI :)

    Now how would i get that in "things", "items" and "sitemap" ? So i can get my node battery voltage in openHAB iOS...
    Do I need to create a new child that "carries" this info?

    Thanks a lot for your help

    1 Reply Last reply
    1
    • T Offline
      T Offline
      TimO
      Hero Member
      wrote on last edited by
      #2

      @ben999 : Here's an example how to integrate the battery percent value: https://github.com/tobof/openhab2-addons/wiki/Examples
      Look for bathBat01.

      B 1 Reply Last reply
      2
      • T TimO

        @ben999 : Here's an example how to integrate the battery percent value: https://github.com/tobof/openhab2-addons/wiki/Examples
        Look for bathBat01.

        B Offline
        B Offline
        ben999
        wrote on last edited by
        #3

        @TimO saving my evening once more !

        I got so much inspiration from that link already... and tonight's solution was there all along!!!

        It is now working fine, with icon changing according to voltage changes !!!

        Thanks a lot Tim!!

        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


        15

        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