Garbage Collection Reminder


#73

True or false, depending what week you’re currently in. It will alternate after that.


#74

We have recycling every week


#75

Then just initialize it to true in the code itself. That way it will always be true.


#76

I did and I reported that it didn’t work last week. I’ll wait again for this week and see if it triggers correctly.


#77

At the end of the line 45 it has ‘with type JSON’ but when I put this code in I don’t have that and can not find a way to add it.

Also I am in Aus so can not use SMS and also using Hubitat so can not use push notification. I usually go with IFTTT push notification but how do I set it up for this instance?

EDIT: Never mind, worked it out with some other code to do Pushover.net with out IFTTT. Thank for the piston!


#78

My screenshot is from an older version of webCoRE – if I would create a new screenshot now it would no longer show the with JSON either.

See the following announcement for more details on the change:


#79

Fair enough, thanks for that!


#80

Apparently this isn’t working anymore. Not sure if the GET format is asking in JSON format.

We had a holiday this week and all pickup is for Saturday but the piston returned Friday.


#81

It works just fine for me:
07

It lists Friday but my normal pickup day is Thursday:

(also note that isHoliday is correctly set to true).

Please make sure that you have the holidays listed, correctly spelled, and that both countryCode and regionCode are set correctly.


#82

isHoliday is set false in the boolean

country us
region wa

strange


#83

Hmm - the request does return the correct result:
https://kayaposoft.com/enrico/json/v2.0/?action=getHolidaysForDateRange&fromDate=2-9-2018&toDate=6-9-2018&country=us&region=wa&holidayType=public_holiday


#84

very odd

is there a way to do a fresh check other then a test ?


#85

Not easily since it only check between the current day and the pickup day for holidays. Since we’re past the holiday already, it still wouldn’t find it.


#86

Ok I’ll wait for the next holiday and see what happens


#87

When it says make sure to initialize this variable if it’s recycle week or not, does that mean just set to true or false for what ever week it is currently? As I had it as false for last week (no recycle) but it does not seem to have changed to true for this week.


#88

I just gave it another week to make sure and yeah it does not seem to be changing each week. Can anyone please idiot proof my piston as I am sure I made a mistake somewhere there. This week should be both normal and recycle.


#89

You initialized isRecyclingWeek in the piston. Don’t do that as this will make sure it is always false when the piston starts…


#90

I initialized isRecyclingWeek using int(formatDateTime($now,‘w’))%2==0.
If your recycle gets pickup on even weeks (week 2, 4, 38), set it to == 0
1 for odd weeks (week 1, 3, 37)
You can then remove the line set variable {isRecyclingWeek} = {!isRecyclingWeek}
I think that should work.


#91

Perfect, thanks for that!


#92

@coops8d what url did you use on line 63 for using pushover? Was it https://api.pushover.net/1/messages.json?
Thanks