Enhancement - Specify GCM destination

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
antipiot
Posts: 45
Joined: Wednesday 03 January 2018 15:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Switzerland
Contact:

Enhancement - Specify GCM destination

Post by antipiot »

Hello all,

I did some search but couln't find anything related:

It would be great to be able to specify destination of GCM messages based on the list of available mobile devices or to any connected GCM devices as it work actually.

As we already can send test message to a specific device in the mobile devices section, can this be added easily?

The idea behind is that response for user specific interactions are returne to the specific user:
I get back home - Alarm is disabled based on my location - I get a notification the alarm is disable.

Kind regards,

Antipiot
ToxicTiger
Posts: 8
Joined: Saturday 17 June 2017 18:13
Target OS: NAS (Synology & others)
Domoticz version: 2020.2
Contact:

Re: Enhancement - Specify GCM destination

Post by ToxicTiger »

Wondering if you managed to find an answer to this?

I can send the test message to an individual phone using the Mobile devices menu, but I can't find out a way to send a message from a script to a single mobile phone using GCM.
Is it possible using LUA?

Thanks
ToxicTiger
Posts: 8
Joined: Saturday 17 June 2017 18:13
Target OS: NAS (Synology & others)
Domoticz version: 2020.2
Contact:

Re: Enhancement - Specify GCM destination

Post by ToxicTiger »

I've been looking at how the Test message button on the Mobile Devices page works. It sends a json request:

http://xxx.xxx.xxx.xxx:xxxx/json.htm?type=command&param=testnotification&subsystem=gcm&extradata=midx_44

xxx.xxx.xxx.xxx:xxxx being my servers IP address and Domoticz port and midx_44 being my mobile device (obtained from the reading the HTML code behind the test button on the Mobile devices page).

When I enter this into a my web browser it send a test message to my mobile phone, just as expected.

So from, this I tested the following json, which I hoped would work:
http://xxx.xxx.xxx.xxx:xxxx/json.htm?type=command&param=sendnotification&subject=SUBJECT&body=BODY&subsystem=gcm&extradata=midx_44

This does send the message to my mobile, but unfortunately it ignores the extradata=midx_44, so it sends to all mobile devices registered on my Domoticz server.
antipiot
Posts: 45
Joined: Wednesday 03 January 2018 15:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Switzerland
Contact:

Re: Enhancement - Specify GCM destination

Post by antipiot »

Hello,

sorry for my late answer; i did not searched further for this:
Nice informations you got there tho, looking forward for this to work :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest