Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error fetching stats #13

Open
b-reich opened this issue May 30, 2023 · 8 comments
Open

Error fetching stats #13

b-reich opened this issue May 30, 2023 · 8 comments

Comments

@b-reich
Copy link

b-reich commented May 30, 2023

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",
					},
				]
			}
		},
@cedricdirr
Copy link

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

@b-reich
Copy link
Author

b-reich commented Jun 25, 2023

@cedricdirr same here...

@P11x3l
Copy link

P11x3l commented Aug 28, 2023

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.

@Snille
Copy link
Owner

Snille commented Jun 30, 2024

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...

@b-reich
Copy link
Author

b-reich commented Jul 4, 2024

I can give it a shot at the weekend

@b-reich
Copy link
Author

b-reich commented Jul 22, 2024

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?

@Snille
Copy link
Owner

Snille commented Jul 22, 2024

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"...

@b-reich
Copy link
Author

b-reich commented Jul 25, 2024

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants