• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
action: Pushbullet
#1
Pushbullet is a free service (with API) to send push messages to devices. All modern browsers and mobile devices are supported, and it's free.

Although I don't have the skills to develop it myself, I can work out the concept a bit and hope someone will pick it up and develop something nice.

I am aware there already is Pushover functionality.
To the contrary of Pushover the Pushbullet mobile apps are free!

See the API documentation for specifics.

Example usage (heads up, correct usage here):
Code:
"rules": {
    "doorMessage": {
        "rule": "IF (door.state IS opened) THEN pushbullet TITLE "Door" MESSAGE "The door was opened" TOKEN your_access_token_here",
        "active": 1
}

Edit: Looking at pilights Pushover source it should be a breeze to adapt it to Pushbullet, for someone with a bit of C experience.
 
Reply
#2
To give this another push (pun intended):

POST request to:
https://ACCESS_TOKEN@api.pushbullet.com/v2/pushes

Header: 'Content-Type: application/json'

binary-data: '{"type": "note", "title": "Note Title", "body": "Note Body"}'

The variables are bold.
 
Reply
#3
This is implemented now in the development branch on Github. Thanks to curlymo.

Format:
Code:
IF ... THEN pushbullet TITLE title BODY \"a message\" TYPE note TOKEN pushbullet_token

To advance this feature I'd like to add a feature request:
Add support for TYPE link, by adding the parameter URL.

This would add the possibility to automatically open the remote, for example.
 
Reply
#4
The basics are there, maybe you can edit the action yourself.
 
Reply
#5
Works like a charm Smile

youtubemovie

Doorbel status is always on until someone presses the doorbell (have to figure out if i can revert the status?).

When the doorbell is triggered, pushbullet is activated by the eventing rule and an extra rule is added to set the doorbel status back to on after 1 minute.
 
Reply
#6
Did work like a charm until today , for me at least.

Code:
c 09 21:50:22:500225] pilight-daemon: INFO: executed rule: notification-doorbell2
[Dec 09 21:50:22:500405] pilight-daemon: DEBUG: rule #2 notification-doorbell2 was parsed in 0.000838 seconds
[Dec 09 21:50:22:500908] pilight-daemon: DEBUG: socket write succeeded: {"origin":"sender","protocol":"relay","message":{"gpio":4,"state":"on"},"uuid":"0000-b8-27-eb-83c3cc","repeat":1}

[Dec 09 21:50:22:501100] pilight-daemon: DEBUG: broadcasted: {"origin":"sender","protocol":"relay","message":{"gpio":4,"state":"on"},"uuid":"0000-b8-27-eb-83c3cc","repeat":1}
[Dec 09 21:50:22:584982] pilight-daemon: ERROR: ssl_handshake failed
[Dec 09 21:50:22:586310] pilight-daemon: NOTICE: pushbullet action failed (-1) with message: (null)

Looking and searching gives me this:

pushbullet errors since 20hours

Anyone having the same issues?
 
Reply
#7
Nobody experiencing this problem?

Found another thread about the same current problem:

https://forums.sabnzbd.org/viewtopic.php?f=3&t=21890

They think it has to do with the python version but I run the latest version available on xbian.

It worked but broke down one day without reason.
 
Reply
#8
Tried this and it works with the same api key from pushbullet:

pushbullet.sh example:
Code:
#!/bin/bash

API="YOURKEY"
MSG="$1"

curl -u $API: https://api.pushbullet.com/v2/pushes -d type=note -d title="Alert" -d body="$MSG"

I tried to understand pushbullet.c but that beyond my scope of understanding:

Code:
root@raspberrypi:~/pilight/libs/pilight/events/actions/pushbullet.c

Wish I could see the compleet url at http_post_content Smile Who can help me troubleshoot this.
 
Reply
#9
I don't see a difference in what you post and what we've implemented. Does curl allow you to post the full http request?
 
Reply
#10
Quote:Does curl allow you to post the full http request?
dont know if curl can show it more 'plain' than this:

Quote:curl -u $APIKEY: https://api.pushbullet.com/v2/pushes -d type=note -d title="Alert" -d body="$MSG"

Are you (indirect) telling me that I'm the only one having this problem? I'll reformat en reinstall everything again to see if it works again.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  _VARSTORE_ set action fourty2 1 1,205 05-19-2019, 09:07 PM
Last Post: curlymo
  skipping overridden action switch do1eh 2 858 01-19-2019, 05:25 PM
Last Post: do1eh
  http action Niek 21 5,764 08-12-2018, 11:44 AM
Last Post: rorie
  action: pushover Niek 36 20,327 12-03-2017, 11:13 AM
Last Post: Alex
  action: file Niek 14 5,035 06-23-2016, 04:02 PM
Last Post: Niek
  action: switch Niek 54 23,440 03-31-2016, 06:24 PM
Last Post: jjj
  action: program bazb 16 9,165 03-31-2016, 09:14 AM
Last Post: Niek
  action: toggle Niek 1 2,676 02-19-2016, 03:04 PM
Last Post: Joeks
  action: dim terrar 10 6,766 08-13-2015, 05:13 PM
Last Post: terrar
  Event action sipcal to make a voip phonecall pieterd 7 5,028 05-15-2015, 05:47 PM
Last Post: koos147

Forum Jump:


Browsing: 1 Guest(s)