True or false, depending what week you’re currently in. It will alternate after that.
Garbage Collection Reminder
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.
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!
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:
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.
It works just fine for me:
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.
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®ion=wa&holidayType=public_holiday
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.
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.
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.
You initialized isRecyclingWeek
in the piston. Don’t do that as this will make sure it is always false when the piston starts…
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.
@coops8d what url did you use on line 63 for using pushover? Was it https://api.pushover.net/1/messages.json?
Thanks