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. Help with Thing/sketch syntax for transmitted variables

Help with Thing/sketch syntax for transmitted variables

Scheduled Pinned Locked Moved OpenHAB
11 Posts 3 Posters 2.2k Views 3 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.
  • gohanG Offline
    gohanG Offline
    gohan
    Mod
    wrote on last edited by
    #2

    For battery there is a specific function to call, for other things it depends and you may look around in examples and forum posts to get an idea of what you could use.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gadgetman
      wrote on last edited by
      #3

      Thanks - I've been searching but still unclear. I've got battery status for the humidity sensor working as part of the humidity "thing" using the "sendBatteryLevel" function but if I wanted to simply define a custom thing for just battery level alone how do I define the variable in the thing?

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

        Battery status is a special case in MySensors and in OpenHAB. You may define any thing type and only enable the battery channel. Every thing supports the battery channel. But you can't present a battery thing. Use another temp / humidity thing instead for example.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          gadgetman
          wrote on last edited by
          #5

          Ah I see. Will search some more then! Thanks.

          1 Reply Last reply
          0
          • gohanG Offline
            gohanG Offline
            gohan
            Mod
            wrote on last edited by
            #6

            If you want to test different sensors, you can use the mock mysensors sketch in the examples

            1 Reply Last reply
            0
            • G Offline
              G Offline
              gadgetman
              wrote on last edited by gadgetman
              #7

              Thanks for that - will play with the different sensor types - I've got humidity/temp/battery worked out from the github wiki.

              However I have a different question now (background - I installed the binding via the eclipse marketplace although I assume that has no bearing on the issue). The humidity/temperature sensors (which are what I've built so far) are discovered automatically in paperui (which is good) and I have them populating paperui control (using simple mode). I've noticed that the thing channel names in paperui control don't survive a reboot of my raspberry pi. While the sensor values eventually reappear, I need to unlink and relink the channels for each thing for the names to reappear. Is this normal? (as mentioned I'm running the mysensors ethernet gateway and openhab2 on the same pi)

              T 1 Reply Last reply
              0
              • gohanG Offline
                gohanG Offline
                gohan
                Mod
                wrote on last edited by
                #8

                Personally I have no idea, maybe it is more an openhab forum question. Did you try over there?

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  gadgetman
                  wrote on last edited by gadgetman
                  #9

                  I'll do that - it doesn't happen with other bindings though. So maybe one for Timo?

                  1 Reply Last reply
                  0
                  • G gadgetman

                    Thanks for that - will play with the different sensor types - I've got humidity/temp/battery worked out from the github wiki.

                    However I have a different question now (background - I installed the binding via the eclipse marketplace although I assume that has no bearing on the issue). The humidity/temperature sensors (which are what I've built so far) are discovered automatically in paperui (which is good) and I have them populating paperui control (using simple mode). I've noticed that the thing channel names in paperui control don't survive a reboot of my raspberry pi. While the sensor values eventually reappear, I need to unlink and relink the channels for each thing for the names to reappear. Is this normal? (as mentioned I'm running the mysensors ethernet gateway and openhab2 on the same pi)

                    T Offline
                    T Offline
                    TimO
                    Hero Member
                    wrote on last edited by
                    #10

                    @gadgetman With the binding I'm only able to handle the things and the channels. The representation via items is not part of the bindings. After your description my first guess is, that this is a problem of OpenHAB itself, but I have no idea why it only happens with things using the MySensors binding. Is there something helpful in the logs?

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      gadgetman
                      wrote on last edited by
                      #11

                      Happy to look at them - could you tell me where they're located?

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


                      18

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.1k

                      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