Hello all,
I am trying to send notifications to the domotic lite app, preferably to one specific mobile device.
The test messages are working OK, both in the mobile device panel as in the notification tab under settings.
As I understand the format of the Lua command should be
commandArray['SendNotification']='subject#body#extraData#priority#sound#subsystem'.
I have tried various ways. As I understand the subsystem needs to be gcm.
But I havent been able to send a message to my mobile succesfully.
Does anyone have a hint or example on how to get this working?
Regards,
Bert
Send notification to Domoticz lite app.
Moderator: leecollings
-
- Posts: 56
- Joined: Wednesday 06 December 2017 16:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Send notification to Domoticz lite app.
Please include the relevant part of your script. Your understanding of the format is correct.brjhaverkamp wrote: ↑Tuesday 13 November 2018 8:55 I am trying to send notifications to the domotic lite app, preferably to one specific mobile device.
As I understand the format of the Lua command should be
commandArray['SendNotification']='subject#body#extraData#priority#sound#subsystem'.
Does anyone have a hint or example on how to get this working?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 56
- Joined: Wednesday 06 December 2017 16:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Send notification to Domoticz lite app.
Hi Waaren,
I can't reach the event right now unfortunately. But basically I tried a lot of different variations of
commandArray['SendNotification']='Notice#Alarm####gcm'
But nothing gets through.
Regards,
Bert
I can't reach the event right now unfortunately. But basically I tried a lot of different variations of
commandArray['SendNotification']='Notice#Alarm####gcm'
But nothing gets through.
Regards,
Bert
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Send notification to Domoticz lite app.
Without the eventscript at hand it is very hard to help.brjhaverkamp wrote: ↑Tuesday 13 November 2018 15:00 I can't reach the event right now unfortunately. But basically I tried a lot of different variations of
commandArray['SendNotification']='Notice#Alarm####gcm'
But nothing gets through.
In dzVents this code snippet
Code: Select all
domoticz.notify("Domoticz", "test", domoticz.PRIORITY_NORMAL,domoticz.SOUND_DEFAULT, "" , domoticz.NSS_GOOGLE_CLOUD_MESSAGING)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 56
- Joined: Wednesday 06 December 2017 16:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Send notification to Domoticz lite app.
Hi Waaren,
Well currently my event script literally is:
--------------------------
commandArray = {}
-- commandArray['SendNotification']='subject#body#extraData#priority#sound#subsystem'.
commandArray['SendNotification'] = 'Subject5###8##gcm';
return commandArray
------------------
the value 8 was my last attempt to play with the priority..
The related log looks like this:
2018-11-13 16:59:13.828 Status: EventSystem: Script event triggered: Test notification
2018-11-13 16:59:13.834 Status: Notification: Subject5
I will try your dzVents line tonight. Thanks for this. Hopefully it will show me the way forward.
But meanwhile, if anyone has a working gcm sendnotification setup, I'd like to hear about it.
Regards,
Bert
Well currently my event script literally is:
--------------------------
commandArray = {}
-- commandArray['SendNotification']='subject#body#extraData#priority#sound#subsystem'.
commandArray['SendNotification'] = 'Subject5###8##gcm';
return commandArray
------------------
the value 8 was my last attempt to play with the priority..
The related log looks like this:
2018-11-13 16:59:13.828 Status: EventSystem: Script event triggered: Test notification
2018-11-13 16:59:13.834 Status: Notification: Subject5
I will try your dzVents line tonight. Thanks for this. Hopefully it will show me the way forward.
But meanwhile, if anyone has a working gcm sendnotification setup, I'd like to hear about it.
Regards,
Bert
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Send notification to Domoticz lite app.
Just tested with this in an internal Lua script and it works without any problem. I am on the latest Beta and RPI3 with Debioan Stretch.brjhaverkamp wrote: ↑Tuesday 13 November 2018 17:02 Well currently my event script literally is:the value 8 was my last attempt to play with the priority..Code: Select all
commandArray = {} -- commandArray['SendNotification']='subject#body#extraData#priority#sound#subsystem'. commandArray['SendNotification'] = 'Subject5###8##gcm'; return commandArray
commandArray['SendNotification'] = 'Subject5#test####gcm';
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 56
- Joined: Wednesday 06 December 2017 16:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Send notification to Domoticz lite app.
Hi Waaren,
Much appreciated! I at least have something to check against.
I will doublecheck all setting. At least I know now that this line _should_ work!
Regards,
Bert
Much appreciated! I at least have something to check against.
I will doublecheck all setting. At least I know now that this line _should_ work!
Regards,
Bert
-
- Posts: 56
- Joined: Wednesday 06 December 2017 16:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Send notification to Domoticz lite app.
Just to finish the thread.
I got it working now as well.
With embarrassment I have to admit that the gcm notification was disabled...
I probably only pressed test, and forgot to enable it, or enabled it and forgot to press apply at the top of the page.
Anyways, I got a lot of noise coming out of my phone when the alarm goes of.
I havent been able to send messages to individual users. There is sourcecode to enable this when you fill in midx_xx for the extradata parameter.
I have to look into this a bit deeper still.
Ciao,
Bert
I got it working now as well.
With embarrassment I have to admit that the gcm notification was disabled...
I probably only pressed test, and forgot to enable it, or enabled it and forgot to press apply at the top of the page.
Anyways, I got a lot of noise coming out of my phone when the alarm goes of.
I havent been able to send messages to individual users. There is sourcecode to enable this when you fill in midx_xx for the extradata parameter.
I have to look into this a bit deeper still.
Ciao,
Bert
Who is online
Users browsing this forum: No registered users and 1 guest