Looking for the simpler option? The DragonFly now has native PushOver & PushBullet notifications built into the firmware—no scripting required for most cases. The method below is for custom Automata triggers the native feature doesn't cover, or for older firmware.

Using the PushBullet app

PushBullet logo www.pushbullet.com

PushBullet is a great and free app that allows you to receive instant notifications on your phone, computer, tablet…

We already use it in the Solo to warn of weather changes, and it is easy to have your DragonFly send this kind of message too.

Example: notify when a sensor goes off

Assume you want to be notified when DragonFly sensor 8 goes off (it may be a power-off alarm, or anything else).

You just have to copy the following text into a file, and save it with the name SensorOff8.vbs (be sure to avoid the .txt extension if you're using Notepad). The file has to be placed in the same folder as all DragonFly scripts:

C:\Program Files (x86)\Dragonfly\dfscripts
PushBullet notifications across phone, tablet and computer

The script

Just modify the 3 lines with tit, bod and key—it's correct that tit and bod each have a pair of triple double-quotes—a lot of quotes, but that's intentional (it's how the quote character ends up escaped inside the JSON payload).

The key, of course, refers to the key you'll obtain once registered at PushBullet.com.

Don't forget to enable the sensor scripts option in your DragonFly software.

The code:

Dim objXmlHttpMain , URL
tit = """Message title"""
bod = """Body of the message"""
key = "your pushbullet key"
strJSONToSend ="{""type"": ""note"", ""title"": " & tit & "", ""body"": " & bod & "}"
URL="https://api.pushbullet.com/v2/pushes"
Set objXmlHttpMain = CreateObject("Msxml2.ServerXMLHTTP")
objXmlHttpMain.open "POST",URL, False
objXmlHttpMain.setRequestHeader "Authorization", "Bearer " & key
objXmlHttpMain.setRequestHeader "Content-Type", "application/json"
objXmlHttpMain.send strJSONToSend
set objJSONDoc = nothing
set objResult = nothing

Note: the original version of this article had its quote marks garbled by a text-editor encoding issue (every " rendered as « or »). The code above has been restored to plain double-quotes so it can be copy-pasted directly—no wording or logic was changed.