Sending file/image to Pushbullet
Posted: Tuesday 02 February 2016 14:15
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?
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?