Coder Social home page Coder Social logo

iobroker-community-adapters / iobroker.tankerkoenig Goto Github PK

View Code? Open in Web Editor NEW
32.0 6.0 13.0 15.61 MB

Spritpreis Adapter für ioBroker

Home Page: http://www.iobroker.net

License: MIT License

JavaScript 2.31% HTML 0.28% TypeScript 97.04% CSS 0.36%
tankerkoenig iobroker node-module tanken spritpreis home-automation

iobroker.tankerkoenig's Introduction

Logo

ioBroker.tankerkoenig

Number of Installations ioBroker stable release NPM version Downloads Test and Release

This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers. For more details and for information how to disable the error reporting see Sentry-Plugin Documentation! Sentry reporting is used starting with js-controller 3.0.

NodeJS v14 or higher is required.

Migration Guides

Migration guide 3.3.3 to 3.3.5
Migration guide 3.1.x to 3.3.x or 3.2.x to 3.3.x
Migration guide 2.x.x to 3.3.x

Documentation

🇩🇪 Dokumentation

🇬🇧 Documentation

Changelog

WORK IN PROGRESS

  • (mcm1957) Adapter requires node.js 18 and js-controller >= 5 now
  • (mcm1957) Dependencies have been updated

3.3.7 (2023-02-06)

  • (xXBJXx) added difference to jsonTable issue #116
  • (xXBJXx) added a log message for the error parameter error
  • (xXBJXx) set the name length to 34 characters
  • (xXBJXx) Added verification if the api key is encrypted
  • (xXBJXx) updated the Dependencies

3.3.6 (2023-01-22)

  • (xXBJXx) fixed position of the warning message in the UI
  • (xXBJXx) updated the documentation and migration guides for stable version 3.3.6

3.3.5 (2023-01-04)

  • (xXBJXx) fixed copy/paste bug in the UI

3.3.4 (2023-01-03)

  • (xXBJXx) Fixed an issue where a postal code starting with 0 was not displayed correctly Issue #113

3.3.3 (2023-01-02)

  • (xXBJXx) fixed => adapter does not fetch data after a requestData error e.g. internet termination.
  • (xXBJXx) add adapter migration Guide from 3.1.x to 3.3.x or 3.2.x to 3.3.x Migration guide
  • (xXBJXx) fixed Issue Issue #111

License

The MIT License (MIT)

Copyright (c) 2024 iobroker-community-adapters [email protected] Copyright (c) 2016-2023 xXBJXx [email protected] pix

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

iobroker.tankerkoenig's People

Contributors

anwa avatar apollon77 avatar bergreiter avatar dependabot[bot] avatar germanbluefox avatar jens-maus avatar lueghi avatar mcm1957 avatar pix--- avatar schmakus avatar simatec avatar snyk-bot avatar thebam1990 avatar wendy2702 avatar xxbjxx avatar zwer2k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

iobroker.tankerkoenig's Issues

report information according LOG entry

Hello,

while starting tankerkoenig on my new system i get a message that i should report something to the developer. Herewith i do it:

The message is in the LOGs:
`

tankerkoenig.0 2021-01-03 12:31:42.612 warn (18592) This object will not be created in future versions. Please report this to the developer.
tankerkoenig.0 2021-01-03 12:31:42.612 warn (18592) Object tankerkoenig.0.tank is invalid: obj.type has to exist

`

0 Werte bei jeder Aktualisierung?

Hallo,

ich habe seit einigen Tagen in iobroker die Historienfunktion in Verwendung inklusive Grafischer Darstellung. Unter anderem wollte ich die Spritpreise so als Verlauf darstellen. Leider habe ich gesehen, dass hier kein durchgängiger Graph sondern ein wildes Zick-Zack dargestellt wird. Nach kurzer Recherche habe ich folgendes herausgefunden. Der Adapter scheint bei jedem Durchlauf erstmal alle Werte auf 0 zu setzen bevor er die neuen Werte setzt wodurch z.B. folgende Historie ergibt.

