MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Which modules with Home Assistant currently work?

    Scheduled Pinned Locked Moved General Discussion
    39 Posts 7 Posters 17.8k Views 9 Watching
    Loading More Posts
    • 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.
    • I Offline
      iorifly
      last edited by iorifly

      With the help of @sdetweil , I was able to solve problems with MM.

      Now I am having trouble accessing HA with MMM-HASS.

      If anyone can help I will be happy.

      alt text

      My HA configuration looks like this configuration.yam:

      homeassistant:
        whitelist_external_dirs:
          - /tmp
          - /config/temp/
        auth_providers:
            - type: legacy_api_password
              api_password: "juere3027"
        
            - type: trusted_networks
              trusted_networks:
                - 192.168.1.0/24
                - 127.0.0.1
                - ::1
              allow_bypass_login: true
            - type: homeassistant
      

      config.js

      {
                      module: "MMM-HASS",
                      position: "middle_center",
                      config: {
                              host: "192.168.1.158",
                              port: "8123",
                              apipassword: "juere3027",
                              hassiotoken: true,
                              https: false,
                              devices: [
                              { deviceLabel: "Quintal",
                                      deviceReadings: [
                                      { sensor: "sensor.caixa_dagua", icon: "mdi:waves", suffix: "%"}
                                      
                                      ]
                                }
                              
                                     ]
                              }       
              
                   },
      

      The mirror executes loads the other modules, but HASS does not load. I have the following output:

      > magicmirror@2.10.1 start /home/pi/MagicMirror
      > ./run-start.sh
      
      [22:26:04.896] [LOG] Starting MagicMirror: v2.10.1
      [22:26:04.931] [LOG] Loading config ...
      [22:26:04.951] [LOG] Loading module helpers ...
      [22:26:04.959] [LOG] No helper found for module: alert.
      [22:26:05.139] [LOG] Initializing new module helper ...
      [22:26:05.146] [LOG] Module helper loaded: updatenotification
      [22:26:05.151] [LOG] No helper found for module: clock.
      [22:26:06.647] [LOG] Initializing new module helper ...
      [22:26:06.650] [LOG] Module helper loaded: calendar
      [22:26:06.653] [LOG] No helper found for module: compliments.
      [22:26:07.888] [LOG] Initializing new module helper ...
      [22:26:07.890] [LOG] Module helper loaded: MMM-DarkSkyForecast
      [22:26:08.030] [LOG] Initializing new module helper ...
      [22:26:08.035] [LOG] Module helper loaded: newsfeed
      [22:26:08.129] [LOG] Initializing new module helper ...
      [22:26:08.133] [LOG] Module helper loaded: MMM-HASS
      [22:26:08.137] [LOG] All module helpers loaded.
      [22:26:08.143] [LOG] Starting server on port 8080 ...
      [22:26:08.251] [LOG] Server started ...
      [22:26:08.256] [LOG] Connecting socket for: updatenotification
      [22:26:08.261] [LOG] Connecting socket for: calendar
      [22:26:08.265] [LOG] Starting node helper for: calendar
      [22:26:08.268] [LOG] Connecting socket for: MMM-DarkSkyForecast
      [22:26:08.271] [LOG] ====================== Starting node_helper for module [MMM-DarkSkyForecast]
      [22:26:08.275] [LOG] Connecting socket for: newsfeed
      [22:26:08.278] [LOG] Starting module: newsfeed
      [22:26:08.282] [LOG] Connecting socket for: MMM-HASS
      [22:26:08.288] [LOG] Sockets connected & modules started ...
      [22:26:08.293] [LOG]
      Ready to go! Please point your browser to: http://localhost:8080
      Starting chromium browser now, have patience, it takes a minute
      [22:26:08.451] [ERROR]  { Error: listen EADDRINUSE: address already in use 127.0.0.1:8080
          at Server.setupListenHandle [as _listen2] (net.js:1280:14)
          at listenInCluster (net.js:1328:12)
          at GetAddrInfoReqWrap.doListen [as callback] (net.js:1461:7)
          at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:61:10)
        code: 'EADDRINUSE',
        errno: 'EADDRINUSE',
        syscall: 'listen',
        address: '127.0.0.1',
        port: 8080 }
      [22:26:08.444] [LOG]    Whoops! There was an uncaught exception...
      [22:26:08.510] [LOG]    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      [22:26:08.512] [LOG]    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
       --disable-quic --enable-tcp-fast-open --ppapi-flash-path=/usr/lib/chromium-browser/libpepflashplayer.so --ppapi-flash-args=enable_stagevideo_auto=0 --ppapi-flash-version=
      [22:26:22.272] [LOG]    Use existing news fetcher for url: https://noticias.r7.com/rio-de-janeiro/feed.xml
      [22:26:22.303] [LOG]    Request URL: http://192.168.1.158:8123/api/states/sensor.caixa_dagua?api_password=juere3027
      [22:26:22.388] [LOG]    { undefined: undefined, label: 'Quintal' }
      
      
      S 1 Reply Last reply Reply Quote 0
      • I Offline
        iorifly
        last edited by

        I see that the module tries to connect to the Home assistant.

        https://imgur.com/oHjP479

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @iorifly
          last edited by

          @iorifly said in Which modules with Home Assistant currently work?:

          EADDRINUSE

          U already have some application using that port, and are trying to start another

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • I Offline
            iorifly
            last edited by

            I don’t know what it would be. It is not related to MMM-HASS.

            Even with a simple config.js I have this msg. I think I should restart my raspberry.

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @iorifly
              last edited by

              @iorifly does mm start on boot?

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • I Offline
                iorifly
                last edited by iorifly

                Do not. I restarted and the msg stopped. Now I’m fighting with MMM-HASS.

                I take back what I said. He did give me more information!

                The mistake I have is in the development of the module. The error is in the connection of the module to the HA system.
                  
                I can’t do anything but wait for the developer’s announcement.

                [14:23:57.773] [LOG]    Create new news fetcher for url: https://noticias.r7.com/rio-de-janeiro/feed.xml - Interval: 300000
                [14:23:57.895] [LOG]    { deviceLabel: 'Quintal',
                  deviceReadings:
                   [ { sensor: 'sensor.caixa_dagua',
                       icon: 'wi wi-thermometer',
                       suffix: '%' } ] }
                [14:23:57.919] [LOG]    192.168.1.158:8123/api/states/sensor.caixa_dagua?api_password=juere3027
                [14:23:57.920] [LOG]    Request URL: http://192.168.1.158:8123/api/states/sensor.caixa_dagua?api_password=juere3027
                [14:23:58.215] [ERROR]  (node:18860) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
                [14:23:58.440] [LOG]    null
                [14:23:58.443] [LOG]    401: Unauthorized
                [14:23:58.445] [LOG]    { undefined: undefined, label: 'Quintal' }
                [14:23:59.415] [LOG]    Refreshed access token because it has expired. Expired at: 14:23:57 now is: 14:23:59
                [14:23:59.450] [LOG]    Refreshed access token because it has expired. Expired at: 15:23:59 now is: 14:23:59
                [14:23:59.487] [LOG]    Refreshed access token because it has expired. Expired at: 15:23:59 now is: 14:23:59
                pi@raspberrypi:~/MagicMirror $
                
                1 Reply Last reply Reply Quote 0
                • I Offline
                  iorifly
                  last edited by

                  I tried this option but also to no avail.

                  https://github.com/aserramonner/MMM-HASS/pull/13

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    darbos @iorifly
                    last edited by

                    @iorifly to dvbit point you could just use fullpageos if you just want to display a Lovelace tab…

                    Also, I have had homeassistany sensors working recently…if you want to give some more detail of what you’ve done and what the problem is. And share you relevant code I can try to help…

                    I 1 Reply Last reply Reply Quote 0
                    • I Offline
                      iorifly @darbos
                      last edited by

                      @darbos

                      I would love to know how to display only one lovelace tab. But still it would be the whole screen or I can go down the screen to show only what I want.

                      I have my problem report here too:

                      https://community.home-assistant.io/t/magic-mirror/8443/59

                      what do you need ? I can pass everything !!!

                      S 1 Reply Last reply Reply Quote 0
                      • D Offline
                        dvbit
                        last edited by

                        You can use a custom card called custom header to minimize the top and right bar . also having it happen just for the mm through user agent recognition

                        1 Reply Last reply Reply Quote 0
                        • S Offline
                          sdetweil @iorifly
                          last edited by

                          @iorifly add debuglogging: true,

                          to the config.js for the HASS module

                          it doesn’t handle errors at all… but will report status if that flag is enabled

                          request(get_options, function(error, response, body) {
                                    completed_requests++;
                                    if(config.debuglogging) {
                                      console.log(error);
                                      console.log(body);
                                    }
                          

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          I 1 Reply Last reply Reply Quote 0
                          • I Offline
                            iorifly @sdetweil
                            last edited by

                            @sdetweil

                            added it to my config.js. However nothing happened or signaled … Thanks anyway.

                            S 1 Reply Last reply Reply Quote 0
                            • S Offline
                              sdetweil @iorifly
                              last edited by

                              @iorifly Will be in the terminal window, or pm2 logs output

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              1 Reply Last reply Reply Quote 0
                              • I Offline
                                iorifly
                                last edited by

                                I managed to solve !!! Connected !!! THANKS !!

                                S 1 Reply Last reply Reply Quote 0
                                • S Offline
                                  sdetweil @iorifly
                                  last edited by

                                  @iorifly what was it? Can’t keep us guessing!

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

                                  1 Reply Last reply Reply Quote 0
                                  • I Offline
                                    iorifly
                                    last edited by

                                    I created another token (in HA). and replace in the module.

                                    1 Reply Last reply Reply Quote 0
                                    • I Offline
                                      iorifly
                                      last edited by

                                      but I will try to use this module. It seems to be more complete.

                                      https://github.com/leinich/MMM-homeassistant-sensors

                                      I will create another token in the Home assistant (HA) for him.

                                      1 Reply Last reply Reply Quote 0
                                      • I Offline
                                        iorifly
                                        last edited by

                                        actually this module is also working. That is,

                                        operational modules tested by me:

                                        MMM-HASS
                                        MMM-homeassistant-sensor

                                        1 Reply Last reply Reply Quote 0
                                        • B Offline
                                          Babene1 Project Sponsor
                                          last edited by Babene1

                                          i want to use the modul MMM-HASS
                                          but i get the error in HA “Login attempt or request with invalid authentication from”
                                          i use Home Assistant 0.116.2

                                          here is my MM-Config from the Modul:

                                          {
                                                     module: "MMM-HASS",
                                                     position: "top_left",
                                                     config: {
                                                             host: "xxx.xxx.xxx.xxx",
                                                             port: "8123",
                                                             apipassword: "xxxxxx",
                                                             hassiotoken: true,
                                                             token: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                                                             https: false,
                                                             devices: [
                                                             { deviceLabel: "Temp Test",
                                                                     deviceReadings: [
                                                                     { sensor: "sensor.temp1", icon: "wi wi-thermometer", suffix: "°"},
                                                                     { sensor: "sensor.temp1 _2", icon: "wi wi-humidity", suffix: "%"},
                                                                     ]
                                                             },
                                                             ]
                                                       }
                                          

                                          In MM:

                                          Temp Test undefined°undefined%

                                          Log from MM:

                                          [2021-01-09 10:36:47.251] [LOG] { undefined: undefined, label: Temp Test }
                                          [2021-01-09 10:37:47.408] [LOG] Request URL: http://xxx.xxx.xxx.xxx:8123/api/states/sensor. temp1?api_password= xxxxxx
                                          [2021-01-09 10:37:47.408] [LOG] Request URL: http://xxx.xxx.xxx.xxx:8123/api/states/sensor. temp1_2?api_password= xxxxxx
                                          [2021-01-09 10:37:47.524] [LOG] { undefined: undefined, label: Temp Test }

                                          What I have to config in HA? Would be really grateful for tips

                                          B 1 Reply Last reply Reply Quote 0
                                          • B Offline
                                            Babene1 Project Sponsor @Babene1
                                            last edited by

                                            Only for information, in case someone has the same problem.
                                            The module works for me now, with the above configuration

                                            I found the following articles: https://github.com/aserramonner/MMM-HASS/pull/13/commits/bd816304ba146ad84bce5cada65cb3416194aca7

                                            I made these changes: In File „node_helper.js“ von MMM-HASS

                                            row 130 changed in:

                                            post_options.headers = { 'Authorization' : 'Bearer ' + config.token };
                                            

                                            row 176 changed in:

                                            get_options.headers = { 'Authorization' : 'Bearer ' + config.token };
                                            
                                            Coolie1101C 1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy