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. Home Assistant v 0.13.1

Home Assistant v 0.13.1

Scheduled Pinned Locked Moved Home Assistant
dimmerlight switchswitchserial gatewayhome assistant
13 Posts 3 Posters 5.9k 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.
  • M Offline
    M Offline
    Mihai
    wrote on last edited by
    #4

    Thank you.

    1 Reply Last reply
    0
    • Борис БашкинцевБ Offline
      Борис БашкинцевБ Offline
      Борис Башкинцев
      wrote on last edited by Борис Башкинцев
      #5

      Great controller, but IMHO raw.
      Add mysensors dimmer to HA 0.16.1. It appears in web interface, but no slider.
      0_1459718772155_upload-27909598-f1eb-437c-afd1-21999ab7bd63
      I can turn lights OFF, but not ON - sensor just dont recive any command. And HA set V_PERCENTAGE=0, instead of 100:
      0_1459719368007_Image 005.png

      I use latest dev version of Mysensors. MYSController works fine with this sensor.

      martinhjelmareM 1 Reply Last reply
      0
      • Борис БашкинцевБ Борис Башкинцев

        Great controller, but IMHO raw.
        Add mysensors dimmer to HA 0.16.1. It appears in web interface, but no slider.
        0_1459718772155_upload-27909598-f1eb-437c-afd1-21999ab7bd63
        I can turn lights OFF, but not ON - sensor just dont recive any command. And HA set V_PERCENTAGE=0, instead of 100:
        0_1459719368007_Image 005.png

        I use latest dev version of Mysensors. MYSController works fine with this sensor.

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

        @Борис-Башкинцев

        Hi!

        Dimmer slider is supported but depends on how you've presented your actuator.

        https://home-assistant.io/components/light.mysensors/

        The slider will only be shown once the actuator is turned on, either from HA or the device.

        If you post or link to your sketch, HA mysensors config and include the sent/received commands in the log, I might be able to tell you why you're not getting the expected result.

        1 Reply Last reply
        0
        • Борис БашкинцевБ Offline
          Борис БашкинцевБ Offline
          Борис Башкинцев
          wrote on last edited by
          #7

          Clear log and start HA:

          16-04-04 16:05:40 homeassistant.components.recorder: Found unfinished sessions
          16-04-04 16:06:15 mysensors.mysensors: child_id 0 already exists in children, cannot add child
          16-04-04 16:06:15 mysensors.mysensors: child_id 1 already exists in children, cannot add child
          16-04-04 16:06:15 mysensors.mysensors: child_id 2 already exists in children, cannot add child
          16-04-04 16:06:15 mysensors.mysensors: child_id 3 already exists in children, cannot add child
          16-04-04 16:06:53 homeassistant.components.http: API password missing or incorrect.
          16-04-04 16:07:30 mysensors.mysensors: Serial exception
          Traceback (most recent call last):
            File "C:\Users\bazis\AppData\Roaming\.homeassistant\lib\mysensors\mysensors.py", line 341, in run
              line = self.serial.readline()
            File "C:\Users\bazis\AppData\Roaming\.homeassistant\lib\serial\serialwin32.py", line 218, in read
              raise SerialException('call to ClearCommError failed')
          serial.serialutil.SerialException: call to ClearCommError failed
          
          

          found_sensors:

          {"14": {"children": {"0": {"type": 4, "values": {"3": "0"}, "id": 0}, "1": {"type": 4, "values": {"3": "0"}, "id": 1}, "2": {"type": 4, "values": {"3": "0"}, "id": 2}, "3": {"type": 6, "values": {"0": "29.0"}, "id": 3}}, "type": 17, "sketch_version": "1.1", "battery_level": 0, "sensor_id": 14, "sketch_name": "Aquarium"}}
          

          Config:

          homeassistant:
            # Name of the location where Home Assistant is running
            name: Home
            # C for Celcius, F for Fahrenheit
            temperature_unit: C
            # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
            time_zone: Europe/Moscow
             # Location required to calculate the time the sun rises and sets
            latitude: **********
            longitude: *********
          
          # View all events in a logbook
          logbook:
          
          # Checks for available updates
          updater:
          
          # Enables the frontend
          frontend:
          
          # Show links to resources in log and frontend
          #introduction:
          
          # Discover some devices automatically
          discovery:
          
          # Enables support for tracking state changes over time.
          history:
          
          # Allows you to issue voice commands from the frontend
          conversation:
          
          # Track the sun
          sun:
          
          http:
            api_password: **********
          
          device_tracker:
            platform: ddwrt
            host: 192.168.1.1
            username: *********
            password: **********
            #interval_seconds: 60
          
          
          mysensors:
            gateways:
              - port: 'COM5'
                #persistence_file: "C:\\Users\\bazis\\AppData\\Roaming\\.homeassistant\\found_mysensors.json"
                persistence_file: "found_mysensors.json"
                baud_rate: 115200
            debug: true
            persistence: true
            version: '1.5'
            optimistic: 'true'
          
          

          I will post some additional info later.

          martinhjelmareM 1 Reply Last reply
          0
          • Борис БашкинцевБ Борис Башкинцев

            Clear log and start HA:

            16-04-04 16:05:40 homeassistant.components.recorder: Found unfinished sessions
            16-04-04 16:06:15 mysensors.mysensors: child_id 0 already exists in children, cannot add child
            16-04-04 16:06:15 mysensors.mysensors: child_id 1 already exists in children, cannot add child
            16-04-04 16:06:15 mysensors.mysensors: child_id 2 already exists in children, cannot add child
            16-04-04 16:06:15 mysensors.mysensors: child_id 3 already exists in children, cannot add child
            16-04-04 16:06:53 homeassistant.components.http: API password missing or incorrect.
            16-04-04 16:07:30 mysensors.mysensors: Serial exception
            Traceback (most recent call last):
              File "C:\Users\bazis\AppData\Roaming\.homeassistant\lib\mysensors\mysensors.py", line 341, in run
                line = self.serial.readline()
              File "C:\Users\bazis\AppData\Roaming\.homeassistant\lib\serial\serialwin32.py", line 218, in read
                raise SerialException('call to ClearCommError failed')
            serial.serialutil.SerialException: call to ClearCommError failed
            
            

            found_sensors:

            {"14": {"children": {"0": {"type": 4, "values": {"3": "0"}, "id": 0}, "1": {"type": 4, "values": {"3": "0"}, "id": 1}, "2": {"type": 4, "values": {"3": "0"}, "id": 2}, "3": {"type": 6, "values": {"0": "29.0"}, "id": 3}}, "type": 17, "sketch_version": "1.1", "battery_level": 0, "sensor_id": 14, "sketch_name": "Aquarium"}}
            

            Config:

            homeassistant:
              # Name of the location where Home Assistant is running
              name: Home
              # C for Celcius, F for Fahrenheit
              temperature_unit: C
              # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
              time_zone: Europe/Moscow
               # Location required to calculate the time the sun rises and sets
              latitude: **********
              longitude: *********
            
            # View all events in a logbook
            logbook:
            
            # Checks for available updates
            updater:
            
            # Enables the frontend
            frontend:
            
            # Show links to resources in log and frontend
            #introduction:
            
            # Discover some devices automatically
            discovery:
            
            # Enables support for tracking state changes over time.
            history:
            
            # Allows you to issue voice commands from the frontend
            conversation:
            
            # Track the sun
            sun:
            
            http:
              api_password: **********
            
            device_tracker:
              platform: ddwrt
              host: 192.168.1.1
              username: *********
              password: **********
              #interval_seconds: 60
            
            
            mysensors:
              gateways:
                - port: 'COM5'
                  #persistence_file: "C:\\Users\\bazis\\AppData\\Roaming\\.homeassistant\\found_mysensors.json"
                  persistence_file: "found_mysensors.json"
                  baud_rate: 115200
              debug: true
              persistence: true
              version: '1.5'
              optimistic: 'true'
            
            

            I will post some additional info later.

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

            @Борис-Башкинцев

            Looking at the persistence file, you are missing V_LIGHT or V_STATUS in values. You need to use one of these in your sketch to turn the dimmer on. Make sure you send an initial value for this in setup or presentation. Also make sure you handle this in incoming message function.

            If you send state feedback to controller after receiving an incoming value, you can set optimistic to false, or remove that line entirely in HA mysensors config.

            Regarding the serial exception, was that a one time event, or is it recurring?

            1 Reply Last reply
            0
            • Борис БашкинцевБ Offline
              Борис БашкинцевБ Offline
              Борис Башкинцев
              wrote on last edited by
              #9

              I send initial values in setup.

              MyMessage temp_msg(TEMP_SENSOR_ID, V_TEMP);
              MyMessage light_msg(0, V_PERCENTAGE);
              
              void setup()  
              { 
              
                send(light_msg.setSensor(0).set(0));
                send(light_msg.setSensor(1).set(0));
                send(light_msg.setSensor(2).set(0));
               .....
              }
              

              Here log from MYSController

              04.04.2016 21:26:35	INFO	Connected to COM5
              04.04.2016 21:26:37	CHILD	New child discovered, node id=0, child id=internal
              04.04.2016 21:26:37	RX	0;255;3;0;14;Gateway startup complete.
              04.04.2016 21:26:44	UPDATE	281474976713968
              04.04.2016 21:26:46	NODE	New node discovered, node id=14
              04.04.2016 21:26:46	CHILD	New child discovered, node id=14, child id=3
              04.04.2016 21:26:46	RX	14;3;1;0;0;29.5
              04.04.2016 21:27:23	CHILD	New child discovered, node id=14, child id=0
              04.04.2016 21:27:23	RX	14;0;1;0;3;0
              04.04.2016 21:27:23	CHILD	New child discovered, node id=14, child id=1
              04.04.2016 21:27:23	RX	14;1;1;0;3;0
              04.04.2016 21:27:23	CHILD	New child discovered, node id=14, child id=2
              04.04.2016 21:27:23	RX	14;2;1;0;3;0
              04.04.2016 21:27:24	CHILD	New child discovered, node id=14, child id=internal
              04.04.2016 21:27:24	DEBUG	Update child id=255, type=ARDUINO_NODE
              04.04.2016 21:27:24	RX	14;255;0;0;17;2.0.0-beta
              04.04.2016 21:27:24	TX	14;255;3;0;6;M
              04.04.2016 21:27:24	RX	14;255;3;0;6;0
              04.04.2016 21:27:24	DEBUG	Update child id=0, type=DIMMER
              04.04.2016 21:27:24	RX	14;0;0;0;4;
              04.04.2016 21:27:24	DEBUG	Update child id=1, type=DIMMER
              04.04.2016 21:27:24	RX	14;1;0;0;4;
              04.04.2016 21:27:24	DEBUG	Update child id=2, type=DIMMER
              04.04.2016 21:27:24	RX	14;2;0;0;4;
              04.04.2016 21:27:24	DEBUG	Update child id=3, type=TEMP
              04.04.2016 21:27:24	RX	14;3;0;0;6;
              04.04.2016 21:27:24	RX	14;255;3;0;11;Aquarium
              04.04.2016 21:27:24	RX	14;255;3;0;12;1.1
              04.04.2016 21:28:02	TX	14;2;1;0;3;56
              04.04.2016 21:28:02	RX	14;2;1;0;3;56
              04.04.2016 21:28:24	RX	14;3;1;0;0;29.5
              04.04.2016 21:28:27	TX	14;2;1;0;3;0
              04.04.2016 21:28:27	RX	14;2;1;0;3;0
              

              Set optimistic: 'false', nothing changes. I can only turn OFF.

              Serial exeption is permanent. Tried pyserial 2.7 and 3.0.1

              If you send state feedback to controller after receiving an incoming value - YES
              Also make sure you handle this in incoming message function. - I dont uderstand. What should I do with incoming messages in mysensors serial gateway?

              martinhjelmareM 1 Reply Last reply
              0
              • Борис БашкинцевБ Борис Башкинцев

                I send initial values in setup.

                MyMessage temp_msg(TEMP_SENSOR_ID, V_TEMP);
                MyMessage light_msg(0, V_PERCENTAGE);
                
                void setup()  
                { 
                
                  send(light_msg.setSensor(0).set(0));
                  send(light_msg.setSensor(1).set(0));
                  send(light_msg.setSensor(2).set(0));
                 .....
                }
                

                Here log from MYSController

                04.04.2016 21:26:35	INFO	Connected to COM5
                04.04.2016 21:26:37	CHILD	New child discovered, node id=0, child id=internal
                04.04.2016 21:26:37	RX	0;255;3;0;14;Gateway startup complete.
                04.04.2016 21:26:44	UPDATE	281474976713968
                04.04.2016 21:26:46	NODE	New node discovered, node id=14
                04.04.2016 21:26:46	CHILD	New child discovered, node id=14, child id=3
                04.04.2016 21:26:46	RX	14;3;1;0;0;29.5
                04.04.2016 21:27:23	CHILD	New child discovered, node id=14, child id=0
                04.04.2016 21:27:23	RX	14;0;1;0;3;0
                04.04.2016 21:27:23	CHILD	New child discovered, node id=14, child id=1
                04.04.2016 21:27:23	RX	14;1;1;0;3;0
                04.04.2016 21:27:23	CHILD	New child discovered, node id=14, child id=2
                04.04.2016 21:27:23	RX	14;2;1;0;3;0
                04.04.2016 21:27:24	CHILD	New child discovered, node id=14, child id=internal
                04.04.2016 21:27:24	DEBUG	Update child id=255, type=ARDUINO_NODE
                04.04.2016 21:27:24	RX	14;255;0;0;17;2.0.0-beta
                04.04.2016 21:27:24	TX	14;255;3;0;6;M
                04.04.2016 21:27:24	RX	14;255;3;0;6;0
                04.04.2016 21:27:24	DEBUG	Update child id=0, type=DIMMER
                04.04.2016 21:27:24	RX	14;0;0;0;4;
                04.04.2016 21:27:24	DEBUG	Update child id=1, type=DIMMER
                04.04.2016 21:27:24	RX	14;1;0;0;4;
                04.04.2016 21:27:24	DEBUG	Update child id=2, type=DIMMER
                04.04.2016 21:27:24	RX	14;2;0;0;4;
                04.04.2016 21:27:24	DEBUG	Update child id=3, type=TEMP
                04.04.2016 21:27:24	RX	14;3;0;0;6;
                04.04.2016 21:27:24	RX	14;255;3;0;11;Aquarium
                04.04.2016 21:27:24	RX	14;255;3;0;12;1.1
                04.04.2016 21:28:02	TX	14;2;1;0;3;56
                04.04.2016 21:28:02	RX	14;2;1;0;3;56
                04.04.2016 21:28:24	RX	14;3;1;0;0;29.5
                04.04.2016 21:28:27	TX	14;2;1;0;3;0
                04.04.2016 21:28:27	RX	14;2;1;0;3;0
                

                Set optimistic: 'false', nothing changes. I can only turn OFF.

                Serial exeption is permanent. Tried pyserial 2.7 and 3.0.1

                If you send state feedback to controller after receiving an incoming value - YES
                Also make sure you handle this in incoming message function. - I dont uderstand. What should I do with incoming messages in mysensors serial gateway?

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

                @Борис-Башкинцев

                You're only sending initial value for V_PERCENTAGE. You need to do the same for V_STATUS.

                ...
                MyMessage status_msg(0, V_STATUS);
                void setup() {
                ...
                send(status_msg.setSensor(0).set(0));
                ...
                }
                

                Sorry for not indenting properly. Can't do it on my cell phone.

                When you turn the dimmer on in home assistant, it will send a message of type V_STATUS to the actuator. But only if you already sent an initial value of the same type. Since the controller will send this type of message, you need to handle that type in your function for incoming messages.

                So in your function for handling incoming messages, you should not only handle messages of type V_PERCENTAGE but also V_STATUS.

                How often do you get the serial exception? Every time you turn on a node, or every message?

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

                  I'll add example sketches for each component to the home assistant docs. It's clear that the docs are not currently good enough, how to present and setup a sensor or actuator.

                  1 Reply Last reply
                  0
                  • Борис БашкинцевБ Offline
                    Борис БашкинцевБ Offline
                    Борис Башкинцев
                    wrote on last edited by
                    #12

                    How often do you get the serial exception? - I get it when close hass.exe.
                    Now I have this found sensors:

                    {"14": {"sensor_id": 14, "sketch_name": "Aquarium", "type": 17, "sketch_version": "1.1", "children": {"0": {"id": 0, "values": {"2": "0", "3": "0"}, "type": 4}, "1": {"id": 1, "values": {"2": "0", "3": "0"}, "type": 4}, "2": {"id": 2, "values": {"2": "0", "3": "0"}, "type": 4}, "3": {"id": 3, "values": {"0": "29.0"}, "type": 6}}, "battery_level": 0}}
                    

                    Thanks for your help, I updated HA to 0.17.3 and it began to work, but no sliders.

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

                      I've updated the docs at home-assistant.io with sketch examples. Look at the light example.
                      https://home-assistant.io/components/light.mysensors/#example-sketch

                      It's what I used for testing during development. It adds an RGB sensor/actuator also besides a dimmer, but you can just remove any references to rgb in the sketch.

                      The dimmer slider will only be visible after turning on the light and clicking the entity in the gui to bring up the more info card.

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


                      13

                      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