Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. Port of MySensors Library 1.4 to Raspberry

Port of MySensors Library 1.4 to Raspberry

Scheduled Pinned Locked Moved Development
raspberry1.4
10 Posts 5 Posters 4.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aliasdoc
    wrote on last edited by
    #1

    Hi all, I port 1.4 library to Raspberry, it's not complete but is functional, check raspberry repo in github

    1 Reply Last reply
    0
    • B Offline
      B Offline
      busa
      wrote on last edited by
      #2

      Perfect!

      Could you post the Link to the Project?

      A 1 Reply Last reply
      0
      • b0rmannB Offline
        b0rmannB Offline
        b0rmann
        wrote on last edited by
        #3

        not functional

        MySensor.cpp:232: undefined reference to `RF24::write(void const*, unsigned char, bool)'

        A 1 Reply Last reply
        0
        • B busa

          Perfect!

          Could you post the Link to the Project?

          A Offline
          A Offline
          aliasdoc
          wrote on last edited by
          #4

          @busa hi, https://github.com/aliasdoc/Raspberry

          1 Reply Last reply
          0
          • b0rmannB b0rmann

            not functional

            MySensor.cpp:232: undefined reference to `RF24::write(void const*, unsigned char, bool)'

            A Offline
            A Offline
            aliasdoc
            wrote on last edited by
            #5

            @b0rmann HI, there are no problem with this line, can you post build output.

            b0rmannB 1 Reply Last reply
            0
            • A aliasdoc

              @b0rmann HI, there are no problem with this line, can you post build output.

              b0rmannB Offline
              b0rmannB Offline
              b0rmann
              wrote on last edited by
              #6

              @aliasdoc yes, i can :)

              ~/Raspberry $ make
              g++ -c -o MyGateway.o MyGateway.cpp -Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -Ilibrf24-bcm/
              g++ -c -o MySensor.o MySensor.cpp -Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -Ilibrf24-bcm/
              g++ -c -o MyMessage.o MyMessage.cpp -Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -Ilibrf24-bcm/
              g++ -c -o PiGateway.o PiGateway.cpp -Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -Ilibrf24-bcm/
              PiGateway.cpp: In function ‘void setup()’:
              PiGateway.cpp:26:88: warning: large integer implicitly truncated to unsigned type [-Woverflow]
              g++ -o PiGateway MyGateway.o MySensor.o MyMessage.o PiGateway.o -Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -Ilibrf24-bcm/ -lrf24-bcm
              MySensor.o: In function MySensor::setupRadio(rf24_pa_dbm_e, unsigned char, rf24_datarate_e)': /home/pi/Raspberry/MySensor.cpp:121: undefined reference to RF24::setPALevel(unsigned char)'
              MySensor.o: In function MySensor::sendWrite(unsigned char, MyMessage&, bool)': /home/pi/Raspberry/MySensor.cpp:231: undefined reference to RF24::write(void const*, unsigned char, bool)'
              /home/pi/Raspberry/MySensor.cpp:231: undefined reference to RF24::write(void const*, unsigned char, bool)' /home/pi/Raspberry/MySensor.cpp:231: undefined reference to RF24::write(void const*, unsigned char, bool)'
              /home/pi/Raspberry/MySensor.cpp:231: undefined reference to RF24::write(void const*, unsigned char, bool)' /home/pi/Raspberry/MySensor.cpp:231: undefined reference to RF24::write(void const*, unsigned char, bool)'
              MySensor.o:/home/pi/Raspberry/MySensor.cpp:231: more undefined references to `RF24::write(void const*, unsigned char, bool)' follow
              collect2: ld returned 1 exit status
              Makefile:18: recipe for target 'PiGateway' failed
              make: *** [PiGateway] Error 1

              1 Reply Last reply
              0
              • A Offline
                A Offline
                aliasdoc
                wrote on last edited by
                #7

                Ok, post an issue in github repo. Try to compile using this command "make clean all"

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  busa
                  wrote on last edited by
                  #8

                  Hi

                  Im working on a MQTT Port for the Pi, based on your work. During debuging, a discovered a strange behavior. If i connect my Sensor to a Arduino-Gateway, everything works well. As soon as i connect the same Sensor to a Pi-Gateway, the Gateway receives the Messages, but on the Sensor-Side, the Logs looks quiet Special:

                  send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=ok:21.1
                  send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=ok:55.4
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=ok:96
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=ok:1
                  send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
                  send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.4
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:0
                  send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
                  send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.4
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
                  send: 20-20-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  read: 0-0-20 s=255,c=3,t=8,pt=1,l=1:0
                  new parent=0, d=1
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=ok:0
                  send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=ok:21.1
                  send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=ok:55.4
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:1
                  send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
                  send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.4
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:0
                  send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
                  send: 20-20-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=ok:55.3
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=ok:96
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=ok:0
                  send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
                  send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.3
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:96
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:1
                  send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
                  send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.3
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
                  send: 20-20-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  read: 0-0-20 s=255,c=3,t=8,pt=1,l=1:0
                  new parent=0, d=1
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=ok:0
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=ok:97
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=ok:1
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:96
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:0
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:96
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:1
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:0
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
                  send: 20-20-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=ok:0
                  send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=ok:21.1
                  send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=ok:55.3
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=ok:96
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:1
                  send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
                  send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.3
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:96
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:0
                  send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
                  send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.3
                  send: 20-20-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=ok:96
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=ok:0
                  send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=ok:21.1
                  send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.3
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:1
                  send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
                  send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.3
                  send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
                  send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:0
                  send: 20-20-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
                  read: 0-0-20 s=255,c=3,t=8,pt=1,l=1:0
                  new parent=0, d=1

                  As you can see, there is kind of a Pattern ocouring every 14 Messages starting with 3-4 OK, followed by 7 FAIL and then the Discovery. Any Ideas what the cause ot this behavor could be?

                  Greetings

                  busa

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kihon
                    wrote on last edited by
                    #9

                    Hi guys,

                    Im trying to get my raspberry PI to act like a gateway/controller, where the nodes request an id from the controller. But Im stuck sending back the response to the sensor set message.

                    I have updated the PiGateway.cpp to detect the ID request message, and respond using the parseAndSend function. The sensor node appears to accept the response, and then sends a set message indicating the sensor value. However Im not sure how to respond to this.

                    What do I need send back so that the sensor treats it as success rather than failure?

                    Thanks

                    Kihon

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      sharath krishna
                      wrote on last edited by
                      #10

                      Hello Guys ,

                      I am looking to run the rasp pi as gateway+controller with the nrf24 . Please where should i start from does it have any explanation like we have for the arduino s running mysensor ? .

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      16

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.0k

                      Posts


                      Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                      • Login

                      • Don't have an account? Register

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