Push Notification per Script - Problem

Hallo!

Ich würde gerne per Script eine Push Notification an mein iPhone schicken. Per „Test-Nachricht senden“ funktioniert das auch wunderbar, aber führe ich dieses Befehl per Script aus, kommt eine Fehlermeldung „Instanz #54562 existiert nicht“. Okay, klar, ich finde diese Instanz auch nicht, aber wie löse ich dieses Problem?

Script.JPG

Das ist eigentlich nur die Push Notification im Webfront. Also ID vom WFC rein un d dann siehst du es im Webfront.

und an im Webfront angemeldete Mobil-Geräte
Notification Control — IP-Symcon :: Automatisierungssoftware

Ja, das hatte ich vergessen zu erwähnen: Mit der ID des WFC funktioniert das auch, dann kommt die Message am Handy aber via IPS Client. Ich will aber die Message am IPSView Client haben und das sollte eigentlich auch gehen :frowning: , da ich ja ja mit dem Testbutton auch eine Testmessage verschicken kann!

Für IPSView musst Du NC_PushNotification verwenden, ist sogar dokumentiert :cool:

http://docu.brownson.at/ipsstudio/webhelp/DesignerControlsTypeWidgetMessage.html

Thanx, das war genau was ich gesucht hatte, aber nicht gefunden :banghead:

Hi Brownson,

für die PushNotification gehe ich aber über die Google-Server - dies möchte ich ja gerade nicht.

Gibt es nicht eine Möglichkeit, dass die Funktion

WFC_AudioNotification

, welche auf dem Android-Client tadellos funktioniert auch in IPS-View eingebunden wird?

Ich möchte ungern zu IPSView auf dem Client noch im Hintergrund einen Browser mit dem Symcon Webfront aufmachen müssen, nur um Benachrichtigungen anzusagen…

Ciao
HerbertF

Nein, WFC_AudioNotification funktioniert nur für das WebFront:mad:

und hast Du eine Idee, wie ich sonst Audio-Files (als Ansagen) auf dem Client nur über IPSView abspielen könnte

Ciao
HerbertF

Moin Herbertf,

auf diese Funktion warte ich auch schon sehnlichst und habe sie deshalb auch als Feature Wunsch eingetragen - leider ist das bislang nicht realisiert worden :mad: Dabei wäre es so genial, wenn man auch auf iPads direkt einen Sound abspielen könnte.

Im Moment benutze ich dafür ein HM mp3-Modul was dann komplett überflüssig wäre. Bei dem Ding muss man jeden Sound auf die SD-Karte übertragen was extrem unkomfortabel und unflexibel ist. Von daher ist es wirklich sehr schade, dass diese eigentlich für eine View wichtige Funktion nicht verfügbar ist :wink:

Gruß
Hans

Na dann unterstütze ich den wichtigen Feature-Wunsch hiermit und hoffe, dass Brownson ein einsehen hat ;):wink:

Ciao
HerbertF

#metoo

Eigene Sound oder ansagen zB bei „Waschmaschine fertig“ oder „Es hat geklingelt“ mit Sprache steigern den WAC ungemein!

Gruß Steffan

Hi,

I’m having the same issue as the tread starter with the push notifications to the IPSView app when trying to use script.

$Brann = GetValue(14254);

if ($Brann) {
NC_PushNotification(15480, 'BRANN', 'Brannalarm aktivert i Rogneveien', '', 0);
}

Using the above code I just get:
Instance #15480 does not exist in /var/lib/symcon/scripts/14602.ips.php on line 7

It is working fine when using the same ID #15480 in an event or with the „Test Message“ in notification.

Any idea what could be wrong?

Andreas

Have you checked the logical tree view -> core instances? You want to use the instance ID of the notification instance.

paresy

Now I’m not sure I understand you.

If I use notification to a object ID for a webfront:

//Brannalarm rele aktivert.
$Brann = GetValue(14254);

if ($Brann) {
WFC_PushNotification(22502, 'BRANN', 'Brannalarm aktivert i Rogneveien', '', 0);
}

This works just fine.

But using object ID for my View (Ipsview) does not. As explained the same object ID does work then sending push notification with en Event.

You have to use the NC_PushNotification, first parameter ist the instance of the notification instance and the second parameter is the ID of your view:

eg:


<?

if (NC_PushNotification(40274, /*ID of NotificationInstance*/
                        45434, /*ID of your View */ 
                        'Information', 
                        'a Message to be shown', 
                        '')) {
	echo "NC_PushNotification successfully ...";
} else {
	echo "NC_PushNotification failed ...";
}


?>

Aaah, that’s it.
Thank you very much :smiley: