Read the statement by Michael Teeuw here.
Home Assistant Sensor
-
Re: MMM-HomeAssistant-Sensors (Development) - Show your HA Sensors on your Mirror
Hello all
looking for some help with Home assistant sensor
I’m getting “Error Fetching Stats” on the Magic Mirror
My Config is below{ module: 'MMM-homeassistant-sensors', position: 'bottom_left', config: { host: "10.10.28.134", port: "8123", https: false, token: "My Token" values: [ { sensor: "status.14928_acurite_00275rm_14928_t1", }, { sensor: "status.14928_acurite_00275rm_14928_b", }, ] }I have tried using a host name instead of the IP address same issue
If anyone has any thoughts please let me know
Thanks
-
@ChrisKelley can you look at the output where you start MM
if that is pm2, thenpm2 logs --lines=xxxx
xxxx is the number of most recent lines, default 15on another module to my HA
[2025-12-03 08:29:00.425] [INFO] [MMM-HomeAssistantDisplay] [ 'Conected to Home Assistant for module_20_MMM-HomeAssistantDisplay after 0 retries' ]one other thing, for config and logs, please use a code wrapper around the content
paste into editor, blank line above and below
select the text you just pasted, hit the </> button on the editor toolbar above
or manually
add a tripple backtic (left of the 1 key on the US keyboard) as the only chars on the line (the blank line above and below) -
Thanks for the fast response… here is the log file
0|MagicMir | [2025-12-03 13:22:44.738] [LOG] MMM-homeassistant-sensors - Connection Failed: undefined 0|MagicMir | [2025-12-03 13:23:11.668] [LOG] SONOS_UPDATE 0|MagicMir | [2025-12-03 13:23:35.496] [LOG] SONOS_UPDATE 0|MagicMir | [2025-12-03 13:23:38.618] [LOG] MMM-homeassistant-sensors - Connection Failed: undefined 0|MagicMir | [2025-12-03 13:23:41.668] [LOG] SONOS_UPDATE 0|MagicMir | [2025-12-03 13:23:44.748] [LOG] MMM-homeassistant-sensors - Connection Failed: undefined 0|MagicMir | [2025-12-03 13:24:11.668] [LOG] SONOS_UPDATE 0|MagicMir | [2025-12-03 13:24:35.713] [LOG] SONOS_UPDATE 0|MagicMir | [2025-12-03 13:24:38.845] [LOG] MMM-homeassistant-sensors - Connection Failed: undefined 0|MagicMir | [2025-12-03 13:24:41.668] [LOG] SONOS_UPDATE 0|MagicMir | [2025-12-03 13:24:44.818] [LOG] MMM-homeassistant-sensors - Connection Failed: undefined 0|MagicMir | [2025-12-03 13:24:59.257] [INFO] Newsfeed-Fetcher: Broadcasting 60 items. 0|MagicMir | [2025-12-03 13:24:59.258] [INFO] Newsfeed-Fetcher: Broadcasting 60 items. 0|MagicMir | [2025-12-03 13:25:03.630] [INFO] Newsfeed-Fetcher: Broadcasting 30 items. 0|MagicMir | [2025-12-03 13:25:11.669] [LOG] SONOS_UPDATE -
@ChrisKelley based on that error which I can’t see in the code
I think its one of two things
ipaddress of HA wrong
token to HA wrongcan you set this config option for the module
debuglogging:true,and recapture the log…
-
Ok… So i added the logging line as well as added .local to the url… this changed things see below… Still not working but error on screen is gone
chris@MagicMirror:~ $ pm2 logs [TAILING] Tailing last 15 lines for [all] processes (change the value with --lin es option) /home/chris/.pm2/pm2.log last 15 lines: PM2 | 2025-12-03T08:14:38: PM2 log: pid=4758 msg=process killed PM2 | 2025-12-03T08:14:38: PM2 log: App [MagicMirror:0] starting in -fork mode- PM2 | 2025-12-03T08:14:38: PM2 log: App [MagicMirror:0] online PM2 | 2025-12-03T14:27:30: PM2 log: Change detected on path MagicMirror/c onfig/config.js for app MagicMirror - restarting PM2 | 2025-12-03T14:27:30: PM2 log: Stopping app:MagicMirror id:0 PM2 | 2025-12-03T14:27:30: PM2 log: App [MagicMirror:0] exited with code [0] via signal [SIGINT] PM2 | 2025-12-03T14:27:30: PM2 log: pid=5225 msg=process killed PM2 | 2025-12-03T14:27:30: PM2 log: App [MagicMirror:0] starting in -fork mode- PM2 | 2025-12-03T14:27:30: PM2 log: App [MagicMirror:0] online PM2 | 2025-12-03T15:00:50: PM2 log: Change detected on path MagicMirror/c onfig/config.js for app MagicMirror - restarting PM2 | 2025-12-03T15:00:50: PM2 log: Stopping app:MagicMirror id:0 PM2 | 2025-12-03T15:00:50: PM2 log: App [MagicMirror:0] exited with code [0] via signal [SIGINT] PM2 | 2025-12-03T15:00:50: PM2 log: pid=9835 msg=process killed PM2 | 2025-12-03T15:00:50: PM2 log: App [MagicMirror:0] starting in -fork mode- PM2 | 2025-12-03T15:00:50: PM2 log: App [MagicMirror:0] online /home/chris/.pm2/logs/sonos-out.log last 15 lines: 1|sonos | 2025-12-03T12:51:12.492Z INFO Could not find file /home/chris/node- sonos-http-api/settings.json 1|sonos | 2025-12-03T12:51:12.696Z INFO Presets loaded: { 1|sonos | example: { 1|sonos | players: [ 1|sonos | { roomName: 'Bathroom', volume: 10 }, 1|sonos | { roomName: 'Kitchen', volume: 10 }, 1|sonos | { roomName: 'Office', volume: 10 }, 1|sonos | { roomName: 'Bedroom', volume: 10 }, 1|sonos | { roomName: 'TV Room', volume: 15 } 1|sonos | ], 1|sonos | playMode: { shuffle: true, repeat: 'all', crossfade: false }, 1|sonos | pauseOthers: false 1|sonos | } 1|sonos | } 1|sonos | 2025-12-03T12:51:13.727Z INFO http server listening on 0.0.0.0 port 5005 /home/chris/.pm2/logs/sonos-error.log last 15 lines: 1|sonos | Please migrate your code to use AWS SDK for JavaScript (v3). 1|sonos | For more information, check the blog post at https://a.co/cUPnyil 1|sonos | (Use `node --trace-warnings ...` to show where the warning was crea ted) 1|sonos | (node:985) NOTE: The AWS SDK for JavaScript (v2) is in maintenance mode. 1|sonos | SDK releases are limited to address critical bug fixes and securit y issues only. 1|sonos | 1|sonos | Please migrate your code to use AWS SDK for JavaScript (v3). 1|sonos | For more information, check the blog post at https://a.co/cUPnyil 1|sonos | (Use `node --trace-warnings ...` to show where the warning was crea ted) 1|sonos | (node:1035) NOTE: The AWS SDK for JavaScript (v2) is in maintenance mode. 1|sonos | SDK releases are limited to address critical bug fixes and securit y issues only. 1|sonos | 1|sonos | Please migrate your code to use AWS SDK for JavaScript (v3). 1|sonos | For more information, check the blog post at https://a.co/cUPnyil 1|sonos | (Use `node --trace-warnings ...` to show where the warning was crea ted) /home/chris/.pm2/logs/MagicMirror-error.log last 15 lines: 0|MagicMir | [2025-12-03 14:56:32.970] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states 0|MagicMir | [2025-12-03 14:56:35.439] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states 0|MagicMir | [2025-12-03 14:57:32.971] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states 0|MagicMir | [2025-12-03 14:57:35.435] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states 0|MagicMir | [2025-12-03 14:58:32.971] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states 0|MagicMir | [2025-12-03 14:58:35.456] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states 0|MagicMir | [2025-12-03 14:59:32.970] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states 0|MagicMir | [2025-12-03 14:59:35.446] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states 0|MagicMir | [2025-12-03 15:00:32.970] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states 0|MagicMir | [2025-12-03 15:00:35.444] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states 0|MagicMir | /home/chris/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT 0|MagicMir | [2025-12-03 15:00:52.085] [WARN] You're using a full whitelist con figuration to allow for all IPs 0|MagicMir | [2025-12-03 15:00:55.458] [ERROR] [MMM-Remote-Control] Could not fi nd main module js file for MMM-homeassistant-sensors-old 0|MagicMir | [2025-12-03 15:01:35.732] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states 0|MagicMir | [2025-12-03 15:02:35.439] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states -
@ChrisKelley can you show the end of the error—- build lines
-
Lets see if this is better… When I hit the </> button it moves half the code hard right…
@sde/home/chris/.pm2/logs/MagicMirror-error.log last 15 lines:
0|MagicMir | [2025-12-03 15:00:35.444] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states
0|MagicMir | /home/chris/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT
0|MagicMir | [2025-12-03 15:00:52.085] [WARN] You’re using a full whitelist con figuration to allow for all IPs
0|MagicMir | [2025-12-03 15:00:55.458] [ERROR] [MMM-Remote-Control] Could not fi nd main module js file for MMM-homeassistant-sensors-old
0|MagicMir | [2025-12-03 15:01:35.732] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states
0|MagicMir | [2025-12-03 15:02:35.439] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states
0|MagicMir | [2025-12-03 15:03:35.542] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states
0|MagicMir | [2025-12-03 15:04:35.450] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states
0|MagicMir | [2025-12-03 15:05:35.449] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states
0|MagicMir | [2025-12-03 15:06:35.564] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states
0|MagicMir | [2025-12-03 15:07:35.437] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states
0|MagicMir | [2025-12-03 15:08:35.680] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states
0|MagicMir | [2025-12-03 15:09:35.585] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states
0|MagicMir | [2025-12-03 15:10:35.488] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states
0|MagicMir | [2025-12-03 15:11:36.010] [ERROR] MMM-homeassistant-sensors - build Url: http://homeassistant.local:8123/api/states
tweil -
@ChrisKelley did you change the config to .local??
Can you ping that from the MagicMirror system
i have grandson duty for 2 hours now
Then I will install that module -
Yep that works…
chris@MagicMirror:~ $ ping 10.10.28.134
PING 10.10.28.134 (10.10.28.134) 56(84) bytes of data.
64 bytes from 10.10.28.134: icmp_seq=1 ttl=64 time=0.027 ms
64 bytes from 10.10.28.134: icmp_seq=2 ttl=64 time=0.032 ms
64 bytes from 10.10.28.134: icmp_seq=3 ttl=64 time=0.029 ms
64 bytes from 10.10.28.134: icmp_seq=4 ttl=64 time=0.062 ms
64 bytes from 10.10.28.134: icmp_seq=5 ttl=64 time=0.036 ms
64 bytes from 10.10.28.134: icmp_seq=6 ttl=64 time=0.035 ms
64 bytes from 10.10.28.134: icmp_seq=7 ttl=64 time=0.022 ms
64 bytes from 10.10.28.134: icmp_seq=8 ttl=64 time=0.022 ms
64 bytes from 10.10.28.134: icmp_seq=9 ttl=64 time=0.025 ms
64 bytes from 10.10.28.134: icmp_seq=10 ttl=64 time=0.025 mscode_text -
@ChrisKelley ping by name?
