DrozmotiX / ioBroker.tado

Tado cloud connector to control Tado devices
MIT License
24 stars 13 forks source link

null-Values when writing new settings (like temperature.celsius) #551

Closed seb2010 closed 1 year ago

seb2010 commented 1 year ago

I am on adapter version v0.4.0.

Everytime I do write a new target temperature to "Rooms.x.setting.temperature.celsius" or do a OverlayClearZone trigger, I do observe two things I would like to avoid:

  1. the Room in question does get all values (like sensorDataPoints etc.) set to "null" while processing the API-call/response. Does it have to be this way? Can't only the values be updated without cleaning them. This looks strange in the Visualization, as if something was wrong.
  2. This behavior also happens for Rooms not touched in any way. So the API-call also triggers a refresh (coming with the above described time window where everything is "null") for other rooms as well.

So basically, everytime I do control tado via the adapter, I do get some seconds of "null"-values all over the place in the objects and therefore also in the Vis-Visualization. Can this be avoided or am I doing the controlling wrong? Cheers Sebastian

HGlab01 commented 1 year ago

I tried to reproduce your issue, but the null values never appears in my environment.

Is there anything in the log? There are two options that a vaule is set to NULL

  1. API is returning a NULL value
  2. API is no longer returning a value for the state

The response-time of the TADO-API is less than 300ms - so this cannot be linked to the issue you describe.

Generally I would appreciate if you would use the template to raise a bug and in cases like this to provide the log.

https://user-images.githubusercontent.com/54232526/203915845-cb94f98f-71b2-4d77-a380-c28cba7a002c.mp4

seb2010 commented 1 year ago

Hi. I also do not have a perfect recreate scenario, but it happens a lot. Looking at the logs, there seems to be all kinds of Create_state called for state 'xxxxxx._JSON_response.Stage_09_ZoneStates_data_8' and name 'Stage_09_ZoneStates_data_8' with value and alike messages popping up. Followed by null-reset log entries. If you would open discord, I can send you more detailed logs.

seb2010 commented 1 year ago

Bei vielen Schreiboperationen wird JsonExplorer.setLastStartTime() aufgerufen, damit checkExpire mit gesetztem Scope die States resetted.

async clearZoneOverlay(home_id, zone_id) { let url = /api/v2/homes/${home_id}/zones/${zone_id}/overlay; if (await isOnline() == false) { throw new Error('No internet connection detected!'); } await this.apiCall(url, 'delete'); this.log.debug(Called 'DELETE ${url}'); await JsonExplorer.setLastStartTime(); await this.DoZoneStates(home_id, zone_id); await JsonExplorer.checkExpire(home_id + '.Rooms.' + zone_id + '.overlay.*'); }

In der globalen Refresh-Funktion ist allerdings auch ein checkExpire auf alle States enthalten. Das führt dazu, dass alle States auf null gesetzt werden.

HGlab01 commented 1 year ago

fixed in https://github.com/DrozmotiX/ioBroker.tado/releases/tag/v0.4.3-alpha.0