MMM-homeassistant-sensors icon indicating copy to clipboard operation
MMM-homeassistant-sensors copied to clipboard

Error fetching stats

Open b-reich opened this issue 1 year ago • 8 comments

Hi, I am currently unable to get the plugin to work. Maybe someone has an Idea.

grafik

config:

		{
			module: 'MMM-homeassistant-sensors',
			position: 'top_left',
			config: {
				host: "homeassistant.lan",
				port: "8123",
				https: true,
				token: "my-token",
				values: [
					{
						sensor: "sensor.schreibtisch_steckdose_energy",
					},
				]
			}
		},

b-reich avatar May 30 '23 08:05 b-reich

same here, I don't understand the issue yet, and cannot see anything on the logs.

cedricdirr avatar Jun 23 '23 16:06 cedricdirr

@cedricdirr same here...

b-reich avatar Jun 25 '23 19:06 b-reich

I'm far from a coding guru but removing part of the error checking has made this work for me.

MMM-homeassistant-sensors.js Line 125 if (data && !this.isEmpty(data)) { Change Line 125 TO if (data) {

Using browser debug console we can see 'data' contains results from HA, so something with the isEmpty() isn't working correctly.

P11x3l avatar Aug 28 '23 03:08 P11x3l

Hi, I have completely missed all the issues here... Do you guys still have issues? I have pushed a "reworked" version of the "request" part (using fetch instead)... Check out the "dev" branch...

Snille avatar Jun 30 '24 17:06 Snille

I can give it a shot at the weekend

b-reich avatar Jul 04 '24 10:07 b-reich

Sorry, for my late response.

I had some time to test it. No change for me.

https: true, can it handle a self singed cert?

b-reich avatar Jul 22 '24 14:07 b-reich

Ah, ok. I have not tested that bit. :) Not sure if I can fix it... Never tried out the https parts actually, it's from the original "fork"... :) I'm not using a cert "internally"...

Snille avatar Jul 22 '24 20:07 Snille

Adding (self singed) certs to electron/node is a bit painful..

It would be helpful to have some logging output at this point

b-reich avatar Jul 25 '24 07:07 b-reich