HassOS + Serial Gateway OR Docker + RPI Ethernet Gateway



  • Hi,

    currently I'm using MySensors RPI-Gateway and MyController on the same RPI 2 .
    I connected a RFM69 Modul directly to the GPIO of the Pi.
    This system works fine for many Years.

    Now its time for an upgrade.
    I want to use HA and I want to add ZigBee devices. For that I purchased the SonOff Dongle-P and I grapped a RPI 3 for testing HA parallel to my running setup.

    Now I want to tidy up. Two RPI for a task, which one alone can do is not the best solution.
    The question of all questions is now, how to combine HA, MySensors and Zigbee in the best way?

    Option 1 (I have to build the serial GW, and ICs (328P) are rare at the moment):
    HassOS + MySensors Serial Gateway (RFM69 connected to an ATMEGA328 connected to the UART-pins from the RPI) + ZigBee USB Stick. (I dont want to use a UART<-> USB chip, when a RPI has native UART on the GPIO)

    Option 2 (Favorite, because I dont have to build hardware stuff):
    HA running in Docker + MySensors RPI Gatway (RFM69 connected directly to the GPIO) + ZigBee USB Stick. (I found a tutorial for installing HA in Docker with Supervisor)

    Are there any pitfalls in the Options above?
    Can I use the UART Port "/dev/ttyAMA0" in HassOS?
    Are there any limitations in Option2, when HA running in Docker?

    I hope someone can give some tips.

    Thanks!
    Sebastian



  • I had a similar conundrum, though it was Z-Wave instead of Zigbee.

    I have a concern that an RPI is not sufficiently robust. This may be unfounded because there are a lot of amazing things that people do with it. Be that as it may, I found a refurbished PC on Amazon for under $100, well under the current price of an RPi! (I bought the $10, 2 year warrantee, too) On this I installed Virtualbox and installed Home Assistant OS on it. I allocated a USB port for the virtual machine and plugged in a Z-Wave dongle.

    The downside of the computer is that the video is VGA, so one needs a VGA monitor (and mouse and keyboard) to set it up. The computer is run headless and I remote into it with VNC, thus the VNC server process is also running on it. The free version of RealVNC allows five server licenses, and unlimited viewers.

    I like the concept of using MQTT and chose that over serial. Also because because the computer is located in the garage and the gateway needs to be on the other side of the house near my sensors and actuators which are in the back yard. So, I run the gateway on my RPi (the one I bought for $35). My MQTT broker runs as a separate process on this computer, "next" to Virtualbox.

    Note that the gateway can run on an Arduino Nano which could be plugged into this computer which would be, not only a cost effective solution, but IMHO, more robust. (I just had a thought, run HAOS on the RPi and plug the Nano into the RPi ... would this work?)

    So when I'm working out in my yard, I VNC into this computer with my phone, pull up Firefox to bring up the HA interface and view and control my devices in the yard. (Think HA has an app, but I haven't tried it ... I don't like cloud based apps.)

    Just some thoughts for you.

    Good luck on your project!

    OSD


  • Mod

    @OldSurferDude the HA app is local, no cloud involved. (With the exception of app notifications which go through firebase)



  • Thanks @mfalkvidd! I just automatically made the assumption the any app on a phone is cloud based. A personal myth busted, for which I express my appreciation!

    OSD



  • @se-O-matic said in HassOS + Serial Gateway OR Docker + RPI Ethernet Gateway:

    Can I use the UART Port "/dev/ttyAMA0" in HassOS?

    Yes.

    @se-O-matic said in HassOS + Serial Gateway OR Docker + RPI Ethernet Gateway:

    Are there any limitations in Option2, when HA running in Docker?

    Not that I can think of. Supervisor might be unhappy about "unsupported" setup, but it will work. They invented very strict guidelines for supervisor setup, apparently to lift any "responsibility" in terms of support for what people may come up with in their setups. But everything usually works anyway.



  • Thanks for the answers. 🙂

    I want to keep the raspberry pi as central. This should fit all my needs in my rental apartment.
    For HA, I have chosen a SD-card with application class A2.

    For a clean setup, i will try to run HA in docker. So can i use the same Raspberry as gateway and for the controller.
    So I dont have to use a "rare" mega328p for a serial gateway.

    I report my results, when I find some time to work on it.



  • Hello,

    finally, ... I had time to test the "Option 2".
    Because the stock of all shops are empty, I used my old RPI 3 B+. But after all, the CPU runs at 50%. Even the 1 GB ram is half free.

    The way wasn't as easy as I thought. But now the setup runs pretty good.
    This steps I had to make:

    1. A fresh install of Raspian Lite (I used 64-Bit, if this is needed? I dont know)
    2. Installed "Home Assistant Supervised", which runs in a docker. (I found a tutorial based on this informations: https://github.com/home-assistant/supervised-installer)
    3. Installed the MySensors Gateway with some changes! (https://www.mysensors.org/build/raspberry)
      3b. The manual works fine for 32 Bit raspbian. For 64 Bit you have to edit two files bevor the compile starts. (https://forum.mysensors.org/topic/11456/is-mysensors-rpi-gw-32bit-only/8)
      In my case i have to change the section for the BCM2837 (= RPI3) as described in the post.

    Now, I have a clean setup for my smarthome with MySensors Nodes and Zigbee Nodes.
    alt text
    The RFM69 ist directly connected to the GPIO of the PI.

    The power consumption is araound 2 W. Somewhat lower when idle.


Log in to reply
 

Suggested Topics

  • 1
  • 3
  • 8
  • 5
  • 5
  • 2

8
Online

11.4k
Users

11.1k
Topics

112.7k
Posts