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
BartB

Bart

@Bart
About
Posts
36
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • RS485/RS232/Serial transport class for mysensors.org
    BartB Bart

    @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
    
    Development rs485 serial rs485

  • Enable serial debugs from the RS485 GW in the log
    BartB Bart

    @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 :)

    Home Assistant
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular