How to send notification with photo to mobile phone

I want to send push notification with an image.
I can already send a simple notification via myopenhab.org (see here)

I read here that myopenhab.org does not support sending an image in the notification
but the Pushover binding does.

So I want to add a Pushover Account Thing but I’m having trouble.
This is what I have done (I already described it here, but I’m repeating for clarity):

  • step1 - Sign-up to pushover service
    In there I see a User Key (u…f96), and email (v...@pomail.net) (see snapshot1)
    I verified that the account is registered by going to https://pushover.net/ (unrelated to oh3) and sending a test notification which appeared in the mobile phone as expected.

  • step2 - added the pushover binding

  • step3 - Add the Pushover Account Thing
    In oh3, to add the pushover Thing (see snapshot2), I’m required to provide:

    • API Token / Key
      Required Your API token / key (APP_TOKEN) to access the Pushover Message API
    • User / Group Key
      Required Your user key or group key (USER_KEY) to which you want to push notifications.

I don’t know what to place in the these 2 required fields. I tried to insert:

  • the API token from OpenHAB to API Token / Key
  • the User Key from the Pushover account to the User / Group Key
    But I’m getting an error: ERROR:CONFIG application token is invalid (see snapshot3)

What should I do to add the New Pushover Account Thing successfully?
Thanks,
Avner

snapshot1 - pushover sign-in page

snapshot2 - Adding New Pushover Account Thing

snapshot3 - error adding a Pushover Account Thing

I ended up using Telegram to send notification with photo to the mobile phone. (I was not able to use the pushover binding).

Here is what I did:
I followed the instructions in here and here to:

  • install the Telegram binding
  • create a new Bot and get the Token
  • create the destination chat
  • get the chatID
  • create a Telegram Bot Thing
    (note, that except the Binding and the Thing, I did not have to create other Telegram related components, e.g. Item or Channel)
  • install Telegram app on the Android mobile phone
  • update the rule to send a Telegram notification with photo
    The rule looks like so:
triggers:
  - id: "1"
    configuration:
      itemName: TestSwitch001
      command: OFF
    type: core.ItemCommandTrigger
conditions: []
actions:
  - inputs: {}
    id: "4"
    configuration:
      type: application/vnd.openhab.dsl.rule
      script: >-2
           val telegramAction = getActions("telegram","telegram:telegramBot:abcdef1234")
           telegramAction.sendTelegramPhoto("/some_image.png",
              "Some image title") 
    type: script.ScriptAction

After doing the changes I was able to trigger an event that sent a notification with photo to my mobile phone.

1 Like

Just for reference, it seems the step that you were missing for pushover, is to register your application to get an api key:
https://pushover.net/apps/build