1.13 | true | tankerkoenig.0 | 2017-11-15 01:30:03.184
0 | false | tankerkoenig.0 | 2017-11-15 01:30:03.168

Nun meine Frage was hier dahinter steckt, das zuerst die Nullung stattfindet und ob dies wirklich notwendig ist?

Danke

Save and Close and Save itself does nor work

Hey,

I tried to setup Tankerkoenig. I've got my own api key and and id of a station, but I am unable to to save the Data. Every other IO Broker Adapter does work when changing the settings, but the Tankerkoenig adapter does not save it.

Solved: I had to enter the Intervall first, even though there was a "5" displayed

Rabatt in Preis mit einfließen lassen

Hallo,

der Adapter funktioniert perfekt.
Ich komme jedoch bei einer Tankstelle 3cent Rabatt auf den Liter Sprit. Wie kann ich denn die Werte angleichen?

Aktualisierung geht nicht

Ich habe im Admin Modus schon den Neustart der Instanz eingestellt.
Wird nicht aktualisiert.
Wenn ich manuell auf "Neu laden" klicken, werden die Kurse erneuert

wiederkehrende Fehlermeldung

Ich bekomme bei meiner Tankstelle während der Nacht immer die Fehlermeldung

018-02-07 02:30:02.761 error Spritpreise einlesen (gezielte Stationen via ID) - Parse Fehler: TypeError: Cannot read property '1' of und

Es scheint, dass das Errorhandling des Json Parsers nicht richtig funktioniert.
Es wäre wünschenswert, wenn diese Fehlermeldung nicht kommen würde, weil der Nutzer keine Möglichkeit hat, Korrekturen durchzuführen.

Außerdem wäre es schön, wenn die Info, dass der Adapter gestartet wurde, nicht im Log File erscheint, wenn der Nutzer den Level Error für den Adapter eingestellt hat.

Ideen für die Weiterentwicklung

Lose Ideensammlung für die Weiterentwicklung des Adapters:

  • zu jeder Station manuell auszufüllende Felder mit Geodaten zufügen. Die könnten später in VIS verwendet werden
  • o.g. Felder ggf. durch eine innerhalb der Einstellungen manuelle ausgelöste Abfrage der Tankerkönig detail.php mit weiteren Inforamtionen füllen, die über die standardmäßig vom Adapter genutzte Abfrage nicht kommen. Diese brauchen ja nur für die Einrichtung einmal vom tankerkönig- Server geladen werden.
  • zu jeder Station ein Feld für ein Logo
  • eine frei definierbare Pausenzeit, in der keine Abfragen gemacht werden
  • Zufallsgenerator für die Startminute zwischen 1 und 4 bei Adapterstart (schedule("1 * * * *")), um Häufungen der Abfragen beim Server abzufedern (läuft seit 2.0.0 mit eigenem Timer)
  • Ähnlich wie auf der Webseite von tankerkoenig.de auch die letzte Preisänderung mit Timestamp abspeichern (nicht in cheapest)

Billigste Tanke, Preis passt nicht

Hallo Pix,

ist mir heute morgen in Vis aufgefallen, da der Preis(billigste Tankstelle) auf meiner Startseite nicht mit dem Preis in der Übersicht(alle Tankstellen) übereinstimmt.
tankerkoenig

Please check ioBroker.tankerkoenig with js-controller 2.0

Hi,

the new js-controller 2.0 will come into latest repository in the next days and we want to make sure that all adapters are working well. We already did a 2 weeks Beta test and so some adapter were aleady checked and some needed slight adjustments.

You can find more information in ioBroker/ioBroker.js-controller#482 and in the ioBroker Forum. If you have more technical questions please write in the referenced issue or in the Developer thread please. General questions are best in the genral thread.

Please update your systems to js-controller 2.0 and check your adapter.

Please close this issue once you have checked your adapter or received successfull reports from users.

Thank you very much for your support. Please contact us in the other Threads or Forum on any question.

