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. RaspberryPi 4 as a gateway/controller

RaspberryPi 4 as a gateway/controller

Scheduled Pinned Locked Moved Development
4 Posts 1 Posters 85 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.
  • R Offline
    R Offline
    rafal9318
    wrote on last edited by rafal9318
    #1

    Hi All,

    I want to make my Raspberry Pi a gateway of MySensors RS485 networ and controller of home automation using Domoticz.

    Hardware i've got:

    1. Raspberry Pi 4 (2GB RAM)
    2. Converter USB <-> RS485 (it uses FTDI FR232RL chip) connected to the RPI
    3. Converter RS485 <-> UART (MAX485)
    4. Arduino Uno

    I was trying to use this tutorial: https://www.mysensors.org/build/raspberry

    But i think, i'm making something wrong.

    After i connect the USB converter to the RPI i've got this answers:

    1. ls -l /dev/tty* (images -> attachment: RPI1)
    2. ls -l /dev/serial* (images -> attachment: RPI2)
    3. ls -l /dev/serial/by-id/ (images -> attachment: RPI3)

    What parameters should i use to configure this system correctly ?
    I tried:
    ./configure --my-transport=rs485 --my-gateway=serial --my-serial-is-pty --my-serial-port=/dev/ttyUSB0 --my-serial-baudrate=115200

    And:
    ./configure --my-transport=rs485 --my-gateway=serial --my-serial-is-pty --my-serial-port=usb-FTDI_FT232R_USB_UART_A50285BI-if00-port0 --my-serial-baudrate=115200

    And what should i type in examples_linux/mysgw.cpp file (preprocessor definitions)? (images -> attachment: RPI4)

    I made (make command) both configurations, and i've got the same ./bin/mysgw logs messages. (images -> attachment: RPI5)

    To the RS485 network, i connected RS485 node example (MotionSensorRS485)

    And at the end, how to cofigure domoticz hardware, when i want to use raspberry pi gateway?
    RPI1.jpg
    RPI2.jpg
    RPI3.jpg
    RPI4.jpg
    RPI5.jpg

    R 1 Reply Last reply
    1
    • R rafal9318

      Hi All,

      I want to make my Raspberry Pi a gateway of MySensors RS485 networ and controller of home automation using Domoticz.

      Hardware i've got:

      1. Raspberry Pi 4 (2GB RAM)
      2. Converter USB <-> RS485 (it uses FTDI FR232RL chip) connected to the RPI
      3. Converter RS485 <-> UART (MAX485)
      4. Arduino Uno

      I was trying to use this tutorial: https://www.mysensors.org/build/raspberry

      But i think, i'm making something wrong.

      After i connect the USB converter to the RPI i've got this answers:

      1. ls -l /dev/tty* (images -> attachment: RPI1)
      2. ls -l /dev/serial* (images -> attachment: RPI2)
      3. ls -l /dev/serial/by-id/ (images -> attachment: RPI3)

      What parameters should i use to configure this system correctly ?
      I tried:
      ./configure --my-transport=rs485 --my-gateway=serial --my-serial-is-pty --my-serial-port=/dev/ttyUSB0 --my-serial-baudrate=115200

      And:
      ./configure --my-transport=rs485 --my-gateway=serial --my-serial-is-pty --my-serial-port=usb-FTDI_FT232R_USB_UART_A50285BI-if00-port0 --my-serial-baudrate=115200

      And what should i type in examples_linux/mysgw.cpp file (preprocessor definitions)? (images -> attachment: RPI4)

      I made (make command) both configurations, and i've got the same ./bin/mysgw logs messages. (images -> attachment: RPI5)

      To the RS485 network, i connected RS485 node example (MotionSensorRS485)

      And at the end, how to cofigure domoticz hardware, when i want to use raspberry pi gateway?
      RPI1.jpg
      RPI2.jpg
      RPI3.jpg
      RPI4.jpg
      RPI5.jpg

      R Offline
      R Offline
      rafal9318
      wrote on last edited by rafal9318
      #2

      Okey, i know more.

      So, I programmed Arduino using MotionSensorRS485 example.
      And using monitor COM tool, i see this in arduino logs:
      arduino.jpg

      And by using this command:
      ./configure --my-gateway=serial --my-serial-is-pty --my-serial-port=/dev/ttyUSB020
      im saying RaspberryPi to create the gateway that commucnicates with controller using virtual serial port (/dev/ttyUSB020),

      and i think that by editing file examples_linux/mygw.cpp i'm choosing serial port for RS485 network (sensors network).

      After i add the hardware to the domoticz controller, i've got this:
      domoticz1.jpg

      domoticz2.jpg

      but still node is unknown.
      Please help.

      1 Reply Last reply
      1
      • R Offline
        R Offline
        rafal9318
        wrote on last edited by
        #3

        I checked the frames. And when i coneccted USB-RS485 to the computer i've got this in Realterm:
        realterm_win7.jpg

        And next in python script on Raspbeery Pi i've got this:
        python_rpi4.jpg

        So, i think the communication beetwen Raspberry Pi and Arduino is working (through USB-RS485 converter).

        How should looks the frame of presentation, and sendSketchInfo ?

        1 Reply Last reply
        0
        • R Offline
          R Offline
          rafal9318
          wrote on last edited by
          #4

          I bought second arduino uno.

          And, first Arduino has example MotionSensorRS485,
          second Arduino has example GetwaySerialRS485.

          And i have got the same situation. So even Gateway on Arduino doesn't see MotionSensor.

          Next test i made, i disconnected MAX485 converters, and i connected UART pins from first arduino to the second one (UART = Rx(8) <-> Tx(9), Tx(9)<->Rx(8)) and GND. And i have got the same result. Gateway doesn't see sensor.

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


          9

          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