Push notification
-
Hi,
Is there an easy way to include push notification option in Rexygen, like using Prowl for IOS?
If this can be done on a single ESP8266 or ESP32, (like you can find here on github) I would assume this also might be able to implement in Rexygen.
Do we need Rexlang block for this?
I would like to send a message when a Digital status is changing.
So if I have 3 pushbuttons, I would like to get a message informing me when it is pressed and which one is pressed.
Any help will be appreciated.Regards,
Peter -
Is the information in this article maybe useable with the python block to achieve sending a Prowl notification?
Or should or can this be used with Rexlang block to achieve the requested push notification?
Regards,
Peter -
Hi Peter,
thanks for your interest. Integrating Prowl notifications to REXYGEN should be straightforward using REST API (function block HTTP2) - see docs: https://www.rexygen.com/doc/ENGLISH/MANUALS/BRef/HTTP2.html#x263-26200015
There are also some examples which illustrate how to use HTTP2 function block. See examples directory 0302 IoT Integrations.
Let me know if you require any help.
Regards,
Tomas -
Thanks Tomáš for making me aware of the existing examples.
I will check the examples and come back to you if I am facing any problems.Best regards,
Peter -
Hi Tomas,
I used the example "Pushbullet" as example as that is factually the same concept as Prowl (for IOS), but than dedicated for Android.
Changed the Username field for my Prowl API key and the URL to the URL for Prowl,
But unfortunately I'm getting error message, "Missing field: API key is required" and I cannot figure out where it goes wrong.
.
Is there anything that I have overseen maybe??
Hope you can be of some help to resolve this.Regards,
Peter -
Hi Peter,
the issue is that the Prowl API key need to be stated as query parameter not as a "user" parameter. Try to add the API key string to "urldata" input of HTTP2 function block in following format:
?apikey=YOUR_PROWL_API_KEY
Note: if you want to add more parameters, use "&"
Let me know if it helped.
Regards,
Tomas -
Hi Tomas,
Thanks for your feedback on this subject.
Unfortunately it still did not resolve the issue.
The description of the HTTP2 block is also a bit unclear to me.
Where is the postdata, urldata and header input information been used?I tried several things in the parameter “url” of the HTTP2 block, with and without additional parameters after the apikey, but also and with and without the url string as posted above in front of the apikey.
Unfortunately all without succes.
I will try more and if successful I will post it here of course.If anyone is meanwhile successful using this Prowl free push notification service for IOS, please post your approach here please.
Best regards
Peter -
With help from Tomas I succeeded to get it working. Thanks Tomas for your help!
Please find the details in the screenshots below and see how it appears on the iPhone.Please note: you cannot use a direct"space character" and some other special characters in the CNS blocks for the "application", "event" and "description" otherwise the HPPT2 block will generate an error message.
Use an underscore "" to make it working, but you can also create a space character by using "%20" instead of ""!The properties of the CONCAT block.
And the properties of the HTTP2 block.
And finally this is what you will get on the iPhone when you trigger the HPPT2 block.
Regards,
Peter -
I created a "ProwlPushMessage" block (SubSystem) where all properties can be set easily.
Implemented the conversion from a "space" character towards "%20" in order to get the correct code for the message.So this system is ready to be used, only fill in your own APIkey and press the button to send a message to your iPhone.
Please find the project attached.
prowl_exec.mdl
prowl_task.mdl
This is how it looks.