Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensor state unknown #16

Closed
codebude opened this issue Oct 29, 2023 · 10 comments · Fixed by #17
Closed

Sensor state unknown #16

codebude opened this issue Oct 29, 2023 · 10 comments · Fixed by #17
Labels
bug Something isn't working

Comments

@codebude
Copy link

codebude commented Oct 29, 2023

I configured the component as described, but my sensors show state "Unbekannt" (unknown).
There are not error notifications in HA. Is there a possibility to see some debug logs?

Screenshot_2023-10-29-10-43-59-712_io homeassistant companion android-edit

My config looks like:

- platform: abfallplus
  name: Gelber Sack
  key: e5543a3e190cb8d91c645660ad60965f
  municipality: 3707
  street: 241756
  trash_ids: "695"
  pattern: müll

I assume that my sensor configs are valid, because I just ran parts of your Python Code in visual studio and saw that the ICS file could be downloaded and contains the trash dates.

@Bouni
Copy link
Owner

Bouni commented Nov 28, 2023

Please share your municipality, ideally the URL from where you got the config values.

@dtoenies
Copy link

The same error happens on my side. I request Restmüll, Gelber Sack and Papier. All requests get a value except Papier.
image

Here is my data:

Local waste disposal company: https://www.egst.de/de/abfallabholung/

Configuration:

- platform: abfallplus
  name: Restmuell
  key: e21758b9c711463552fb9c70ac7d4273
  municipality: 2593
  street: 495
  trash_ids: "50,161,53,31,169,50,161,53,31,169"
  pattern: Restm
- platform: abfallplus
  name: Gelber Sack
  key: e21758b9c711463552fb9c70ac7d4273
  municipality: 2593
  street: 495
  trash_ids: "50,161,53,31,169,50,161,53,31,169"
  pattern: Gelber Sack
- platform: abfallplus
  name: Papier
  key: e21758b9c711463552fb9c70ac7d4273
  municipality: 2593
  street: 495
  trash_ids: "50,161,53,31,169,50,161,53,31,169"
  pattern: Papier

API: https://api.abfall.io/?key=e21758b9c711463552fb9c70ac7d4273&modus=d6c5855a62cf32a4dadbc2831f0f295f&waction=auswahl_fraktionen_set

Response of the API:

9ab708b7393b9dbffb0929e78bcc2d81: 4f9a48b43048d722ea03162bd01699d6
f_id_kommune: 2593
f_posts_json[]: a:2:{s:32:"9ab708b7393b9dbffb0929e78bcc2d81";s:32:"4f9a48b43048d722ea03162bd01699d6";s:12:"f_id_kommune";s:4:"2593";}
f_id_bezirk: 492,493
f_posts_json[]: a:4:{s:32:"9ab708b7393b9dbffb0929e78bcc2d81";s:32:"4f9a48b43048d722ea03162bd01699d6";s:12:"f_id_kommune";s:4:"2593";s:12:"f_posts_json";a:0:{}s:11:"f_id_bezirk";s:7:"492,493";}
f_id_strasse: 2593bauernschaften
f_posts_json[]: a:5:{s:32:"9ab708b7393b9dbffb0929e78bcc2d81";s:32:"4f9a48b43048d722ea03162bd01699d6";s:12:"f_id_kommune";s:4:"2593";s:12:"f_posts_json";a:1:{i:0;s:117:"a:2:{s:32:"9ab708b7393b9dbffb0929e78bcc2d81";s:32:"4f9a48b43048d722ea03162bd01699d6";s:12:"f_id_kommune";s:4:"2593";}";}s:11:"f_id_bezirk";s:7:"492,493";s:12:"f_id_strasse";s:18:"2593bauernschaften";}
f_id_strasse_hnr: 495
f_posts_json[]: a:6:{s:32:"9ab708b7393b9dbffb0929e78bcc2d81";s:32:"4f9a48b43048d722ea03162bd01699d6";s:12:"f_id_kommune";s:4:"2593";s:12:"f_posts_json";a:2:{i:0;s:117:"a:2:{s:32:"9ab708b7393b9dbffb0929e78bcc2d81";s:32:"4f9a48b43048d722ea03162bd01699d6";s:12:"f_id_kommune";s:4:"2593";}";i:1;s:176:"a:4:{s:32:"9ab708b7393b9dbffb0929e78bcc2d81";s:32:"4f9a48b43048d722ea03162bd01699d6";s:12:"f_id_kommune";s:4:"2593";s:12:"f_posts_json";a:0:{}s:11:"f_id_bezirk";s:7:"492,493";}";}s:11:"f_id_bezirk";s:7:"492,493";s:12:"f_id_strasse";s:18:"2593bauernschaften";s:16:"f_id_strasse_hnr";s:3:"495";}
f_id_abfalltyp_0: 50
f_id_abfalltyp_1: 161
f_id_abfalltyp_2: 53
f_abfallarten_index_max: 5
f_posts_json[]: a:14:{s:32:"9ab708b7393b9dbffb0929e78bcc2d81";s:32:"4f9a48b43048d722ea03162bd01699d6";s:12:"f_id_kommune";s:4:"2593";s:12:"f_posts_json";a:3:{i:0;s:117:"a:2:{s:32:"9ab708b7393b9dbffb0929e78bcc2d81";s:32:"4f9a48b43048d722ea03162bd01699d6";s:12:"f_id_kommune";s:4:"2593";}";i:1;s:176:"a:4:{s:32:"9ab708b7393b9dbffb0929e78bcc2d81";s:32:"4f9a48b43048d722ea03162bd01699d6";s:12:"f_id_kommune";s:4:"2593";s:12:"f_posts_json";a:0:{}s:11:"f_id_bezirk";s:7:"492,493";}";i:2;s:352:"a:5:{s:32:"9ab708b7393b9dbffb0929e78bcc2d81";s:32:"4f9a48b43048d722ea03162bd01699d6";s:12:"f_id_kommune";s:4:"2593";s:12:"f_posts_json";a:1:{i:0;s:117:"a:2:{s:32:"9ab708b7393b9dbffb0929e78bcc2d81";s:32:"4f9a48b43048d722ea03162bd01699d6";s:12:"f_id_kommune";s:4:"2593";}";}s:11:"f_id_bezirk";s:7:"492,493";s:12:"f_id_strasse";s:18:"2593bauernschaften";}";}s:11:"f_id_bezirk";s:7:"492,493";s:12:"f_id_strasse";s:18:"2593bauernschaften";s:16:"f_id_strasse_hnr";s:3:"495";s:16:"f_id_abfalltyp_0";s:2:"50";s:16:"f_id_abfalltyp_1";s:3:"161";s:16:"f_id_abfalltyp_2";s:2:"53";s:16:"f_id_abfalltyp_3";s:2:"31";s:23:"f_abfallarten_index_max";s:1:"5";s:13:"f_abfallarten";s:16:"50,161,53,31,169";s:10:"f_zeitraum";s:17:"20230101-20231231";s:12:"f_export_als";s:148:"{'action':'https://api.abfall.io/?key=e21758b9c711463552fb9c70ac7d4273&modus=d6c5855a62cf32a4dadbc2831f0f295f&waction=export_pdf','target':'_blank'}";}
f_abfallarten: 50,161,53,31
f_zeitraum: 20230101-20231231
f_export_als: {'action':'https://api.abfall.io/?key=e21758b9c711463552fb9c70ac7d4273&modus=d6c5855a62cf32a4dadbc2831f0f295f&waction=export_pdf','target':'_blank'}

