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. Home Assistant
  4. No lights shown in GUI

No lights shown in GUI

Scheduled Pinned Locked Moved Home Assistant
10 Posts 2 Posters 2.5k 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.
  • BartB Offline
    BartB Offline
    Bart
    wrote on last edited by Bart
    #1

    Hi

    I wanted to try out the lights via mysensors.

    So from a switch sketch I've made a conversion to light sketch. The only change I've made is in present function have used S_DIMMER instead of S_BINARY. Other than that I am using the V_STATUS type to send the updates to HA.

    So I can see that the persistence file has been populated with the sensors:

    {"0": {"children": {}, "battery_level": 0, "protocol_version": "2.0.1-beta", "sketch_name": "SerialGateway", "sketch_version": "0.1", "sensor_id": 0, "type": 18}, "1": {"children": {"22": {"values": {}, "description": "IB_SALON_M_1", "id": 22, "type": 4}, "23": {"values": {}, "description": "IB_SALON_M_2", "id": 23, "type": 4}, "24": {"values": {}, "description": "IB_SALON_M_3", "id": 24, "type": 4}, "25": {"values": {}, "description": "IB_SALON_M_4", "id": 25, "type": 4}, "26": {"values": {"2": "0"}, "description": "IB_SALON_BL_1", "id": 26, "type": 4}, (...) }, "battery_level": 0, "protocol_version": "2.0.1-beta", "sketch_name": "InputBinary1", "sketch_version": null, "sensor_id": 1, "type": 17}}
    

    but I am not getting anything shown in the GUI. Also I can see that the state requests (getting state from the HA when sketch initializes) are timing out.

    So how do I get these lights properly populated? Maybe I am not aware of some obvious fact about light component.

    on the side note, I have not seen any higher level explanation of the HA design. Is there something that explains its architecture?

    martinhjelmareM 1 Reply Last reply
    0
    • BartB Bart

      Hi

      I wanted to try out the lights via mysensors.

      So from a switch sketch I've made a conversion to light sketch. The only change I've made is in present function have used S_DIMMER instead of S_BINARY. Other than that I am using the V_STATUS type to send the updates to HA.

      So I can see that the persistence file has been populated with the sensors:

      {"0": {"children": {}, "battery_level": 0, "protocol_version": "2.0.1-beta", "sketch_name": "SerialGateway", "sketch_version": "0.1", "sensor_id": 0, "type": 18}, "1": {"children": {"22": {"values": {}, "description": "IB_SALON_M_1", "id": 22, "type": 4}, "23": {"values": {}, "description": "IB_SALON_M_2", "id": 23, "type": 4}, "24": {"values": {}, "description": "IB_SALON_M_3", "id": 24, "type": 4}, "25": {"values": {}, "description": "IB_SALON_M_4", "id": 25, "type": 4}, "26": {"values": {"2": "0"}, "description": "IB_SALON_BL_1", "id": 26, "type": 4}, (...) }, "battery_level": 0, "protocol_version": "2.0.1-beta", "sketch_name": "InputBinary1", "sketch_version": null, "sensor_id": 1, "type": 17}}
      

      but I am not getting anything shown in the GUI. Also I can see that the state requests (getting state from the HA when sketch initializes) are timing out.

      So how do I get these lights properly populated? Maybe I am not aware of some obvious fact about light component.

      on the side note, I have not seen any higher level explanation of the HA design. Is there something that explains its architecture?

      martinhjelmareM Offline
      martinhjelmareM Offline
      martinhjelmare
      Plugin Developer
      wrote on last edited by martinhjelmare
      #2

      @Bart

      None of the children have populated the values dictionary according to the JSON file. Initial values is required to add the mysensors devices as entities in home assistant and is explained in the mysensors docs at home-assistant.io.

      https://home-assistant.io/components/mysensors/#presentation

      Please read the docs and use the provided example sketches at home-assistant.io when first trying a platform.

      https://home-assistant.io/components/light.mysensors/#example-sketch

      Note that this is a mysensors version 1.5 sketch.

      1 Reply Last reply
      0
      • martinhjelmareM Offline
        martinhjelmareM Offline
        martinhjelmare
        Plugin Developer
        wrote on last edited by
        #3

        Regarding architecture there's a developer section in the docs explaining that.

        BartB 1 Reply Last reply
        0
        • martinhjelmareM martinhjelmare

          Regarding architecture there's a developer section in the docs explaining that.

          BartB Offline
          BartB Offline
          Bart
          wrote on last edited by Bart
          #4

          @martinhjelmare So do I need to send all 3 values to HA? As shown in the example sketch?

            gw.send(lightMsg.set(currentLevel > 0 ? 1 : 0));
            gw.send(dimmerMsg.set(currentLevel));
            gw.send(rgbMsg.set(rgb));
          

          Or will it be enough to send the lightMsg (that is V_STATUS)? And just as a sidenote - I have briefly checked the sketch in domoticz. It worked and I was able to turn on/off the lights and see the initial status.

          1 Reply Last reply
          0
          • martinhjelmareM Offline
            martinhjelmareM Offline
            martinhjelmare
            Plugin Developer
            wrote on last edited by martinhjelmare
            #5

            The device will show in the HA GUI as soon as all required values comes in, but you should send an initial value for each V_TYPE that you want to use, otherwise some functions will probably not work. Check each platform doc for required types, S_TYPE and V_TYPE.

            Edit: If you want more specific help, you should post serial and home assistant logs. It's hard for me to say anything specific for your case otherwise.

            BartB 1 Reply Last reply
            0
            • martinhjelmareM martinhjelmare

              The device will show in the HA GUI as soon as all required values comes in, but you should send an initial value for each V_TYPE that you want to use, otherwise some functions will probably not work. Check each platform doc for required types, S_TYPE and V_TYPE.

              Edit: If you want more specific help, you should post serial and home assistant logs. It's hard for me to say anything specific for your case otherwise.

              BartB Offline
              BartB Offline
              Bart
              wrote on last edited by
              #6

              @martinhjelmare OK thanks. Will make sure to collect these logs next time. Hopefully I will get the console logs shown. Still not sure why I am not seeing them...

              1 Reply Last reply
              0
              • BartB Offline
                BartB Offline
                Bart
                wrote on last edited by
                #7

                @martinhjelmare said:

                The device will show in the HA GUI as soon as all required values comes in, but you should send an initial value for each V_TYPE that you want to use, otherwise some functions will probably not work. Check each platform doc for required types, S_TYPE and V_TYPE.

                OK, after sending the V_PERCENTAGE it is visible. I have not understood correctly the table presented in the manual. Seems to be obvious now :)

                However I am wondering how to get rid of the dimmer functionality on HA side. It could be done by sending e.g. V_PERCENTAGE == -1. That would tell the HA side the light is not a dimmer and we could get rid of such option for the lights in the front-end.

                1 Reply Last reply
                0
                • martinhjelmareM Offline
                  martinhjelmareM Offline
                  martinhjelmare
                  Plugin Developer
                  wrote on last edited by
                  #8

                  If you don't want it to be a dimmer then don't present it as a dimmer. What functionality do you need for the device? If it's only an on/off device you should present it as S_LIGHT or S_BINARY. Then it will show as a regular switch in the frontend.

                  BartB 1 Reply Last reply
                  0
                  • martinhjelmareM martinhjelmare

                    If you don't want it to be a dimmer then don't present it as a dimmer. What functionality do you need for the device? If it's only an on/off device you should present it as S_LIGHT or S_BINARY. Then it will show as a regular switch in the frontend.

                    BartB Offline
                    BartB Offline
                    Bart
                    wrote on last edited by
                    #9

                    @martinhjelmare But then can I have HA do the same stuff it is doing on other lights? https://home-assistant.io/components/light/ ?

                    1 Reply Last reply
                    0
                    • martinhjelmareM Offline
                      martinhjelmareM Offline
                      martinhjelmare
                      Plugin Developer
                      wrote on last edited by
                      #10

                      Do you mean profiles and transition? Those are hardware specific features and not supported by mysensors lights.

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


                      15

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