Warnmeldung tankerkönig

Moin,
ich habe nach wie vor das Problem mit der folgenden Fehlermeldung:
Bild1

Da der letzt Bug Report geschlossen wurde, dachte ich, dass evtl. eine Installation der Version 2.0.9 das Problem behebt. Bei mir leider nicht. Die Warnmeldungen kommen mit jeder Aktualisierung der Daten wieder. Node und NPM sind aktuell und den Fixer habe ich auch schon gestartet.

Greetz
Roland

Preis für Super Plus

Leider fehlt der Super Plus Preis.
Wäre schön, wenn der auch mit abgefragt werden könnte.

Think about to fix the issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/Pix---/ioBroker.tankerkoenig

  • [E154] common.dependencies must contain{"js-controller": ">=2.0.0"} or {"js-controller": ">=3.0.0"}
  • [E605] No actual year found in copyright. Please add "Copyright (c) 2016-2022 pix" at the end of README.md

Thanks,
your automatic adapter checker.

P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

2.0.1 - too much requests

Hallo, Version 2.0.1 macht anscheinend zuviele requests, die 5min oder 15min die ich eingestellt habe, werden nicht eingehalten, sondern es werden dauernd requests gesendet, siehe Email:
....
kommen momentan etwa 150 Zugriffe/Sekunde auf unser API (seit heute
morgen über 350000 Zugriffe).
... meine Api und IP wurde deaktiviert. Musste die Instanz erstmal stoppen.

Aber ich muss sagen, die Angaben waren immer sehr aktuell heute.. ;-)

Compatibility check and testing for Node.js 14 and 16

Dear Adapter develop,

Node.js 14 is now available for a year and Node.js 16 was release just some days ago and will become LTS by October 2021. We plan to update the ioBroker Node.js recommendation (currently 12.x) to 14.x later this year.

Please check your adapter with Node.js 14 especially, and ideally also directly with Node.js 16

Please add both versions to the adapter testing which is executed on commits.

If your adapter requires a certain minimum version of Node.js please set the 'engine' setting in package.json accordingly! Please also do this if the adapter is not able to work in certain Node.js versions, so that ioBroker can prevent users from installing te adapter if not compatible!

On questions please talk to us at ioBroker/ioBroker.js-controller#1138

Please close the issue after you checked it.

Thank you very much for your support!

Error in saving new tankerkönig api-key

When saving the tankerkoenig API key nothing happens in the UI.

In the browser console the following error is found:

Uncaught ReferenceError: Invalid left-hand side in assignment
at save (index_m.html?0:166)
at HTMLAnchorElement. (adapter-settings.js:196)
at HTMLAnchorElement.dispatch (jquery-3.2.1.min.js:3)
at HTMLAnchorElement.q.handle (jquery-3.2.1.min.js:3)

This error has its origin in index_m.html:157:

if (apikey_string.match(patt) === null)

unfortunately results in false, although my API-key should match the regex pattern, see:

https://regex101.com/r/w9EzeR/2

Is it possible to implement a workaround there?

Updatewunsch cheapest.xxx.stationid

Hallo,

erst mal danke für den tollen Adapter!

Auf meiner Vis-Startseite würde ich gerne die günstigte Tanke anzeigen.
Um das richtige Icon anzuzeigen würde ich gerne das widget "Image 8"-stateful verwenden.
Bräuchte dazu aber die Nummer der Station um die richtige URL des Bildes zuzuordnen.
Ich würde mich freuen wenn der zusätzliche Datenpunkt bei jeder Spritsorte noch dazu kommt.
z.b. tankerkoenig.0.stations.cheapest.diesel.stationid

Gruß xbow42

Updating states twice (first with zero)

I have a trigger on a "feed" state to recognize changes of the price.
I noticed that the trigger is fired twice: the first time I get a value with 0 and shortly after the first trigger I receive a second trigger with the correct value.
That's a misbehaviour. I have to filter it in my trigger function but it would be better when the states are written correctly.

