Closed MedicoreV8 closed 2 years ago
extra info: I do have a zone configured around my home. the zone is called "Thuis" because I'm Dutch. not sure if that matters?
Also: I did add one gas station on purpose to see if that would work. Doesn't pull any data though (not sure what status code 500 means)
First: this person probably does not exist on you ha instance: state_attr("person.skons This is in your automations, change this to the person ore zone from which you want the nearest gas station.
second: does gas station 4059 exist? (I cannot check that right now)
third: where did you get the rest sensor from? I cannot find it in the current documentation. That is the way it was done, but does not work anymore. It can be removed
last: can you enable debug logging? Redact passwords when pasting here, but it will contain hopefully more information in regards to your issues.
error 500 means internal server error and comes from directlease. Probably the input is not correct and means that your input is not correct. The addon can have better error handling which could point you to the real problem. I can take a look into that.
I have changed state_attr from person.skons to person.[username] (hope that is correct)
Yes, 4059 exists,
I got the rest sensor from a closed issue as I was hoping to find other people with the same problem. Didn't know it was deprecated, did cross my mind though.
Debug logging enabled, will report back in 5 minutes
I don't think the automation has been triggered just yet. Here is the output of the log
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...
-----------------------------------------------------------
Add-on: Dutch gas prices
Get gas prices from dutch gas stations
-----------------------------------------------------------
Add-on version: 2022.1.2.1
You are running the latest version of this add-on.
System: Home Assistant OS 7.4 (armv7 / raspberrypi4)
Home Assistant Core: 2022.2.6
Home Assistant Supervisor: 2022.01.1
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
Log level is set to DEBUG
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[20:45:06] DEBUG: Requested API resource: http://supervisor/services/mqtt
[20:45:06] DEBUG: Request method: GET
[20:45:06] DEBUG: Request data: {}
[20:45:06] DEBUG: API HTTP Response code: 200
[20:45:06] DEBUG: API Response: {"result": "ok", "data": {"host": "core-mosquitto", "port": 1883, "ssl": false, "protocol": "3.1.1", "username": "addons", "password": "[Redacted]", "addon": "core_mosquitto"}}
[20:45:07] INFO: Log_level: debug
[20:45:07] INFO: mqtt_host: core-mosquitto
[20:45:07] INFO: mqtt_port: 1883
[20:45:07] DEBUG: mqtt_username: homeassistant
[20:45:07] DEBUG: mqtt_password: [Redacted]
[20:45:07] INFO: Starting dutch gas prices...
[2022-02-14 20:45:08] INFO : DGP initialized, launching client
[2022-02-14 20:45:08] INFO : Connecting mqtt
[2022-02-14 20:45:08] INFO : Connected with result code 0
You are aware of the fact, that after a restart of HA it always takes 10-20 minutes, before some results are showed? So with other words, are you waiting long enough before you think, it does no work?
It always generates some errors after a fresh start and results arrive within 20 minutes ;-)
The first time I have waited a couple of hours. Right now, i have been waiting 15 minutes and counting. Will check back in 45 minutes
It seems to return data now. This is the tail of the log https://pastebin.com/ZgVQ3MGe
I am however also seeing errors in my regular hass log: https://pastebin.com/pfdSmit5
You can run the actions of an automation by hand. By default it runs 5 minute paar the hole hour (check the automation you used 😉). If you want it different, you can change it 😊
I am also getting some results on my lovelace dashboard with the default entities
However, I have no way of telling which fuel pumps that is.
in the first part of your automation you are missing this thing about the friendly name.
see my working code:
action:
- service: mqtt.publish
data:
topic: dgp/gas_stations
payload_template: >-
{"fuel_type":"euro98","radius":5,"latitude":{{
state_attr("person.mischa", "latitude") }},"longitude":{{
state_attr("person.mischa", "longitude")
}},"friendly_name_template":"[brand] ([station_street])",
"to_publish":10}
It seems to return data now. This is the tail of the log https://pastebin.com/ZgVQ3MGe
I am however also seeing errors in my regular hass log: https://pastebin.com/pfdSmit5
Not all errors seem to be related though this isn’t correct amersfoortsestraat13(n23°_eur And sensor.gas_station_daam_fockemalaan18(n22_euro95.
i think this is an ocr error. I will look into that
You are getting results though. As you said, no way of knowing what is what. To solve this, read the manual on how to create a friendly name
The dynamic discovery works with the friendly name template. Only thing left to resolve is the ocr error.
Ok, cool. And some documentation updates and error handling stuff
I can't seem to get this to work and the manual isn't really that obvious for me either, I checked the closed issues to see if that could point me into the right direction but it didn't in the end. (for example: https://github.com/Skons/hassio-addons/issues/1)
Anyway, I installed the MQTT Broker and that is running too.
My config
configuration.yaml
automations.yaml
The Log:
I tried to follow the manual but It's not really clear to me what I'm doing wrong here.