MySensor on Hass.io - can't get it work



  • Hi! Can anyone help me with this code? https://pastebin.com/byb6BQZz The code isn't mine (made by my friend), I've been using it with Domoticz for almost a year, and it worked perfectly. But recently i decided to give a try to Hass.io, and I really like it. But I still have a problem with lights connected via MySensors (Arduino Mega conected to Rpi via USB), can't get it work with Hass.io. Config part in configuration.yaml looks like this https://pastebin.com/y3RDrCKQ
    I forgot about error log https://pastebin.com/WUMtMKfK

    I'll be gratefull for some hints.



  • @maty said in MySensor on Hass.io - can't get it work:

    e code isn't mine (made by my friend), I've been using it with Domoticz for almost a year, and it worked perfectly. But recently i decided to give a try to Hass.io, and I really like it. But I still have a problem with lights connected via MySensors (Arduino Mega conected to Rpi via USB), can't get it work with Hass.io. Config part in configuration.yaml look

    Hi @MaTy
    I have no experience with hass.io, but some comments arise.

    1. Your configuration.yaml file path seems to be incorrect. You have to edit this to real path, something like "/user/.homeassistant/mysensors.json" or whatever. The path should exist, file there will be created if it is correct and writeable.
    2. You should check if your USB port is really /dev/ttyUSB0 usually command "lsusb" is used, but I'm not sure how to do this in hass.io
    3. Also, check if USB port speed is the same as in mysensors gateway and your configuration. 38400 seems different than the standard what usually is 115200 if I'm not mistaken.
      EDIT: Ok, baud seems to match, so that should not be an issue.


  • @archiijs said in MySensor on Hass.io - can't get it work:

    @maty said in MySensor on Hass.io - can't get it work:

    e code isn't mine (made by my friend), I've been using it with Domoticz for almost a year, and it worked perfectly. But recently i decided to give a try to Hass.io, and I really like it. But I still have a problem with lights connected via MySensors (Arduino Mega conected to Rpi via USB), can't get it work with Hass.io. Config part in configuration.yaml look

    Hi @MaTy
    I have no experience with hass.io, but some comments arise.

    1. Your configuration.yaml file path seems to be incorrect. You have to edit this to real path, something like "/user/.homeassistant/mysensors.json" or whatever. The path should exist, file there will be created if it is correct and writeable.
    2. You should check if your USB port is really /dev/ttyUSB0 usually command "lsusb" is used, but I'm not sure how to do this in hass.io
    3. Also, check if USB port speed is the same as in mysensors gateway and your configuration. 38400 seems different than the standard what usually is 115200 if I'm not mistaken.
      EDIT: Ok, baud seems to match, so that should not be an issue.

    Ad.1. I tried different path too (default one '/config/mysensors.json') - still wrong. I'm not sure how these .json files works, so maybe I'm still makeing sthg wrong. (Maybe someone can share me a link with an explanation or write a few words about it?)
    Ad.2. USB is correct I checked (besides i have RFLink on the ttyUSB1 and it works great).
    Ad.3. As You said at the end ... baud should be OK.



  • @maty said in MySensor on Hass.io - can't get it work:

    /config/mysensor

    Default path seems to be generic and not really useful, at the beginning I had problems with understanding this as well. Take a look at the full location where your home assistant configuration files are located, this could be a good location. and add "mysensors.json" at the end (this file will be created and you can name it anything.yson).
    like mine is "/root/.homeassistant/mysensors.json"



  • Wait, do I need to install an addon from reposytory, to make it work? Isn't it included in Hass.io? I cant see any repo 😕



  • I think i found the answer ... https://forum.mysensors.org/topic/7360/hass-io-and-ethernet-gateway-on-pi

    It looks like I need docker add-on to run MySensors gateway on Hass.io, and it doesn't exist so far, what a shame 😞



  • I don't have a light switch on my sensors but I do have a couple of temp sensors running on my hassio installation with no problem.



  • @tom-carpenter
    How did You make it? Is it via serial gateway?


  • Plugin Developer

    @maty

    That thread is about attaching the radio directly to the RPi GPIO in combination with Hass.io. You're using an arduino as gateway that has the radio if I understand correctly. So you shouldn't need an addon for your case.

    I suggest looking at the Z-wave documentation for Hass.io where they also connect a USB device. It's the same principle as the mysensors serial gateway when you use an arduino as gateway.

    https://home-assistant.io/hassio/zwave/



  • @martinhjelmare

    Oh, sorry, im so confused after I moved from domoticz to Hass.io. But I don't need Z-wave. What I have is serial gateway based on arduino mega 2560, with a sketch (example) https://hastebin.com/cinokiraka.cpp which controles all lights in my house. The arduino mega is connected to my RPI3 (with Hass.io) via usb (ttyUSB0). It worked perfectly on Domoticz, all lights was discovered automatically. I've checked the documentation of MySensors implementation on Hass.io web site, and read plenty of forums and still nothing 😕
    I'm still getting errors. https://pastebin.com/VDaVRKkV


Log in to reply
 

479
Online

6.7k
Users

7.6k
Topics

80.3k
Posts

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.