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. Troubleshooting
  3. Openhab thing/item for gas sensor

Openhab thing/item for gas sensor

Scheduled Pinned Locked Moved Troubleshooting
2 Posts 1 Posters 38 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.
  • S Offline
    S Offline
    seppi9
    wrote on last edited by
    #1

    Dear Forum
    I would appreciate some pointers making a gas meter sensor working in openhab using a serial gateway. I used the water meter sketch and redefined S_WATER with S_GAS. The sensors shows up in openhab and reports data, but the data never gets stored as item.

    The Sensor sketch uses:
    #define CHILD_ID 1 // Id of the sensor child
    MyMessage flowMsg(CHILD_ID,V_FLOW);
    MyMessage volumeMsg(CHILD_ID,V_VOLUME);
    MyMessage lastCounterMsg(CHILD_ID,V_VAR1);

    things definition:
    Bridge mysensors:bridge-eth:mybridge [ ipAddress="127.0.0.1", tcpPort=5003, sendDelay=100, networkSanCheckEnabled=true ] {
    Thing gasMeter Meter_Gas [ nodeId=100, childId=1 ] {
    Channels:
    Type number : volume []
    Type number : flow []
    Type number : var1 []
    }
    }

    items definition:
    Number Gas_Flow "GasFlow" <flow> (Gas) ["Meter"] {channel="mysensors:gasMeter:mybridge:Meter_Gas:flow"}
    Number Gas_Volume "GasVol" <volume> (Gas) ["Meter"] {channel="mysensors:gasMeter:mybridge:Meter_Gas:vol"

    openhab receives the messages and shows them in the gateway debug output:
    Message from gateway received: 100;1;1;0;24;36
    Node 100 found in gateway
    Child 1 found in node 100
    Message from gateway received: 100;1;1;0;35;0.360
    Node 100 found in gateway
    Child 1 found in node 100

    But the output of the other (working) sensors is then processed and stored:
    Updating channel: hum(V_HUM) value to: 49.2
    Humidity1 changed from 48.2 to 49.2

    How can I specifythe channels correctly in the things and items file? Would it be better to use seperate child Ids instead of channels?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      seppi9
      wrote on last edited by
      #2

      just a small correction: it's a Raspberry Pi Gateway, but probably this makes no difference

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


      22

      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