Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Push notifications

Ton
2017-11-25
2024-03-01
  • Ton - 2017-11-25

    3S Moderator:
    thanks for sharing this added to CODESYS V3 Raspberry Pi share your devices & libraries & applications
    l viewtopic.php?f=23&t=6247&p=19180#p19663 l

    Push notification to Android/ios/desktop withPusover.
    https://pushover.net/.
    Push notification to your device with title, message, sound and application.
    For $5 (once) you can push 7500 notifications per month.

    With this account you can create notification for applications.
    This application has name, token, icon,.. So you can create a clear structure.
    In this example you see a notification for three applications.

    I use this for over a year and works like a charm.

    I just use some of the possibilities, there a more. See https://pushover.net/api.

    IMG: Pushover.png

    Pushover.projectarchive [109.59 KiB]

     
  • koburg - 2021-02-05

    thank you yes this is working but i can not get it working when using the group key.
    which should just be exchanged with the user key.

    i have this working on many other applications like nodered etc.

     
  • Ton - 2021-02-06

    I think you should change the token.
    There might be a problem with the string you send.
    Maybe you have to encode it with the FUNCTION URLDecoder.

    I use webclient sl now.

    Changes are:

    change:
    HTTPClient: HTTP.HttpClient;
    with
    webClient: WEB_CLIENT.WebClient:= (udiTimeOut:= 50000000, eRequestType:= WEB_CLIENT.REQUEST_TYPE.POST);

    and change:
    sTitle:= CONCAT(STR1:= '&title=', STR2:= title);
    with
    sTitle:= CONCAT(STR1:= '&title=', STR2:= WEB_CLIENT.URL_ENCODE_STRING(pbIn:= ADR(title)));

    and change:
    sMessage:= CONCAT(STR1:= '&message=', STR2:= message);
    with
    sMessage:= CONCAT(STR1:= '&message=', STR2:= WEB_CLIENT.URL_ENCODE_STRING(pbIn:= ADR(message)));

    and call:
    webClient(
    xExecute:= xExecute,
    sURL:= 'https://api.pushover.net/1/messages.json',
    pwsAdditionalHeader:= ,
    pwsPostValue:= ADR(wsPostValue));
    instead off the HTTPClient.

     

Log in to post a comment.