Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Bart
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by Bart

    • RE: RS485/RS232/Serial transport class for mysensors.org

      @hek
      I will do the schematic once I solve all issues as I am still losing events while connected to Home Assistant. Need to check whether it is because of pymysensors library (Home Assistant side) or if there is still some GW <-> Sensors problem. At this moment my Sensors board has around 48 binary states one can set/read from the controller and at the same time they are changeable via input pins (falling edge toggles the switch).

      To give a quick overview of my setup:

      2 x (MEGA 2560 + RS485 module)
      alt text

      I have the following connections for each mega+rs485 module:

      • +5/GND connected to respective pins on rs485 module
      • D2 connected to RE/DE
      • D18 <-> RO
      • D19 <-> DI

      The A and B lines are connected to each other. (A-A, B-B). And most importantly I am using the above mentioned minor change in the MyTransportRS485.cpp to replace altSoftSerial with Serial1 (https://forum.mysensors.org/topic/1947/rs485-rs232-serial-transport-class-for-mysensors-org/99)

      and just if anyone would like to try it here's the config I am using:

      // Gateway:
      #define MY_RS485
      #define MY_RS485_DE_PIN 2
      #define MY_RS485_BAUD_RATE 9600
      #define MY_GATEWAY_SERIAL
      // below not official for getting the Serial1
      #define MY_RS485_SERIAL Serial1
      
      // Sensor node
      #define MY_DEBUG
      #define MY_RS485
      #define MY_RS485_DE_PIN 2
      #define MY_RS485_BAUD_RATE 9600
      // below not official for getting the Serial1
      #define MY_RS485_SERIAL Serial1
      
      posted in Development
      Bart
      Bart
    • RE: Enable serial debugs from the RS485 GW in the log

      @martinhjelmare thanks. I am still not really good at git kung-fu to do it quickly. will try to do the PR when I have some spare time 🙂

      posted in Home Assistant
      Bart
      Bart