Pushbullet API-KEY - get it from here for free
migrated to new parameter handling and logging convention
Added “delete” function
Changed any push function to return the pushbullet service result object
Changed Logging to “warning”
Added support for eMail-Addresses as deviceId
Updated README.md with instructions “How to get your deviceId”
Added usage example to send a note to a specific device
New python library dependecy: “magic” (see requirements section above)
Updated to pushbullet api v2, including new file handling
New (optional) “body” parameters for link and file pushes
pushbullet: class_name: Pushbullet class_path: plugins.pushbullet # deviceid: <your-default-device-id> # apikey: <your-api-key>
Description of the attributes:
apikey: set api-key globally so you do not have to set it in the function calls
deviceid: set deviceid globally so it will be used as defaul target, you can override this on each call
How to get your deviceId
Use your browser to log into your account on http://www.pushbullet.com
Select your desired target device
Copy the last part of the browser url (behind the “device_iden=”) into your clipboard.
Paste it to your plugin.yaml or your api call.
Pass a ‘deviceid’ if no set globally or if you want to send to another device.
Add ‘apikey’ if not set globally.
sh.pushbullet.note(title, body [, deviceid] [, apikey])
Send a note to your device.
title: The title of the note
body: The note’s body
#send simple note to default device sh.pushbullet.note("Note to myself.", "Call my mother.") #send simple note to device with id: x28d7AJFx13 sh.pushbullet.note("Note to myself.", "Call my mother.", "x28d7AJFx13") #send simple note to user with email: firstname.lastname@example.org sh.pushbullet.note("Note to myself.", "Call my mother.", "email@example.com")
sh.pushbullet.address(name, address [, deviceid] [, apikey])
Send a address to your device.
name: The name of the place at the address
address: The full address or Google Maps query
# send address of "Eifel Tower" to default device sh.pushbullet.address("Eifel Tower", "https://www.google.com/maps/place/Eiffelturmfirstname.lastname@example.org,2.294481,17z/data=!3m1!4b1!4m2!3m1!1s0x47e66e2964e34e2d:0x8ddca9ee380ef7e0")
sh.pushbullet.list(title, title [, deviceid] [, apikey])
Send a list of items to your device.
title: The title of the list
items: The list items
#send a shopping list to default device sh.pushbullet.list("Shopping list", ["Milk", "Eggs", "Salt"])
sh.pushbullet.file(filepath [, deviceid] [, apikey] [, body])
Send a file to your device.
filepath: absolute path to the file to push
(optional) body: An optional message
#send smarthome log file to default device sh.pushbullet.file("/usr/local/smarthome/var/log/smarthome.log", body="Take a look at this log-file")
Delete the push with the given id.
pushid: id of of the push to delete
#send a push and delete it afterwards result = sh.pushbullet.note("Note to myself.", "Call my mother.") sh.pushbullet.delete(result['iden'])