OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) How To: Push notifications for OpenSprinkler Reply To: How To: Push notifications for OpenSprinkler



Thanks for adding the code in. You code was just what I was looking for.

Here are a couple of additions I thought about adding, but didn’t want my code to deviate too much. Maybe add this to the wish list:

1 – Allow the station number to be appended into the IFTTT event name (like is done with the event message.) i.e.’EventName{}’ –> ‘EventName1’, ‘EventName2’, … This would allow different IFTTT actions for different stations. I already tested it, and it does work. Just not sure best way to integrate with existing code.

2 – Retrieve the station names and use them in the event message. Retrieving the names was straight forward, but passing them to the push code was more code deviation. Would be nice to have different replace symbols in the event message to allow different information to be inserted, maybe using regular expression matching and replacement. ( {0} is replaced by station number, {1} is replaced by station name, …) I wrote something, but it is a bit of a hack, as I don’t have much Python experience.

3 – Turn notifications on for only some stations, some actions. My stations are grouped, so that the same stations always run in sequence. I only care when station 1 starts and station 3 ends, and when station 4 starts and station 6 ends. Maybe some kind of data structure in the config that would allow customizing this on a station by station basis. Config data per station would include ‘Push when turns on’ (y/n), ‘Push when turns off’ (y/n), ‘Station name’, ‘IFTTT “value1” format’, ‘IFTTT event name’, …

Just some thoughts for adding to the common code.

Thanks again