Sending file/image to Pushbullet

Moderator: leecollings

Post Reply
Kohen
Posts: 23
Joined: Monday 12 October 2015 12:05
Target OS: NAS (Synology & others)
Domoticz version:
Location: Veldhoven, The Netherlands
Contact:

Sending file/image to Pushbullet

Post by Kohen »

I've been trying to send a picture with my message to pushbullet but cant figure it out.

Here is what i do:
When butten is pushed (doorbell) a snapshot will me made with this command:
/usr/bin/curl -s http://<IPSERVER>:<PORT>/camsnapshot.jpg?idx=2 > /volume1/web/Domoticz/images/doorbell/doorbell.png

Then it send a signal to my Pushbullet
curl -u <API KEY>: -X POST https://api.pushbullet.com/v2/pushes --header 'Content-Type: application/json' --data-binary '{"type": "note", "title": "Doorbell", "body": "Someone is at the door!"}'

After that is completed I also want to upload the image just taken. In the documentation I need to use this API statement:
curl -u <API KEY>: -X POST https://api.pushbullet.com/v2/upload-request -d file_name=/volume1/web/Domoticz/images/doorbell/doorbell.png -d file_type=image/png

Taking the picture and sending me a notification is working but sending the picture .. not..
Can someone help me out?
Synology NAS 412+, Aeotec stick V5, Aeotec recessed door sensor, Aeotec micro double smart switch, Fibaro Dimmer, iPad 2 with own 3d printed wall mount.
paulvha
Posts: 40
Joined: Friday 29 January 2016 16:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Sending file/image to Pushbullet

Post by paulvha »

uploading a file looks to be a multi-step process : It's actually a 3 step process. You send a file upload request to pushbullet, they respond with an amazon URL, you send the file to amazon, and then send a pushbullet notification to a device. ( from https://www.reddit.com/r/PushBullet/com ... ullet_api/). i tried to read the latest Pushbullet documentation to upload but it is "clear as mud"
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest