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
M

marceloaqno

@marceloaqno
Code Contributor
About
Posts
206
Topics
2
Shares
0
Groups
2
Followers
3
Following
0

Posts

Recent Best Controversial

  • MySensors Raspberry port suggestions
    M marceloaqno

    This is the initial support for Linux/RaspberryPi for the 2.0:
    https://github.com/marceloaqno/Arduino/tree/dev-raspberrypi

    Supports:

    • RF24 radio
    • Ethernet gateway
    • Store "eeprom" to a file (thanks to @aaron832 )
    • MQTT (thanks to @aaron832 )
    • Can be compiled in a linux machine other than Pi

    To be implemented:

    • Store "eeprom" to a file
    • Serial
    • MQTT
    • RF24 interrupts
    • UDP
    • Act as a client to connect to a controller

    I haven't extensively test it, so there are probably some bugs. Any suggestions or ideas for improvement are welcome.

    Development

  • Debug messages over Wi-Fi
    M marceloaqno

    I wrote a library to be able to watch the debug messages from a ethernet gateway over Wi-Fi (or ethernet).
    It opens port 2300, so you can connect with putty (change the "Connection type" to Telnet or Raw).

    If anyone is interested, here is the code: https://github.com/marceloaqno/MyNetDebug

    To use it, add the following lines in your sketch before MySensors.h

    #include <MyNetDebug.h>
    #define MY_SERIALDEVICE NetDebug
    

    And into your loop function:

    void loop()
    {
      (void)NetDebug.available();
      ...
    

    For more details, please check the examples.

    Development

  • 💬 Building a Raspberry Pi Gateway
    M marceloaqno

    @otto001 I think I found the problem. I wrote a fix for it:
    https://github.com/marceloaqno/MySensors/commit/ca8865d8e1fe1b08195943fae1640d5fddb81924

    Announcements

  • MySensors Raspberry port suggestions
    M marceloaqno

    In an attempt to keep mysensors/Raspberry repository in sync with mysensors/Arduino, I started a while ago working on a solution but only recently had time to finish.
    I ended up with two approaches:

    Place the raspberry gateway files in a directory called examples_RPi within the libraries\MySensors folder (more or less like TMRh20/RF24 does)
    https://github.com/marceloaqno/Arduino/tree/raspberry-gateway

    or keep the two repos and use git subtree to bind them:
    https://github.com/marceloaqno/Raspberry/tree/experimental

    What you guys thinks?

    I'm trying to catch up with new changes into the development branch and thinking of a way to port this into it.

    Development

  • Mysensors Gateway on OrangePi (Zero) (opi)
    M marceloaqno

    I created the draft for the official article: https://www.mysensors.org/build/orange

    Development

  • 💬 Building a Raspberry Pi Gateway
    M marceloaqno

    @frencho I hope to write something this weekend, at least a draft.

    Announcements

  • MySensors Raspberry port suggestions
    M marceloaqno

    @raptorjr PiDome should work now (https://forum.mysensors.org/topic/2389/added-support-for-local-mysensors-rpi-direct-radio-connection).

    You need to add --my-serial-is-pty when running ./configure or uncomment the line #define MY_IS_SERIAL_PTY in mysGateway.cpp.

    Development

  • 💬 Building a Raspberry Pi Gateway
    M marceloaqno

    The RPi port has just received a new update that changes some important things related to the location and name of the gateway binary and services:

    mysGateway was renamed to mysgw
    mysgateway service was renamed to mysgw

    Now, after successfully running the make command, you will find the gateway file under ./bin/mygw

    Also, before installing the new version you need to manually remove the old one:

    If you are using systemd

    sudo systemctl disable mysgateway.service
    sudo rm /etc/systemd/system/mysgateway.service
    sudo rm /usr/local/bin/mysGateway
    

    If you are using sysvinit

    sudo update-rc.d -f mysgateway remove
    sudo rm /etc/init.d/mysgateway
    sudo rm /usr/local/bin/mysGateway
    
    Announcements

  • MySensors Raspberry port suggestions
    M marceloaqno

    Add some options to the gateway execution:

    # ./examples_linux/mysGateway -h
    Usage: mysGateway [options]
    
    Options:
    -h            Display a short summary of all program options.
    -d            Enable debug.
    -b            Become a daemon.
    

    Debug is now disabled by default.
    You can't run it as a linux daemon if debug is enabled.
    When daemonized all messages will be print to syslog.

    Development

  • 💬 Building a Raspberry Pi Gateway
    M marceloaqno

    @gohan There is a open github pull request very similar to what @macvictor proposed, but for now I recommend using the examples_linux/mysgw.cpp file.

    Announcements

  • MySensors Raspberry port suggestions
    M marceloaqno

    Update: Added support for status leds (RX/TX/ERR), you can enable it in examples_linux/mysGateway.cpp file.

    Development

  • 💬 Building a Raspberry Pi Gateway
    M marceloaqno

    @gohan Done!

    Announcements

  • Mysensors Gateway on OrangePi (Zero) (opi)
    M marceloaqno

    Support for OrangePi is now part of the official MySensors development repository.
    In the official version, it is necessary to define the CE and CS pins, as the default ones will not work. This will change in the future, but more work needs to be done to better detect the different types of Orange Pi and other H3 soc boards.
    For now, if you have set your system in the same way as the wiring instructions, use:

    ./configure --spi-spidev-device=/dev/spidev1.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=13
    
    Development

  • 💬 Building a Raspberry Pi Gateway
    M marceloaqno

    @alowhum yes, to use MY_SIGNING_SIMPLE_PASSWD feature, add the following to your list of configure options:

    ... --my-signing=password --my-signing-password=<PASSWORD>
    
    Announcements

  • 💬 Building a Raspberry Pi Gateway
    M marceloaqno

    @otto001 After a few hours running the reconnect script, I noticed several error messages in my gateway log:

    accept(): Too many open files
    

    The problem was that the gateway wasn't releasing the socket descriptor after each disconnection of the controller. After reaching the limit (mine was 1036) the controller can't connect.

    I'm not entirely sure that this problem is related to what you're having. You can check how many file descriptors currently opened by the gateway with the command below

    sudo lsof -u root |grep mysgw |wc -l
    

    The fix:
    https://github.com/marceloaqno/MySensors/commit/a40d4441b7460225100398ff6f2581c2b0df36ea

    Announcements

  • 💬 Building a Raspberry Pi Gateway
    M marceloaqno

    @ricorico94 to update your install run:

    sudo make install
    sudo systemctl restart mysgw.service
    
    Announcements

  • help for step by step wiring and configure a gateway with RS485 module and raspberry pi 3
    M marceloaqno

    @Reza You need to set the transport to use the rs485:

    --my-transport=rs485
    
    Troubleshooting

  • MQTT Broker gateway
    M marceloaqno

    Those are the most recent changes to MQTT gateway:

    • Fixed node id distribution by the gateway (reported by @viking)
    • Fixed the problem with openhab and multiple MQTT clients
    • Fixed the appearance of garbage in messages sent from MQTT to a node
    Controllers

  • 💬 Building a Raspberry Pi Gateway
    M marceloaqno

    @hawk_2050 same for you guys who helped, thank you for all the feedback.

    @jerseyguy1996 I don't see anything wrong with your config.Try to add a small delay() after the first send() and before the sendBattery().

    @annegerben This looks like a wire problem. I updated the guide, check the wire section again.

    Announcements

  • Raspberry Pi MQTT gateway crashes after a few hours
    M marceloaqno

    @joakim-johansson I'll need you to run mysgw through gdb to gather more information about this problem.

    Please follow the steps below:

    • Stop the mysgw service:

      systemctl stop mysgw
      
    • Start a new linux screen: (or any other windows manager)(You can find more information on how to install and use screen here: http://raspi.tv/2012/using-screen-with-raspberry-pi-to-avoid-leaving-ssh-sessions-open)

      screen
      
    • Run gdb with the path of your mysgw binary:

      gdb /usr/local/bin/mysgw
      
    • Within the gdb, start the gateway passing the debug option

      run -d
      

    You can detach from the linux screen using “Ctrl-a” “d”.
    This will return to the shell.
    The gateway will continue to run, and you can re-attach it later

    screen -r
    

    Now, you will have to wait for the gateway to crash again.
    When this occurs, post the information printed on the screen.

    I'll prepare a more complete tutorial for this. Please let me know if you have any questions.

    Troubleshooting
  • Login

  • Don't have an account? Register

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