For those who are avid push bullet users is there any chance we could roll that in to webcore? I’m researching 3rd party apps but I feel pushbullet always notifies me while sms sometimes gets a little bogged down. Also with feeds I can throw it to a mass of people which is great for what I’d like to use it for
Pushbullet Capability?
It looks like pushbullet does a lot of things, what are you looking for specifically? There has been some discussion recently about Pushover which I am considering rolling into my notification suite since it exposes a simple API to send messages.
If you have a need for multiple recipients the notification suite may be of interest to you to simplify complicated messaging like [critical] @jane @joe:if-present Possible intrusion detected in the barn
.
Most the capability to push things to what pushbullet calls feeds. I have one for my media center that notifies the house hold and friends on certain media events within my server. I’d like to have one that does notification of presence sensor arrivals, open doors, etc.
Here is a working example that uses the Pushbullet API to send a broadcast (untargeted) notification. Hopefully this can serve as a starting point for you! Just import this piston with the backup code gb0c4
then replace the accessToken
with the value shown in your Pushbullet settings.
I would recommend setting up a piston that takes arguments like the subject, message, and recipient and passes them along to Pushbullet, rather than including this raw web request in every piston where you want to send a message.
Due to the limits and subscription fees to upgrade I think that Pushover will be a better example for my purposes. I received the Hello world notifications in my Pushbullet app using the code above but they did not come through as normal push notifications, just appeared in the app – so I may not quite understand how this service is supposed to work.
Thanks for this! One slight modification to above…you have to send the Post Request to: https://api.pushbullet.com/v2/pushes, not https://webcore.co.
When pistons are shared the devices, URLs, and other potentially sensitive data gets anonymized. I updated the example above to avoid that by storing the API URL (which is not sensitive in this case and does not need to be anonymized) in a variable.
A couple of things I noticed. I am having trouble using global variables with this API. Seems to work fine with local variables.
Also, is there a way I can create a function/piston and call it easily from other pistons? Copying this code for every pushbullet notification I want to do is tedious, especially considering I can’t use global variables.
Any help is appreciated!
You can use the Execute piston action which accepts Arguments to pass along. Your single Pushbullet piston will use $args.message rather than a global variable to determine what to send. Of course you can use other arguments as well for more control.
You can search the forums for examples of arguments. Basically to send a “message” argument the calling piston will need a variable called message, then you select that variable as an argument in the Execute piston action.
Does anyone know how to send messages to @baldeagle072’s ‘Pushbullet device with service manager’ over on the ST forum?
Here’s the link…
It includes 3 pieces…
-
Device Handler
This is the code used to create a ‘thing’ in SmartThings for each Pushbullet endpoint desired. -
Service Manager SmartApp
This is the SmartApp that takes the Pushbullet API, and uses it to create a ‘thing’ in SmartThings for the desired Pushbullet endpoint. -
Notifier SmartApp
This is the SmartApp that is used to send messages to the Pushbullet endpoints via their corresponding, newly created ‘things’ in SmartThings.
In my case, I only installed the Device Handler and the Service Manager (Connect) SmartApp, because I want to use webCoRE to do the message sending.
In my testing, it did indeed create a viable ‘thing’ in SmartThings for the Pushbullet endpoint that I chose in the SmartApp, and the test that I sent to it from within the SmartApp did indeed get there.
However, I’m not sure how to use it lol
Of course, the simple answer is for me to follow through with the rest of the project, and install his Pushbullet Notifier, but I was hoping to use webCoRE for that.
I just don’t see a way of doing that when I start building a piston.
Any ideas?