Navigation

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

    Posts made by 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: πŸ’¬ Building a Orange Pi Gateway

      @pii Try to connect the IRQ pin from the radio to another GPIO on your Orange Pi, for example the GPIO2.

      #define MY_RFM95_IRQ_PIN 2
      
      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Orange Pi Gateway

      @pii --my-rfm95-cs-pin and --my-rfm95-irq-pin options are not currently supported by the configure script.
      Until we fix this, could you please try adding the following to your examples_linux/mysgw.cpp (before the #include <MySensors.h>)

      #define MY_RFM95_CS_PIN 13
      #define MY_RFM95_IRQ_PIN 10
      #define MY_RFM95_FREQUENCY RFM95_915MHZ
      

      and run the make command again.

      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
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @masmat This is my mosquitto.log

      1521680648: mosquitto version 1.4.10 (build date Fri, 22 Dec 2017 08:19:25 +0000) starting
      1521680648: Config loaded from /etc/mosquitto/mosquitto.conf.
      1521680648: Opening ipv4 listen socket on port 1883.
      1521680648: Opening ipv6 listen socket on port 1883.
      1521762617: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1521763549: New connection from 127.0.0.1 on port 1883.
      1521763549: New client connected from 127.0.0.1 as mygateway1 (c1, k15, u'rpi').
      

      A socket error message:

      1521764339: Socket error on client mygateway1, disconnecting.
      

      shows only if I stop/exit mysgw.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @gohan Sorry to hear that, mysgw doesn't change any system files, a simple reboot and rebuild of the gateway should be enough to resume communication in a case of more serious error.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @mvader The gateway will respond with an I_VERSION every time a controller connected to port 5003 sends an I_VERSION request.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @masmat I did a test with the following configuration:

      • Raspberry Pi 1 with Raspbian (2017-11-29-raspbian-stretch-lite)

        pi@raspberrypi:~/MySensors $ lsb_release -a
        No LSB modules are available.
        Distributor ID: Raspbian
        Description:    Raspbian GNU/Linux 9.1 (stretch)
        Release:        9.1
        Codename:       stretch
        
      • MySensors master branch - Protocol version - 2.2.0

        ./configure --my-transport=nrf24 --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=m ygateway1 --my-mqtt-user=rpi --my-mqtt-password=password
        
      • Mosquitto version 1.4.10 (build date Fri, 22 Dec 2017 08:19:25 +0000) [installed from apt-get]

        pi@raspberrypi:~/MySensors $ cat /etc/mosquitto/mosquitto.conf
        # Place your local configuration in /etc/mosquitto/conf.d/
        #
        # A full description of the configuration file is at
        # /usr/share/doc/mosquitto/examples/mosquitto.conf.example
        
        pid_file /var/run/mosquitto.pid
        
        persistence true
        persistence_location /var/lib/mosquitto/
        
        log_dest file /var/log/mosquitto/mosquitto.log
        
        allow_anonymous false
        password_file /etc/mosquitto/passwordfile
        
        include_dir /etc/mosquitto/conf.d
        

        Added the mosquitto user (user=rpi, password=password) with:

        sudo mosquitto_passwd -c /etc/mosquitto/passwordfile rpi
        

      It didn't show any error to connect to the MQTT broker:

      pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw -d
      mysgw: Starting gateway...
      mysgw: Protocol version - 2.2.0
      mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0
      mysgw: TSF:LRT:OK
      mysgw: TSM:INIT
      mysgw: TSF:WUR:MS=0
      mysgw: TSM:INIT:TSP OK
      mysgw: TSM:INIT:GW MODE
      mysgw: TSM:READY:ID=0,PAR=0,DIS=0
      mysgw: MCO:REG:NOT NEEDED
      mysgw: MCO:BGN:STP
      mysgw: MCO:BGN:INIT OK,TSP=1
      mysgw: GWT:RMQ:MQTT RECONNECT
      mysgw: connected to 127.0.0.1
      mysgw: GWT:RMQ:MQTT CONNECTED
      mysgw: GWT:TPS:TOPIC=mysensors-out/0/255/0/0/18,MSG SENT
      mysgw: TSF:MSG:READ,5-5-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
      mysgw: TSF:MSG:PINGED,ID=5,HP=1
      mysgw: TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
      mysgw: TSF:MSG:READ,5-5-0,s=255,c=3,t=32,pt=5,l=4,sg=0:500
      mysgw: GWT:TPS:TOPIC=mysensors-out/5/255/3/0/32,MSG SENT
      mysgw: TSF:MSG:READ,5-5-0,s=255,c=3,t=33,pt=5,l=4,sg=0:4951
      mysgw: GWT:TPS:TOPIC=mysensors-out/5/255/3/0/33,MSG SENT
      mysgw: TSF:MSG:READ,5-5-0,s=1,c=1,t=37,pt=4,l=4,sg=0:36053
      mysgw: GWT:TPS:TOPIC=mysensors-out/5/1/1/0/37,MSG SENT
      mysgw: TSF:MSG:READ,5-5-0,s=255,c=3,t=32,pt=5,l=4,sg=0:500
      mysgw: GWT:TPS:TOPIC=mysensors-out/5/255/3/0/32,MSG SENT
      mysgw: TSF:MSG:READ,5-5-0,s=255,c=3,t=33,pt=5,l=4,sg=0:5000
      mysgw: GWT:TPS:TOPIC=mysensors-out/5/255/3/0/33,MSG SENT
      mysgw: TSF:MSG:READ,5-5-0,s=1,c=1,t=37,pt=4,l=4,sg=0:36055
      mysgw: GWT:TPS:TOPIC=mysensors-out/5/1/1/0/37,MSG SENT
      mysgw: TSF:MSG:READ,5-5-0,s=255,c=3,t=32,pt=5,l=4,sg=0:500
      mysgw: GWT:TPS:TOPIC=mysensors-out/5/255/3/0/32,MSG SENT
      mysgw: TSF:MSG:READ,5-5-0,s=255,c=3,t=33,pt=5,l=4,sg=0:5000
      mysgw: GWT:TPS:TOPIC=mysensors-out/5/255/3/0/33,MSG SENT
      mysgw: TSF:MSG:READ,5-5-0,s=1,c=1,t=37,pt=4,l=4,sg=0:36055
      mysgw: GWT:TPS:TOPIC=mysensors-out/5/1/1/0/37,MSG SENT
      
      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @gieljnssns One way is to replace the changed files, in this case EthernetServer.cpp for the first patch and EthernetClient.cpp for the second patch.

      You can download from:
      https://raw.githubusercontent.com/marceloaqno/MySensors/linux-fix-stability/drivers/Linux/EthernetServer.cpp
      https://raw.githubusercontent.com/marceloaqno/MySensors/linux-fix-stability/drivers/Linux/EthernetClient.cpp

      Here is a step-by-step:

      git clone https://github.com/mysensors/MySensors.git
      cd MySensors
      curl https://raw.githubusercontent.com/marceloaqno/MySensors/linux-fix-stability/drivers/Linux/EthernetServer.cpp -o drivers/Linux/EthernetServer.cpp
      curl https://raw.githubusercontent.com/marceloaqno/MySensors/linux-fix-stability/drivers/Linux/EthernetClient.cpp -o drivers/Linux/EthernetClient.cpp
      

      from here just run ./configure with your options and then make

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @masmat What is the mqtt broker / version you are using?

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @otto001 The second patch can be applied without the first one.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @gieljnssns The fixes I mentioned above haven't yet been applied to the development branch. Eventually they will be, but I'm still doing some testing.

      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

      @otto001 In a new attempt to trigger this problem, I am using a script that will force the fhem controller to reconnect every 30s to the gateway (built with mysensors master branch, unpatched), and sends me a note in case of high CPU usage:

      I'll leave it running for a few days to see what happens.

      Here is the script, if anyone is interested:

      #!/bin/sh
      
      while true; do
        (echo "set mysgw disconnect"; echo "quit") | telnet localhost 7072 > /dev/null 2>&1
        sleep 1
        (echo "set mysgw connect"; echo "quit") | telnet localhost 7072 > /dev/null 2>&1
        sleep 1
      
        cpu_percent=$(ps -C "mysgw" -o %cpu=)
        cpu_percent=${cpu_percent%%.*}
        if [ "$cpu_percent" -ge 90 ]
        then
          echo "ALERT: HIGH CPU USAGE"
          # pushbullet script from https://gist.github.com/outadoc/189bd3ccbf5d6e0f39e4
          /home/pi/pushbullet.sh "RPi1: HIGH CPU USAGE"
          exit
        fi
      
        sleep 30
      done
      
      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

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

      @syna It is empty because it's a message of type I_ID_REQUEST that your node is sending. You need to set up a controller to distribute IDs or you can set it manually by adding this to your node's sketch:

      #define MY_NODE_ID X
      

      where X is a unique number from 1 to 254.

      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: πŸ’¬ 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: Raspberry Pi MQTT gateway crashes after a few hours

      @gohan I've had some segmentation faults on rare occasions in the past, but I've never been able to find the reason.

      I'm suspecting that there is some bug in the class EthernetClient or EthernetServer that manifests in special conditions.

      posted in Troubleshooting
      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: πŸ’¬ 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
    • 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

      @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

      @pettib @gohan There have been some changes in /proc/cpuinfo in newer versions of kernels which leads to a wrong detection.
      The problem was fix in #827 and will be available in the master branch in the next mysensor release.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: Unable to compile Raspberry Pi gateway from development due to too error: many initializers for β€˜spi_ioc_transfer’

      @mfalkvidd It looks like your system has two versions available for linux-libc-dev:
      3.2.51 and 3.16.39
      Is it version 3.2.51 that is installed?

      sudo apt-cache policy linux-libc-dev
      

      Try to force the update to 3.16.

      posted in Development
      marceloaqno
      marceloaqno
    • RE: Unable to compile Raspberry Pi gateway from development due to too error: many initializers for β€˜spi_ioc_transfer’

      @mfalkvidd Could you check struct spi_ioc_transfer in /usr/include/linux/spi/spidev.h? It should look like this:

      struct spi_ioc_transfer {
              __u64           tx_buf;
              __u64           rx_buf;
      
              __u32           len;
              __u32           speed_hz;
      
              __u16           delay_usecs;
              __u8            bits_per_word;
              __u8            cs_change;
              __u8            tx_nbits;
              __u8            rx_nbits;
              __u16           pad;
      
              /* If the contents of 'struct spi_ioc_transfer' ever change
               * incompatibly, then the ioctl number (currently 0) must change;
               * ioctls with constant size fields get a bit more in the way of
               * error checking than ones (like this) where that field varies.
               *
               * NOTE: struct layout is the same in 64bit and 32bit userspace.
               */
      };
      

      If not, try upgrading the linux-libc-dev package or the package responsible for the spidev.h file on your system (dpkg -S /usr/include/linux/spi/spidev.h)

      posted in Development
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @gohan Done!

      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

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

      @jirm Support for RFM69 also applies to the OrangePi πŸ˜‰

      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 Raspberry Pi Gateway

      @dirkc The default settings for ./configure is to use the nrf24 module connected in the same way as shown in the guide and as an ethernet gateway.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @dirkc Try to connect your module to the SPI0 (https://www.mysensors.org/view/180#wiring).
      You only need to enable the SPIDEV if you want to use the SPI1.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @romeo01 You have to connect the nrf24 to the GPIO if you want to use it with the RPi, the information on the wiki was wrong, sorry about that.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @TommiP What I think is happening is that you are running two instances of the gateway.
      If you need to get the debug logs, first stop the mysgw service:

      sudo systemctl stop mysgw.service
      
      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @engy OpenHab2 supports mysensors serial and ethernet gateways:
      https://github.com/tobof/openhab2-addons/wiki

      Maybe the build guide may have given you that impression, but ethernet Gateway is supported on Raspberry PI:

      ./configure --my-gateway=ethernet
      
      posted in Announcements
      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

      @gohan There isn't exactly the best place to set things, it really depends on your preferences.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: Odroid c1 as getaway?

      @dantefff Nice. Let me know when your module arrives, and you start testing with it.

      posted in Hardware
      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: πŸ’¬ Building a Raspberry Pi Gateway

      @gohan You can also set mqtt username and password in examples_linux/mysgw.cpp

      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: πŸ’¬ 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: πŸ’¬ 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: πŸ’¬ Building a Raspberry Pi Gateway

      @OliverDog Home Assistant supports ethernet gateways, I recommend you go with that.

      ./configure --my-gateway=ethernet --my-transport=nrf24
      

      (The default settings is to use ethernet and nrf24, so you could omit them)

      and add to it any of your custom options.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @Erik-Tamminga Some pins may have some restrictions, I couldn't find any good info about that. Try using another pin (GPIO 25).

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @OliverDog Which controller are you using(or are planning to use)?

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @OliverDog You can configure the RPi to be any of the 3 types: ethernet, serial or mqtt, with the nrf24 attached to it.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @OliverDog

      You execute ./configure once with all your options to set your gateway.

      You need to decide what type of gateway you want to build: ethernet, serial or mqtt:
      https://www.mysensors.org/build/select_gateway

      Take a look at the link and let me know if you still have any questions.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @macvictor For the MY_SIGNING_NODE_WHITELISTING, you can uncomment and edit it in MyConfig.h or add it to the examples/mysgw.cpp.

      posted in Announcements
      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: πŸ’¬ Building a Orange Pi Gateway

      @Yveaux Yes, more than enough πŸ˜„ . Thanks and thanks for pointing that out.

      posted in Announcements
      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: πŸ’¬ 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: πŸ’¬ Building a Raspberry Pi Gateway

      @Anduril Sorry, the gateway does not support what you're trying to do.

      posted in Announcements
      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: πŸ’¬ Building a Raspberry Pi Gateway

      @pete1450 If you use the --my-controller-ip-address= option, the gateway will act as a client and attempt to conect to the supplied ip and port. If you want the gateway to open port 5003, omit this option.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @pete1450 Could you send the debug log with the connection errors?

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @pete1450 @lakshmc
      Make sure you are not using an old version of mosquitto (or any other broker you're using):

      $ mosquitto -h
      mosquitto version 1.4.10 (build date 2016-09-20 11:02:07-0600)
      

      It's working fine with the 2.1.1 release:

      [alarm@pi3 mysgw]$ sudo ./bin/mysgw -d
      mysgw: Starting gateway...
      mysgw: Protocol version - 2.1.1
      mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
      mysgw: TSF:LRT:OK
      mysgw: TSM:INIT
      mysgw: TSF:WUR:MS=0
      mysgw: TSM:INIT:TSP OK
      mysgw: TSM:INIT:GW MODE
      mysgw: TSM:READY:ID=0,PAR=0,DIS=0
      mysgw: MCO:REG:NOT NEEDED
      mysgw: MCO:BGN:STP
      mysgw: MCO:BGN:INIT OK,TSP=1
      mysgw: Attempting MQTT connection...
      mysgw: connected to 127.0.0.1
      mysgw: MQTT connected
      mysgw: Sending message on topic: mysensors-out/0/255/0/0/18
      mysgw: TSF:MSG:READ,2-2-0,s=1,c=1,t=17,pt=7,l=5,sg=0:108.12
      mysgw: TSF:MSG:ACK REQ
      mysgw: TSF:MSG:SEND,0-0-2-2,s=1,c=1,t=17,pt=7,l=5,sg=0,ft=0,st=OK:108.12
      mysgw: Sending message on topic: mysensors-out/2/1/1/0/17
      mysgw: TSF:MSG:READ,2-2-0,s=2,c=1,t=17,pt=7,l=5,sg=0:48.31
      mysgw: TSF:MSG:ACK REQ
      mysgw: TSF:MSG:SEND,0-0-2-2,s=2,c=1,t=17,pt=7,l=5,sg=0,ft=0,st=OK:48.31
      mysgw: Sending message on topic: mysensors-out/2/2/1/0/17
      mysgw: TSF:MSG:READ,2-2-0,s=3,c=1,t=17,pt=7,l=5,sg=0:362.86
      mysgw: TSF:MSG:ACK REQ
      mysgw: TSF:MSG:SEND,0-0-2-2,s=3,c=1,t=17,pt=7,l=5,sg=0,ft=0,st=OK:362.86
      mysgw: Sending message on topic: mysensors-out/2/3/1/0/17
      
      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @Reza There are many guides on the web teaching how to connect and use rs485 with the RPi. I recommend you start with them and when you are sure it is working, you add MySensors to the equation.

      posted in Announcements
      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: πŸ’¬ Building a Raspberry Pi Gateway

      @marceltrapman

      If you use the --my-controller-ip-address= option, the gateway will act as a client and attempt to conect to the supplied ip and port. If you want the gateway to open port 5003, omit this option.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @tiana
      "The Broadcom SoC has three independant SPI interfaces, however only one of these is brought out to the GPIO connector, and that one SPI interface has 2 Chip enable lines."
      More info here: https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=22608

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @LaMB95 No, I meant the options you used when you ran ./configure

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @Reza Yes, you can use rs485 in the RPi.

      ./configure --my-transport=rs485 --my-rs485-serial-port=<YOUR_SERIAL_PORT>
      

      For more options, run:

      ./configure -h
      
      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @marceltrapman Are you sure it's not a problem with your controller?
      Have you tried connecting to your controller using telnet?

      telnet 192.168.1.x 5003
      
      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @marceltrapman @LaMB95
      Could you post the complete ./configure command used to configure the gateway?

      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: Mysensors Gateway on OrangePi (Zero) (opi)

      Instructions page updated, let me know if there is any mistake.

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

      @Tag great! Thanks for the detailed explanation πŸ‘
      I will add to the instructions page

      posted in Development
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @Reza

      From the Building a Raspberry Pi Gateway article:

      If you wish to install:

      sudo make install
      

      The last command will provide instructions for your system on how to start the gateway on every boot.

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

      @mihai.aldea The gateway does the exporting when needed, you don't need to run:
      for A in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do echo "$A" > /sys/class/gpio/export ; done

      Could you send the output of this command?

      ls -lah /dev/spidev*
      
      posted in Development
      marceloaqno
      marceloaqno
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @Reza Is there /sys/class/gpio/export file on your OPi?

      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: Mysensors Gateway on OrangePi (Zero) (opi)

      @Tag Could you fill this table with your current setup?

      nRF24L01 | OrangePi  | OrangePi
               | phyPin    | GPIO
      _________|_______________________
      VCC      | 3V3-PWR   | 3V3-PWR
      GND      | GND       | GND
      CSN      |           |
      CE       |           |
      MOSI     | 19        | 15
      SCK      | 23        | 14
      MISO     | 21        | 16
      
      posted in Development
      marceloaqno
      marceloaqno
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @Tag Oops, did I get it right this time (I reuploaded the image)?

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

      @mihai.aldea sorry about the github link mistake.

      @pansen Yes, I will.

      Is the orientation of the pins correct in the image?
      0_1483990616295_Orange-Pi-Zero-Description.jpg

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

      @mihai.aldea I think you're not in the right branch, could you start from scratch like this:

      rm -rf marceloaqno-spidev
      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

      @Mihai I have not done any extensive testing with IRQ functionality in RPi, I plan to do it in the future, so for now you will have to test it for yourself.

      @Madhias Yes, this is the expected output, the gateway is now waiting for messages to arrive.

      @pjeran Yes, there is a work in progress with many improvements: https://github.com/mysensors/MySensors/pull/722

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

      @Reza Was /sys/class/gpio/export created after modprobe gpio-sunxi?

      @mihai-aldea Could you send the complete make and configure output so I can check if your system is correctly detected?

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

      @mihai.aldea Could you try the repo I'm working on (https://github.com/marceloaqno/MySensors/tree/spidev marceloaqno-spidev) adding your settings to the examples_linux/mysgw.cpp?

      #define MY_RF24_CE_PIN 7
      #define MY_RF24_CS_PIN 0
      
      posted in Development
      marceloaqno
      marceloaqno
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @Tag Does the TMRh20 works in the way your radio is currently connected?

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

      @Reza You need to run:

      modprobe gpio-sunxi
      

      so that /sys/class/gpio/export is created.

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

      @Tag I found more information on the wiki page about the gpio pins:
      http://linux-sunxi.org/GPIO

      It seems that there is a calculation to be made to know which number to use 😱

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

      @Tag also, please don't set the interrupt pin for now.

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

      @Tag Maybe this one can help too:
      http://orange314.com/WiringOP

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

      @Tag Great! The mapping of the physical GPIO number in OrangePi is not ready yet, so you need to figure out the correct value for the CE and CSN pins by adding this to the examples_linux/mysgw.cpp or MyConfig.h

      #define MY_RF24_CE_PIN X
      #define MY_RF24_CS_PIN Y
      

      This is the best pinout image I've found that could help:
      https://oshlab.com/orange-pi-zero-pinout/

      This may also give you some hint:

      cat /sys/kernel/debug/gpio
      
      posted in Development
      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: Mysensors Gateway on OrangePi (Zero) (opi)

      @hausinger The problem you are having with your serial gateway (./configure --my-gateway=serial --my-serial-port=/dev/ttyUSB0 --my-serial-baudrate=115200) may be related to this bug:
      https://github.com/mysensors/MySensors/issues/720#issuecomment-270712256

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

      @hausinger That shouldn't happen (gateway quitting itself). Could you submit the debug log with MY_DEBUG_VERBOSE_RF24 enabled?

      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: πŸ’¬ 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: πŸ’¬ Building a Raspberry Pi Gateway

      @jirm The configure script from MySensor repo is based on the https://github.com/TMRh20/RF24/blob/master/configure. Could you try with theTMRh20 master branch and post the result?

      git clone https://github.com/TMRh20/RF24.git
      cd RF24
      ./configure
      make
      
      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @musthafa Yes, set the IP Address to 127.0.0.1 in your openhab for the ethernet gateway.

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @musthafa Openhab2 works using mysgw configured as an ethernet gateway. This is the guide I used: https://github.com/tobof/openhab2-addons/wiki

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @musthafa I'll give it a try. What version of openhab are you using?

      posted in Announcements
      marceloaqno
      marceloaqno
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @jirm If you try to use the nrf24h radio you will get the same error as the @Tag post:

      In file included from examples_linux/mysgw.cpp:74:0:
      ./MySensors.h:258:2: error: #error No support for nRF24 radio on this platform
      #error No support for nRF24 radio on this platform
      

      For @aand error, it's what you mention in your early post, a gcc compiler issue.

      MySensors nrf24 drivers uses the SPI interface to drive the module, it's the same driver for all supported platforms (RPi, esp8266, atmega328p, ...), this way it is easier to maintain.

      I understand that it must have been frustrating to find out that it does not work for the OPi but there isn't much I can do to help you. I bought one too, still waiting to arrive.

      posted in Announcements
      marceloaqno
      marceloaqno