Home Assistant v 0.13.1


  • Plugin Developer

    A new release of home assistant is out! 0.13 was released last night and a bugfix release, 0.13.1, was pushed after some hours.

    For mysensors this release includes the following highlights:

    • Add light platform, which supports S_LIGHT, S_DIMMER, S_RGB.
    • Handle message-type req, @Erik-Forsberg.
    • Expose baud rate in configuration, to allow setting other than 115200 bps, @Riccardo-Massari.
    • Fix add_child_sensor to not add child_ids already in children.
    • Fix decode partial data.

    Breaking changes:
    S_LIGHT has been moved from the switch platform to the light platform. If you have automations etc in your configuration.yaml accessing those devices that are presented as S_LIGHT, you should now access them from the light platform, eg light.entity_id.

    Problem reports or success reports, 😄, are very welcome.



  • @martinhjelmare Thank you for update. Please let me know if this change does apply also for MQTT devices. I am using MySensors with MQTT Gateway and declared sub-type is S_Status/V_Status, in HA one of my sensor looks like:

      state_topic: "P/12/9/1/0/2"
      command_topic: "S/12/9/1/0/2"
    

    Should I update the configuration file? Thank you


  • Plugin Developer

    @Mihai

    Hi, no the MQTT component is not affected by the change in mysensors platforms.



  • Thank you.



  • 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.


  • Plugin Developer

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

    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.



  • 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.


  • Plugin Developer

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

    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?



  • 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?


  • Plugin Developer

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

    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?


  • Plugin Developer

    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.



  • 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.


  • Plugin Developer

    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.



Suggested Topics

  • 21
  • 13
  • 2
  • 3
  • 30
  • 10
  • 4

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts