tp1de / ioBroker.ems-esp

EMS-ESP Adapter
MIT License
18 stars 4 forks source link

datapoints in api are using language dependent names. #23

Closed harvey637 closed 11 months ago

harvey637 commented 11 months ago

Hi, with version 2.0.0 all my datapoints are now in the selected web language. So all writing into influxdb is to new datapoints, old history is lost. A little bit of inconsitency, some values are the original old names :-(

See screenshots: grafik

The line "dampedoutdoortemp" is still there (as not deleting data with database use), but not active anymore. New temperature is provided in "gedämpfte Außentemperatur".

This breaks all history of ESP data!

IMHO the api should not be language dependent, in the web configuration some configuration (e.g. boolean format for web // boolean format for api/mqtt) takes this perfectly into account.

Maybe that this new problem is in connection to the "use language for device entities" - this should be ONLY for web, not for api/mqtt.

Please revert/solve soon, as I loose my continous historic data - thank you cu Harvey

harvey637 commented 11 months ago

confirmed: changing the "use selected language for device entities" to english helps as a workaround.

This setting should not change the api?!?

Also some mor problems with the usage of the "hc1", Old aadapter version used it as subdirectory, new adapter as part of the name? Is this intended? please see screenshot: OLD adapter:

grafik

NEW adapter: grafik

Or is this change intended? Sad story, as history will be lost for HC1 :-( cu Harvey

tp1de commented 11 months ago

This is not new in version 2.0.0. And yes the api-language for the entity names and texts depend on the ems-esp settings.

changing the "use selected language for device entities" to english helps as a workaround. This is not a workaround . The ioBroker adapter can just take the data from the API. Whenever the names are changed with the ems-esp firmware, you will face the same.

harvey637 commented 11 months ago

Sorry, but the "workaround" for boiler is also not working :-(

Under the "subdirectory" ems/boiler I have old entities e.g. "ems:total energy consumption", now I have(inside the subdirectory boiler!): "ems:boiler.total energy consumption"

This also breaks history in the database!

IMHO the "subdirectory" structure is sufficient for "boiler" (ok, what about more than one boiler?). Same goes to the thermostats and the heating circuits:

Here we had a subdirectory "thermostat" with a subsubdirectory "hc1" - perfect sorted. Now we have thermostat with datapoints like "ems:thermostat hc1 current room temperature", old datapoint was: "ems: hc1 current room temperature"

I need to go back to a version before 2.0.0, as I do a LOT of calculation with the datapoints, eg. calculation daily/weekly/monthly energyconsumption, and similar stuff with energy provided, extra heater power consumption and more.

cu Harvey

tp1de commented 11 months ago

There is nothing changed in version 2.0 ... at least not intended. You say 1.34.0 is working and 2.0.0 not?

harvey637 commented 11 months ago

Hi, nice to meet you!

I did not change anything in the emsp lately, so the language for device entities was "german" before to get a nice reading when using the web interface. I am shure that this was NOT reflected in the entity names in the api, as I have all the historic data until the update to version 2.0.0 of the iobroker adapter.

I will revert to 1.3.4.0 in a minute to confirm your question cu Harvey

tp1de commented 11 months ago

I am a bit confused. Nothing changed on my history and names. And in respect to your question of more then one boiler. This is not foreseen in the ems-esp firmware and not within the adapter until now.

harvey637 commented 11 months ago

Hi, thank you for the explanation about boilers - this is off topic to this issue and just came into my mind when looking into the "hc1" (where some people might have "hc2", hc3" .... simply forget my excursion :-)

Now back to 1.34.0 AND changed the ems-esp setting to "language for device entities" back to german.

grafik

the subdirectory structure thermostat/hc1 is back (no more "ems:thermostat hc1 current room temperature") this is the datapoint info:

{
  "_id": "ems-esp.0.thermostat.hc1.currtemp",
  "type": "state",
  "common": {
    "id": "thermostat.hc1.currtemp",
    "name": "ems: HK1 aktuelle Raumtemperatur",
    "type": "number",
    "unit": "°C",
    "read": true,
    "write": false,
    "role": "value.temperature",
    "custom": {
      "influxdb.0": {
        "enabled": true,
        "storageType": "",
        "aliasId": "",
        "changesOnly": true,
        "debounce": "1000",
        "changesRelogInterval": "0",
        "changesMinDelta": "0",
        "enableDebugLogs": false,
        "debounceTime": 1000,
        "blockTime": 1000
      }
    }
  },
  "native": {
    "ems_type": "number",
    "visible": true,
    "ems_command": "currtemp",
    "ems_device": "thermostat",
    "ems_id": "hc1",
    "ems_api": "V3"
  },
  "from": "system.adapter.ems-esp.0",
  "user": "system.user.admin",
  "ts": 1690193403776,
  "acl": {
    "object": 1636,
    "state": 1636,
    "owner": "system.user.admin",
    "ownerGroup": "system.group.administrator"
  }
}

So I see the english name as "_id" and "id" (which is used for the creation of the database entry - my guess) AND the german "name" (which is not used for the database).

tp1de commented 11 months ago

I am on the way to check ... is 1.34.0 working well?

harvey637 commented 11 months ago

yes!

if it helps I can go to 2.0.0 and make the identical infos again. simply ask

tp1de commented 11 months ago

Not necessary I can reproduce ... I just do not know why? I will check

tp1de commented 11 months ago

Harvey, Ich glaube ich habe den Fehler gefunden. Kannst Du mal vom Github installieren und testen?

harvey637 commented 11 months ago

ist gemacht, sieht gut aus!

so sah die Info mit dem original 2.0.0 adapter aus:

{
  "_id": "ems-esp.0.thermostat.HK1 aktuelle Raumtemperatur",
  "type": "state",
  "common": {
    "id": "thermostat.HK1 aktuelle Raumtemperatur",
    "name": "ems:thermostat.HK1 aktuelle Raumtemperatur",
    "type": "mixed",
    "unit": "",
    "read": true,
    "write": false,
    "role": "value"
  },
  "native": {
    "ems_command": "HK1 aktuelle Raumtemperatur",
    "ems_device": "thermostat",
    "ems_id": "",
    "ems_api": "3.6.0-dev.13b"
  },
  "from": "system.adapter.ems-esp.0",
  "user": "system.user.admin",
  "ts": 1690195156544,
  "acl": {
    "object": 1636,
    "state": 1636,
    "owner": "system.user.admin",
    "ownerGroup": "system.group.administrator"
  }
}

Da fehlte was, ist jetzt wieder drin!

S-U_P_E_R !!!

tp1de commented 11 months ago

Kleine Änderung große Auswirkung. Ich schreibe jetzt die ems-esp firmware Version ins log, da ich aktuell (zu) viele Fragen zum ems-esp bekomme. Eine Abrgae nach V3 war noch aus Zeiten vorhanden, wo ich V2 unterstützt habe. Ist korrigiert. Mache jetzt neue Version.

tp1de commented 11 months ago

Danke für das schnelle Melden ..... Thomas

harvey637 commented 11 months ago

Es ist mir eine Freude bei der Fehlersuche zu helfen, mache ich gerne, dafür schreie ich auch wenn ich was finde :-)

Ich warte auch noch etwas mit der Firmeware auf ems-esp, da bin ich auch auf einer Sonderversion (dev2), da das Speichern einiger WW Anpassungen nicht ging (aktuell alles ok, aber ich denke das wird irgendwann in die 3.6.1 oder 3.6.0.13 einfließen).

eine schöne und erfolgreiche Woche cu Harvey PS ich mache den ISSUE zu, wird ja dann in 2.0.1 auftauchen ...