[SOLVED] Just wires, no radio, no rfl24



  • I have just started off with mysensors, with the goal of extending my pi's gpio ports with some ports on the arduino uno I had lying around.
    So I thought that I can plug in my arduino to the pi (running HA btw) and I can connect roughly + 10 sensors to my home automation.
    But I can't seem to get things right in my mind. I don't really understand the concept of gateway, node, transport, etc.

    My wished setup is 1 arduino uno, 1 pi2, connected via usb, and I wish to connect my motion, humidity and dimmer fets to the arduino directly.

    I don't want to use any radio in my configuration because of various reasons.
    I have found the serial gateway install mode, and thought that it would be for me, but unfortunately I am stuck at the ./configure level.

    The --my-transport variable has the options none, nrf24, rs485, rfm95. From this I assume that nrf24, rfm95 are radios so they are not my options rs485 is "LAN cabling" which could be an option but it loses some pins on the arduino and it is surely not using the usb cable to communicate, so the only option is "none".
    I have chosen none, because if I do not chose anything then the make command fails with the "nrf24 not available on this platform" error.

    I have also found the forum thread discussing a connection using just wires and measuring power usage, but I find that too complicated for a start. (but tried to adapt the ino file to my needs, which uploads fine to the arduino)

    Right now I have a HC-SR501 connected to the digital pin 8 on the arduino and wish to set up a sensor in HA which shows 1 or 0 depending on the state of the HC-SR501.
    I do not need help with the HA setup.
    I think that if I run ./bin/mysgw -d in a putty window I should see something going on when I "dance" in front of the motion sensor, but there is nothing happening. So I am thinking that transport "none" is not a good option, but then what?

    Before you ask, I don't see the:

    mysgw: !TSM:INIT:TSP FAIL
    

    message in the putty window, so I suppose I should be good.

    but I don't see the

    mysgw: TSM:INIT:TSP OK
    mysgw: TSM:INIT:GW MODE
    

    messages as well, which bothers me a little, but it can be because of the none transport, or?

    In my mind: node=HC-SR501, gateway=arduino uno, transport=serial, or
    node=arduino uno, gateway=pi, transport=serial and the SR501 is a child.

    So now I am a bit confused as what is the gateway, the node, and transport in my case?

    Is my setup possible?

    thanks
    tom


  • Admin

    if you connect your arduino with USB, then you do not need to have the rpi act as a gateway.

    I would program the arduino as a "gateway" (without radio..) then just have it report the various sensor data..

    Then your controller software on the rpi, just needs to connect to the serial port on the arduino.



  • It should be sufficient to define the Arduino as serial GW in HA and attach the sensor HW to the Arduino and adopt the GW-Sketch accordingly.
    So it is NOT the PI acting as GW but the Arduino.
    (@tbowmo Sorry for double-Posting; didn't see you already answered...



  • @tbowmo
    Ok guys, thanks for the response.
    As I understand your response, then I do not need the stuff from github on my pi.
    Just connect the arduino, load the sketch, and configure HA.
    Everything works like magic?

    tom


  • Mod

    @towme not like magic. Magic implies something that can't be understood. MySensors is well documented, so understanding it is just a matter of reading the documentation, experimenting, and interacting in the forum.

    But yes, MySensors is made to be easy to get started. Just wire according to the instructions, load the example sketch and configure your controller.



  • @mfalkvidd
    Sorry didn't mean to be sarcastic!
    I meant magic as that I have been spending two weeks now to try to set up my frist motion sensor, with trying different options with configure command, so for me it is magic for now.
    But it seems like I have been over thinking things a little.

    But now that you mention documentation....
    All the docs I have found searching for "no radio", "no nrf24", has the nrf24 in the shopping list. Their sensors maybe wired, but their arduino, nodemcu, etc. communicates over the radio with the controller, and the only one I found to be almost usable is the power metering forum post (and some other post mentioning/linking the power metering post) but thats too complicated for a newbie like me.

    but for me it seems that 98% of people is using radio happily with mysensors.


  • Mod

    @towme yes, the majority of MySensors users use the nrf24. It is cheap and many users prefer not having to install wires to all their sensors. But, maybe more importantly, nrf24 was the first communication supported by MySensors so the combined community has much more experience with it.

    All example sketches are supposed to work with any transport type (nrf24, rfm69, rs485, ...). The motion sensor example has a list where users can decide which one to use. But I see that the alternative of not enabling any of the transports might not be intuitive, so there the documentation could be improved.

    We should probably also update https://www.mysensors.org/about/components#the-radio to better explain non-radio alternatives.

    Big thanks for your feedback. It is feedback like this that continuously makes the documentation better.


Log in to reply
 

280
Online

6.7k
Users

7.6k
Topics

80.4k
Posts

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