Home-Assistant-Sensor-Afvalbeheer icon indicating copy to clipboard operation
Home-Assistant-Sensor-Afvalbeheer copied to clipboard

Collector Omrin no data

Open roan111 opened this issue 2 years ago • 9 comments

Hi,

I have added the Omrin collector, but i am not receiving any data.

2023-12-22 12_19_19-Overzicht – Home Assistant – Mozilla Firefox

roan111 avatar Dec 22 '23 11:12 roan111

What is your config? Do you have any errors?

pippyn avatar Dec 22 '23 12:12 pippyn

Config: afbeelding

I can't find any erros in the log. Or I am not looking in the right place, where should any erros be?

roan111 avatar Dec 22 '23 13:12 roan111

Please don't post code/configs as images. I'm not going to type your whole config. Use the code block.

Does the Omrin website work for your address? Did you check if those are the correct fractions? Did you use the print waste type option of this sensor?

pippyn avatar Dec 22 '23 14:12 pippyn

afvalbeheer: wastecollector: Omrin resources: - restafval - gft - papier - pmd postcode: 9977PR streetnumber: 7 suffix: "" # (optional) upcomingsensor: 1 # (optional) dateformat: '%d-%m-%Y' # (optional) dateonly: 0 # (optional) name: "" # (optional) nameprefix: 1 # (optional) builtinicons: 0 # (optional) dutch: 1 # (optional)

Omrin site is working my address. I have checked all the fractions:

afbeelding

roan111 avatar Dec 22 '23 14:12 roan111

+1

Noticed my GFT resource also switched to Unknown status. Restafval container is still showing the upcoming date, but I'm sure when that gets an update it'll also switch to Unknown.

image

afvalbeheer:
  - wastecollector: Omrin
    resources:
      - restafval container
      - gft
    postcode: 9561AA
    streetnumber: 1
    upcomingsensor: 0
    dayofweek: 0
    disableicons: 1

daniels1989 avatar Dec 23 '23 14:12 daniels1989

Update: It's... working again? I restarted Home Assistant to load a config change, and it magically started working again. My guess is that this was a hiccup in Omrin's API.

@roan111 Is it working again for you as well or is it still all "unknown"?

daniels1989 avatar Dec 27 '23 11:12 daniels1989

@daniels1989 is still shows "unkown" I have restart the config as well

afbeelding

@daniels1989

Update: When I use your zip code I do get data in HA. Would you mind testing zip code: 9977PR 1?

roan111 avatar Dec 28 '23 07:12 roan111

@roan111 No luck, unfortunately. I enabled the printwastetypes option for your address and it can't find any waste types. The logs also get a 2023-12-28 13:01:43.475 ERROR (MainThread) [custom_components.afvalbeheer.API] No Waste data found! error message

daniels1989 avatar Dec 28 '23 12:12 daniels1989

@roan111 I'm afraid this is an issue with the API, and not with the Afvalbeheer integration. @pippyn I've noticed the url is https://api-omrin.freed.nl. Is this the official Omrin API or just something another party put together?

I logged the responses I get for both our addresses, this one is yours:

{
  "DebiteurId": 0,
  "Success": false,
  "IsLoggedIn": false,
  "AansluitingID": 0,
  "AddressData": null,
  "CalendarHomeV2": null,
  "CalendarV2": null, #This is used by the integration for data
  "Gemeente": null,
  "PushData": {
    "Tags": null,
    "NotificationsEnabled": false,
    "DayBefore1600": false,
    "DayBefore1900": false,
    "DayBefore2100": false,
    "At0700": false
  },
  "Routes": null,
  "WasteGoodsForm": null,
  "DiftarV2": {
    "Type": 0,
    "OldApi": false,
    "CalenderItems": null,
    "TestGroup": null,
    "ExportDate": null,
    "TipHome": null,
    "ShowTipHome": false,
    "ShowGft": false,
    "DiftarMetKlep": false,
    "ActivatedQrDate": null,
    "EnergieLabels": null
  },
  "TipData": {
    "CalenderItems": null,
    "TipHome": null,
    "ShowTipHome": false
  },
  "WelkeContainers": null,
  "ServerVersion": null,
  "LitterFormAvailable": false,
  "CardFormAvailable": false,
  "ContactFormAvailable": false,
  "DevicetokenAvailable": false,
  "IdealEnabled": true,
  "ContactFormCategories": null,
  "Version": 6,
  "Errors": [
    4 #It seems the API has errors
  ],
  "HasErrors": true,
  "z": null
}

And here's mine, with most data removed to keep it shorter.