Think about to fix the issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/Pix---/ioBroker.tankerkoenig

  • [E150] No common.connectionType found in io-package.json
  • [E152] No common.dataSource found in io-package.json

Thanks,
your automatic adapter checker.

P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

export jason function not working - nothing happens

Hello,
i am migrating to another computer and wanted to use the export function of tankerkoenig.0 but when i click on the button. nothings happens !

tankerkoenig version 2.0.5
nodejs v12.20.0
npm 6.14.8

grafik

Millionen Requests, Software ist defekt

Hallo, seit einigen Stunden kommen hunderte Requests/Sekunde auf das Tankerkönig-API von mehreren Usern, die wahrscheinlich diese Software einsetzen. Bitte die Änderung wieder zurücknehmen, sonst müssen wir unseren API-Server vom Netz nehmen. Es wäre schön, wenn im Request-Header eine Info über die Software (incl Version) mitgeschickt würde, dann können wir besser reagieren.

request wird nicht ausgeführt

der request(url, function (error, response, body) { wird bei Aktualisierung nicht ausgeführt
es ist so als ob dieser bei Adapterstart nicht beendet wurd .. und der nächste mag nicht anlaufen..

wenn der Adapter neu gestartet wird gehts..

Vorschlag: bau den um auf interne Verarbeitung in der Schleife.. dann endet der request auch.

Verify Compact mode for your adapter

We have detected that your adapter supports the compact mode. Please use the latest js-controller 2.0 and verify that everything works.

Some more information what is important to check can be found at ioBroker/ioBroker.js-controller#512

On questions please answer to the linked issue. Please close this issue after your test and add the version number that you have tested please as a comment.

Thank you for your support.

Autogas LPG ?

Halo, gibt es eine Möglichkeit ,Autogas einzubinden?

"short" Datenpunkte aktualisieren sich mit Wert "0"

Habe eben durch den Historyadapter festgestellt dass die Datenpunkte "short" beim Aktualisieren zuerst einen "0"-Wert schreiben bevor der richtige Preis angezeigt wird.

Screenshot 2022-07-02 064520

Dieses Verhalten macht es schwierig in z.B. Blockly auf Veränderungen zu reagieren.

Update stable version in repo to 2.0.6

Think about update stable version to 2.0.6

Version: stable=2.0.5 (375 days old) => latest=2.0.6 (322 days old)
Installs: stable=2634 (51.28%), latest=2124 (41.35%), total=5137
Click to edit

Dark mode issue

when in admin dark mode the UI is unreadable

TK-dark

Same image, just in lightmode 5sec later

tk-light

Einstellungen können nicht gespeichert werden

Hallo zusammen,

habe den Adapter mehrfach neu installiert jetzt auch über Github 2.0.5.
Kann die Einstellungen nicht speichern.
API Key und Tankstellen werden mit "good" betitelt.

Woran kann das liegen?
Danke schon mal

JS-Controller 3.3 - wrong type "number" but has to be "string"

tankerkoenig.0 | warn | Read-only state "tankerkoenig.0.stations.8.e5.feed" has been written without ack-flag with value "0"
tankerkoenig.0 | warn | Read-only state "tankerkoenig.0.stations.8.status" has been written without ack-flag with value ""
tankerkoenig.0 | warn | Read-only state "tankerkoenig.0.stations.7.diesel.3rd" has been written without ack-flag with value "0"
tankerkoenig.0 | warn | State value to set for "tankerkoenig.0.stations.7.diesel.short" has wrong type "number" but has to be "string"
tankerkoenig.0 |warn | Read-only state "tankerkoenig.0.stations.7.diesel.combined" has been written without ack-flag with value ""
ioBroker/ioBroker.js-controller#1299

JSON wird in Widget nicht angezeigt (evtl. Array nicht definiert?)

Ich möchte die Tabelle mit dem JSON-Widget in VIS darstellen, es wird aber nichts angezeigt. Im Datenpunkt liegen die Daten in folgendem Format:
{"ok":true,"license":"CC BY 4.0 - https:\/\/creativecommons.tankerkoenig.de","data":"MTS-K","prices":{"6d38e242-65c7-4f07-9ed9-73e58796ce50":{"status":"open","e5":1.429,"e10":1.409,"diesel":1.299},"af93b17c-8eba-4245-84dd-9feb83032ab5":{"status":"open","e5":1.439,"e10":1.419,"diesel":1.319},"3eddd11c-8b0a-4075-8509-de79becbf9d3":{"status":"open","e5":1.379,"e10":1.359,"diesel":1.259},"00060788-0004-4444-8888-acdc00000004":{"status":"open","e5":1.364,"e10":1.344,"diesel":1.224},"51d4b4a6-a095-1aa0-e100-80009459e03a":{"status":"open","e5":1.329,"e10":1.309,"diesel":1.179},"51d4b4d3-a095-1aa0-e100-80009459e03a":{"status":"open","e5":1.409,"e10":1.389,"diesel":1.279}}
Der Standardtext im Widget gibt folgende Struktur vor:
[{"Title": "first", "Value": 1, "_Description": "Value1"}, {"Title": "second", "Value": 2, "_Description": "Value2"}]
Die komplette Ausgabe ist mit eckigen Klammern umschlossen. Wie ist das zu beheben?

Please add your adapter to ioBroker.discovery

I am an automatic service from ioBroker that searches adapters and makes suggestions.

I noticed that your adapter is not integrated in the ioBroker.discovery. Using the Discovery adapter, ioBroker can automatically find devices or suggest services to the user for installation. If possible I would live to see your adapter added there.

Some adapters have already been added and you can use them as blueprints. See: https://github.com/ioBroker/ioBroker.discovery You need to fork this project and then create a PR for your adapter to be added.

Basically the plugins can do HTTP calls, UDP discovery, MDNS, UPNP and will iterate over all devices found by IP scan and check local serial ports. If you want you can also add new discovery methods but please try to do that with at least dependencies as possible.

Then create one file under lib/adapters for your adapter to implement the detection and proposal of an instance to the user.

On questions, the other developers will support in the forum or via GitHub issues too.

If no detection is possible, simply close this issue and I won't bother you again. ;-)

Thanks,
your automatic adapter checker.

P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

Error message "instance system.adapter.tankerkoenig.0 terminated with code 156 (156)"

This happens by starting the adapter.

2020-03-29 18:09:03.890 - debug: tankerkoenig.0 (8417) Einstellung/Eintrag Nr. 8 ist leer 2020-03-29 18:09:03.890 - debug: tankerkoenig.0 (8417) Einstellung/Eintrag Nr. 7 ist leer 2020-03-29 18:09:03.890 - debug: tankerkoenig.0 (8417) Einstellung/Eintrag Nr. 6 ist leer 2020-03-29 18:09:03.889 - debug: tankerkoenig.0 (8417) Einstellung/Eintrag Nr. 9 ist leer 2020-03-29 18:09:03.791 - info: tankerkoenig.0 (8417) Reading data from tankerkoenig ... 2020-03-29 18:09:03.783 - debug: tankerkoenig.0 (8417) API Key Länge: 36 Zeichen 2020-03-29 18:09:03.782 - info: tankerkoenig.0 (8417) Sync time set to 5 minutes or 300000 ms 2020-03-29 18:09:03.782 - debug: tankerkoenig.0 (8417) Option is true 2020-03-29 18:09:03.777 - debug: tankerkoenig.0 (8417) Schedule restart: * * * * * 2020-03-29 18:09:03.750 - info: tankerkoenig.0 (8417) starting. Version 2.0.6 in /opt/iobroker/node_modules/iobroker.tankerkoenig, node: v10.19.0 2020-03-29 18:09:02.396 - debug: tankerkoenig.0 (8417) statesDB connected 2020-03-29 18:09:02.396 - debug: tankerkoenig.0 (8417) States connected to redis: 127.0.0.1:9000 2020-03-29 18:09:02.391 - debug: tankerkoenig.0 (8417) States create User PubSub Client 2020-03-29 18:09:02.391 - debug: tankerkoenig.0 (8417) States create System PubSub Client 2020-03-29 18:09:02.388 - debug: tankerkoenig.0 (8417) Redis States: Use Redis connection: 127.0.0.1:9000 2020-03-29 18:09:02.387 - debug: tankerkoenig.0 (8417) objectDB connected 2020-03-29 18:09:02.384 - debug: tankerkoenig.0 (8417) Objects connected to redis: 127.0.0.1:9001 2020-03-29 18:09:02.378 - debug: tankerkoenig.0 (8417) Objects create User PubSub Client 2020-03-29 18:09:02.378 - debug: tankerkoenig.0 (8417) Objects create System PubSub Client 2020-03-29 18:09:02.378 - debug: tankerkoenig.0 (8417) Objects client initialize lua scripts 2020-03-29 18:09:02.377 - debug: tankerkoenig.0 (8417) Objects client ready ... initialize now 2020-03-29 18:09:02.365 - debug: tankerkoenig.0 (8417) Redis Objects: Use Redis connection: 127.0.0.1:9001 2020-03-29 18:09:02.032 - info: host.iobroker instance system.adapter.tankerkoenig.0 started with pid 8417 2020-03-29 18:09:01.021 - info: host.iobroker Restart adapter system.adapter.tankerkoenig.0 because enabled 2020-03-29 18:09:01.021 - error: host.iobroker instance system.adapter.tankerkoenig.0 terminated with code 156 (156) 2020-03-29 18:09:00.509 - info: tankerkoenig.0 (8399) Terminated (START_IMMEDIATELY_AFTER_STOP): Without reason 2020-03-29 18:09:00.508 - info: tankerkoenig.0 (8399) terminating 2020-03-29 18:09:00.004 - info: tankerkoenig.0 (8399) Scheduled restart. 2020-03-29 18:08:44.070 - debug: tankerkoenig.0 (8399) Einstellung/Eintrag Nr. 6 ist leer 2020-03-29 18:08:44.069 - debug: tankerkoenig.0 (8399) Einstellung/Eintrag Nr. 9 ist leer 2020-03-29 18:08:44.069 - debug: tankerkoenig.0 (8399) Einstellung/Eintrag Nr. 8 ist leer 2020-03-29 18:08:44.069 - debug: tankerkoenig.0 (8399) Einstellung/Eintrag Nr. 7 ist leer 2020-03-29 18:08:43.981 - info: tankerkoenig.0 (8399) Reading data from tankerkoenig ... 2020-03-29 18:08:43.972 - info: tankerkoenig.0 (8399) Sync time set to 5 minutes or 300000 ms 2020-03-29 18:08:43.972 - debug: tankerkoenig.0 (8399) Option is true 2020-03-29 18:08:43.972 - debug: tankerkoenig.0 (8399) API Key Länge: 36 Zeichen 2020-03-29 18:08:43.967 - debug: tankerkoenig.0 (8399) Schedule restart: * * * * * 2020-03-29 18:08:43.940 - info: tankerkoenig.0 (8399) starting. Version 2.0.6 in /opt/iobroker/node_modules/iobroker.tankerkoenig, node: v10.19.0

Read-only state written without ack-flag and State value has wrong type (js-controller 3.3.x)

js-controller: 3.3.1
Admin 5.0.11
Tankerkönig Spritpreise: 2.0.10

Using new js-controller 3.3.1 will throw the following warnings:

This is just an extract from the log file. There are more states which are affected

tankerkoenig.0 (431) Read-only state "tankerkoenig.0.stations.8.e10.feed" has been written without ack-flag with value "0"
tankerkoenig.0 (431) Read-only state "tankerkoenig.0.stations.8.e10.short" has been written without ack-flag with value "0"
tankerkoenig.0 (431) Read-only state "tankerkoenig.0.stations.8.e5.3rd" has been written without ack-flag with value "0"
tankerkoenig.0 (431) Read-only state "tankerkoenig.0.stations.8.e5.combined" has been written without ack-flag with value ""
tankerkoenig.0 (431) Read-only state "tankerkoenig.0.stations.8.e5.feed" has been written without ack-flag with value "0"
tankerkoenig.0 (431) Read-only state "tankerkoenig.0.stations.8.e5.short" has been written without ack-flag with value "0"
tankerkoenig.0 (431) Read-only state "tankerkoenig.0.stations.8.status" has been written without ack-flag with value ""
tankerkoenig.0 (431) Read-only state "tankerkoenig.0.stations.9.diesel.3rd" has been written without ack-flag with value "0"
tankerkoenig.0 (431) Read-only state "tankerkoenig.0.stations.9.diesel.combined" has been written without ack-flag with value ""
tankerkoenig.0 (431) Read-only state "tankerkoenig.0.stations.9.diesel.feed" has been written without ack-flag with value "0"
tankerkoenig.0 (431) Read-only state "tankerkoenig.0.stations.9.diesel.short" has been written without ack-flag with value "0"
tankerkoenig.0 (431) Read-only state "tankerkoenig.0.stations.9.e10.3rd" has been written without ack-flag with value "0"
tankerkoenig.0 (431) Read-only state "tankerkoenig.0.stations.9.e10.combined" has been written without ack-flag with value ""
tankerkoenig.0 (431) Read-only state "tankerkoenig.0.stations.9.e10.feed" has been written without ack-flag with value "0"
tankerkoenig.0 (431) Read-only state "tankerkoenig.0.stations.9.e10.short" has been written without ack-flag with value "0"

and

tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.2.diesel.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.2.e10.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.2.e5.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.3.diesel.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.3.e10.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.3.e5.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.4.diesel.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.4.e10.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.4.e5.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.5.diesel.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.5.e10.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.5.e5.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.6.diesel.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.6.e10.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.6.e5.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.7.diesel.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.7.e10.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.7.e5.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.8.diesel.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.8.e10.short" has wrong type "number" but has to be "string"
tankerkoenig.0 (431) State value to set for "tankerkoenig.0.stations.8.e5.short" has wrong type "number" but has to be "string"

Wert in 'short' nicht richtig

Das Feld 'short' wird anscheinend für station und cheapest anders berechnet.
Bei den stations wird anscheinend die 3. Nachkommastelle abgeschnitten, bei cheapest aufgerundet.

Beispiel für station:
bei 'feed' -> 1.079
bei 'short' -> 1.07

in cheapest steht in dem Feld 'short' bei der gleichen Tankstelle dann 1.08
laut Feldbeschreibung ist dies falsch, da short nicht gerundet wird

Öffnungszeiten der Tankstellen einbauen

Wie ich gesehen habe, bietet die API auch an, die Öffnungszeiten der Tankstellen abzurufen. Schön wäre es, diese Information auch über den Adapter im ioBroker zur Verfügung zu haben.
Dabei muss die Abfrage der Daten ja nicht so oft stattfinden, wie die Aktualisierung der Preise.

Compatibility check to js-controller 3.3 and Admin5 React UI

Dear Adapter developer,

with js-controller 3.2 and js-controller 3.3 some additional checks were added to make sure that created objects match to the specifications and also written state values match to the object definition.

If something is not correct this is logged as 'warning' or 'info' log.

Please take the time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn log there from these checks please adjust the adapter and fix the relevant cases.

For questions please refer to ioBroker/ioBroker.js-controller#1301

Additionally we are preparing Admin 5 which will have a completely rewritten UI. Please install Admin 5, activate that new UI and verify that the configuration of you adapter works as expected also there.

More informations on Admin 5 can be found in Forum https://forum.iobroker.net/topic/44282/test-adapter-admin-5-0-x-alpha-der-neuen-ui

Please close the issue after you checked it.

Thank you very much for your support!

Fehlermeldung Objekttyp existiert nicht

Hallo,

ich habe gerade den Adapter installiert und eingerichtet.

Beim Start des Adapters erhalte ich folgende Warnmeldung:
tankerkoenig.0 | 2021-12-18 18:06:52.224 | warn | This object will not be created in future versions. Please report this to the developer. tankerkoenig.0 | 2021-12-18 18:06:52.223 | warn | Object tankerkoenig.0.tank is invalid: obj.type has to exist

Was ist denn mit der Variable geplant? Kann ich die ggf. löschen?
Wäre ja schön, wenn man den bevorzugten Sprittyp angeben kann und der Adapter gibt auf den Sprittyp bezogen den 1. , 2. und 3. Platz zurück.

Compatibility check to js-controller 4.0

Dear Adapter developer,

with js-controller 4.0 object definitions are now also checked that min/max in only provided for number/mixed objects and that the type of the default value matches to the object type.

If something is not correct this is logged as 'warning' or 'info' log.

Please also make sure to update to the lastest @iobroker/testing dependency 2.5.4 or to accept the PR from Apollon77 for legacy testing!

Please spent some time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn or info log there from these checks please adjust the adapter and fix the relevant cases.

For questions please refer to ioBroker/ioBroker.js-controller#1749

Please close the issue after you checked it.

Thank you very much for your support to get the best experience for the growing numbers of ioBroker users!

Spritpreise einlesen schlägt fehl

Hallo
Bei mir kommt immer der Fehler
27159) Spritpreise einlesen (gezielte Stationen via ID) - Fehler: Error: getaddrinfo EAI_AGAIN creativecommons.tankerkoenig.de creativecommons.tankerkoenig.de:443
egal welche Tankstelle ich eingebe,
bei einem anderen iobroker projekt (Freund) funktioniert es
habe die Instance schon gelöscht und neu installiert, egal welche Version ich nehme (V2.0.5 oder v2.0.9)
habe auch schon eine API-Key von einem Freund genutzt bei dem es funktioniert

im log (/opt/iobroker/log/iobroker.current.log) steht auch nicht mehr.
wenn ich den API-Key und die Tankstellen id im Browser eingebe kommen plausible daten

https://creativecommons.tankerkoenig.de/json/detail.php?apikey=xxxxxxxxx-yyyyy-7ab0-92c1-18f71e80f640&id=32c47dff-4bf0-4f51-928a-8e113c28608a
Ergebnis
{"ok":true,"license":"CC BY 4.0 - https:\/\/creativecommons.tankerkoenig.de","data":"MTS-K","status":"ok","station":{"id":"32c47dff-4bf0-4f51-928a-8e113c28608a","name":"Tank Plus Tankstelle","brand":"Tank Plus","street":"Nordgaustra\u00dfe","houseNumber":"36","postCode":93059,"place":"Regensburg","openingTimes":[],"overrides":[],"wholeDay":true,"isOpen":true,"e5":1.219,"e10":1.169,"diesel":1.009,"lat":49.037666,"lng":12.104853,"state":null}}

sollte also nicht am PAI oder Tankstellen-ID liegen

meine Machine:
Platform: linux
Betriebssystem: linux
Architektur: x64
CPUs: 4
Geschwindigkeit: 2586 MHz
Modell: Intel(R) Pentium(R) Silver N5000 CPU @ 1.10GHz
RAM: 7.17 GB
System Betriebszeit: 5 T. 21:02:29
Node.js: v10.16.3 (Es gibt eine neuere Version: v10.23.0 - Empfohlene Version v12.19.0)
NPM: 6.9.0
Festplatte Größe: 7.81 GB
Festplatte frei: 4.04 GB
Anzahl der Adapter: 309
Betriebszeit: 5 T. 21: 01:19
Aktive Instanzen: 20
Hostname: iobroker

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.