How Can I? Scripting Push Notifications

ryanbuckner
Posts: 1409
Joined: Sat Oct 08, 2011 12:33 pm
Location: Northern Virginia
Contact:

How Can I? Scripting Push Notifications

Post by ryanbuckner »

I have a script that checks to see if my daughters bus is running late. What is the best way to script pushing this data to my wife's pixel phone with DomoPad? Trying to avoid a workaround by storing the text in a variable and having an Indigo trigger send the push, but I'm ok if that's the only way.

Here's an example of what the message will look like:

Code: Select all

Daughter's bus route HI-21 AM: Double back - Estimated Delay: 10-15 min
User avatar
RogueProeliator
Posts: 2538
Joined: Tue Nov 13, 2012 3:54 pm
Location: Baton Rouge, LA

Re: How Can I? Scripting Push Notifications

Post by RogueProeliator »

I have a script that checks to see if my daughters bus is running late. What is the best way to script pushing this data to my wife's pixel phone with DomoPad? Trying to avoid a workaround by storing the text in a variable and having an Indigo trigger send the push, but I'm ok if that's the only way.
Hey Ryan... basically every action that can be taken by a plugin should be scriptable, the key is just finding what the key values in the dictionary will be to pass in to the plugin. It should look something like this:

Code: Select all

plugin = indigo.server.getPlugin("com.duncanware.domoPadMobileClient")
plugin.executeAction("sendPushNotification", deviceId=123456, props={"message": "Hi there!", "importanceLevel":"normal"})
I think that should get you what you need... there are other options but based on your requirements, I think that is what you need. But do let me know if it works or not and we can tweak from there.
ryanbuckner
Posts: 1409
Joined: Sat Oct 08, 2011 12:33 pm
Location: Northern Virginia
Contact:

[SOLVED] Re: How Can I? Scripting Push Notifications

Post by ryanbuckner »

that worked, thank you
Post Reply

Return to “DomoPad Android Client”