@Bouni
Copy link
Owner

Bouni commented Dec 4, 2023

I think you got the street wrong.

grafik

Altenberge only gives two options for streets, "Innenbereich" -> 491 or "Aussenbereich" -> 492,493

Please try the right value for your street and test again.

@Bouni
Copy link
Owner

Bouni commented Dec 4, 2023

🤦🏽 It's quite a long time since I built this plugin and I forgot a lot since then. I need to check whats actuall yworng as you did everything according to the instructions

@dtoenies
Copy link

dtoenies commented Dec 4, 2023

When I tried to insert "492,493" as street I got the error that an INT is expected. Unfortunately, the individual values do not lead me to success either.

If I leave out the pattern pattern: Papier in the setting for paper, I get values for the Gelber Sack or Restmüll.

@Bouni Bouni added the bug Something isn't working label Dec 4, 2023
@Bouni
Copy link
Owner

Bouni commented Dec 4, 2023

Ok, so I'm rather confident that its some kind of bug with recurring_ical_events

If I filter the event with it, all Papier entrys are gone for some reason.

I investigate this further ...

@Bouni
Copy link
Owner

Bouni commented Dec 4, 2023

So I think I figured it out. The ICS that is downloaded by the integration does only contain the current year!

If I filter the raw ICS I get this as result for Papier events:

Papier
2023-02-10
Papier
2023-04-06
Papier
2023-06-03
Papier
2023-07-28
Papier
2023-09-22
Papier
2023-11-17

So after November 17th you'll get Unbekannt because there's no event in the calendar.

I will see If i can download all calendar files and merge them befor parsing.

@halli77
Copy link

halli77 commented Dec 16, 2023

Hi,
I have the same issue with v0.3.0. Sensors with dates in 2024 are in state "unknown". I checked the ical for my city/street for 2024 (http://abfall-landkreis-waldshut.de), looks good. Reinstalled the abfallplus integration as well, with no effect.
Any ideas?

my config:
sensor:

  • platform: abfallplus
    name: Biotonne
    key: 5b0384147b5bc055c30fee1fb6db6f76
    municipality: 271
    street: 15722
    trash_ids: "51,17,31,43,20"
    pattern: Biotonne
  • platform: abfallplus
    name: Restmüll
    key: 5b0384147b5bc055c30fee1fb6db6f76
    municipality: 271
    street: 15722
    trash_ids: "51,17,31,43,20"
    pattern: Restmüll
  • platform: abfallplus
    name: Gelber Sack
    key: 5b0384147b5bc055c30fee1fb6db6f76
    municipality: 271
    street: 15722
    trash_ids: "51,17,31,43,20"
    pattern: Gelber Sack
  • platform: abfallplus
    name: Blaue Tonne
    key: 5b0384147b5bc055c30fee1fb6db6f76
    municipality: 271
    street: 15722
    trash_ids: "51,17,31,43,20"
    pattern: Blaue Tonne
Bildschirmfoto 2023-12-16 um 18 29 06

@Bouni
Copy link
Owner

Bouni commented Dec 27, 2023

@halli77 I just doublechecked and it seems that Landkreis Waldshut does no longer use Abfall Plus as their provider.
The seem to have hacked together somethng own

grafik

The bae URL even results in a Apache tomcat landing page 🤦🏽

grafik

As Landkreis Waldshut is my Landkreis as well, I think I need to create a new integartion to support that ...

@Bouni
Copy link
Owner

Bouni commented Dec 27, 2023

Its not self hacked but looks pretty shitty built by https://axians-athos.de/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants