iobroker-community-adapters / ioBroker.pvforecast

Forecast for your photovoltaic plant in ioBroker
Other
24 stars 13 forks source link

missing JSON states under summary and new log errors #99

Closed Diginix closed 1 year ago

Diginix commented 1 year ago

The problem

with update from 2.6.0 to 2.7.0 following objects are deleted: pvforecast.0.summary.JSONData pvforecast.0.summary.JSONTable pvforecast.0.summary.JSONGraph pvforecast.0.summary.lastUpdated

All hourly values in summary are 0: pvforecast.0.summary.power.hoursTomorrow

Here are some log entries after update and 2 restarts:

2023-05-09 21:17:31.660 - info: pvforecast.0 (1326714) starting. Version 2.7.0 in /opt/iobroker/node_modules/iobroker.pvforecast, node: v16.20.0, js-controller: 4.0.24 2023-05-09 21:17:31.704 - info: pvforecast.0 (1326714) using system latitude: 50. longitude: 10. 2023-05-09 21:17:31.899 - info: pvforecast.0 (1326714) Deleted plant with id: "pvforecast.0.summary" - (not found in configuration) 2023-05-09 21:17:32.905 - warn: pvforecast.0 (1326714) Object pvforecast.0.summary.power.now is invalid: obj.type has to exist 2023-05-09 21:17:32.906 - warn: pvforecast.0 (1326714) This object will not be created in future versions. Please report this to the developer. 2023-05-09 21:17:32.915 - warn: pvforecast.0 (1326714) Object pvforecast.0.summary.energy.now is invalid: obj.type has to exist 2023-05-09 21:17:32.915 - warn: pvforecast.0 (1326714) This object will not be created in future versions. Please report this to the developer. 2023-05-09 21:17:32.923 - warn: pvforecast.0 (1326714) Object pvforecast.0.summary.energy.today is invalid: obj.type has to exist 2023-05-09 21:17:32.924 - warn: pvforecast.0 (1326714) This object will not be created in future versions. Please report this to the developer. 2023-05-09 21:17:32.934 - warn: pvforecast.0 (1326714) Object pvforecast.0.summary.energy.tomorrow is invalid: obj.type has to exist 2023-05-09 21:17:32.934 - warn: pvforecast.0 (1326714) This object will not be created in future versions. Please report this to the developer. 2023-05-09 21:17:34.656 - warn: pvforecast.0 (1326714) Object of state "pvforecast.0.summary.energy.now" is missing the required property "common.type" 2023-05-09 21:17:34.701 - warn: pvforecast.0 (1326714) Object of state "pvforecast.0.summary.energy.today" is missing the required property "common.type" 2023-05-09 21:17:34.745 - warn: pvforecast.0 (1326714) Object of state "pvforecast.0.summary.energy.tomorrow" is missing the required property "common.type" 2023-05-09 21:17:34.790 - warn: pvforecast.0 (1326714) Object of state "pvforecast.0.summary.power.now" is missing the required property "common.type" 2023-05-09 21:17:34.834 - warn: pvforecast.0 (1326714) State "pvforecast.0.summary.power.installed" has no existing object, this might lead to an error in future versions 2023-05-09 21:17:34.882 - warn: pvforecast.0 (1326714) State "pvforecast.0.summary.JSONData" has no existing object, this might lead to an error in future versions 2023-05-09 21:17:34.978 - warn: pvforecast.0 (1326714) State "pvforecast.0.summary.JSONTable" has no existing object, this might lead to an error in future versions 2023-05-09 21:17:35.025 - warn: pvforecast.0 (1326714) State "pvforecast.0.summary.JSONGraph" has no existing object, this might lead to an error in future versions 2023-05-09 21:17:35.069 - warn: pvforecast.0 (1326714) State "pvforecast.0.summary.lastUpdated" has no existing object, this might lead to an error in future versions 2023-05-09 21:17:35.150 - info: pvforecast.0 (1326714) Starting internal update cron (every 15 Minutes) for timezone: Europe/Berlin 2023-05-09 21:18:20.172 - info: pvforecast.0 (1326714) Got terminate signal TERMINATE_YOURSELF 2023-05-09 21:18:20.175 - info: pvforecast.0 (1326714) terminating 2023-05-09 21:18:20.178 - info: pvforecast.0 (1326714) Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason 2023-05-09 21:18:25.547 - info: pvforecast.0 (1326839) starting. Version 2.7.0 in /opt/iobroker/node_modules/iobroker.pvforecast, node: v16.20.0, js-controller: 4.0.24 2023-05-09 21:18:25.605 - info: pvforecast.0 (1326839) using system latitude: 50.68710300 longitude: 10.91463090 2023-05-09 21:18:26.461 - info: pvforecast.0 (1326839) Deleted plant with id: "pvforecast.0.summary" - (not found in configuration) 2023-05-09 21:18:27.502 - warn: pvforecast.0 (1326839) Object pvforecast.0.summary.power.now is invalid: obj.type has to exist 2023-05-09 21:18:27.503 - warn: pvforecast.0 (1326839) This object will not be created in future versions. Please report this to the developer. 2023-05-09 21:18:27.513 - warn: pvforecast.0 (1326839) Object pvforecast.0.summary.energy.now is invalid: obj.type has to exist 2023-05-09 21:18:27.513 - warn: pvforecast.0 (1326839) This object will not be created in future versions. Please report this to the developer. 2023-05-09 21:18:27.523 - warn: pvforecast.0 (1326839) Object pvforecast.0.summary.energy.today is invalid: obj.type has to exist 2023-05-09 21:18:27.524 - warn: pvforecast.0 (1326839) This object will not be created in future versions. Please report this to the developer. 2023-05-09 21:18:27.533 - warn: pvforecast.0 (1326839) Object pvforecast.0.summary.energy.tomorrow is invalid: obj.type has to exist 2023-05-09 21:18:27.534 - warn: pvforecast.0 (1326839) This object will not be created in future versions. Please report this to the developer. 2023-05-09 21:18:29.626 - warn: pvforecast.0 (1326839) Object of state "pvforecast.0.summary.energy.now" is missing the required property "common.type" 2023-05-09 21:18:29.669 - warn: pvforecast.0 (1326839) Object of state "pvforecast.0.summary.energy.today" is missing the required property "common.type" 2023-05-09 21:18:29.714 - warn: pvforecast.0 (1326839) Object of state "pvforecast.0.summary.energy.tomorrow" is missing the required property "common.type" 2023-05-09 21:18:29.767 - warn: pvforecast.0 (1326839) Object of state "pvforecast.0.summary.power.now" is missing the required property "common.type" 2023-05-09 21:18:29.904 - warn: pvforecast.0 (1326839) State "pvforecast.0.summary.power.installed" has no existing object, this might lead to an error in future versions 2023-05-09 21:18:30.336 - warn: pvforecast.0 (1326839) State "pvforecast.0.summary.JSONData" has no existing object, this might lead to an error in future versions 2023-05-09 21:18:30.413 - warn: pvforecast.0 (1326839) State "pvforecast.0.summary.JSONTable" has no existing object, this might lead to an error in future versions 2023-05-09 21:18:30.466 - warn: pvforecast.0 (1326839) State "pvforecast.0.summary.JSONGraph" has no existing object, this might lead to an error in future versions 2023-05-09 21:18:30.514 - warn: pvforecast.0 (1326839) State "pvforecast.0.summary.lastUpdated" has no existing object, this might lead to an error in future versions 2023-05-09 21:18:30.590 - info: pvforecast.0 (1326839) Starting internal update cron (every 15 Minutes) for timezone: Europe/Berlin

