TA2k / ioBroker.mystrom

myStrom ioBroker Adapter
MIT License
5 stars 3 forks source link

Devices which are not in the local network spam the logfile full with errors because the local rest api of the device can not access #92

Open Floatcher opened 2 years ago

Floatcher commented 2 years ago

Describe the bug
Devices which are not in the local network spam the logfile full with errors because the local rest api of the device can not access. For this devices only the cloud infromation should be pulled.

To Reproduce
Steps to reproduce the behavior:

  1. Add an device to your MyStrom account (i.e. from an other house, to see the power flow of the switch there)
  2. Adapter creates ever minute an error in the logfile

Screenshots & Logfiles
mystrom.0 | 2021-12-23 14:31:18.641 | warn | Error: connect EHOSTUNREACH 192.168.1.171:80 mystrom.0 | 2021-12-23 14:31:18.640 | warn | http://192.168.1.171/api/v1/settings mystrom.0 | 2021-12-23 14:31:18.639 | warn | Error: connect EHOSTUNREACH 192.168.1.171:80 mystrom.0 | 2021-12-23 14:31:18.638 | warn | http://192.168.1.171/temp mystrom.0 | 2021-12-23 14:31:18.637 | warn | Error: connect EHOSTUNREACH 192.168.1.171:80 mystrom.0 | 2021-12-23 14:31:18.636 | warn | http://192.168.1.171/report mystrom.0 | 2021-12-23 14:31:18.634 | warn | Error: connect EHOSTUNREACH 192.168.1.171:80 mystrom.0 | 2021-12-23 14:31:18.634 | warn | http://192.168.1.171/api/v1/settings mystrom.0 | 2021-12-23 14:31:18.632 | warn | Error: connect EHOSTUNREACH 192.168.1.171:80 mystrom.0 | 2021-12-23 14:31:18.631 | warn | http://192.168.1.171/temp mystrom.0 | 2021-12-23 14:31:18.629 | error | undefined

Versions:
latest

Additional context
Add any other context about the problem here.

TA2k commented 2 years ago

Please try the latest github version

Floatcher commented 2 years ago

Thx for the fast reply.

Sadly, this didnt fixed it. Now I get even more entries to the log every minute.

Devices registered to the mystrom cloud, which are not in the local network accessable by the iobroker adapter should not generate an error/warning to the log. "localData" should only be fetched from devices which are in the local network and accessable. (I guess the error/warnings come from this part of the object tree, because I cant see the localdata part of the remote devices).

mystrom.0 | 2021-12-23 17:37:23.267 | warn | http://192.168.1.171/report mystrom.0 | 2021-12-23 17:36:23.283 | warn | Error: connect EHOSTUNREACH 192.168.1.171:80 mystrom.0 | 2021-12-23 17:36:23.283 | warn | http://192.168.1.171/api/v1/settings mystrom.0 | 2021-12-23 17:36:23.282 | warn | Error: connect EHOSTUNREACH 192.168.1.171:80 mystrom.0 | 2021-12-23 17:36:23.282 | warn | http://192.168.1.171/temp mystrom.0 | 2021-12-23 17:36:23.281 | warn | Error: connect EHOSTUNREACH 192.168.1.171:80 mystrom.0 | 2021-12-23 17:36:23.280 | warn | http://192.168.1.171/report mystrom.0 | 2021-12-23 17:36:23.279 | warn | Error: connect EHOSTUNREACH 192.168.1.171:80 mystrom.0 | 2021-12-23 17:36:23.279 | warn | http://192.168.1.171/api/v1/settings mystrom.0 | 2021-12-23 17:36:23.278 | warn | Error: connect EHOSTUNREACH 192.168.1.171:80 mystrom.0 | 2021-12-23 17:36:23.278 | warn | http://192.168.1.171/temp mystrom.0 | 2021-12-23 17:36:23.277 | warn | Error: connect EHOSTUNREACH 192.168.1.171:80 mystrom.0 | 2021-12-23 17:36:23.276 | warn | http://192.168.1.171/report mystrom.0 | 2021-12-23 17:36:23.275 | warn | Error: connect EHOSTUNREACH 192.168.1.171:80 mystrom.0 | 2021-12-23 17:36:23.275 | warn | http://192.168.1.171/api/v1/settings mystrom.0 | 2021-12-23 17:36:23.274 | warn | Error: connect EHOSTUNREACH 192.168.1.171:80 mystrom.0 | 2021-12-23 17:36:23.274 | warn | http://192.168.1.171/temp mystrom.0 | 2021-12-23 17:36:23.273 | warn | Error: connect EHOSTUNREACH 192.168.1.171:80 mystrom.0 | 2021-12-23 17:36:23.272 | warn | http://192.168.1.171/report mystrom.0 | 2021-12-23 17:36:23.271 | warn | Error: connect EHOSTUNREACH 192.168.1.171:80 mystrom.0 | 2021-12-23 17:36:23.271 | warn | http://192.168.1.171/api/v1/settings mystrom.0 | 2021-12-23 17:36:23.270 | warn | Error: connect EHOSTUNREACH 192.168.1.171:80 mystrom.0 | 2021-12-23 17:36:23.270 | warn | http://192.168.1.171/temp mystrom.0 | 2021-12-23 17:36:23.269 | error | undefined

Floatcher commented 2 years ago

Sorry for bothering, but will this by fixed/improved? My iobroker log is really useless with all this entries every minute and I really like your adapter, it works perfect for the data.

Maybe an option "ignore host unreachable" as quickfix?

TA2k commented 2 years ago

please double check you really installed the latest version from github the warn should not occur

Floatcher commented 2 years ago

...my fault... works. THX A LOT!