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. Controllers
  3. Home Assistant
  4. Raspberry Pi gateway + hass.io + MQTT + MySensors

Raspberry Pi gateway + hass.io + MQTT + MySensors

Scheduled Pinned Locked Moved Home Assistant
38 Posts 4 Posters 768 Views 5 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.
  • M Michał Szura

    I think that you have concept problem. First I don't think that raspbian install have any sense at this stage. There's so much more you can do with hassos ( docker). And second why you doesn't connect gateway via USB an use serial connection. I use Arduino mega directly via USB and it is very stable. You have to add in configuration mysensors with path to USB (I recommend serial number identification).

    SebexS Offline
    SebexS Offline
    Sebex
    wrote on last edited by
    #8

    @michał-szura here and there I do read the possibility of a Pi acting as a gateway and controller. But you mention that it is not possible whatsoever? Why not?

    @Dave-Myers I agree that it is not possible via HassOS, but it should be possible when run via a virtual enivroment as monte suggested.

    @monte hassio now shows up in docker as a container. But I am struggling to run it, what's the command to run hassio_supervisor? attach hassio_supervisor causes it to become unresponsive.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Michał Szura
      wrote on last edited by
      #9

      In this case I have question why? I Know that why not and because I can is good enough answer but...
      You can have best from home assistant (install Hass os) and mysensors (make gateway on separate Arduino). And this way when you want to upgrade to something more than RPi you can do it with minimal damage ( I did it this way and it was quite nice upgrade). But this is only myn2 cents

      monteM 1 Reply Last reply
      0
      • M Michał Szura

        In this case I have question why? I Know that why not and because I can is good enough answer but...
        You can have best from home assistant (install Hass os) and mysensors (make gateway on separate Arduino). And this way when you want to upgrade to something more than RPi you can do it with minimal damage ( I did it this way and it was quite nice upgrade). But this is only myn2 cents

        monteM Offline
        monteM Offline
        monte
        wrote on last edited by
        #10

        @michał-szura some may say that one integrated device is better than two. Also you can restart and debug mysensors gateway via ssh, try to achieve this with arduino. Anyway, even after you decide to move your controller installation to lets say dedicated server, NUC or VM you can still use your RPi as a network gateway without rebuilding anything.

        @Sebex what exactly did you do? Did you use install script, or followed some guide on mentioned forum thread.
        To see if supervisor is running execute sudo systemctl status hassio-supervisor.service
        Also you can use sudo docker ps command to list running docker containers, sudo docker ps -a will show every container even if it is stopped.

        SebexS 1 Reply Last reply
        0
        • monteM monte

          @michał-szura some may say that one integrated device is better than two. Also you can restart and debug mysensors gateway via ssh, try to achieve this with arduino. Anyway, even after you decide to move your controller installation to lets say dedicated server, NUC or VM you can still use your RPi as a network gateway without rebuilding anything.

          @Sebex what exactly did you do? Did you use install script, or followed some guide on mentioned forum thread.
          To see if supervisor is running execute sudo systemctl status hassio-supervisor.service
          Also you can use sudo docker ps command to list running docker containers, sudo docker ps -a will show every container even if it is stopped.

          SebexS Offline
          SebexS Offline
          Sebex
          wrote on last edited by Sebex
          #11

          @monte said in Raspberry Pi gateway + hass.io + MQTT + MySensors:

          @Sebex what exactly did you do? Did you use install script, or followed some guide on mentioned forum thread.
          To see if supervisor is running execute sudo systemctl status hassio-supervisor.service
          Also you can use sudo docker ps command to list running docker containers, sudo docker ps -a will show every container even if it is stopped.

          I followed your github link, and used the cmd below to instal hassio.

          curl -sL https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh | bash -s -- -m MY_MACHINE
          

          When I run your suggested status cmd I indeed see that hassio is running:

          Dec 29 23:18:24 banana hassio-supervisor[1046]: 19-12-29 22:18:24 INFO (MainThread) [__main__] Run Hass.io
          Dec 29 23:18:24 banana hassio-supervisor[1046]: 19-12-29 22:18:24 INFO (MainThread) [hassio.api] Start API on 172.30.32.2
          Dec 29 23:18:24 banana hassio-supervisor[1046]: 19-12-29 22:18:24 INFO (MainThread) [hassio.addons] Phase 'initialize' start 0 add-ons
          Dec 29 23:18:24 banana hassio-supervisor[1046]: 19-12-29 22:18:24 INFO (MainThread) [hassio.addons] Phase 'system' start 0 add-ons
          Dec 29 23:18:24 banana hassio-supervisor[1046]: 19-12-29 22:18:24 INFO (MainThread) [hassio.addons] Phase 'services' start 0 add-ons
          Dec 29 23:18:24 banana hassio-supervisor[1046]: 19-12-29 22:18:24 INFO (SyncWorker_1) [hassio.docker.interface] Start homeassistant/raspberrypi3-64-homeassistant
          Dec 29 23:18:33 banana hassio-supervisor[1046]: 19-12-29 22:18:33 ERROR (MainThread) [hassio.homeassistant] Home Assistant has crashed!
          Dec 29 23:18:33 banana hassio-supervisor[1046]: 19-12-29 22:18:33 INFO (MainThread) [hassio.addons] Phase 'application' start 0 add-ons
          Dec 29 23:18:33 banana hassio-supervisor[1046]: 19-12-29 22:18:33 INFO (MainThread) [hassio.tasks] All core tasks are scheduled
          Dec 29 23:18:33 banana hassio-supervisor[1046]: 19-12-29 22:18:33 INFO (MainThread) [hassio.core] Hass.io is up and running
          

          But I tried accessing hassio multiple times via <raspberrypi local ipadres>:8123, which is unresponsive. Any suggestions? The Pi is connected via wifi, ip adres is not yet static but doubt that this is the cause.

          -- update

          Now that I am looking into it again after setting Pi's IP to static, the bottom 4th line shows an error. Home assistant has crashed. So something is going wrong...

          monteM 1 Reply Last reply
          0
          • SebexS Sebex

            @monte said in Raspberry Pi gateway + hass.io + MQTT + MySensors:

            @Sebex what exactly did you do? Did you use install script, or followed some guide on mentioned forum thread.
            To see if supervisor is running execute sudo systemctl status hassio-supervisor.service
            Also you can use sudo docker ps command to list running docker containers, sudo docker ps -a will show every container even if it is stopped.

            I followed your github link, and used the cmd below to instal hassio.

            curl -sL https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh | bash -s -- -m MY_MACHINE
            

            When I run your suggested status cmd I indeed see that hassio is running:

            Dec 29 23:18:24 banana hassio-supervisor[1046]: 19-12-29 22:18:24 INFO (MainThread) [__main__] Run Hass.io
            Dec 29 23:18:24 banana hassio-supervisor[1046]: 19-12-29 22:18:24 INFO (MainThread) [hassio.api] Start API on 172.30.32.2
            Dec 29 23:18:24 banana hassio-supervisor[1046]: 19-12-29 22:18:24 INFO (MainThread) [hassio.addons] Phase 'initialize' start 0 add-ons
            Dec 29 23:18:24 banana hassio-supervisor[1046]: 19-12-29 22:18:24 INFO (MainThread) [hassio.addons] Phase 'system' start 0 add-ons
            Dec 29 23:18:24 banana hassio-supervisor[1046]: 19-12-29 22:18:24 INFO (MainThread) [hassio.addons] Phase 'services' start 0 add-ons
            Dec 29 23:18:24 banana hassio-supervisor[1046]: 19-12-29 22:18:24 INFO (SyncWorker_1) [hassio.docker.interface] Start homeassistant/raspberrypi3-64-homeassistant
            Dec 29 23:18:33 banana hassio-supervisor[1046]: 19-12-29 22:18:33 ERROR (MainThread) [hassio.homeassistant] Home Assistant has crashed!
            Dec 29 23:18:33 banana hassio-supervisor[1046]: 19-12-29 22:18:33 INFO (MainThread) [hassio.addons] Phase 'application' start 0 add-ons
            Dec 29 23:18:33 banana hassio-supervisor[1046]: 19-12-29 22:18:33 INFO (MainThread) [hassio.tasks] All core tasks are scheduled
            Dec 29 23:18:33 banana hassio-supervisor[1046]: 19-12-29 22:18:33 INFO (MainThread) [hassio.core] Hass.io is up and running
            

            But I tried accessing hassio multiple times via <raspberrypi local ipadres>:8123, which is unresponsive. Any suggestions? The Pi is connected via wifi, ip adres is not yet static but doubt that this is the cause.

            -- update

            Now that I am looking into it again after setting Pi's IP to static, the bottom 4th line shows an error. Home assistant has crashed. So something is going wrong...

            monteM Offline
            monteM Offline
            monte
            wrote on last edited by monte
            #12

            @sebex well, that indicates that homeassistant docker container has crashed for some reason. That's why you can not access it via web.
            I assume you tried to restart RPi? No changes?
            Try sudo docker start homeassistant and sudo docker ps -a after this to see if it crashed or not.
            It will print something like this:

            CONTAINER ID   NAMES                      IMAGE                                            COMMAND                  CREATED             STATUS                  
            b8d101b1b04d   addon_core_configurator    homeassistant/amd64-addon-configurator:4.2       "/run.sh"                13 hours ago        Up 13 hours
            ee63787039a5   hassio_dns                 homeassistant/amd64-hassio-dns:1                 "coredns -conf /conf…"   14 hours ago        Up 14 hours
            18c68d86c0ae   homeassistant              homeassistant/qemux86-64-homeassistant:0.103.5   "/bin/entry.sh pytho…"   14 hours ago        Up 14 hours
            24f80b84279d   hassio_supervisor          homeassistant/amd64-hassio-supervisor            "/bin/entry.sh pytho…"   14 hours ago        Up 14 hours
            

            Status will show the status of the container. You can read the logs to see why it is crashing with command sudo docker logs homeassistant.
            Yesterday after I wrote a reply I tried that install script on my server and it just worked. I hope we will find problem with your setup :)

            SebexS 1 Reply Last reply
            0
            • monteM monte

              @sebex well, that indicates that homeassistant docker container has crashed for some reason. That's why you can not access it via web.
              I assume you tried to restart RPi? No changes?
              Try sudo docker start homeassistant and sudo docker ps -a after this to see if it crashed or not.
              It will print something like this:

              CONTAINER ID   NAMES                      IMAGE                                            COMMAND                  CREATED             STATUS                  
              b8d101b1b04d   addon_core_configurator    homeassistant/amd64-addon-configurator:4.2       "/run.sh"                13 hours ago        Up 13 hours
              ee63787039a5   hassio_dns                 homeassistant/amd64-hassio-dns:1                 "coredns -conf /conf…"   14 hours ago        Up 14 hours
              18c68d86c0ae   homeassistant              homeassistant/qemux86-64-homeassistant:0.103.5   "/bin/entry.sh pytho…"   14 hours ago        Up 14 hours
              24f80b84279d   hassio_supervisor          homeassistant/amd64-hassio-supervisor            "/bin/entry.sh pytho…"   14 hours ago        Up 14 hours
              

              Status will show the status of the container. You can read the logs to see why it is crashing with command sudo docker logs homeassistant.
              Yesterday after I wrote a reply I tried that install script on my server and it just worked. I hope we will find problem with your setup :)

              SebexS Offline
              SebexS Offline
              Sebex
              wrote on last edited by Sebex
              #13

              @monte yes tried rebooting it several times and also reinstalled but no changes so far, it still crashes.

              I tried your commands, after sudo docker start homeassistant it immediately crashes according to the logs below.

              CONTAINER ID        IMAGE                                                 COMMAND                  CREATED             STATUS                     PORTS               NAMES
              0b0ffff70832        homeassistant/armv7-hassio-dns:1                      "coredns -conf /conf…"   5 minutes ago       Up 5 minutes                                   hassio_dns
              3b83e6f9db07        homeassistant/raspberrypi3-64-homeassistant:0.103.5   "/bin/entry.sh pytho…"   2 hours ago         Exited (1) 2 seconds ago                       homeassistant
              9fd90364c61f        homeassistant/armv7-hassio-supervisor  
              
              sudo docker logs homeassistant
              [FATAL tini (6)] exec /bin/entry.sh failed: Exec format error
              [FATAL tini (6)] exec /bin/entry.sh failed: Exec format error
              

              Thanks for the help so far @monte hope we can fix it :D

              monteM 1 Reply Last reply
              0
              • SebexS Sebex

                @monte yes tried rebooting it several times and also reinstalled but no changes so far, it still crashes.

                I tried your commands, after sudo docker start homeassistant it immediately crashes according to the logs below.

                CONTAINER ID        IMAGE                                                 COMMAND                  CREATED             STATUS                     PORTS               NAMES
                0b0ffff70832        homeassistant/armv7-hassio-dns:1                      "coredns -conf /conf…"   5 minutes ago       Up 5 minutes                                   hassio_dns
                3b83e6f9db07        homeassistant/raspberrypi3-64-homeassistant:0.103.5   "/bin/entry.sh pytho…"   2 hours ago         Exited (1) 2 seconds ago                       homeassistant
                9fd90364c61f        homeassistant/armv7-hassio-supervisor  
                
                sudo docker logs homeassistant
                [FATAL tini (6)] exec /bin/entry.sh failed: Exec format error
                [FATAL tini (6)] exec /bin/entry.sh failed: Exec format error
                

                Thanks for the help so far @monte hope we can fix it :D

                monteM Offline
                monteM Offline
                monte
                wrote on last edited by monte
                #14

                @sebex okay, that seems that for some reason script pulled out wrong HA container, I mean for wrong architecture. At least [FATAL tini (6)] exec /bin/entry.sh failed: Exec format error indicates that.
                What is your RPi version?
                You can try running the script without -m MY_MACHINE argument. It should autodetect the architecture and pull correct docker image.
                What does uname -m show?

                1 Reply Last reply
                0
                • SebexS Offline
                  SebexS Offline
                  Sebex
                  wrote on last edited by
                  #15

                  @monte yea it made me wonder as well whether I should have selected the rpi 3 64bit version for docker image.
                  I have a Raspberry pi 3 b+ (so 64bit).
                  uname -m shows armv7l, when googling I got the answer that this can also be due to that Raspbian is running in 32 mode?

                  I tried running the script without -m MY_MACHINE returns an error for setting the machine.

                  root@banana:/home/pi# sudo curl -sL https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh | bash -s
                  ModemManager.service enabled
                  [Warning] ModemManager service is enabled. This might cause issue when using serial devices.
                  [ERROR] Please set machine for armv7l
                  

                  I've just completely reflashed my Pi and used a different microsd card (couldn't format the original one anymore). Reinstalled raspbian, docker and hass.io. For the latter I selected raspberrpi3 (instead of rpi3-64). After accessing localip:8123 it seems that hass.io is accessible :D It's currently preparing so looking good!!

                  SebexS 1 Reply Last reply
                  0
                  • SebexS Sebex

                    @monte yea it made me wonder as well whether I should have selected the rpi 3 64bit version for docker image.
                    I have a Raspberry pi 3 b+ (so 64bit).
                    uname -m shows armv7l, when googling I got the answer that this can also be due to that Raspbian is running in 32 mode?

                    I tried running the script without -m MY_MACHINE returns an error for setting the machine.

                    root@banana:/home/pi# sudo curl -sL https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh | bash -s
                    ModemManager.service enabled
                    [Warning] ModemManager service is enabled. This might cause issue when using serial devices.
                    [ERROR] Please set machine for armv7l
                    

                    I've just completely reflashed my Pi and used a different microsd card (couldn't format the original one anymore). Reinstalled raspbian, docker and hass.io. For the latter I selected raspberrpi3 (instead of rpi3-64). After accessing localip:8123 it seems that hass.io is accessible :D It's currently preparing so looking good!!

                    SebexS Offline
                    SebexS Offline
                    Sebex
                    wrote on last edited by Sebex
                    #16

                    Ok so homeassistant is running and not crashing :) Now building the gateway, @monte to eventually communicate with hass.io do I need to select the gateway as --my-gateway=ethernet or mqtt?

                    monteM 1 Reply Last reply
                    0
                    • SebexS Sebex

                      Ok so homeassistant is running and not crashing :) Now building the gateway, @monte to eventually communicate with hass.io do I need to select the gateway as --my-gateway=ethernet or mqtt?

                      monteM Offline
                      monteM Offline
                      monte
                      wrote on last edited by
                      #17

                      @sebex you can chose either. I prefer ethernet, so you don't rely on another piece of software - MQTT broker, no additional setup is required.
                      Read this docs especially the "Presentation" paragraph. At first I had trouble registering my nodes in HA, because it require particular way of presentation. "Send at least one initial value per V_TYPE. In version 2.x of MySensors, this has to be done in the loop function."

                      SebexS 1 Reply Last reply
                      0
                      • monteM monte

                        @sebex you can chose either. I prefer ethernet, so you don't rely on another piece of software - MQTT broker, no additional setup is required.
                        Read this docs especially the "Presentation" paragraph. At first I had trouble registering my nodes in HA, because it require particular way of presentation. "Send at least one initial value per V_TYPE. In version 2.x of MySensors, this has to be done in the loop function."

                        SebexS Offline
                        SebexS Offline
                        Sebex
                        wrote on last edited by
                        #18

                        @monte ok thanks, will take it into account.
                        Out of curiousity, since MQTT takes additional setup what''s the benefit of using MQTT? Do you know?

                        monteM 1 Reply Last reply
                        0
                        • SebexS Sebex

                          @monte ok thanks, will take it into account.
                          Out of curiousity, since MQTT takes additional setup what''s the benefit of using MQTT? Do you know?

                          monteM Offline
                          monteM Offline
                          monte
                          wrote on last edited by
                          #19

                          @sebex I guess if you already have other mqtt services or devices in your system, or want to use a controller that is designed specifically around mqtt, nodered for example, or the one that doesn't have support for Mysensors specifically.
                          Also you could use Mysensors with remote mqtt server, your own, or third party. I tried this once, when I needed one sensor exposed to internet without dedicated server hardware at place, so I've built an esp8266 gateway with mqtt connected to free online mqtt broker. The nodered controller was also hosted on a free cloud :)
                          Not that it was particularly useful, or I would recommend it to someone, but it's a flexibility Mysensors has, and I guess it's the main reason so many people are using it for their projects.

                          1 Reply Last reply
                          0
                          • SebexS Offline
                            SebexS Offline
                            Sebex
                            wrote on last edited by
                            #20

                            @monte ok it seems to work. Temp/humidity sensor is recognised by HA and data is getting through so looks good! Only connection isnt stable which is most likely due to that I still need to get capacitors for the NRF24L01+ on both ends, and need to solder the cables to the sensor. So still some tweaks to do but happy that it works, thanks for the support @monte :grinning:

                            Two general questions, any advice for which capacitor to select? Apart from 4.7 or 47uF, there's different types. Tanto, elco, bipolaire etc.
                            Furthermore I wondered why the 64bit hassio software didn't work on my Arduino, while it is a 64bit RPi 3+. Does Raspbian (or dockers?) as default run in 32?

                            monteM 1 Reply Last reply
                            0
                            • SebexS Sebex

                              @monte ok it seems to work. Temp/humidity sensor is recognised by HA and data is getting through so looks good! Only connection isnt stable which is most likely due to that I still need to get capacitors for the NRF24L01+ on both ends, and need to solder the cables to the sensor. So still some tweaks to do but happy that it works, thanks for the support @monte :grinning:

                              Two general questions, any advice for which capacitor to select? Apart from 4.7 or 47uF, there's different types. Tanto, elco, bipolaire etc.
                              Furthermore I wondered why the 64bit hassio software didn't work on my Arduino, while it is a 64bit RPi 3+. Does Raspbian (or dockers?) as default run in 32?

                              monteM Offline
                              monteM Offline
                              monte
                              wrote on last edited by monte
                              #21

                              @sebex 4.7uF should be enough, I've never seen any problem with this value on my nodes. As for the type of the capacitor you probably will want to use ceramic or electrolytic (polarized) capacitor, but it doesn't do much difference for this application, if any. Those are just the most common types. Ceramic SMD capacitor of a size 0805 is the best choice IMO because it could be soldered directly to the VCC and GND pins on top of NRF24 module.
                              You can google about why raspbian is running like RPi is 32 bits, but as I understood it's better for downward compatibility and the fact that RPi3 won't get much boost (if any) from switching to 64 bit architecture.

                              SebexS 1 Reply Last reply
                              0
                              • monteM monte

                                @sebex 4.7uF should be enough, I've never seen any problem with this value on my nodes. As for the type of the capacitor you probably will want to use ceramic or electrolytic (polarized) capacitor, but it doesn't do much difference for this application, if any. Those are just the most common types. Ceramic SMD capacitor of a size 0805 is the best choice IMO because it could be soldered directly to the VCC and GND pins on top of NRF24 module.
                                You can google about why raspbian is running like RPi is 32 bits, but as I understood it's better for downward compatibility and the fact that RPi3 won't get much boost (if any) from switching to 64 bit architecture.

                                SebexS Offline
                                SebexS Offline
                                Sebex
                                wrote on last edited by
                                #22

                                @monte ah smart makes sense and probably looks most neat as well. Thanks!

                                1 Reply Last reply
                                0
                                • SebexS Offline
                                  SebexS Offline
                                  Sebex
                                  wrote on last edited by
                                  #23

                                  Ok so I am experiencing node loss. After a while my sensor node is not recognized anymore by the gateway/mothernode. It seems to be related to the persistence file that is not accessible although the user account should have the correct rights, not sure how to verify. See HA dev logs below.

                                  Developer Tools
                                  Permission denied when writing to /config/home/pi/.homeassistant/mysensors.json
                                  10:13 PM /usr/local/lib/python3.7/site-packages/mysensors/persistence.py (ERROR) - message first occurred at 10:06 PM and shows up 42 times
                                  Node 1 is unknown
                                  10:11 PM __main__.py (WARNING) - message first occurred at 10:06 PM and shows up 116 times
                                  Failed to load sensors from file: home/pi/.homeassistant/mysensors.json
                                  10:06 PM /usr/local/lib/python3.7/site-packages/mysensors/persistence.py (WARNING)
                                  File does not exist or is not readable: home/pi/.homeassistant/mysensors.json.bak
                                  10:06 PM /usr/local/lib/python3.7/site-packages/mysensors/persistence.py (WARNING)
                                  Trying backup file: home/pi/.homeassistant/mysensors.json.bak
                                  10:06 PM /usr/local/lib/python3.7/site-packages/mysensors/persistence.py (WARNING)
                                  File does not exist or is not readable: home/pi/.homeassistant/mysensors.json
                                  10:06 PM /usr/local/lib/python3.7/site-packages/mysensors/persistence.py (WARNING)```
                                  
                                  
                                  # MySensors gateway
                                  mysensors:
                                   gateways: 
                                    - device: '192.168.178.27'
                                      persistence_file: 'home/pi/.homeassistant/mysensors.json'
                                      tcp_port: 5003
                                   persistence: true  
                                  
                                  logger:
                                    default: info
                                    logs:
                                      homeassistant.components.mysensors: debug
                                      mysensors: debug
                                  

                                  @drock1985 saw your post in another thread related to this, do you have a suggestion?

                                  monteM 1 Reply Last reply
                                  0
                                  • SebexS Sebex

                                    Ok so I am experiencing node loss. After a while my sensor node is not recognized anymore by the gateway/mothernode. It seems to be related to the persistence file that is not accessible although the user account should have the correct rights, not sure how to verify. See HA dev logs below.

                                    Developer Tools
                                    Permission denied when writing to /config/home/pi/.homeassistant/mysensors.json
                                    10:13 PM /usr/local/lib/python3.7/site-packages/mysensors/persistence.py (ERROR) - message first occurred at 10:06 PM and shows up 42 times
                                    Node 1 is unknown
                                    10:11 PM __main__.py (WARNING) - message first occurred at 10:06 PM and shows up 116 times
                                    Failed to load sensors from file: home/pi/.homeassistant/mysensors.json
                                    10:06 PM /usr/local/lib/python3.7/site-packages/mysensors/persistence.py (WARNING)
                                    File does not exist or is not readable: home/pi/.homeassistant/mysensors.json.bak
                                    10:06 PM /usr/local/lib/python3.7/site-packages/mysensors/persistence.py (WARNING)
                                    Trying backup file: home/pi/.homeassistant/mysensors.json.bak
                                    10:06 PM /usr/local/lib/python3.7/site-packages/mysensors/persistence.py (WARNING)
                                    File does not exist or is not readable: home/pi/.homeassistant/mysensors.json
                                    10:06 PM /usr/local/lib/python3.7/site-packages/mysensors/persistence.py (WARNING)```
                                    
                                    
                                    # MySensors gateway
                                    mysensors:
                                     gateways: 
                                      - device: '192.168.178.27'
                                        persistence_file: 'home/pi/.homeassistant/mysensors.json'
                                        tcp_port: 5003
                                     persistence: true  
                                    
                                    logger:
                                      default: info
                                      logs:
                                        homeassistant.components.mysensors: debug
                                        mysensors: debug
                                    

                                    @drock1985 saw your post in another thread related to this, do you have a suggestion?

                                    monteM Offline
                                    monteM Offline
                                    monte
                                    wrote on last edited by monte
                                    #24

                                    @Sebex you are using Hassio, so there is no /home/pi folder. Try persistence_file: 'mysensors.json'

                                    SebexS 1 Reply Last reply
                                    0
                                    • monteM monte

                                      @Sebex you are using Hassio, so there is no /home/pi folder. Try persistence_file: 'mysensors.json'

                                      SebexS Offline
                                      SebexS Offline
                                      Sebex
                                      wrote on last edited by
                                      #25

                                      @monte seems to do the trick :grin: thanks again!!

                                      1 Reply Last reply
                                      1
                                      • SebexS Offline
                                        SebexS Offline
                                        Sebex
                                        wrote on last edited by
                                        #26

                                        @monte, I'm seeing that a HA update is available. Since I'm using HA via docker the following applies to update.
                                        $ sudo docker pull homeassistant/home-assistant:latest
                                        To be on the safe side I'd like to backup my HA and/or RPi first to prevent me from losing all my settings. In your experience what's the most convenient for doing this. I did make a clone from the sd card a few weeks ago but it's not the most labour efficient method, do you make regular backups?

                                        monteM 1 Reply Last reply
                                        0
                                        • SebexS Sebex

                                          @monte, I'm seeing that a HA update is available. Since I'm using HA via docker the following applies to update.
                                          $ sudo docker pull homeassistant/home-assistant:latest
                                          To be on the safe side I'd like to backup my HA and/or RPi first to prevent me from losing all my settings. In your experience what's the most convenient for doing this. I did make a clone from the sd card a few weeks ago but it's not the most labour efficient method, do you make regular backups?

                                          monteM Offline
                                          monteM Offline
                                          monte
                                          wrote on last edited by
                                          #27

                                          @Sebex if you installed Hassio with provided script then you can find your Home Assistant config folder in /usr/share/hassio. You can also change this path to your liking in /etc/hassio.json config file.
                                          To backup all of your HA settings and setups you need to just copy this folder. That's why I like idea of using Docker. You can lose all your RPi setup, but if you fave backed up your config folder it only matter of half an hour to recover everything from scratch.

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


                                          10

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


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