Hallo Zusammen!
Nochmal ich bezüglich VISU App -> Version 1.4.2
Spoiler
[image: 1765662749250-info_visu-app-version.jpg]
Ich habe mich nun nochmal mit der Push-Nachricht laut ioT-Adapter Beschreibung versucht.
Mir sind 3 unterschiedliche Verhaltensweisen aufgefallen.
Ist das bei euch auch so?
Mache ich hier etwas falsch?
Kann es eventuell an Einstellungen am Android Handy liegen?
Mein eingegebenes Skript für Fall 1 und Fall 2:
-> Ohne payload: ... buttons
Spoiler
// or just one state (this also allows to use payload -> `actions`, `devices` and `link` property)
// only message is mandatory. All other are optional
// Note that, if you are using `actions`or `devices`, the app needs to handle the notification in the background before showing it
// in some scenarios, e.g. low power or spamming to many notifications the OS may decide to not show the notification at all
setState('iot.0.app.message', JSON.stringify({
message: 'Testnachricht',
title: 'Testtitel',
payload: {
devices: JSON.stringify('Handy-Raphael'), // devices to send the message to, if not given send to all - requires Visu App 1.4.0
openUrl: 'https://www.iobroker.net', // opens a link when clicking on the notification
}
})); // important, that ack=false (default)
Mein eingegebenes Skript für Fall3:
-> Mit payload: ... mit buttons
Spoiler
// or just one state (this also allows to use payload -> `actions`, `devices` and `link` property)
// only message is mandatory. All other are optional
// Note that, if you are using `actions`or `devices`, the app needs to handle the notification in the background before showing it
// in some scenarios, e.g. low power or spamming to many notifications the OS may decide to not show the notification at all
setState('iot.0.app.message', JSON.stringify({
message: 'Testnachricht',
title: 'Testtitel',
payload: {
devices: JSON.stringify('Handy-Raphael'), // devices to send the message to, if not given send to all - requires Visu App 1.4.0
openUrl: 'https://www.iobroker.net', // opens a link when clicking on the notification
actions: JSON.stringify([ // actions to respond to the notification - requires Visu App 1.4.0
{ buttonTitle: 'Yes', identifier: 'home:yes' }, // The app will display the button title and on clicking the identifier will be set to the state `iot.0.app.devices.<deviceName>.actionResponse`
{ buttonTitle: 'No', identifier: 'home:no' }
])
}
})); // important, that ack=false (default)
Fall 1
-> Visu App ist nicht geöffnet (weder im Vorder- noch im Hintergrund)
-> 1 x Push Nachricht kommt an (jedoch nur bei Verwendung Skript ohne payload: ... Teil)
Spoiler
[image: 1765662601339-fall_1-1.jpg] [image: 1765662601350-fall_1-2.jpg]
Fall 2
-> Visu App ist geöffnet (trifft nur zu, wenn App in Hintergrund offen / minimiert)
-> 2 x Push Nachrichten kommen instantan an
-> + 1 x "leere / nicht definierte) Nachricht kommt an, wenn man beide vorigen Nachrichten leert
-> Wenn App im Vordergrund offen / im Vollbild, dann kommt nur eine Nachricht an (wie in Fall 1)
Spoiler
[image: 1765662626859-fall_2-1.jpg] [image: 1765662626870-fall_2-2.jpg] [image: 1765662626881-fall_2-3.jpg]
Fall 3
-> Visu App ist im Vordergrund oder im Hintergrund offen
-> 1 x Nachricht kommt an -> Dies funktioniert dann auch mit dem Payload: ... Button Skript
Spoiler
[image: 1765662716324-fall_3-1.jpg] [image: 1765662716333-fall_3-2.jpg]
EDIT - Ergänzung:
Nachfolgend Visu Android 14 App-Einstellungen
Spoiler
[image: 1765665416434-android-14-app-einstellung-1.jpg] [image: 1765665416450-android-14-app-einstellung-2.jpg] [image: 1765665416467-android-14-app-einstellung-3.jpg] [image: 1765665416478-android-14-app-einstellung-4.jpg] [image: 1765665416494-android-14-app-einstellung-5.jpg]
Ich bin drauf gekommen, dass es unterschiedliches Verhalten gibt, wie man die beiden "Miscellaneous" Einstellungen setzt. (auf Deutsch "Verschiedenes")
Nur 1. aktiv (Ziffer 3 = blau) - Verhalten:
-> App geschlossen -> kein Skript macht eine Pushnachricht
-> App offen im Vordergrund -> beide Skripte machen 1 x Pushnachricht
-> App offen minimiert -> beide Skripte machen 1 x Pushnachricht
Nur 2. aktiv (Ziffer 4 = rot) - Verhalten:
-> App geschlossen -> Skript ohne Button 1 x Pushnachricht (mit Button keine)
-> App offen im Vordergrund -> kein Skript macht eine Pushnachricht
-> App offen minimiert -> Skript ohne Button 1 x Pushnachricht (mit Button keine)
Beide aktiv (Ziffer 3 = blau und Ziffer 4 = rot) - Verhalten:
-> App geschlossen -> Skript ohne Button 1 x Pushnachricht (mit Button keine)
-> App offen im Vordergrund -> beide Skripte machen 1 x Pushnachricht
-> App offen minimiert -> Skript ohne Button 2 x instant gleiche Push + bei leeren 1 x leere Push
-- -- -- -- -- -- -- -- - --> Skript mit Button 1 x Pushnachricht
Ich lerne daraus:
Ich aktiviere am besten erste Benachrichtigungseinstellung + lasse die App immer im Hintergrund laufen.
Dann habe ich beide Möglichen Skripte mit oder ohne Butten sauber laufen mit 1 x Pushnachricht.
Beide aktiv oder nur zweite aktiv hat den Vorteil, dass zumindest Pushnachrichten ohne Buttonfunktion auch bei geschlossener App aufscheinen.
Aber nur zweite Benachrichtigungseinstellung aktiv hat den Nachteil, dass bei offener App keine Push kommt.
Und bei beiden aktiv den Nachteil, dass bei minimierter App Doppel-/Dreifachnachrichten kommen.
Ich glaube, ich habe mir hiermit selbst geholfen.
Ich lasse das mal als Hinweis für alle hier stehen, als Gedankenanstoß, wie es sich verhält.