{
  "DebiteurId": 65,
  "Success": true,
  "IsLoggedIn": false,
  "AansluitingID": 371227,
  "AddressData": {
    "PostalCode": "9561 AA",
    "HouseNumber": 1,
    "Extension": "",
    "Street": "Viaductstraat",
    "City": "Ter Apel",
    "HasAccounts": true
  },
  "CalendarHomeV2": [
    {
      "Aansluitingid": 371227,
      "Datum": "2023-12-28T00:00:00+01:00",
      "Dagsoort": null,
      "Omschrijving": "Restafval container",
      "Info": "Zet de grijze container op de aangegeven datum voor 7.00 uur aan de weg.",
      "Info2": "",
      "Afroepinzamel": null,
      "Type": 3,
      "Image": "sorti.png",
      "IsVast": false,
      "IsAfroepInzamel": false,
      "WelkAfval": "<p>\r\n\t.</p>\r\n",
      "WelkAfvalAfbeelding": "713f46f2-eb9b-4069-a7e9-0084a7559adb.png",
      "Kleur": "#646468"
    },
    #*snip*
  ],
  "CalendarV2": [
    {
      "Aansluitingid": 371227,
      "Datum": "2023-12-28T00:00:00+01:00",
      "Dagsoort": null,
      "Omschrijving": "Restafval container",
      "Info": "Zet de grijze container op de aangegeven datum voor 7.00 uur aan de weg.",
      "Info2": "",
      "Afroepinzamel": null,
      "Type": 3,
      "Image": "sorti.png",
      "IsVast": false,
      "IsAfroepInzamel": false,
      "WelkAfval": "<p>\r\n\t.</p>\r\n",
      "WelkAfvalAfbeelding": "713f46f2-eb9b-4069-a7e9-0084a7559adb.png",
      "Kleur": "#646468"
    },
    #*snip*
  ],
  "Gemeente": {
    "Id": "8f259a30-0511-401b-b723-264d42b32ecd",
    "Title": "Westerwolde",
    "Debiteur_id": 65,
    "Color": null,
    "ColorDark": null,
    "Grofvuil_tekst": "",
    "Grofvuil": 1,
    "DiftarAvailable": 1,
    "MilieustraatAvailable": false,
    "TipsAvailable": false,
    "ReferenceWeight": 0,
    "ReferenceWeightVast": 0,
    "DiftarTonenActiefVanafJaar": 2023,
    "OldDiftarApi": false,
    "MilieustraatUrl": null,
    "FaqUrl": null,
    "GrofvuilUrl": "https://www.westerwolde.nl/afval",
    "ZwerfvuilUrl": null,
    "ContactUrl": "https://www.westerwolde.nl/klacht-indienen",
    "DiftarMetKlep": true,
    "LogoUrl": "logosgemeentes/westerwolde.png",
    "DiftarCalculationUrlRest": null,
    "DiftarCalculationUrlPapier": null,
    "DiftarCalculationUrlGft": null,
    "ShowDiftarGft": true,
    "_CmsLocation": "5.795975#53.202537"
  },
  "PushData": {
    "Tags": [
      "debiteurnr_65",
      "aansluitnr_371227",
      "93ab3974-a57d-11ee-b695-0242ac130002",
      "postcode_9561AA",
      "postcodehuisnr_9561AA1",
      "alerttijd_16",
      "routecode_654G33",
      "routecode_654R12"
    ],
    "NotificationsEnabled": true,
    "DayBefore1600": true,
    "DayBefore1900": false,
    "DayBefore2100": false,
    "At0700": false
  },
  "Routes": [
    {
      "Postcode": "9561 AA",
      "Routecode": "654G33      ",
      "Afvalstof": "GFT",
      "Route": "GFT Ter Apel Noord West ZL 2022",
      "Gemeente": null,
      "GemeenteCode": null,
      "Datum": "0001-01-01T00:00:00",
      "NotificationTekst": null,
      "DebiteurId": null,
      "Afvalsoort": 1,
      "NotificationToSend": false
    },
    {
      "Postcode": "9561 AA",
      "Routecode": "654R12      ",
      "Afvalstof": "Huisvuil",
      "Route": "Rest Ter Apel Noord West ZL 2022",
      "Gemeente": null,
      "GemeenteCode": null,
      "Datum": "0001-01-01T00:00:00",
      "NotificationTekst": null,
      "DebiteurId": null,
      "Afvalsoort": 0,
      "NotificationToSend": false
    }
  ],
  "WasteGoodsForm": {
    "a": 0,
    "f": null,
    "b": null,
    "c": null,
    "d": null,
    "e": null,
    "g": null,
    "h": null
  },
  "DiftarV2": {
    "Type": 2,
    "OldApi": false,
    "CalenderItems": null,
    "TestGroup": null,
    "ExportDate": null,
    "TipHome": null,
    "ShowTipHome": false,
    "ShowGft": false,
    "DiftarMetKlep": false,
    "ActivatedQrDate": null,
    "EnergieLabels": null
  },
  "TipData": {
    "CalenderItems": null,
    "TipHome": null,
    "ShowTipHome": false
  },
  "WelkeContainers": [],
  "ServerVersion": "0.1.30145.8754 ",
  "LitterFormAvailable": false,
  "CardFormAvailable": false,
  "ContactFormAvailable": true,
  "DevicetokenAvailable": false,
  "IdealEnabled": true,
  "ContactFormCategories": [
    "Mijn vraag staat er niet tussen",
    "Verzamelcontainer is kapot of vol",
    "Restafvalcontainer niet geleegd",
    "gft container niet geleegd",
    "Vraag over Afvalapp"
  ],
  "Version": 6,
  "Errors": [],
  "HasErrors": false,
  "z": null
}

daniels1989 avatar Dec 28 '23 12:12 daniels1989