Skip to content
  • 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. Door battery status
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

Door battery status

Scheduled Pinned Locked Moved OpenHAB
6 Posts 4 Posters 2.6k Views 4 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.
  • M Offline
    M Offline
    MagnusF
    wrote on last edited by
    #1

    I started a few months ago with MySensor and openhab and have now configured a node with a door contact. I'm using a serial gateway connected to a RPi with openhab. The node is registered as Door in openhab and works with the door Open / Closed. The node is powered by battery so I want to report battery status but do not know how to get this to openhab. Have searched the forum but have not found anything.

    The Thing Door has in openhab 4 channels:
    Tripped Status, mysensors:door 709db93f:door_3_1:tripped, Contact
    Armed Status, mysensors:door 709db93f:door_3_1:armed, Switch
    Battery Level, mysensors:door 709db93f:door_3_1:battery, Number
    Last Update, mysensors:door 709db93f:door_3_1:lastupdate, DateTime

    All the channels have the same node id (3) and child id (1) so how shall I send the battey value from the sketch to the channel "Battery Level"?

    1 Reply Last reply
    0
    • rozpruwaczR Offline
      rozpruwaczR Offline
      rozpruwacz
      wrote on last edited by
      #2

      @MagnusF said in Door battery status:

      h to the channel

      did You try sendBatteryLevel function ?

      M 1 Reply Last reply
      0
      • rozpruwaczR rozpruwacz

        @MagnusF said in Door battery status:

        h to the channel

        did You try sendBatteryLevel function ?

        M Offline
        M Offline
        MagnusF
        wrote on last edited by
        #3

        @rozpruwacz Thanks!

        That it could be that simple! :flushed: Did not see the connection between sending the battery status in the sketch and the thing in openhab.

        1 Reply Last reply
        0
        • MasMatM Offline
          MasMatM Offline
          MasMat
          wrote on last edited by
          #4

          A little off topic but I'm struggling with a same type of scenario. Didnt want to start a new topic if the answer is here.
          The battery I figured out but I'm having problems with the item (contact) and getting it to my sitemap.
          I have checked both files "Contact" in items and "Text" in sitemap (when I add this line the sitemap doesnt load).

          I will post my code if necessary, but can you tell me if a map is always necessary for door contacts? I have other types of sensors working without problems. Should my arduino send only specific words or boolean to make it work?

          F M 2 Replies Last reply
          0
          • MasMatM MasMat

            A little off topic but I'm struggling with a same type of scenario. Didnt want to start a new topic if the answer is here.
            The battery I figured out but I'm having problems with the item (contact) and getting it to my sitemap.
            I have checked both files "Contact" in items and "Text" in sitemap (when I add this line the sitemap doesnt load).

            I will post my code if necessary, but can you tell me if a map is always necessary for door contacts? I have other types of sensors working without problems. Should my arduino send only specific words or boolean to make it work?

            F Offline
            F Offline
            fredswed
            wrote on last edited by
            #5

            @masmat - I am far from an OpenHAB expert but... The sitemap in OpenHAB is only needed to view the status of (or interact with) the item. It is not required for the functionality of an item or thing itself.

            Have you checked your logs to see if there are clues when OpenHAB parses the things/items filed?

            Please start another thread and post your .things, .items, .sitemap files and a log extract there so we can have a look at them.

            1 Reply Last reply
            0
            • MasMatM MasMat

              A little off topic but I'm struggling with a same type of scenario. Didnt want to start a new topic if the answer is here.
              The battery I figured out but I'm having problems with the item (contact) and getting it to my sitemap.
              I have checked both files "Contact" in items and "Text" in sitemap (when I add this line the sitemap doesnt load).

              I will post my code if necessary, but can you tell me if a map is always necessary for door contacts? I have other types of sensors working without problems. Should my arduino send only specific words or boolean to make it work?

              M Offline
              M Offline
              MagnusF
              wrote on last edited by
              #6

              @masmat No it's not necessary to put the "Contact" in a sitemap, your arduino shall send boolean (0/1).

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              3

              Online

              11.7k

              Users

              11.2k

              Topics

              113.0k

              Posts


              Copyright 2019 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
              • OpenHardware.io
              • Categories
              • Recent
              • Tags
              • Popular