Help with mysensors

Hi I’m just trying to get some mysensor nodes up and running and I feel like I’m so close, but must just be missing something. I’ve got a serial gateway attached to my pi and an led dimmer node. Both nodes are compiled with v2.0 of mysensors library. I know it’s partly working as I get this in the mysensors.json, but I can’t see any sensors anywhere and am not sure how you connect to it or get it to display. I’ve read around all over the mysensors pages, forums and ha pages, forums, youtube, etc, but don’t see anything that explains how you render out a sensor in ha to control it. Here is the mysensors.json that was generated:

`

{“0”: {“sensor_id”: 0, “children”: {}, “type”: 18, “sketch_name”: null, “sketch_version”: null, “battery_level”: 0, “protocol_version”: “2.0.0”}, “2”: {“sensor_id”: 2, “children”: {“1”: {“id”: 1, “type”: 4, “description”: “”, “values”: {}}}, “type”: 17, “sketch_name”: “Dimable Light”, “sketch_version”: “1.0”, “battery_level”: 0, “protocol_version”: “2.0.0”}}

This is my config:

 #MySensors Gateways
 mysensors:
   gateways:
      - device: '/dev/ttyUSB0'
        persistence_file: '/config/mysensors.json'
        baud_rate: 115200
   debug: true
   optimistic: true
   persistence: true
   retain: true
   version: 2.0

sensor: !include sensors.yaml

And this is in my sensors.yaml

# MySensors
- platform: mysensors

All devices/children need to send at least one initial value per value type you want to use. That’s what seems to be missing.

You can remove the sensor config section for mysensors, it’s not used. All mysensors platforms are setup via discovery from the mysensors component. So only that config section is used.

1 Like

Thank you that was absolutely the issue. I stumbled across the led script on the Hass site instead and got it working. I’ve since rewritten a script for a HTU21D sensor with mysensors 2.0 library. I feel like my home automation project has finally started so thanks again!

1 Like