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

Collector Omrin no data #435

Open
roan111 opened this issue Dec 22, 2023 · 9 comments
Open

Collector Omrin no data #435

roan111 opened this issue Dec 22, 2023 · 9 comments

Comments

@roan111
Copy link

roan111 commented Dec 22, 2023

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

@pippyn
Copy link
Owner

pippyn commented Dec 22, 2023

What is your config?
Do you have any errors?

@roan111
Copy link
Author

roan111 commented Dec 22, 2023

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?

@pippyn
Copy link
Owner

pippyn commented Dec 22, 2023

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?

@roan111
Copy link
Author

roan111 commented Dec 22, 2023

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

@daniels1989
Copy link

+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
Copy link

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"?

@roan111
Copy link
Author

roan111 commented Dec 28, 2023

@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?

@daniels1989
Copy link

@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
Copy link

@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
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants