@Luc3as Okay, Again I found answer while after asking, I used dev branch of mysensors and it is working like a charm.
Best posts made by Luc3as
-
RE: 💬 Building a Raspberry Pi Gateway
-
RS485 Gateway on Raspberry Pi
Re: RS485/RS232/Serial transport class for mysensors.org
Hello gentlemans,
I am strugling with crazy combination of RS485 adapter connected to Raspberry Pi, which is running Node-RED, and I would like to connect arduino sensors through RS485 to this gateway.
For start, I hope this configuration is possible. So I connected the MAX RS485 adapter to the pi like this
I installed the MySensors gateway , and I am able to run it without problem, I can even see gateway started successfully, but I think it doesn't know anything about status of RS485 in real.On the other side I burnt example of RS485 motion sensor to arduino pro mini, and watched serial console, It cannot Find parent so there has to be some communication issue.
I wanted to exclude Raspberry pi as gateway from this so I came with another setup, 2 arduinos with adapters together, one acting as Gateway, second one still with motion sensor example.
However the results are still the same, Gateway starts without problem, and node is looking for gateway, no presentation, nor sending any data.So I was searching through forums and sites day and night, I found some examples of test sketches from altasoft library. With this setup I flashed both and I got working communication, it was sender repeater node so when I wrote something to console it looped me back from another end. Actually I had DE pins connected to D10 as I found it in description.
When I tried to flash mysensors GW and Node again, can't get any data flowing. I tried to switch DE pins on both D10 and D2 pins as in sketch, I tried to change baudrate, switch roles with GW and Node, twist RX and TX pins, all combinations, nothing.
Do you guys have any clue what am I doing wrong with vanilla setup like this ?
Thanks
EDIT:
God, why is it , every time I am going to ask about some problem, moments later find solution.
Wish I found this tread earlier https://forum.mysensors.org/topic/5495/rs485-on-nano/12
So for future references, With use of RS485 wired network, there must be static node ID set for every node and for gateway too.
P.S. We should update the documentation, and maybe add wiring picture to the https://www.mysensors.org/build/rs485 -
RE: 💬 Building a Raspberry Pi Gateway
do you have SPI enabled through raspi-config ?