Bin / Waste Collection

Thanks i managed it now

Or…

Hopefully I can get it in for 0.97

2 Likes

Interactive scrape of a rest protocol would be nice. With auth options.

Maybe even a scrape version.

My scrape returns:
Next Collection Day Friday, 16 August 2019
Can someone help me out to trim this with a template? I’d like to have only the date, in this case: 16 August 2019
My sensor looks like this:

    resource: http://www.wastenet.org.nz/RecycleRubbish/WasteCollectionSearch.aspx?view=2&id=162120
    name: Recycling
    select: "div.wasteSearchResults.recycling > div:nth-child(4)"

Thanks.

The new twentemilieu integration looks cool. As it uses the wasteapi, how about creating a generic integration which supports more than only twentemilieu? I live in a ‘Area reiniging’ area, which also uses wasteapi. I have a custom component up and running for it for more than a year, but i’m looking at contributing it to the homeassistant project. Duplicating big parts of the code feels bad.

Hi mate.
Since I have moved house (still within the council area) I cant get any data for my bins even though its available.

I have just changed the number at the end and tested it in a web browser and it works fine. Should I have done anything else in the code?

Below are the errors Im getting…

image

What does the ` mean in the context after grep, can’t find any info on it.

Its a back tick that executes the date command. In this case it works out the date of this Thursday

Thank you, Im trying to learn more about scripting & programming hence the question.

1 Like

Been struggling with Bolton for ages now trying to scrape; can anyone assist?

https://www.bolton.gov.uk/rubbish-recycling/next-bin-collection/1
BL1 4TG as an example postcode

All im seeing is register for email reminders - no info to scrape

Oops, guess the test postcode I gave has no collection.

Try BL2 4HT; the URL never changes is my problem

You need to get you UID from the site - use F12 in Chrome and Preserve Logs

But for that postcode and number 193 Stitch Lane

https://maps.bolton.gov.uk/residents/getdata.aspx?RequestType=RSS&ms=Bolton/Myhouse&group=My%20house%20data|bin_collection_url&format=jsonp&uid=100010930120

This returns a JSON string which could feed a RESTful - Home Assistant

Thanks for that Rob; really appreciate it. Made a bit of progress but the strings it returns seem to be non-useable in HA as looking at different postcodes & days I can’t find the meaning.

I think I will have to chalk this up to not being good enough to make it work!

Edit: Just can’t parse the JSON enough now; managed to get proper dates from here https://maps.bolton.gov.uk/residents/getdata.aspx?requesttype=LocalInfo&ms=Bolton/MyHouse&group=My%20house%20data|bin_collections_combined&format=jsonp&uid=100010877913

Hi mate. Sorry to bother you but I dont suppose you know why this has stopped working ?

I moved house but in same council area but neither post code works.

Thanks

Martyn

Sorry about not getting back. I seemed to have missed your first message.

From your first message it looks the site address is incorrect.

Try entering your postcode into the following address

https://www.wakefield.gov.uk/site/where-i-live

Then copy the complete new webpage address into the http request node and see if that works.

Hi, no need to appologise. all help is appreciated.

That didnt work, same errors.

Thanks Martyn


image

Hi mate. Please see previous post, it didn’t tag you in.

Thanks

Martyn

OK. I’ll have a look into this tomorrow morning. I’m currently away from my system so can’t check if mine is working.

1 Like

Thank you. Appreciate your help.

Martyn