Navigation

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

    Best posts made by marceloaqno

    • RE: MySensors Raspberry port suggestions

      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.

      posted in Development
      marceloaqno
      marceloaqno
    • Debug messages over Wi-Fi

      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.

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

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

      posted in Announcements
      marceloaqno
      marceloaqno
    • MySensors Raspberry port suggestions

      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.

      posted in Development
      marceloaqno
      marceloaqno
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

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

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

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

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: MySensors Raspberry port suggestions

      @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.

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      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
      
      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: MySensors Raspberry port suggestions

      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.

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @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.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: MySensors Raspberry port suggestions

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

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @gohan Done!

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      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
      
      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @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>
      
      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @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

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @ricorico94 to update your install run:

      sudo make install
      sudo systemctl restart mysgw.service
      
      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: help for step by step wiring and configure a gateway with RS485 module and raspberry pi 3

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

      --my-transport=rs485
      
      posted in Troubleshooting
      marceloaqno
      marceloaqno
    • RE: MQTT Broker gateway

      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
      posted in Controllers
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @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.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: Raspberry Pi MQTT gateway crashes after a few hours

      @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.

      posted in Troubleshooting
      marceloaqno
      marceloaqno
    • RE: MQTT Broker gateway

      @msebbe Which library your are using for the ENC28J60? The UIPEthernet has some examples you could try to test if your module is working.

      posted in Controllers
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @b0rmann I could add support for RS485, but I'll need your help to test because I don't have the hardware.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: Would You Like Support For ESP8266 'Nodes'?

      @affordabletech Playing with custom transport isn't that hard. Here is an unfinished example if you want to follow this path (sorry, I did it in a hurry, so maybe it isn't very self explanatory):
      https://github.com/marceloaqno/MySensors/commit/696d0d3993d88b2dc4565db6cb12f57a461372ad

      I think there has never been much interest in creating an ethernet transport before, given the fact that mysensors don't support multiple transports. But there is some work being done to change that.

      Building a node-to-node network using Ethernet with a standard client-server topology wouldn't be an easy task, I don't know how you intend to do it, but MQTT could help you with that.

      posted in Feature Requests
      marceloaqno
      marceloaqno
    • RE: MQTT Broker gateway

      @msebbe It doesn't print your ip, those numbers after "Started!" is related to mqtt packages showing that PiDome is connected.
      For the device discovery, there are probably a lot of other people who can help you with that because I don't know much about PiDome.

      posted in Controllers
      marceloaqno
      marceloaqno
    • RE: MySensors Raspberry port suggestions

      @aaron832 I'm very close to reaching a working version for the 2.0, will release something in the coming days.

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @NiklasO Done (#622). Thanks for the sugestion.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: MySensors Raspberry port suggestions

      Perhaps we should start another topic with a better name so that more people become aware of this port?

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @Velo17 It might be related to the nrf24 irq pin. Could you try to build the gateway without the my-rf24-irq-pin option and check if the gateway still behaves this way?

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: MySensors Raspberry port suggestions

      @lafleur Do you recommend any RFM69h library that works well in Pi? I could try to add support if there is any.

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @Robinek70

      $ sudo mysgw -h
      Usage: mysgw [options]
      
      Options:
        -h, --help                 Display a short summary of all program options.
        -d, --debug                Enable debug.
        -b, --background           Run as a background process.
        --gen-soft-hmac-key        Generate and print a soft hmac key.
        --gen-soft-serial-key      Generate and print a soft serial key.
        --gen-aes-key              Generate and print an aes encryption key.
        --print-soft-hmac-key      Print the soft hmac key from the config file.
        --print-soft-serial-key    Print the soft serial key from the config file.
        --print-aes-key            Print the aes encryption key from the config file.
        --set-soft-hmac-key        Write a soft hmac key to the config file.
        --set-soft-serial-key      Write a soft serial key to the config file.
        --set-aes-key              Write an aes encryption key to the config file.
      

      To generate a soft hmac key, run:

      sudo mysgw --gen-soft-hmac-key
      

      and set it using:

      sudo mysgw  --set-soft-hmac-key=KEY
      

      For example:

      $ sudo mysgw --gen-soft-hmac-key
      SOFT_HMAC_KEY | 7F3F1A1C1EA32B72BF4BEDE2D16543971C26442F69572177D9CCDE393BFB8126
      
      The next line is intended to be used in SecurityPersonalizer.ino:
      #define MY_SOFT_HMAC_KEY 0X7F,0X3F,0X1A,0X1C,0X1E,0XA3,0X2B,0X72,0XBF,0X4B,0XED,0XE2,0XD1,0X65,0X43,0X97,0X1C,0X26,0X44,0X2F,0X69,0X57,0X21,0X77,0XD9,0XCC,0XDE,0X39,0X3B,0XFB,0X81,0X26
      
      To use this key, run mysgw with:
       --set-soft-hmac-key=7F3F1A1C1EA32B72BF4BEDE2D16543971C26442F69572177D9CCDE393BFB8126
      
      $ sudo mysgw --set-soft-hmac-key=7F3F1A1C1EA32B72BF4BEDE2D16543971C26442F69572177D9CCDE393BFB8126
      

      The same process applies to generate/set the other key types.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: MySensors Raspberry port suggestions

      Just an update, I've been using this port on my raspberry pi during the last months and it has been quite stable, the code is also up to date with the mysensors development branch.

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @Oli After these steps:

      git clone https://github.com/mysensors/MySensors.git
      cd MySensors
      

      to switch to the master branch, run:

      git checkout master
      

      and reinstall the gateway following the same steps from the instructions.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: MySensors Raspberry port suggestions

      @b0rmann It should work now. Thank you for reporting this.

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @eyesoft thanks for the feedback, we need to add support for SPIDEV driver in order to use the BananaPi.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: MySensors Raspberry port suggestions

      @ericvdb That's right. I hope to add support for RFM69, Serial and software signing very soon.

      To use, clone the raspberryPi port for MySensors 2.0:

      git clone https://github.com/marceloaqno/MySensors.git
      cd MySensors
      

      To configure it, take a look at the options available within configure:

      ./configure --help
      

      For other options, you may have to edit the sample file example_linux/mysGateway.cpp, and uncoment what you need.

      Once done, run:

      make
      sudo make install
      

      To run the gateway you need to be root or use sudo:

      sudo msyGateway -h
      

      For wiring, follow this guide:
      https://forum.mysensors.org/topic/2437/step-by-step-procedure-to-connect-the-nrf24l01-to-the-gpio-pins-and-use-the-raspberry-as-a-serial-gateway-mysensors-1-x

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @Reza You could connect the rs485 to the RPi UART and use the option --my-rs485-serial-port=/dev/ttyAMA0, but you need to turning off the UART functioning as a serial console.

      Or, to make things easier:
      rs485 <==> TTL/USB <==> RPi

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: MySensors Raspberry port suggestions

      @b0rmann Fixed a bug with the config file. Please remove your MySensorGateway.cfg and let the gateway re-create it.
      Also the default config file name was changed to /etc/mysensors.dat

      For the routing problem, do you have the output from the nodes that are communicating with the gateway?

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @b0rmann Could you provide the following information?

      • Your RPi model and which linux distribution you are using.
      • gcc version
      • The version and options you used to build the gateway (./configure --option)
      • The number of nodes on your network that sends messages to the gateway.
      • The broker you are using for MQTT and its version
      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: MySensors Raspberry port suggestions

      @raptorjr Sorry, pseudo tty isn't supported. I will try to add it till the end of the day.

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @pete1450
      I can't help you with this, I've never used the Vera controller. You need to search in the Vera settings where you set this option. If Vera supports being a server and opening a port for the gateway to connect, then you use the --my-controller-ip-address option.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: MySensors Raspberry port suggestions

      @raptorjr
      In the current state, serial gateway on RPi can only use a "real" serial port like /dev/ttyAMA0 (gpio pins) or (if an arduino is connected or a USB->Serial adapter) /dev/ttyACM0. To use PiDomo you will need to put an Arduino to the mix.

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Orange Pi Gateway

      @pansen You could document your steps here and I'll update the building guide. If changes to the code are required, please send a PR to the development branch.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: MySensors Raspberry port suggestions

      @ikkeT yes, these are the default pins.
      (SCK = 23, MISO = 21, MOSI = 19, CS = 24, CE = 22)

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @Roberto-Mo-Ca If you are using the nrf24 PA/LNA version you need to use a 5V->3.3V regulator otherwise you can connect to the 3.3v pin.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: MySensors Raspberry port suggestions

      @wergeld I updated the building instructions:
      https://forum.mysensors.org/topic/2759/mysensors-raspberry-port-suggestions/26

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @Madhias /dev/pts/2 it's the one who holds the specified group ownership

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: MySensors Raspberry port suggestions

      The RPi port was merged into mysensors official repository 🎉 (thank you to everyone who helped with this process 👏 ). For future discussion, please use this this topic.

      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @macvictor Did you also enable encryption on your node? (#define MY_RF24_ENABLE_ENCRYPTION)

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      I'm trying to add support for Orange Pi to MySensors, this is the work-in-progress repository:
      https://github.com/marceloaqno/MySensors/tree/spidev

      It would be great if someone could test and submit results from the configure and make commands:

      git clone https://github.com/marceloaqno/MySensors marceloaqno-spidev
      cd marceloaqno-spidev
      git checkout spidev
      ./configure
      make
      
      posted in Development
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @Velo17

      ./configure --spi-driver=SPIDEV --spi-spidev-device=/dev/spidev1.0
      

      (replace the /dev/spidev1.0 with the one you enabled in /boot/config.txt)

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      Support for RFM69 was added to the development branch (finally!).

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Orange Pi Gateway

      Support for RFM69 has been added, check the build guide for more information.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      I forgot to mention in the guide:
      To communicate with the RPi using the RFM69 radio, all of your nodes need to use the new RFM69 driver available in the development branch.
      To make the change, add the following line to the node sketch:

      #define MY_RFM69_NEW_DRIVER
      
      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @gohan @ftw64 sorry for all the trouble

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @gdekeijzer There was a recent update on the random number generator for the RPi port, but unfortunately not all linux versions support the new method. @d00616 is working on a solution to this problem #856. Please use the master branch for the time being.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @ricorico94 Do you see gcc-4.9 in the list returned by the command below?

      sudo apt-cache search gcc
      

      If it's listed, try installing it by specifying the version:

      sudo apt-get install gcc-4.9
      
      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      Please, could all of you who experienced this issue post the configuration options you used to build the gateway?
      This would help to investigate the problem.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      @otto001 I'm trying to reproduce this problem, but so far I've got nothing beyond the normal behavior of mysgw.
      I tried with a RPi1 and RPi3 using the fhem controller with the latest raspbian.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: 💬 Building a Raspberry Pi Gateway

      The two patches to fix ethernet stability have been merger into the development branch, and also some changes to the gateway logging. I updated the build instructions to reflect the changes.

      posted in Announcements
      marceloaqno
      marceloaqno