Version of nodejs

16.20.0

Version of ioBroker js-controller

4.0.24

Version of Adapter

2.7.0

Operating system running ioBroker

Ubuntu 22.04.2 LTS

Checklist of files to include below

Additional information & file uploads

No response

isi07 commented 1 year ago

states are not prroperly created summary.energy.now summary.energy.today summary.energy.tomorrow summary.poweer.now

2023-05-09 21:12:08.190 - warn: pvforecast.1 (502158) Object of state "pvforecast.1.summary.energy.now" is missing the required property "common.type" 2023-05-09 21:12:08.235 - warn: pvforecast.1 (502158) Object of state "pvforecast.1.summary.energy.today" is missing the required property "common.type" 2023-05-09 21:12:08.283 - warn: pvforecast.1 (502158) Object of state "pvforecast.1.summary.energy.tomorrow" is missing the required property "common.type" 2023-05-09 21:12:08.335 - warn: pvforecast.1 (502158) Object of state "pvforecast.1.summary.power.now" is missing the required property "common.type"

2023-05-09 21:12:06.138 - warn: pvforecast.1 (502158) Object pvforecast.1.summary.power.now is invalid: obj.type has to exist 2023-05-09 21:12:06.138 - warn: pvforecast.1 (502158) This object will not be created in future versions. Please report this to the developer. 2023-05-09 21:12:06.201 - warn: pvforecast.1 (502158) Object pvforecast.1.summary.energy.now is invalid: obj.type has to exist 2023-05-09 21:12:06.201 - warn: pvforecast.1 (502158) This object will not be created in future versions. Please report this to the developer. 2023-05-09 21:12:06.210 - warn: pvforecast.1 (502158) Object pvforecast.1.summary.energy.today is invalid: obj.type has to exist 2023-05-09 21:12:06.211 - warn: pvforecast.1 (502158) This object will not be created in future versions. Please report this to the developer. 2023-05-09 21:12:06.220 - warn: pvforecast.1 (502158) Object pvforecast.1.summary.energy.tomorrow is invalid: obj.type has to exist 2023-05-09 21:12:06.220 - warn: pvforecast.1 (502158) This object will not be created in future versions. Please report this to the developer.

