It did help! I only need reminders the night before since they come by very early in the morning so day of reminders would be too late already. Took your piston, added my 3rd pickup and retooled the formulas to look 1x day forward. Ran and worked great last night, just need to verify that it can look forward 1x day to a holiday based off your URL.
Garbage Collection Reminder
I’m a noob here. Can someone help me refactor this such that it follows my trash pickup? I have pickup of trash one week, and the following week it’s trash + recycling, the following week its trash only.
Thanks a ton.
Might be easier to break it up into 2x pistons, 1x for weekly, the other for bi-weekly. What are the day’s of the week that these pickups happen?
Actually, probably easiest to just add a Boolean variable and toggle it each week when the notification is sent. So week 1 it is false and only the trash reminder is sent and the variable is changed to true. The next week it is true so both notifications are sent and then it is changed back to false. Etc.
Try this. Rushed through it but looks like it would work for you. Few things to do on your end;
- Import the piston using the backup code.
- In the variables in the top of the piston update your region code to whatever state you are in. Mine is fl.
- Set the last boolean variable in the top list whether this is trash only week or trash and recycle week. The catch is that you would have to set this before Wednesday. If you are setting this up past Wednesday and trash only has already happened you want to set the boolean value to false so its ready for next week’s trash and recycle.
- In the bottom it will send push notifications and/or speak all based on location modes. Adjust these as needed bu you will have to do it in both sections for trash only and trash plus recycle weeks. You might not want location mode restrictions or have speaking devices. If so you can remove those individual sections. But leave anything else so that it doesn’t loose functionality.
EDIT: corrected green piston based on errors found in below posts
There is an error here:
“Reminder: tomorrow it’s " formatDateTime(addDays($now,1),“EEEE”)”: "
if({holidaysObserved} != “”,“No Trash Collection Tomorrow. Holiday: ]” {holidaysObserved},
if({$dayOfWeek} == NightBeforeA, “Trash and Recycling Collection Tomorrow”))
The expression translates to: Reminder: tomorrow it’s Wednesday: Invalid parameters. Expecting if(condition, valueifTrue, valueifFalse)
It looks like lines 89 and 98 need a ', “No collection tomorrow” ’ added so they look like line 63 and 72.
Since its already Wednesday please make sure to set the boolean on line 36 for the correct value now. If today was trash only set it to false since it has already happened, if today was trash and recycle set it for true since thats whats coming up.
Hoping you can help me here. Not sure whats broken but it appears to be defaulting to holiday behavior even though it says holiday is “Regular Day”
Can you post your log from the day that was incorrect? There is a lot of helpful data that should print out down there. Also, comparing that bad log to a successful log can shed a lot of light as well…
Someone took a lot of care creating detailed logs with this piston.
Hello,
not sure that the push notification is working with the new smartthings app, don’t receive any notification
Is there another way to make it work ?
thanks!
Here’s my piston that calculates holidays, with no reliance on a link to an external calendar. It’s been working flawlessly since I translated it in late 2018 from my Tasker routine that did the same thing.
Those are all the holidays that fall on Mondays. What the piston associated with this does is to alert me as to what goes to the curb. So on Sunday night, it will tell me to put the kitchen trash and yard waste (grass cuttings, hedge trimmings etc) to the curb for collection the next day. But MLK, President’s Day, Labor Day etc all fall on a Monday - so there’s no pickup.
So my piston sees that, and a) does not make the automated announcement on that Sunday night or Monday morning… and b) if I ask it, it says “no pickup tomorrow” or “no pickup today”. For (b), it no longer does that since the demise of Echo Speaks. But I may try to do an Alexa routine for that at some point in the next many months.
Ahh yes… Processed in another piston. That was the missing piece.
I like it!
I wish you’d reconsider my webCoRE > Android workaround for text-to-speech.
(It is still working flawlessly 4 years later)
I’m thinking that a Garbage Schedule app for Alexa might be a great thing. The user inputs the items (garbage, yard waste, rubbish, recycling, etc) and indicates what day(s) each is taken. The user also inputs the holidays taken by their pickup agent. Then, on any day, the user can ask “Alexa, what is the next garbage pickup” and she would reply with the day and the items. She could also be configured for a reminder announcement the evening before, and/or the morning of, each pickup.
Edit: it exists! Will have to see which of them works best