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 2.1 keeps showing light level as 0 with BH1750 and V_LEVEL

OpenHAB 2.1 keeps showing light level as 0 with BH1750 and V_LEVEL

Scheduled Pinned Locked Moved Troubleshooting
openhab2openhablight senors
4 Posts 2 Posters 1.4k 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.
  • George LaynesG Offline
    George LaynesG Offline
    George Laynes
    wrote on last edited by
    #1

    I've been seeing a funny thing for a while and finally got down to try to figure this thing out.

    I have built a couple sensors with the BH1750 light sensor.
    I know the sensor works and that the lux value is transferred to the gateway and read into OpenHAB, as seen here (this is pulled from debug logging from Karaf in OH2.1):

    4;1;1;0;0;24.0
    0;255;3;0;9;TSF:MSG:READ,4-4-0,s=0,c=1,t=1,pt=7,l=5,sg=0:52.3
    4;0;1;0;1;52.3
    0;255;3;0;9;TSF:MSG:READ,4-4-0,s=2,c=1,t=37,pt=3,l=2,sg=0:30
    4;2;1;0;37;30
    0;255;3;0;9;TSF:MSG:READ,4-4-0,s=255,c=3,t=0,pt=1,l=1,sg=0:31
    4;255;3;0;0;31
    0;255;3;0;9;TSF:MSG:READ,4-4-0,s=3,c=1,t=16,pt=0,l=1,sg=0:0
    4;3;1;0;16;0
    

    Light level is child sensor 2.

    What bugs me is that each value gets transferred into an appropriate item, except for light level, as seen here:

    22:28:38.347 [DEBUG] [rsAbstractConnection$MySensorsReader] - 4;1;1;0;0;24.0
    22:28:38.349 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 4 found in gateway
    22:28:38.350 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 1 found in node 4
    22:28:38.352 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: temp(0) value to: 24.0
    22:28:38.383 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 4/1 to 2017-07-09T22:28:38.000+0200
    22:28:38.384 [DEBUG] [rsAbstractConnection$MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,4-4-0,s=0,c=1,t=1,pt=7,l=5,sg=0:52.3
    22:28:38.386 [DEBUG] [rsAbstractConnection$MySensorsReader] - 4;0;1;0;1;52.3
    22:28:38.387 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 4 found in gateway
    22:28:38.395 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 0 found in node 4
    22:28:38.397 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: hum(1) value to: 52.3
    22:28:38.405 [INFO ] [marthome.event.ItemStateChangedEvent] - iUS3TemperatureLC changed from 2017-07-09T22:26:26.000+0200 to 2017-07-09T22:28:38.000+0200
    22:28:38.430 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 4/0 to 2017-07-09T22:28:38.000+0200
    22:28:38.431 [DEBUG] [rsAbstractConnection$MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,4-4-0,s=2,c=1,t=37,pt=3,l=2,sg=0:30
    22:28:38.437 [DEBUG] [rsAbstractConnection$MySensorsReader] - 4;2;1;0;37;30
    22:28:38.437 [INFO ] [marthome.event.ItemStateChangedEvent] - iUS3Humidity changed from 52.9 to 52.3
    22:28:38.447 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 4 found in gateway
    22:28:38.448 [INFO ] [marthome.event.ItemStateChangedEvent] - iUS3HumidityLC changed from 2017-07-09T22:26:26.000+0200 to 2017-07-09T22:28:38.000+0200
    22:28:38.449 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 2 found in node 4
    22:28:38.453 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: level(37) value to: 30
    22:28:38.462 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 4/2 to 2017-07-09T22:28:38.000+0200
    22:28:38.464 [DEBUG] [rsAbstractConnection$MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,4-4-0,s=255,c=3,t=0,pt=1,l=1,sg=0:31
    22:28:38.465 [DEBUG] [rsAbstractConnection$MySensorsReader] - 4;255;3;0;0;31
    22:28:38.469 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Battery percent for node 4 update to: 31%
    22:28:38.470 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: battery value to: 31
    22:28:38.472 [INFO ] [marthome.event.ItemStateChangedEvent] - iUS3LightLevelLC changed from 2017-07-09T22:26:26.000+0200 to 2017-07-09T22:28:38.000+0200
    22:28:38.482 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 4/0 to 2017-07-09T22:28:38.000+0200
    22:28:38.483 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: battery value to: 31
    22:28:38.495 [INFO ] [marthome.event.ItemStateChangedEvent] - iUS3Battery changed from 99 to 31
    22:28:38.496 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 4/2 to 2017-07-09T22:28:38.000+0200
    22:28:38.496 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: battery value to: 31
    22:28:38.513 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 4/3 to 2017-07-09T22:28:38.000+0200
    22:28:38.514 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: battery value to: 31
    22:28:38.524 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 4/1 to 2017-07-09T22:28:38.000+0200
    22:28:38.530 [DEBUG] [rsAbstractConnection$MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,4-4-0,s=3,c=1,t=16,pt=0,l=1,sg=0:0
    22:28:38.530 [INFO ] [marthome.event.ItemStateChangedEvent] - iUS3MotionLC changed from 2017-07-09T22:26:26.000+0200 to 2017-07-09T22:28:38.000+0200
    22:28:38.534 [DEBUG] [rsAbstractConnection$MySensorsReader] - 4;3;1;0;16;0
    22:28:38.536 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 4 found in gateway
    22:28:38.537 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 3 found in node 4
    22:28:38.538 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: tripped(16) value to: CLOSED
    22:28:38.547 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 4/3 to 2017-07-09T22:28:38.000+0200
    

    It looks like the value for light just gets ignored.

    I added light sensors via PaperUI by manually adding a thing and then an item from that (not using Simple mode).

    The code for the sensor is pulled directly out of the example and in Arduino debug, the value is properly given.

    Does anyone else have this problem?

    T 1 Reply Last reply
    1
    • George LaynesG George Laynes

      I've been seeing a funny thing for a while and finally got down to try to figure this thing out.

      I have built a couple sensors with the BH1750 light sensor.
      I know the sensor works and that the lux value is transferred to the gateway and read into OpenHAB, as seen here (this is pulled from debug logging from Karaf in OH2.1):

      4;1;1;0;0;24.0
      0;255;3;0;9;TSF:MSG:READ,4-4-0,s=0,c=1,t=1,pt=7,l=5,sg=0:52.3
      4;0;1;0;1;52.3
      0;255;3;0;9;TSF:MSG:READ,4-4-0,s=2,c=1,t=37,pt=3,l=2,sg=0:30
      4;2;1;0;37;30
      0;255;3;0;9;TSF:MSG:READ,4-4-0,s=255,c=3,t=0,pt=1,l=1,sg=0:31
      4;255;3;0;0;31
      0;255;3;0;9;TSF:MSG:READ,4-4-0,s=3,c=1,t=16,pt=0,l=1,sg=0:0
      4;3;1;0;16;0
      

      Light level is child sensor 2.

      What bugs me is that each value gets transferred into an appropriate item, except for light level, as seen here:

      22:28:38.347 [DEBUG] [rsAbstractConnection$MySensorsReader] - 4;1;1;0;0;24.0
      22:28:38.349 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 4 found in gateway
      22:28:38.350 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 1 found in node 4
      22:28:38.352 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: temp(0) value to: 24.0
      22:28:38.383 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 4/1 to 2017-07-09T22:28:38.000+0200
      22:28:38.384 [DEBUG] [rsAbstractConnection$MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,4-4-0,s=0,c=1,t=1,pt=7,l=5,sg=0:52.3
      22:28:38.386 [DEBUG] [rsAbstractConnection$MySensorsReader] - 4;0;1;0;1;52.3
      22:28:38.387 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 4 found in gateway
      22:28:38.395 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 0 found in node 4
      22:28:38.397 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: hum(1) value to: 52.3
      22:28:38.405 [INFO ] [marthome.event.ItemStateChangedEvent] - iUS3TemperatureLC changed from 2017-07-09T22:26:26.000+0200 to 2017-07-09T22:28:38.000+0200
      22:28:38.430 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 4/0 to 2017-07-09T22:28:38.000+0200
      22:28:38.431 [DEBUG] [rsAbstractConnection$MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,4-4-0,s=2,c=1,t=37,pt=3,l=2,sg=0:30
      22:28:38.437 [DEBUG] [rsAbstractConnection$MySensorsReader] - 4;2;1;0;37;30
      22:28:38.437 [INFO ] [marthome.event.ItemStateChangedEvent] - iUS3Humidity changed from 52.9 to 52.3
      22:28:38.447 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 4 found in gateway
      22:28:38.448 [INFO ] [marthome.event.ItemStateChangedEvent] - iUS3HumidityLC changed from 2017-07-09T22:26:26.000+0200 to 2017-07-09T22:28:38.000+0200
      22:28:38.449 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 2 found in node 4
      22:28:38.453 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: level(37) value to: 30
      22:28:38.462 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 4/2 to 2017-07-09T22:28:38.000+0200
      22:28:38.464 [DEBUG] [rsAbstractConnection$MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,4-4-0,s=255,c=3,t=0,pt=1,l=1,sg=0:31
      22:28:38.465 [DEBUG] [rsAbstractConnection$MySensorsReader] - 4;255;3;0;0;31
      22:28:38.469 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Battery percent for node 4 update to: 31%
      22:28:38.470 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: battery value to: 31
      22:28:38.472 [INFO ] [marthome.event.ItemStateChangedEvent] - iUS3LightLevelLC changed from 2017-07-09T22:26:26.000+0200 to 2017-07-09T22:28:38.000+0200
      22:28:38.482 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 4/0 to 2017-07-09T22:28:38.000+0200
      22:28:38.483 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: battery value to: 31
      22:28:38.495 [INFO ] [marthome.event.ItemStateChangedEvent] - iUS3Battery changed from 99 to 31
      22:28:38.496 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 4/2 to 2017-07-09T22:28:38.000+0200
      22:28:38.496 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: battery value to: 31
      22:28:38.513 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 4/3 to 2017-07-09T22:28:38.000+0200
      22:28:38.514 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: battery value to: 31
      22:28:38.524 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 4/1 to 2017-07-09T22:28:38.000+0200
      22:28:38.530 [DEBUG] [rsAbstractConnection$MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,4-4-0,s=3,c=1,t=16,pt=0,l=1,sg=0:0
      22:28:38.530 [INFO ] [marthome.event.ItemStateChangedEvent] - iUS3MotionLC changed from 2017-07-09T22:26:26.000+0200 to 2017-07-09T22:28:38.000+0200
      22:28:38.534 [DEBUG] [rsAbstractConnection$MySensorsReader] - 4;3;1;0;16;0
      22:28:38.536 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 4 found in gateway
      22:28:38.537 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 3 found in node 4
      22:28:38.538 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: tripped(16) value to: CLOSED
      22:28:38.547 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 4/3 to 2017-07-09T22:28:38.000+0200
      

      It looks like the value for light just gets ignored.

      I added light sensors via PaperUI by manually adding a thing and then an item from that (not using Simple mode).

      The code for the sensor is pulled directly out of the example and in Arduino debug, the value is properly given.

      Does anyone else have this problem?

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

      Hey @George-Laynes !

      You've found a bug in the binding, thank you! :-)

      I've fixed it and it will work in future versions.

      1 Reply Last reply
      0
      • George LaynesG Offline
        George LaynesG Offline
        George Laynes
        wrote on last edited by
        #3

        @TimO - I live to serve ;) and find bugs.

        Any idea on how soon it'll be available for general public?

        T 1 Reply Last reply
        1
        • George LaynesG George Laynes

          @TimO - I live to serve ;) and find bugs.

          Any idea on how soon it'll be available for general public?

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

          @George-Laynes said in OpenHAB 2.1 keeps showing light level as 0 with BH1750 and V_LEVEL:

          Any idea on how soon it'll be available for general public?

          Very soon. The next release is finished in the next days. But it will not be backwards compatible because there was a change in the naming of the parameters, for example: skipStartupCheck is now named startupCheckEnabled, so I need to think about migration options.

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


          25

          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