state is missing summary.power.installed

2023-05-09 21:12:08.379 - warn: pvforecast.1 (502158) State "pvforecast.1.summary.power.installed" has no existing object, this might lead to an error in future versions

klein0r commented 1 year ago

This logic deletes the "device" summary (because it is not in the configuration):

https://github.com/iobroker-community-adapters/ioBroker.pvforecast/blob/e306f6b0789610cc322bba1fbe4aaf40c8bea79b/main.js#L125-L133

@GermanBluefox Why have you changed the type of summary to device?

Existing plant devices: [{"_id":"pvforecast.0.summary","type":"device","common":{"name":{"en":"Summary","de":"Zusammenfassung","ru":"Резюме","pt":"Resumo","nl":"Samenvatting","fr":"Résumé","it":"Sommario","es":"Resumen","pl":"Streszczenie","uk":"Редакція","zh-cn":"概括"}},"native":{},"from":"system.adapter.pvforecast.0","ts":1683702887739,"acl":{"object":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"},"user":"system.user.admin"},{"type":"device","common":{"name":"Nord"},"native":{},"from":"system.adapter.pvforecast.0","user":"system.user.admin","ts":1683628100580,"_id":"pvforecast.0.plants.nord","acl":{"object":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"}},{"type":"device","common":{"name":"Sued"},"native":{},"from":"system.adapter.pvforecast.0","user":"system.user.admin","ts":1683628100744,"_id":"pvforecast.0.plants.sued","acl":{"object":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"}}] - configured: ["pvforecast.0.plants.nord","pvforecast.0.plants.sued"]
2023-05-10 09:14:47.919  - info: pvforecast.0 (2901) Deleted plant with id: "pvforecast.0.summary" - (not found in configuration)