Push-Notifications

Hy,
I just needed a quick solution to statisfy the custumers idea to get Push-Notifications on his Cellphone, from a X20CP0483.
After some research i found Pushover (Easys Setup - 5,99€ Lifetime Licence per Client Device 20k Messages / month)
and implemented a couple of Pushmessages with the Https Lib of AS without any big issues.

Maybe somebody was looking for such solution as well.

Best
Michi

6 Likes

Hi @Michael_Rest,

Great!! I really like Pushover because of the lean API and the “buy once use forever” license model.

I implemented the same some years ago to use it inside a private project.
But I didn’t shared it because I couldn’t imagine that anyone else might need it … perhaps I should rethink my sharing strategy. :smiley:

Best regards!

3 Likes

just to be sure, do you mean https://pushover.net/? :slight_smile:

2 Likes

Hy @alexander.hefner ,
same to me - i often think in packing Code like this in a lib and share it,
but there is always lack of time.
That’s why i published the idea here, so i can provide Codefragments to help implement.

Best Michi

2 Likes

rethink your strategy if you have more tips like this. :slight_smile: I really like and will for sure test it and use it :slight_smile:

1 Like

Hi @kovarj,

okay, here it comes :smiley:

The library “TBSWpush” implements direct push messages using the pushover message api (only message api, see Pushover: API):

The zip at the bottom of this post contains a AS4.12 sample project including the library implementation + one task that shows how to setup and execute the call.
No documentation available unfortunately, but at least the description of the function block and structure elements can be found in the corresponding var / typ files.

What you have to do:

  • create a pushover account, get a user key, see: https://pushover.net
  • setup a pushover application with this account
  • install a pushover client on your smartphone / tablet / desktop … (free trial for xxx days, “a few $ for each client installation”)
  • use the pushover application and group or user keys with the library “TBSWpush”

Of course you have to get familiar with pushover, because the library can only provide the message pushing itself.
So read carefully the informations and instructions at https://pushover.net about account and application creation, client registration, subscribing to pushover applications a.s.o.

Happy message pushing :wink:

PushoverSample.zip (95.4 KB)

7 Likes

I used the shared code as it is and many thanks to @alexander.hefner for making it available. It’s a very neat and practical solution that works perfectly. :ok_hand:

I tested this application by providing internet access to the PLC through the existing B&R SRM (Site Manager) device, instead of connecting the PLC directly to the internet, and without changing its local IP configuration.

So, I wanted to contribute to our community and share this as a use case for securely and conveniently enabling internet access to a PLC via the Site Manager.

  1. Open the Site Manager GUI page, then navigate to Device Agents.

  2. Add a new agent with the following details, then click the Parameter Details button:
    Device Type: CUSTOM (Advanced) + Routing (SCADA)

  3. You can set Device Name as Internet Access.
    Then, in the Scada Address 1 field, enter the IP address of the PLC that has been added as a separate agent in the Site Manager and to which you want to provide internet access. (in my application it is 192.168.5.20 as you can see)
    Finally, don’t forget to activate Enable UPLINK Source Translation.

    SAVE…

  4. In this step, we will configure the default gateway and DNS settings on the B&R controller.
    The Site Manager Dev Port IP address should be set as the B&R controller’s default gateway. For the DNS configuration, use Google’s DNS servers: 8.8.8.8 and 8.8.4.4.

    Compile and transfer the project to PLC.

After applying these settings, I was able to successfully send notifications.

Enjoy! :slight_smile:

3 Likes

Hi @kanmazi

many thanks for that howto, great!

Best regards!