Closed jellewie closed 1 year ago
This is my first try on this station, and i get this result
[2023-04-17 23:34:07] INFO : Received payload '{"fuel_type":"euro95", "station_id":6323 }' on topic 'dgp/gas_station'
[2023-04-17 23:34:07] DEBUG : station: Station id '6323' new request
[2023-04-17 23:34:07] DEBUG : Starting new HTTPS connection (1): tankservice.app-it-up.com:443
[2023-04-17 23:34:07] DEBUG : https://tankservice.app-it-up.com:443 "GET /Tankservice/v1/places/6323.png HTTP/1.1" 200 None
[2023-04-17 23:34:08] DEBUG : _write_stationdata: draw logo coverup with coordinates x0: '668', y0: '0', x1: '908', '200'
[2023-04-17 23:34:08] DEBUG : _write_stationdata: Enhancing contrast with '2'
[2023-04-17 23:34:12] DEBUG : _write_stationdata: OCR lines detected '['Zonnelaan 389', '9742 BK Groningen', 'Brandstof', 'Euro 95 (E10) €1,85°', 'Diesel (B7) €1,56°', 'V-Power Benzine (E5) € 2,16°', 'V-Power Diesel €1,80°', 'Voorzieningen', 'Winkel', '@ Autowasgelegenheid', 'a Internet beschikbaar', 'Q Aanhangwagenverhuur', 'Openingstijden', 'Maandag t/m vrijdag: 6:00-22:00 uur', 'Zaterdag: 7:00-22:00 uur', 'Zondag: 8:00-22:00 uur', '\x0c']'
[2023-04-17 23:34:12] DEBUG : gas_station: Fuel 'euro95' new request
[2023-04-17 23:34:12] DEBUG : Starting new HTTPS connection (1): tankservice.app-it-up.com:443
[2023-04-17 23:34:12] DEBUG : https://tankservice.app-it-up.com:443 "GET /Tankservice/v1/places?fmt=web&fuel=euro95
If you are requesting a seperate station, it will be published to another sensor as when you are requesting withing a radius. So those two should not bite each other. If a station is requested within a radius and afterwards within 1 hour direct, you get data from the cache. That difference can be seen between your log and mine. But the data is the same.
Can you show me a screenshot of the entity instead of the graph?
thank you for asking, I found the issue. It seems it made a bunch of MQTT entities too But those do not work, the other name you suggested works (and I got this from your screenshot)
Not working created entity: sensor.gas_station_zonnelaan_389_euro95
Working name: sensor.gas_station_6323_euro95
I do not know why it made these not working entities, maybe that part can be looked in to?
I have seen these at my instance, but i cannot reproduce it. I do not yet know what caused them
It seems when you disable them, the other values do not get updated. so they seem to hang together even after creation
I can reproduce this issue, i don't know why it did not seem to work earlier. If you request a station by id, you will always get the entity you showed in your screenshot. This seems to be something within HA, because i never publish to that entity. It is probably created automatically. I will have to look into how HA uses the payload to create entities, i think i have to reconfigure the way the data is published to mqtt.
Just updated to version 2023.4.26.1 which solves your issue. My naming convention was all over the place. Fixed that :). You can delete the unknowns safely, sometimes a reboot is needed
Running an automation with
Which has the logs:
Results in an 'Unknown' sensor value?
A script with a radius does seem to work. but it seems you can't have two of those. They will overwrite each other. so It is not useful in my use case.
Am I doing something wrong with the payload_template config, or is there a small bug somewhere?