REXYGEN Community Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Login

    Push notification

    REXYGEN Studio
    2
    9
    703
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      RexPeter
      last edited by

      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

      R 1 Reply Last reply Reply Quote 0
      • R
        RexPeter @RexPeter
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • cechuratC
          cechurat
          last edited by

          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

          R 2 Replies Last reply Reply Quote 0
          • R
            RexPeter @cechurat
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • R
              RexPeter @cechurat
              last edited by RexPeter

              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,
              dead070e-6ad4-4e10-b8fa-2dadadf91d96-image.png
              But unfortunately I'm getting error message, "Missing field: API key is required" and I cannot figure out where it goes wrong.
              619e1942-e0c6-43f9-8f27-a638afcf6b2f-image.png

              ba0e713a-8ede-412b-9304-b62e15e8992f-image.png.

              Is there anything that I have overseen maybe??
              Hope you can be of some help to resolve this.

              Regards,
              Peter

              1 Reply Last reply Reply Quote 0
              • cechuratC
                cechurat
                last edited by

                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

                1 Reply Last reply Reply Quote 0
                • R
                  RexPeter
                  last edited by

                  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

                  1 Reply Last reply Reply Quote 0
                  • R
                    RexPeter
                    last edited by RexPeter

                    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 ""!

                    Prowl_exec_and_task.PNG

                    The properties of the CONCAT block.
                    CONCAT_properties.PNG

                    And the properties of the HTTP2 block.
                    HTTP2_ProwlAPI_Properties.PNG

                    And finally this is what you will get on the iPhone when you trigger the HPPT2 block.

                    Message_on_iPhone.PNG

                    Regards,
                    Peter

                    1 Reply Last reply Reply Quote 0
                    • R
                      RexPeter
                      last edited by

                      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
                      998b3e55-a136-4055-9b09-ccfa7f38c786-image.png

                      This is how it looks.
                      4db243ab-c0d8-4f5d-b534-74a12ac6b81e-image.png

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post

                      This is a community forum for REXYGEN users and fans. Detailed information can be found at REXYGEN homepage.

                      There is also an outdated REXYGEN community forum.

                      Powered by NodeBB.