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. OpenHAB binding is crashing

OpenHAB binding is crashing

Scheduled Pinned Locked Moved OpenHAB
openhab2crash
4 Posts 2 Posters 1.2k 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.
  • A Offline
    A Offline
    Avamander
    wrote on last edited by Avamander
    #1

    So after switching from Home Assistant to MyController to OpenHAB it seems that OpenHAB doesn't like the way my sensors are reporting their values. I'm seeing this stacktrace in the log all the time (something is wrong with it's output, Konsole isn't letting me copy it properly, image of it: image of stacktrace) :

    01:47:24.343 [DEBUG] [ors.internal.gateway.MySensorsGateway] - Node 3 found in gateway
    01:47:24.350 [DEBUG] [ors.internal.gateway.MySensorsGateway] - Child 4 found in node 3
    01:47:24.357 [ERROR] [internal.event.MySensorsEventRegister] - Event broadcasting throw an exception
    java.lang.NumberFormatException: null                                                                                          
    
    
    
    
    24) ~[?:?]                                                                                                                     
    ?]                                                                                                                             
    [?:?]                                                                                                                          
    
    
    
    a:122) ~[?:?]                                                                                                                  
    ]                                                                                                                              
    :?]                                                                                                                            
    
    
    
    a:79) [211:org.openhab.binding.mysensors:2.3.0.201803141156]                                                                   
    nection.java:358) [211:org.openhab.binding.mysensors:2.3.0.201803141156]                                                       
    
    
    
    
    
    01:47:24.462 [DEBUG] [orsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;2225831 TSF:MSG:READ,3-3-0,s=4,c=1,t=37,pt=3,l=2,sg=0:0
    01:47:24.469 [DEBUG] [orsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;2225838 TSF:MSG:ACK REQ
    01:47:24.475 [DEBUG] [orsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;2225842 TSF:MSG:SEND,0-0-3-3,s=4,c=1,t=37,pt=3,l=2,sg=0,ft=0,st=OK:0
    01:47:24.483 [DEBUG] [orsAbstractConnection$MySensorsReader] - Message from gateway received: 3;4;1;0;37;0                                                   
    

    Sensor 3 sending code:

    void presentation() {
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("Gassensor", "0.0");
      Serial.begin(115200);
    
      // Register all sensors to gateway (they will be created as child devices)
      for (uint8_t sensor_id = 0; sensor_id < 11; sensor_id++) {
        pinMode(sensor_pins[sensor_id], INPUT);
        present(sensor_id, V_UNIT_PREFIX);  // Custom unit message.
      }
    }
    
    
    void loop() {
      for (uint8_t sensor_id = 0; sensor_id < 10; sensor_id++) {
        uint16_t reading = analogRead(sensor_pins[sensor_id]);
        Serial.print(F("Sensor: "));
        Serial.print(sensor_id);
        Serial.print(F(", reading: "));
        Serial.println(reading);
        send(msgPrefix.setSensor(sensor_id).set("ppm"), true);
        send(msg.setSensor(sensor_id).set(reading), true);
        sleep(100);
      }
    
      send(msgPrefix.setSensor(10).set("ppm"), true);
      send(msg.setSensor(10).set(analogRead(DUST)), true);
      sleep(SLEEP_TIME);
    }
    
    1 Reply Last reply
    0
    • F Offline
      F Offline
      freynder
      wrote on last edited by
      #2

      Not sure if this has anything to do with it, but you should not use V_UNIT_PREFIX as a parameter in the present function call. The function expects a sensor-type and not a value-type. I suppose you could use S_CUSTOM instead.

      A 1 Reply Last reply
      0
      • F freynder

        Not sure if this has anything to do with it, but you should not use V_UNIT_PREFIX as a parameter in the present function call. The function expects a sensor-type and not a value-type. I suppose you could use S_CUSTOM instead.

        A Offline
        A Offline
        Avamander
        wrote on last edited by
        #3

        @freynder I'll comment that out, it was only needed for Home Assistant, I added it to get the right type of chart. But still, the crash itself happens after presentation?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Avamander
          wrote on last edited by
          #4

          It turns out that V_UNIT_PREFIX is not supported by OpenHAB's MySensors binding.

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


          28

          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