šŸ’¬ Building a Raspberry Pi Gateway


  • Code Contributor

    @martins RFM69 is not yet supported in RPi.



  • @marceloaqno
    OK let me explain better. I've build an arduino serial gateway and connecting it on the uart of the pi. If I do tail -f /dev/ttyAMA0 I can see the messages comming in on the serial interface. However if I run ./bin/mysgw -d I get this error:

    mysgw: Starting gateway...
    mysgw: Protocol version - 2.1.0-beta
    mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.0-beta
    mysgw: TSF:LRT:OK
    mysgw: TSM:INIT
    mysgw: TSF:WUR:MS=0
    mysgw: !TSM:INIT:TSP FAIL
    mysgw: TSM:FAIL:CNT=1
    mysgw: TSM:FAIL:PDT
    mysgw: TSM:FAIL:RE-INIT

    This is the configure I used to build it:
    ./configure --my-gateway=serial --my-serial-port=/dev/ttyAMA0 --my-serial-baudrate=38400

    So the RFM69 Radio in not directly on the PI but on the arduino and is used as the serial gateway.

    Hope this clarify it more.

    Regards,
    Martin



  • @marceloaqno
    Issue solved. Domoticz read directly the serial inputs from the arduino that's connected on the PI. I was under the impression that you need a gateway (software) running on the PI to interface with Domoticz.

    Thanks,
    Martin



  • Hi there,
    I'm trying to make a gateway on my pi and since the begining i'm stuck!
    Using this: git clone https://github.com/mysensors/MySensors.git
    i get: fatal: unable to access 'https://github.com/mysensors/MySensors.git/': Could not resolve host: github.com
    I tried with sudo too! am i the only one getting this?


  • Mod

    @ewgor "Could not resolve host" means dns is not working on your raspberry pi. Is the network working properly (can you access other web sites from the pi?) http://www.suntimebox.com/raspberry-pi-tutorial-course/week-3/day-5/ seems to have a guide if you need help configuring network settings.



  • (sorry, I hit reply on mfalkvidd's post)
    I have a strange problem:

    I tried to be smart (haha) and updated my Raspberry2 with

    sudo apt-get update
    sudo apt-get dist-upgrade
    

    This took quite a while and looked successful to me.

    Unfortunately the MySensors Gateway and/or controller setup is not working correctly anymore. For troubleshooting I disabled my controller (MyController running on the Pi and for sniffing also MYSController available on my Windows machine). I stopped the gateway service and manually ran the gateway with -d debug information and get this:

    mysGateway: Starting gateway...
    mysGateway: Protocol version - 2.0.1-beta
    mysGateway: MCO:BGN:INIT GW,CP=RNNG--Q,VER=2.0.1-beta
    mysGateway: TSF:LRT:OK
    mysGateway: TSM:INIT
    mysGateway: TSM:INIT:TSP OK
    mysGateway: TSM:INIT:GW MODE
    mysGateway: TSM:READY
    mysGateway: Listening for connections on 0.0.0.0:5003
    mysGateway: MCO:REG:NOT NEEDED
    mysGateway: MCO:BGN:STP
    mysGateway: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
    mysGateway: TSF:MSG:READ,7-7-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    mysGateway: TSF:MSG:BC
    mysGateway: TSF:MSG:FPAR REQ,ID=7
    mysGateway: TSF:PNG:SEND,TO=0
    mysGateway: TSF:CKU:OK
    mysGateway: TSF:MSG:GWL OK
    mysGateway: TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    mysGateway: TSF:MSG:PINGED,ID=7,HP=1
    mysGateway: TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    mysGateway: TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    mysGateway: TSF:MSG:READ,7-7-0,s=255,c=0,t=17,pt=0,l=5,sg=0:2.0.0
    mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
    mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=11,pt=0,l=17,sg=0:Ernie Giess-O-Mat
    mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=12,pt=0,l=4,sg=0:0.17
    mysGateway: TSF:MSG:READ,7-7-0,s=2,c=0,t=6,pt=0,l=0,sg=0:
    mysGateway: TSF:MSG:READ,7-7-0,s=0,c=0,t=7,pt=0,l=0,sg=0:
    mysGateway: TSF:MSG:READ,7-7-0,s=3,c=0,t=30,pt=0,l=0,sg=0:
    mysGateway: TSF:MSG:READ,7-7-0,s=4,c=0,t=21,pt=0,l=0,sg=0:
    mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
    mysGateway: TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
    mysGateway: TSF:MSG:READ,7-7-0,s=0,c=1,t=1,pt=7,l=5,sg=0:8219.0
    mysGateway: TSF:MSG:READ,7-7-0,s=2,c=1,t=0,pt=7,l=5,sg=0:29.66
    mysGateway: TSF:MSG:READ,7-7-0,s=3,c=1,t=38,pt=7,l=5,sg=0:9.0
    mysGateway: TSF:MSG:READ,7-7-0,s=4,c=1,t=34,pt=1,l=1,sg=0:0
    mysGateway: TSF:MSG:READ,17-17-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    mysGateway: TSF:MSG:BC
    mysGateway: TSF:MSG:FPAR REQ,ID=17
    mysGateway: TSF:PNG:SEND,TO=0
    mysGateway: TSF:CKU:OK
    mysGateway: TSF:MSG:GWL OK
    mysGateway: TSF:MSG:SEND,0-0-17-17,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    mysGateway: TSF:MSG:READ,17-17-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    mysGateway: TSF:MSG:PINGED,ID=17,HP=1
    mysGateway: TSF:MSG:SEND,0-0-17-17,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    mysGateway: TSF:MSG:READ,7-7-0,s=0,c=1,t=1,pt=7,l=5,sg=0:10834.0
    mysGateway: TSF:MSG:READ,7-7-0,s=2,c=1,t=0,pt=7,l=5,sg=0:3.96
    mysGateway: TSF:MSG:READ,7-7-0,s=3,c=1,t=38,pt=7,l=5,sg=0:9.0
    mysGateway: TSF:MSG:READ,7-7-0,s=4,c=1,t=34,pt=1,l=1,sg=0:0
    mysGateway: TSF:MSG:READ,17-17-0,s=255,c=3,t=0,pt=1,l=1,sg=0:67
    mysGateway: TSF:MSG:READ,17-17-0,s=1,c=1,t=0,pt=7,l=5,sg=0:18.8
    mysGateway: TSM:READY:NWD REQ
    mysGateway: TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    mysGateway: TSF:SRT:OK
    

    Which looks okay to me (2 sensor nodes are sending data here). But after this NWD REQ...STR:OK block nothing more happens, only more of these 3 lines blocks repeat over and over with about 15 minutes or so inbetween.

    "of course" I also re-compiled the gateway source with re-setting the configuration, which is

    sudo ./configure --my-rf24-channel=124 --my-rf24-irq-pin=11  --my-debug=enable
    sudo make install
    

    any ideas what I can try to make it work again? šŸ˜ž

    In any case, happy weekend to everyone,
    greetings from Germany!


  • Code Contributor

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



  • @marceloaqno Thanks for the hint! This actually solves the lock up. But shouldnt the interrupt offer a superior connectivity and thus be desireable? Until yesterday (before I did the RPi upgrading) this worked - or at least it appeared to work (I dont know if the interrupt was actually used)


  • Code Contributor

    @Velo17 I had the same problem in the past but I thought it was because of my nrf24 module wasn't properly shielded or my cables was too long, causing some kind of interference to the irq pin.
    I end up disabling the interrupt options until I replace my nrf24 module or rearrange the cables, which I haven't done yet.

    Could you give more details on what kind of nrf module you are using and how it is connected to rpi?



  • Hi everyone.
    IĀ“m trying to build a new homeController with the following parts / software.

    Raspberry Pi 3
    Home Assistant
    MySensors
    Tellstick
    Mosquitto MQTT Broker

    I got everything working beside the MySensors. IĀ“m trying to connect the NRF 24L01+ chip directly to the RPI with help from https://www.mysensors.org/build/raspberry.

    I want to use MQTT between MySensors and HomeAssistant
    The MQTT broker is working when iĀ“m testing it.
    The Mosquitto is configurated with username and Password in the config of Mosquitto.

    The config iĀ“m using when Make Mysensors is the following:
    ./configure --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=mygateway1 --my-transport=nrf24 --my-rf24-irq-pin=15

    I also changed in the file /examples_linux/mysgw.cpp
    #define MY_MQTT_USER "My User"
    #define MY_MQTT_PASSWORD "My Password"

    When iĀ“m running the command: sudo systemctl status mysgw I got following result.

    ā— mysgw.service - MySensors Gateway daemon
    Loaded: loaded (/etc/systemd/system/mysgw.service; enabled)
    Active: active (running) since tis 2016-12-27 18:52:34 CET; 25min ago
    Main PID: 1405 (mysgw)
    CGroup: /system.slice/mysgw.service
    ā””ā”€1405 /usr/local/bin/mysgw

    dec 27 19:18:10 HomeAssistant mysgw[1405]: failed to connect
    dec 27 19:18:10 HomeAssistant mysgw[1405]: socket: Too many open files
    dec 27 19:18:10 HomeAssistant mysgw[1405]: failed to connect
    dec 27 19:18:10 HomeAssistant mysgw[1405]: socket: Too many open files
    dec 27 19:18:10 HomeAssistant mysgw[1405]: failed to connect
    dec 27 19:18:10 HomeAssistant mysgw[1405]: socket: Too many open files
    dec 27 19:18:10 HomeAssistant mysgw[1405]: failed to connect
    dec 27 19:18:10 HomeAssistant mysgw[1405]: socket: Too many open files
    dec 27 19:18:10 HomeAssistant mysgw[1405]: failed to connect
    dec 27 19:18:10 HomeAssistant mysgw[1405]: socket: Too many open files

    When trying to run command sudo mysgw -d it shows following info in a endless loop:
    mysgw: Attempting MQTT connection...
    mysgw: connected to 127.0.0.1
    mysgw: Attempting MQTT connection...
    mysgw: connected to 127.0.0.1
    mysgw: Attempting MQTT connection...
    mysgw: connected to 127.0.0.1
    mysgw: Attempting MQTT connection...
    mysgw: connected to 127.0.0.1
    mysgw: Attempting MQTT connection...
    mysgw: connected to 127.0.0.1
    mysgw: Attempting MQTT connection...
    mysgw: connected to 127.0.0.1
    mysgw: Attempting MQTT connection...
    mysgw: connected to 127.0.0.1
    mysgw: Attempting MQTT connection...
    mysgw: connected to 127.0.0.1

    Please help figure this out.

    //PeTi



  • Hello
    The past two days I've been trying to setup the gateway on my RPi 2 with domoticz.
    Here's what I did.
    I installed domoticz onto my raspi, then I tried the install the gateway.

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

    Afterwards I did the following

    ./configure --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=mygateway1
    
    make
    
    sudo ./bin/mysgw -d
    

    Then it seems to start normally onto the point where it refuses to connect to anything.
    Does anyone have a clue what's going wrong?
    I can't seem to figure it out. I've tried it several times over, and always go similar results.
    I was using GertSanders's connector for the RPi Hub and I've tried it with normal wiring too.
    As far as I can see it shouldn't be a wiring problem...

    0_1482936624899_upload-edfa86af-fd0c-4e63-be7b-5393e20f27eb

    EDIT:
    !UPDATE!
    I think I just fixed it. I reconfigured it to include the IRQ Pin and now it's just listening for throughput

    pi@raspberrypi:~/MySensors $  sudo ./bin/mysgw -d
    mysgw: Starting gateway...
    mysgw: Protocol version - 2.1.0-beta
    mysgw: MCO:BGN:INIT GW,CP=RNNG--Q,VER=2.1.0-beta
    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: Listening for connections on 0.0.0.0:5003
    mysgw: MCO:BGN:STP
    mysgw: MCO:BGN:INIT OK,TSP=1
    


  • I got the previous problem out of the way for now...
    Now onto the next one.

    I started a node and now I can clearly see data being sent and received on my serial log and ssh. (See picture)
    0_1482941358792_upload-08fe5f75-3536-4fb5-a0f4-2ee7d0edbc6a

    So I tried adding the gateway to domoticz using following settings:
    0_1482941417649_upload-ce92a80a-a5aa-4713-bfe8-227c71b8ce72

    Yet if I check hardware setup I can see no nodes being presented.
    0_1482941455435_upload-e36e2fbf-ac80-4381-895d-293e6e638ead

    Are there settings or steps I missed?
    Greetings
    Flor



  • @Flor-Sanders I think you maybe should choose not USB but Ethernet gateway in domoticz.



  • @Tigroenot
    That fixed it indeed XD
    Thanks for helping me out


  • Code Contributor

    @pettib Could it be that you are using an old version of Mosquitto?

    mosquitto -h
    


  • @marceloaqno
    How so?
    I've tried running the command you've supplied, but it doesn't work... Do I have to install mosquitto?
    I didn't see it anywhere in the guide.
    Everything is working at the moment, you think it can pose a problem later?



  • Hello everyone,
    I've been working gateway on RPi, but I don't know how to configure MY_SIGNING_SOFT .
    File mysgw.cpp contains MY_SIGNING_SOFT definition and I can uncomment it, but I don't know where and how I should define: SOFT_HMAC_KEY, SOFT_SERIAL and AES_KEY ?
    Could you give more details how to configure soft signing on RPi?
    thanks
    //Robert



  • Has anyone successfully built on an Orange Pi One running armbian? RPi running raspbinan is supported, but on my Orange Pi One running armbian I get
    ./MySensors.h:258:2: error: #error No support for nRF24 radio on this platform

    I already have TMRh20's RF24 code running on this system, so I know it's capable.



  • @aand

    working on the same setup, unfortunately was not able to compile the mysensors gateway...
    this is the error i get:

    root@orangepizero:~/MySensors# make
    g++ -MT build/examples_linux/mysgw.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DMY_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o
    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
    ^
    In file included from ./drivers/RF24/RF24.cpp:23:0,
    from ./MySensors.h:294,
    from examples_linux/mysgw.cpp:74:
    ./drivers/RF24/RF24.h:52:17: fatal error: SPI.h: No such file or directory
    #include <SPI.h>
    ^
    compilation terminated.
    Makefile:98: recipe for target 'build/examples_linux/mysgw.o' failed
    make: *** [build/examples_linux/mysgw.o] Error 1
    root@orangepizero:~/MySensors#

    seems spi is missing...

    however it seems to be available in the system:

    root@orangepizero:~/MySensors# ll /dev/spidev0.0
    crw------- 1 root root 153, 0 Dec 30 16:26 /dev/spidev0.0

    root@orangepizero:~/MySensors# dmesg | grep -i spi
    [ 0.814155] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
    [ 0.814185] sunxi_spi_chan_cfg()1376 - [spi-1] has no spi_regulator.
    [ 0.815261] spi spi0: master is unqueued, this is deprecated

    setup:
    Orangepi zero
    Armbian

    hope that we get native OPI support soon, any way all help is appreciated!!

    kind regards,

    Tag



  • @aand said:

    Orange Pi One

    @aand

    I think, maybe the hardware nrf24 radio its not properly detected or ready on OPI?
    Seems ready state of the nrf24 board is needed in the moment to build/make the compilation of that module for the myGateway.

    We have any chance to run any Raspbian version (not armbian) on OPI ?
    Sure have so much differences about raspbian and armbian to aply same softw installation methods on both without adaptat in each case.

    Im so interesed too for use OPI One like my HA Controller and MQTT Gateway, so will be really good if you can post here any evolution and impressions about using OPI for that.

    Cheers



  • jirm daid "I think, maybe the hardware nrf24 radio its not properly detected or ready on OPI?"

    nrf24l01 radios WORK FINE on the Orange Pi One running armbian.

    I downloaded TMRh20's RF24 GitHub files and successfully tested the Linux example code "gettingstarted" in which an Orange Pi One (tx) sent data to another Orange Pi One (rx).



  • @aand.
    No dubt that NRF24 is detected and working on Armbian, but seems not properly detected on the build module process for the gateway installation process made for Raspbian. Sure because OS diferences from Raspbian and Armbian, raise this issue.
    Why not directly use Raspbian on OPI to avoid that and sure other issues that will by found because all software are mainly build for Raspberry (Raspbian OS) and that is the only well tested?

    I see Raspbian is available and updated for OPI trough his manufacturer.

    http://www.orangepi.org/downloadresources/orangepipc/oragepipc_e930546e866b23585721e5d2a6.html

    Regards



  • @jirm Thanks for the suggestion. I've downloaded the raspian image. To duplicate the path I used with armbian, I downloaded TMRh20's RF24 code so I can test the radio with code I've already had up and running on the hardware.. However, this version of raspbian is really bad. So far nothing compiles. Regular raspbian, and armbian on the orange pi one do not have this kind of problem out of the box; they compile a wide range of packages. I'll spend some more time on it to be diligent, but this distro looks like it needs to be put on the abandon pile.

    I tried compiling mysensors gateway too but no luck with that yet either. This is what I get:

    ./configure
    [SECTION] Detecting target machine.
    [OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
    [OK] init system detected: sysvinit
    [SECTION] Saving configuration.
    [SECTION] Cleaning previous builds.
    [OK] Finished.

    make
    gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RA
    DIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/log
    .c -o build/drivers/Linux/log.o
    cc1: error: bad value (armv8-a) for -march switch
    cc1: error: bad value (cortex-a53) for -mtune switch
    Makefile:102: recipe for target 'build/drivers/Linux/log.o' failed
    make: *** [build/drivers/Linux/log.o] Error 1



  • @aand

    Ok. Arrrggg ! .
    So sad ear that OPI Raspbian fork is too not working out the box and but its not surprise because the poor software support form manufacturer. Maybe this is another no way road.
    So seems only keep fighting with both OS (arm and rasp) to make it working.
    Some sugestions ...
    Will be fine if can post this issue but in software section here on mysensors forums. Maybe some mysensors gateway developers or any linux hack can help to trace the error you have on armbian or raspbian.
    Maybe can find another "no official" OPI Raspbian fork that compile better to mygateway. Maybe post this issue in OPI forums will be good and someone there can help or provide other better Raspbian fork.

    Sadly in this days I dont have time to try install on my OPIĀ“s to help more. šŸ‘Ž

    Regards



  • @aand

    The las error you posted...is not on Raspbian but in Armbian ????

    "gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RA
    DIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/log
    .c -o build/drivers/Linux/log.o
    cc1: error: bad value (armv8-a) for -march switch
    cc1: error: bad value (cortex-a53) for -mtune switch"

    In any case seems this is a gcc compiler error maybe because "wrong" version for that processor...so maybe trying to update gcc compiler can help to avoid that error?



  • @jirm The compiler error was from the raspbian image running on the orange pi one hardware. I installed the image, ran apt-get update and apt-get upgrade, then tried the mysensors installation. The error was unusual enough to stop me in my tracks ... it didn't look like a simple dependency error.

    armbian is not as well known as raspbian, but it is a very good distribution with an active and friendly development team. I like raspbian because it is a mature distro, and that's why I wanted to give it a try when you pointed out it's availability, but armbian is a very good alternative. I like armbian a lot and I hope we can get mysensors to work on it. Armbian also supports some of the newest and exciting hardware like the Nano Pi Neo and the Orange Pi Zero, each with a lot of IoT possibilities (they are very small form factors and low cost).

    As you can tell, I think it's a big win if we can get it working on armbian. I will look for the place you mentioned on the forum that might be a good place to post this issue -- please let me know if you have a suggestion on where it's best to post. And I'd like to thank you for your consideration of this problem.



  • IĀ“m in the same boat as you, because for the moment I choose OPI hardware for my HA (Home Automation) system.
    Agree with you that Armbian is much better OS than Raspbian in general terms and preferably the path to walk through for OPI, but in that case always we walk on a parallel side because Raspbian is today the most prefered OS for IoT on developments because Raspberry is the predominant hardware. So that means in future we need fight each installation.

    In that case, Armbian forums sure is necesary place that can help to solve that problem too, but I think first better post here on mysensors software forums to try to get some more light about that specific error about mysensors gateway install process, and then at least have more info to report to someone that can help in Armbian.

    I'm trying to find some help more about the issues you raise and if you maintain posting updates here will be so good for me and sure for others that can use OPI too now or on future.

    OPIĀ“s IĀ“m sure is in near future a very good hardware (because they're so good relation cost-performance and quality) that mucho more people would choose for next coming IoT projects.

    Regards



  • @aand

    The error you post seems because gcc compiler is not well supporting the processor, so maybe need substitute all gcc compiler version in the OS to solve the issue (that's I wanted say before with update).

    apt-get update/upgrade cannot substituting "any" software to other because doing this only can push to last version the existing installed branch on the yet installed software on the OS.

    So It's not any dependence error it's a gcc compiler error raised for some weird version incompatibility with the hardware installed. Strange error but this is seems means message error you posted. So seems needed reinstall all gcc compiler to avoid that.

    Hope I explain enough...sorry about my bad english šŸ˜‰

    See you...



  • Can I install mysensors on a openhab installed RPi ?


  • Code Contributor

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


  • Code Contributor

    @aand @Tag @jirm MySensors uses its own nrf24 drivers, and OrangePi is not currently supported. It will be in the future.



  • @marceloaqno

    You mean the error posted @aand is because that?

    You mean mysgw use own NRF24 drivers that is not supported on OPI although he have running Raspbian version?.

    In any case, if so will be really fine if mysgw software allowed (or provide information about how to do it) to use any NRF24 driver (ex. TMRh20 fork that is working fine on OPI) and maybe too Hope RFMXX (IĀ“m most interested in this last transceivers) because I think that generally speaking make a rigidly link with a type of hardware is not the best thing that can be done to really give the best functionality to any application.

    Still keep waiting for anyone here than can help to install mysgw softw on OPI.

    Thanks for your information

    Best regards



  • @marceloaqno, Thanks a lot



  • Ditto, @Robinek70 !

    Thank you, Marcelo Aquino, for your fantastic work .

    I have Domoticz, Cacti, Heyu and MySensors Gateway running in a 30 dollars RASPBERRY PI 2, all without a glitch, all talking to each other and hopefully soon will also have Alexa for RASPBERRY PI running there also.

    If in doubt, by a RASPBERRY PI and thank people who develop and support it for free instead of complaining all the time.

    'nuff said.

    Luiz Roberto


  • Code Contributor

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


  • Code Contributor

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



  • @marceloaqno

    Thank you for your help here!! would be great to have mysgw on the OPI!
    I am using armbian on a OPI zero, so let me know if you need any further info.

    (Also using an RPI, which runs mysgw with direct connected radio like a charm!)
    Kind regards,

    Tag



  • @marceloaqno said "MySensors uses its own nrf24 drivers, and OrangePi is not currently supported. It will be in the future."

    I wish it worked now, but I don't mind waiting. Just to clarify where I'm coming from -- Orange Pi One hardware running Armbian. Thanks!

    I'll be keeping watching the updates!



  • @marceloaqno

    OpenHab 2



  • @marceloaqno

    Really thanks a lot for your work and very much appreciate you try to help us on our "fight" with the OPI board.
    Sadly in this moment I cannot work because I'm out of time to try install all softw stuff on my OPI and try help much more to push it working with mysgw and so on.
    I don't understand so much why is not working out of the box and the driver issue found and/what hardware communication issue are only on OPI with that similar derived Raspbian OS like Raspberry, and too not understand why cannot work on OPI because that SPI bus issue you say.
    @aand reported nrf24 module work very well with TMRh20 driver, so seems hardware are OK on OPI for the module and I suppose still only discover and hopefully make it work avoiding the driver issue you say to compile properly mysgw softw.
    Anyway, I only hope that anyone can help mainly here to make work mysgw on OPI too, and adapt it to work on Armbian, because OPI is a really good choice for HA controller board and sure in near future much people use it.

    Is there any chance to substitute own nfr24 driver mysgw with the TMR20h, at least for testing purposes on OPI?

    If any mysgw "code" people are reading this maybe can try to help us with some idea to try workaround the compilation issue on OPI.

    Best regards and again many thanks!

    PD: Only for test SPI purposses on armbian this can help (post 248) :
    https://forum.armbian.com/index.php/topic/617-wip-orange-pi-one-support-for-the-upcoming-orange-pi-one/page-9#entry5747

    Only for info, other interesting post about how to make work nrf24l01 module on OPI and armbian:
    https://forum.armbian.com/index.php/topic/3161-orange-pi-one-with-nrf24l01/

    Another one interesting post OPI One with armbian using NRF24 module:
    https://forum.armbian.com/index.php/topic/3161-orange-pi-one-with-nrf24l01/


  • Code Contributor

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



  • Hello.

    I'm also using a orangepi one and wanted to build the gateway on it. But i didn't want to use the nrf24 but a usb to rs485 converter. But if i want to compile it, i get also the same error with the nrf24 and that it is not supporting platform. Why?

    Also if i want to build a serial gateway with a connected arduino on usb port, i got the same error with the nrf24



  • @marceloaqno thank you.

    I have already installed OpenHAB 2 on my RPi. Can I install mysgw on to the same RPi ?



  • @hausinger -- are you running armbian on your orange pi one?



  • How can I update MySensors Gateway from 2.1.0 beta to 2.1.0 stable/final release?


  • Code Contributor

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



  • @aand said:

    @hausinger -- are you running armbian on your orange pi one?

    Yes, I'm running on armbian on my orange pi one



  • @aand

    Hi again!

    I spend some time seeing and reading some of the files from the mysensors github build and I see some things that can help to understand why the error raised to @aand trying to compile on OPI.

    First say that IĀ“m not a coding expert, so please be nice with my if IĀ“m wrong and say something stupid šŸ˜‰

    I see in the .configure file that the machine detection have H3 Soc and this are fine detected , but then I see that selecting type and CPU flags seems not properly selected to match OPI specs , because on OPI soc H3 have a cpu armv7 (not armv8) and is a A20 and not A53.
    So maybe that cpu "selection" is not correct for H3 soc , and is so easy try if anyone that have OPI and have time can change only that values in the config file and try to compile.
    All the values on the A20 line seems correct for the OPI H3 soc, so only needed copy them from the A20 line to the H3 line, and give a try.

    File Configure

    .......

    function gcc_cpu_flags {
    local soc=$1
    case $soc in
    BCM2835)
    flags="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard"
    ;;
    BCM2836)
    flags="-march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard"
    ;;
    AM33XX)
    flags="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard"
    ;;
    A10)
    flags="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard"
    ;;
    A13)
    flags="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard"
    ;;
    A20)
    flags="-march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard"
    ;;
    H3)
    flags="-march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard"

    ;;
    *)



  • @marceloaqno Thank you!



  • also on banana pi pro when i trie to compile i'm getting this :

    [SECTION] Detecting target machine.
    [OK] machine detected: SoC=A20, Type=unknown, CPU=armv7l.
    [OK] init system detected: sysvinit
    [SECTION] Saving configuration.
    [SECTION] Cleaning previous builds.
    [OK] Finished.

    type i think must be BananaPro

    on make :

    -o build/examples_linux/mysgw.o
    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
    ^
    In file included from ./drivers/RF24/RF24.cpp:23:0,
    from ./MySensors.h:294,
    from examples_linux/mysgw.cpp:74:
    ./drivers/RF24/RF24.h:52:17: fatal error: SPI.h: No such file or directory
    #include <SPI.h>
    ^
    compilation terminated.
    Makefile:98: recipe for target 'build/examples_linux/mysgw.o' failed
    make: *** [build/examples_linux/mysgw.o] Error 1

    so Banana Pi Pro soc A20 it's also on wait list or never worked ?



  • @eyesoft

    Yes...I see. That error is that said @marceloaqno about own mysensors NRF24 drivers and SPI bus adapt for Raspberry, because for now mysensors is only supported at Raspi and arduinos.
    On Banana CPU detection seems work better (I agree type seems not good...maybe you can change this on configure file and give a try to compile to see what happends) and I figure can work too on OPI too only changing that I said before, but then is raised NRF24 driver and SPI error.

    I see that mysensors RF24 driver are derivated from that https://github.com/mz-fuzzy/RF24 build that at same time last this is forked directly from http://tmrh20.github.io/RF24Installer/RPi/install.sh that we know are working fine on OPI and armbian, so I figure that maybe itĀ“s not so much hard to modify mysensors RF24 to adapt to work on OPI.

    Hope any mysensors "coder" ear our call and cand give us some hand to make the changes on the mysensors build and we can compile the mysgw to OPI soon.

    Cheers



  • @jirm

    As a side coment, the configure file is on the root Mysensors directory that is buid when you complete the first step "git clone https://github.com/mysensors/MySensors.git" on the mysgw install process.

    Anyone can edit the file with a plain text editor and change the values for see what happens when try compile.

    Regards


  • Code Contributor

    @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
    


  • @marceloaqno

    git clone https://github.com/TMRh20/RF24.git
    cd RF24
    ./configure
    [SECTION] Detecting arm compilation environment.
    [OK] arm-linux-gnueabihf-gcc detected.
    [OK] arm-linux-gnueabihf-g++ detected.
    [SECTION] Detecting target machine.
    [OK] machine detected: SoC=A20, Type=unknown, CPU=armv7l.
    [SECTION] Detecting DRIVER
    [OK] DRIVER detected:SPIDEV.
    [SECTION] Detecting OS.
    [INFO] OS detected:LINUX.
    [SECTION] Preparing configuration.
    [SECTION] Saving configuration.
    [SECTION] Cleaning previous builds.
    [OK] Finished.

    make
    arm-linux-gnueabihf-g++ -fPIC -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c RF24.cpp
    arm-linux-gnueabihf-g++ -fPIC -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/spi.cpp
    arm-linux-gnueabihf-g++ -fPIC -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/gpio.cpp
    arm-linux-gnueabihf-gcc -fPIC -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/compatibility.c
    arm-linux-gnueabihf-g++ -fPIC -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/interrupt.c
    [Linking]
    arm-linux-gnueabihf-gcc -pthread -shared -Wl,-soname,librf24.so.1 -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -o librf24.so.1.2.0 RF24.o spi.o gpio.o compatibility.o interrupt.o


  • Code Contributor

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



  • @marceloaqno
    i've tried on banana pi pro :

    cat /etc/debian_version
    8.6
    cat /etc/bananian_platform
    BananaPro


  • Code Contributor

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



  • @marceloaqno Sadly IĀ“m so much bussy and traveling for few days and cannot acces to my OPIĀ“s šŸ˜ž , but IĀ“m sure someone here (@aand , @hausinger, etc.. ) can give a try on her OPI the things we said before. At least I hope this ...



  • @marceloaqno I see some huge steps up on BananaPi...seems only need add SPIDEV support for make it working... šŸ™‚



  • @marceloaqno I am rather copy/paste not a programming kind a guy, so sorry for my lame questions.

    pi@raspberrypi ~ $ git clone https://github.com/mysensors/MySensors.git
    fatal: destination path 'MySensors' already exists and is not an empty directory

    pi@raspberrypi ~/MySensors $ git checkout master
    Branch master set up to track remote branch master from origin.
    Switched to a new branch 'master'

    but after that:

    pi@raspberrypi ~/MySensors $ make
    make: *** No targets specified and no makefile found. Stop.
    pi@raspberrypi ~/MySensors $ sudo make install
    make: *** No rule to make target 'install'. Stop.



  • @Oli ... try :
    ./configure
    make
    sudo make install



  • @eyesoft same errors



  • @Oli see commands above how to Install and Build, with git checkout master you are on master if you :
    cat README.md
    MySensors Library v2.1.0

    default on git clone you are on development :
    cat README.md
    MySensors Library v2.2.0-beta



  • @Oli First you need delete all Mysensors directory on your machine.
    Then use step by step the guide on Mysensors Gateway installation process:
    https://www.mysensors.org/build/raspberry
    Dont forget put command sudo on sentences if needed.

    Regards



  • I wanna update not to re install of MySensors. I thought about something like ./updaterelease or ./updatebeta... I spend hours of make it work before, so I leave it as it is. No time or nerves for fighting next couple of days.


  • Mod

    @Oli what did you have to do to make it work? It should just be a matter of following the instructions that @jirm linked to.

    EDIT: Since you already have the MySensors repo cloned from git, you can update by running

    pi@raspberrypi ~/MySensors $ git pull
    

    Than run configure, make, etc as per the original instructions.



  • @mfalkvidd I could not find ttyMySensorsGateway on Domoticz. Only ttyUSB0, ttyUSB20 and ttyAMA0. Even after I did ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway


  • Mod

    @Oli so what did you do to make it work?



  • @Oli IĀ“m thinking is hard to "only" update (changing from develop to master branch) directly from github if the repository is not been previously prepared to do this kind of updates... but maybe IĀ“m wrong.

    Will be good you give feedback if you get it.

    Cheers



  • @mfalkvidd hah... thats a good question, don't know. After dozen or more reinstallations, spending hours on Google I finally make it work. Got some notes but frankly I am worrying it will happen again. Hahaha


  • Mod

    @Oli ah, ok. Then I'd recommend backing up everything before doing git pull, configure, make, etc so you can restore if it stops working.



  • @Oli šŸ™‚ šŸ™‚
    Good !
    I like when people can make something work that nobody even knows what it is šŸ™‚

    For me it usually happens just the opposite I am not able to make work even the things I know perfectly well ... maybe it will be a matter of "bad karma" šŸ™‚



  • OK, I did it, I f....g did it, and guess what...
    s...t happened again.
    Everything went as it should, no errors at all, but no ttyUSBMySensorsGateway...
    0_1483469802904_Nowy dokument tekstowy.jpg

    log error message:
    2017-01-03 19:56:38.784 MySensors: Using serial port: /dev/ttyUSBMySensorsGateway
    2017-01-03 19:56:38.785 Error: MySensors: Error opening serial port!
    2017-01-03 19:56:39.785 MySensors: retrying in 30 seconds...

    and again...
    and again...
    ...

    any help would be appreciated.



  • Hello,

    Could someone answer: if i have RPi NRF24 GW, how I could connect MYSController from other computer (for example from Windows computer)?

    1. Is it possible to make that type connection with RPi NRF24 GW?
    2. May I use some integrated web server for this type of connection in RPi to make it work? Is there are easier solutions?

    EDIT: no matter, already answered it by myself šŸ™‚
    Its easy becose it's like Ethernet GW.



  • @Oli: when you do a "ls /dev" is ttyUSBMySensorsGateway shown ?



  • @Oli: by the way, the name of the port you used is ttyMySensorsGateway, not ttyUSBMySensorsGateway:

    @mfalkvidd I could not find ttyMySensorsGateway on Domoticz. Only ttyUSB0, ttyUSB20 and ttyAMA0. Even after I did ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway

    Is the gateway running, ie, "ps -ef "grep my" shows a process there ?

    Cheers,

    Luiz



  • @Oli: sorry, correct syntax is ps -ef | grep my



  • @luizrrocha
    pi@raspberrypi ~ $ ls /dev

    autofs mmcblk0p1 stderr tty36 ttyAMA0
    block mmcblk0p2 stdin tty37 ttyMySensorsGateway
    btrfs-control net stdout tty38 ttyprintk
    bus network_latency tty tty39 ttyUSB0
    cachefiles network_throughput tty0 tty4 ttyUSB20
    char null tty1 tty40 uhid
    console ppp tty10 tty41 uinput
    cpu_dma_latency ptmx tty11 tty42 urandom
    cuse pts tty12 tty43 vc-cma
    disk ram0 tty13 tty44 vchiq
    fb0 ram1 tty14 tty45 vcio
    fd ram10 tty15 tty46 vc-mem
    full ram11 tty16 tty47 vcs
    fuse ram12 tty17 tty48 vcs1
    gpiomem ram13 tty18 tty49 vcs2
    hwrng ram14 tty19 tty5 vcs3
    i2c-1 ram15 tty2 tty50 vcs4
    input ram2 tty20 tty51 vcs5
    kmsg ram3 tty21 tty52 vcs6
    log ram4 tty22 tty53 vcsa
    loop0 ram5 tty23 tty54 vcsa1
    loop1 ram6 tty24 tty55 vcsa2
    loop2 ram7 tty25 tty56 vcsa3
    loop3 ram8 tty26 tty57 vcsa4
    loop4 ram9 tty27 tty58 vcsa5
    loop5 random tty28 tty59 vcsa6
    loop6 raw tty29 tty6 vhci
    loop7 root tty3 tty60 watchdog
    loop-control serial tty30 tty61 watchdog0
    MAKEDEV shm tty31 tty62 xconsole
    mapper snd tty32 tty63 zero
    mem sndstat tty33 tty7
    memory_bandwidth spidev0.0 tty34 tty8
    mmcblk0 spidev0.1 tty35 tty9

    pi@raspberrypi ~ $ ps -ef | grep my

    root 2079 1 1 18:40 ? 00:02:49 /usr/local/bin/mysgw -b
    pi 4214 4181 0 21:25 pts/2 00:00:00 grep --color=auto my



  • @Oli : the port name is actually ttyMySensorsGateway, you have to correct the definition of the gateway on Domoticz to use it....

    Luiz



  • @jacikaas : on MYSController go to Settings -> Gateway -> TCP/IP and add the IP address of the Gateway and use port 5003. It works even if the gateway is feeding data to Domoticz, so you can monitor your sensors in "raw" mode.

    Cheers,

    Luiz



  • @luizrrocha as You can see, on the picture above, I've wrote that ttyUSBMySensors.... is from my previous backup copy. On the same pictures You can also see that I can choose only from three serial ports: USB0, USB20 and AMA0. Thera are no ttyMySensorsGateway despite that it is present after ls /dev.
    And that's the problem, I dont know how to make it present in the serial ports popup menu.



  • @Oli : why not remove the old definition to avoid any trash information and restarting Domoticz to make shure it rereads the port info before creating the new entry ?

    And I do not understand why if you are running domoticz and the gateway on the same Pi, why not use a ethernet gateway and set 127.0.0.1 and port 5003 on the Domoticz gateway entry. I did that and never had to worry about USB ports at all.



  • @luizrrocha

    @luizrrocha said:

    @Oli : why not remove the old definition to avoid any trash information and restarting Domoticz to make shure it rereads the port info before creating the new entry ?

    Of course I did that, I started from the scratch... but when it did not work I try to restore my backup... but it did not work also...

    @luizrrocha said:

    And I do not understand why if you are running domoticz and the gateway on the same Pi, why not use a ethernet gateway and set 127.0.0.1 and port 5003 on the Domoticz gateway entry. I did that and never had to worry about USB ports at all.

    simple... I have no free LAN on my rotuer... there is more, I also have raZberry daughter board (Z-Wave) connected to same Raspberry Pi GPIO port. And till today everything works perfect until... "Better is the enemy of the good" šŸ˜‰



  • OK I found the solution (thanks to @luizrrocha). I change

    ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway
    to
    ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSBMySensorsGateway and now its working.

    Question is, It's only workaround (in my case) or there is bug in the installation guide?



  • @Oli : if both the gateway and Domoticz run on the same Raspi, there is no physical network involved, hence the 127.0.0.1 dummy local address is used by Domoticz to talk to the gateway on the same machine, just using port 5003... and since you use localhost (127.0.0.1, a virtual network) there is no need to create a virtual USB port which is what you did...



  • @luizrrocha interesting... step by step instruction?



  • @Oli: delete the Makefile.inc file on mysensors folder
    ./configure --my-gateway=ethernet
    make
    sudo ./bin/mysgw -b
    go to domoticz and create a new MySensors Gateway with LAN, inform 127.0.0.1 as the address and 5003 as the port...

    that should do the trick.



  • @Oli luizrocha's configuration seems interesting, but just in case your still wanting the serial, from above, has worked for me in the past, but I have since switched to OH2:

    @ysinh said:

    A tiny hint for the users of domoticz :
    ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB20
    make
    sudo ./examples_linux/mysGateway -d

    šŸ™‚ i hope this helps
    then in the hardware setup
    MySensors Gateway USB
    serial port: /dev/ttyUSB20



  • I am also not get it to work in Domoticz tried the USB serial and ethernet way.

    It's a testing pi. Where i didn't connected the radio. Because it's still in the Nano. Could that be the issue? I guess not.



  • @marceloaqno, @jirm, @aand

    Hi!,

    I started a new topic for Mysensors Gateway on OrangePI (OPI), Here

    Hope this is okay,

    Kind regards,

    Tag



  • The Pi MQTT Gateway with IRQ connected may handle better the messages into a loaded network than Ethernet MQTT Gateway where IRQ is not used? (with NRF24)
    Also I would like to know if I can use the other pins of RPi to connect some digital sensors directly there.



  • @Oli
    Stupid question... Did you mount the radio? Because I thought I would like to test if it works. (without radio) but that doesn't work.

    Mounted a radio and ethernet gateway is working.



  • @Mihai

    Maybe i'm wrong but IRQ is used on all gateways if you read above :
    """
    Improving throughput for nrf24
    There is another method were the interrupt pin from the nrf24 modules is used to inform when a new message arrives and it's immediately added to a queue for further processing
    """
    for the second part yes you can use other pins on RPi ... i have RF module NRF24L01 for gateway and DHT11 on RPi.



  • @luizrrocha said:

    Ditto, @Robinek70 !

    Thank you, Marcelo Aquino, for your fantastic work .

    I have Domoticz, Cacti, Heyu and MySensors Gateway running in a 30 dollars RASPBERRY PI 2, all without a glitch, all talking to each other and hopefully soon will also have Alexa for RASPBERRY PI running there also.

    If in doubt, by a RASPBERRY PI and thank people who develop and support it for free instead of complaining all the time.

    'nuff said.

    Luiz Roberto

    Can you please give me the instructions for Domoticz setup?

    I have a node with DHT11 sensor and I can see mygsw service is getting messages. How do I connect Domoticz with mysensors ?

    I have been following openhab until today and I'm switching to Domoticz now.



  • Hello, @musthafa .

    For installation I used the tutorial at http://www.domoticz.com/wiki/Installing_and_running_Domoticz_on_a_Raspberry_PI. It looks like they changed the tutorial that I used to just a single curl command to install it, although there are complaints about it not working alright. You'll have to try it as I cannot reinstall mine.

    Setting up MySensors Gateway is also covered in the wiki : http://www.domoticz.com/wiki/MySensors, very easy. I recommend you go thru the wiki pages as I did, they are a treasure of information, as the manual on www.domoticz.com is outdated though useful.

    Good luck.

    Luiz



  • @luizrrocha said:
    Thank you!

    Hello, @musthafa .

    For installation I used the tutorial at http://www.domoticz.com/wiki/Installing_and_running_Domoticz_on_a_Raspberry_PI. It looks like they changed the tutorial that I used to just a single curl command to install it, although there are complaints about it not working alright. You'll have to try it as I cannot reinstall mine.

    Domoticz Installation was straight forward as per their wiki.

    Setting up MySensors Gateway is also covered in the wiki : http://www.domoticz.com/wiki/MySensors, very easy. I recommend you go thru the wiki pages as I did, they are a treasure of information, as the manual on www.domoticz.com is outdated though useful.

    Good luck.

    Luiz

    MySensors I tried Ethernet didn't work. Virtual Serial Port worked for me. However I have 1 light (LED Test at PIN 4 of Node) & a DHT sensor. Domoticz only lists the DHT sensor. It doesn't show me the light child.



  • @musthafa : look on the MySensors forum for the MYSController, install it and you can monitor the messages going to the gateway.

    Most likely your declaration of the LED output pin on the MySensors arduino is not correct. I still did not use arduinos as actuators with MySensors so I will probably not be of much help here.

    Cheers,

    Luiz



  • @luizrrocha said:

    @musthafa : look on the MySensors forum for the MYSController, install it and you can monitor the messages going to the gateway.

    Most likely your declaration of the LED output pin on the MySensors arduino is not correct. I still did not use arduinos as actuators with MySensors so I will probably not be of much help here.

    Cheers,

    Luiz

    In OpenHAB it worked as a dimmer. Later on OpenHAB was stuck and my mobile app was frozen. Then I start discovering Domoticz. If it can be discovered in OH2 why not in Domoticz ?



  • @eyesoft
    Thank you for the answer, I am happy to get a confirmation about sensors works on a Pi Gateway. Since at least one of my sensor is analogue, I still have to add an Arduino board to the gateway, I plan to connect it via USB.
    I have tested and get very good results with Home Assistant controller running on a Pi where I add sensors directly on Pi and to an Arduino (USB to Pi).
    The Ethernet Gateway do not use IRQ: https://www.mysensors.org/build/ethernet_gateway
    Nor the nodes: https://www.mysensors.org/build/connect_radio Even if the wire is connected at Arduino pin 2, is mentioned: Note: The IRQ is currently not used by the MySensors library so it can be left un-connected
    If you know how to connect and manage this IRQ on Arduino sketch, please let me know.
    I have built this some time ago and works without the IRQ connected. Now I have updated the MySensors to 2.1.0 , IRQ is still unconnected and works the same. As far as I see, it is used for the Pi Gateway. I plan to migrate to this configuration of Pi Gateway, but I would like to get more info before change my working system:

    • this IRQ improve the reliability? (sometimes I have encountered problems due the load of NRF24 network with many messages)
    • I would like to set retain=true for the MQTT Gateway, this will improve the reliability.
      I already addressed the last question somwhere else, still waiting for more info if somebody know.
      Thank you


  • After installing a Raspberry Gateway, is this output OK, or have I forgotten something?

    mysgw: Starting gateway...
    mysgw: Protocol version - 2.2.0-beta
    mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.2.0-beta
    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
    

    I configured with (should be a serial gateway with a controller on the same machine):

    ./configure --soc=BCM2835 --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorGateway --my-serial-groupname=dialout --my-debug=enable
    

Log in to reply
 

Suggested Topics

  • 3
  • 2
  • 5
  • 109
  • 347
  • 584

62
Online

11.4k
Users

11.1k
Topics

112.7k
Posts