Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Free push notification server
Author | Message | ||||
MikeO Senior Member Joined: 11/09/2011 Location: AustraliaPosts: 275 |
For anyone still struggling with using email as the notification system from Geoff's Watering Controller perhaps this may be worth considering. I came across this free service so I thought it may be a perfect solution for the Irrigation system or any time you need to post some info to your phone. Here is the code with some examples, there are lots more message possibilities see the section in the docs in Publishing>Publish via Get.(Thanks to TheMonkeys code, it was great help in accessing the API) The code will run as is to try , just subscribe to <iff2024> from the app on your phone or web app. 'msg$="message=Reboot" 'msg$="message=Rain-watering%20Off" 'msg$="message=Fault-Watering%20Off" msg$="message=Status-All%20OK" ext$="&title=Water%20Irrigation&priority=3&tags=warning" print notify("ntfy.sh",80,"/irr2024/publish?"+msg$+ext$) 'Send push notification to ntfy Function notify(servaddr$,servport,tcpreq$) As string Local return%(64) WEB OPEN TCP CLIENT servaddr$, servport notify$="GET "+tcpreq$+" HTTP/1.1"+Chr$(13)+Chr$(10)+"Host: "+servaddr$+":"+Str$(servport)+Chr$(13)+Chr$(10)+"Connection: keep-alive"+Chr$(13)+Chr$(10)+Chr$(13)+Chr$(10) WEB TCP CLIENT REQUEST notify$, return%() LongString Print return%() WEB CLOSE TCP CLIENT End Function Edited 2024-01-29 07:15 by MikeO Codenquilts |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
Excellent. Thanks Mike. Geoff Geoff Graham - http://geoffg.net |
||||
Print this page |