New notification blocks in OH4.3 (Problem)

Blockly on OH 4.3 release

I just started my Blockly adventure. While testing relevant blocks to replace my Rules DSL step by step, I couldn’t get most of the new notifications block features (e.g. Icon, Tag) working as it was described in the blog.
(“sendNotification” is working with Rules DSL)

Clients:
iPhone 13 mini
iPad 7th Gen

The following script:

… resulted in the following notification:

Are the new “extensions” not working on iOS clients?
Is there any other config needed to get this working?

First of all I have to apologize that the blocks aren’t documented yet. I only noticed a few days ago that I forgot ( I was kind of sure I had done it …).

Regarding iOS I actually tested the Blocks on iOS as well. Can you explain what the problem is? Is it every notification not working or only the custom headers? I don’t understand what issue is you are trying to show with the notification screenshot.

What version of openHAB iOS App?
If it is still V1, those new notification options are not showing up.

iPhone 13 mini: iOS 18.1.1
iPad 7th Gen: iOS 18.1.1

It is V2 I’m using.

Notification setting in iOS for openHAB App:

Not sure, but is there any config that can possible be changed in openHAB cloud to make this work?

We are so grateful that you and all other maintainers are providing such a great openHAB environment. :pray:
No need at all to apologize for anything :wink:

As per config, I’d expect the notification would show Icon, Tag, Media URL and On-Click Action.
However, only Header Title and Message are shown.

2 Likes

Marcus, I found where I “documented” the blocks - even though it is still not in the official docs, this might help you and others in the meantime:

https://github.com/openhab/openhab-webui/pull/2672

Icon is only supported by Android, tag is not shown on iOS (not sure how exactly tag is used on Android) but can still be used to hide notifications.
Media URL and On-Click Action should work however.
Can you please share the full media URL?

Link

Thank you!

When you do the official docs, it would be very helpful to have a table showing compatibility of each functionality with iOS vs. Android.

This is no valid media URL. You need to link to the image file that should be shown, not to the webpage showing the image.

It is a URL to a .png file. What’s wrong with that?

Are Action Buttons supposed to work on iOS?
I can’t get that working either…

It is no URL to a PNG file, it’s a URL to a Wikipedia page showing that image:

You need the link to the actual image:

Success!

Media URL is working now!
Thanks a lot for explaination!

Block config as follows:

On-click Action and Action Buttons are working as well. It needs a “tap hold” on the notification to make all of it visible. Seems I missed that quite important piece of information :upside_down_face:

3 Likes

Update: the blocks are fully documented since a few weeks: Rules Blockly - Notifications | openHAB

1 Like

The Notification block is amazing. I love how you have managed to include so many options in one block.

Perhaps I am missing something, but the linked documentation indicates that the “Send notification to specific cloud email user” block should still be available, but I don’t see it as one of the options under openHAB/Notifications in Blockly in OH 5.0.1. In fact, the instances where I use this block stopped working, I think when I updated from 5.0 to 5.0.1.

I tried to reproduce the functionality using the “to Users” option in the main new block, but I am not receiving any notifications on my iOS devices. (I have 2 separate OH installations, each of which has its own myopenhab cloud logins, and I use the email address for the one that is set up on the iOS openHAB app).

If I leave the user option empty on the linked system, the notifications come through as expected.

System information:

runtimeInfo:
  version: 5.0.1
  buildString: Release Build
locale: en-US
systemInfo:
  configFolder: /etc/openhab
  userdataFolder: /var/lib/openhab
  logFolder: /var/log/openhab
  javaVersion: 21.0.8
  javaVendor: Eclipse Adoptium
  javaVendorVersion: Temurin-21.0.8+9
  osName: Linux
  osVersion: 6.12.25+rpt-rpi-2712
  osArchitecture: aarch64
  availableProcessors: 4
  freeMemory: 339349448
  totalMemory: 805306368
  uptime: 125733
  startLevel: 100
addons:
  - automation-jsscripting
  - binding-amazonechocontrol
  - binding-androidtv
  - binding-astro
  - binding-broadlink
  - binding-denonmarantz
  - binding-ephemeris
  - binding-exec
  - binding-generacmobilelink
  - binding-gpstracker
  - binding-icalendar
  - binding-icloud
  - binding-ipcamera
  - binding-irobot
  - binding-logreader
  - binding-mail
  - binding-matter
  - binding-mqtt
  - binding-network
  - binding-networkupstools
  - binding-ntp
  - binding-openweathermap
  - binding-remoteopenhab
  - binding-ring
  - binding-roku
  - binding-tapocontrol
  - binding-tplinksmarthome
  - binding-tuya
  - binding-zwave
  - misc-homekit
  - misc-openhabcloud
  - persistence-rrd4j
  - transformation-jinja
  - transformation-jsonpath
  - transformation-map
  - transformation-regex
  - ui-basic
  - ui-habpanel
clientInfo:
  device:
    ios: true
    android: false
    androidChrome: false
    desktop: false
    iphone: false
    ipod: false
    ipad: true
    edge: false
    ie: false
    firefox: false
    macos: false
    windows: false
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    os: ios
    osVersion: 18.6.2
    webView: false
    webview: false
    standalone: false
    pixelRatio: 2
    prefersColorScheme: light
  isSecureContext: false
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: N/A
    hardwareConcurrency: 6
    language: en-US
    languages:
      - en-US
    onLine: true
    platform: MacIntel
  screen:
    width: 1024
    height: 1366
    colorDepth: 24
  support:
    touch: true
    pointerEvents: true
    observer: true
    passiveListener: true
    gestures: true
    intersectionObserver: true
  themeOptions:
    dark: light
    filled: true
    pageTransitionAnimation: default
    bars: light
    homeNavbar: default
    homeBackground: default
    expandableCardAnimation: default
    blocklyRenderer: null
  userAgent: Mozilla/5.0 (iPad; CPU OS 18_6_2 like Mac OS X) AppleWebKit/605.1.15
    (KHTML, like Gecko) Brave/1 Mobile/15E148 Safari/604.1
timestamp: 2025-09-01T02:14:47.225Z

Show me the block you created and the code that is generated.

Certainly. Thanks for your help.

ctions.notificationBuilder('test message to xyz').addUserId(...'xyz+abc@gmail.com'.split(',')).send()

This works fine for me:

actions.notificationBuilder(‘message’).addUserId(…‘mail@mymail.com’.split(‘,’)).send()

where mail@mymail.com (this is not the real one of course) is an openhab-cloud user name.

Maybe it is is related to xyz+abz ?

Is xyz+abz@gmail.com the username you use to login at your openhab cloud?

I changed the names before sharing it, but the email I use to log into openHAB cloud does include a “ +”.

Can you add a user to openHAB for test purposes that does not have a + in it and try that one?