Pushbullet-notification to multiple receivers
Moderator: leecollings
-
- Posts: 113
- Joined: Thursday 20 November 2014 22:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Norway
- Contact:
Pushbullet-notification to multiple receivers
Hi, does anyone know if and how it is possible to send pushbullet-notifications to multiple receivers? I.e. if the washing-machine is done I want Domoticz to notify both me and my wife.
Thanks!
Thanks!
2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb
-
- Posts: 228
- Joined: Thursday 21 May 2015 9:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Pushbullet-notification to multiple receivers
Yes I would like to know too... But when the washing machine is ready you should only notify your wife. 

- Mooseknuckle
- Posts: 43
- Joined: Sunday 08 March 2015 9:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Pushbullet-notification to multiple receivers
I use the bash script described here for that:
http://www.domoticz.com/forum/viewtopic.php?f=31&t=3188
You can make 2 scripts, one for you and one for your wife. You can even send it to a specific device if you have more devices with pushbullet configured.
If you add "-d device_iden='pushbullet id of your device'" to the last line you can target a specific device.
http://www.domoticz.com/forum/viewtopic.php?f=31&t=3188
Code: Select all
#!/bin/bash
api=<Put_Your_API_KEY_HERE>
title=$1
body=$2
curl -u $api: https://api.pushbullet.com/v2/pushes -d type=note -d title=$title -d body=$body
If you add "-d device_iden='pushbullet id of your device'" to the last line you can target a specific device.
RPI 3, Philips Hue,Toon Thermostat, Harmony Smart Control, Yeelights
Mysensors wifi gateway + sensors, RFXtrx433E, Kaku stuff, Xiaomi gateway + sensors
Domoticz controlled DIY ambilight, Selectplus chime, Mi-light led controller
Mysensors wifi gateway + sensors, RFXtrx433E, Kaku stuff, Xiaomi gateway + sensors
Domoticz controlled DIY ambilight, Selectplus chime, Mi-light led controller
-
- Posts: 113
- Joined: Thursday 20 November 2014 22:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Norway
- Contact:
Re: Pushbullet-notification to multiple receivers
And then I call the batch-script from a switch? Or a Lua script?Mooseknuckle wrote:I use the bash script described here for that:
http://www.domoticz.com/forum/viewtopic.php?f=31&t=3188
You can make 2 scripts, one for you and one for your wife. You can even send it to a specific device if you have more devices with pushbullet configured.Code: Select all
#!/bin/bash api=<Put_Your_API_KEY_HERE> title=$1 body=$2 curl -u $api: https://api.pushbullet.com/v2/pushes -d type=note -d title=$title -d body=$body
If you add "-d device_iden='pushbullet id of your device'" to the last line you can target a specific device.
Edit: I get
Code: Select all
Error: Error executing script command (/home/pi/domoticz/scripts/bash/pb_washingmachine.sh). returned: 1536
This is my code:
Code: Select all
#!/bin/bash
api=myApIkeY
title='Washing machine finished'
body='Hi, the washing machine is finished :)'
curl -u $api: https://api.pushbullet.com/v2/pushes -d type=note -d title=$title -d body=$body
2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb
- Mooseknuckle
- Posts: 43
- Joined: Sunday 08 March 2015 9:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Pushbullet-notification to multiple receivers
Hi,
You don't change anything in the script (except your key).
From a lua script:
From a switch (On or Off action):
This way the script never changes for different alerts, only the arguments.
You don't change anything in the script (except your key).
From a lua script:
Code: Select all
os.execute('/home/pi/domoticz/scripts/pushbullet.sh "Alert" "The dishwasher is ready"')
Code: Select all
script://home/pi/domoticz/scripts/pushbullet.sh "Alert" "The dishwasher is ready"
Last edited by Mooseknuckle on Wednesday 30 September 2015 16:27, edited 1 time in total.
RPI 3, Philips Hue,Toon Thermostat, Harmony Smart Control, Yeelights
Mysensors wifi gateway + sensors, RFXtrx433E, Kaku stuff, Xiaomi gateway + sensors
Domoticz controlled DIY ambilight, Selectplus chime, Mi-light led controller
Mysensors wifi gateway + sensors, RFXtrx433E, Kaku stuff, Xiaomi gateway + sensors
Domoticz controlled DIY ambilight, Selectplus chime, Mi-light led controller
-
- Posts: 113
- Joined: Thursday 20 November 2014 22:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Norway
- Contact:
Re: Pushbullet-notification to multiple receivers
Ah, now I see, thank you! 
But I only get the first word in the message; The
And i see this in the log:
What does that mean?

But I only get the first word in the message; The
And i see this in the log:
Code: Select all
Error: Error executing script command (/home/pi/domoticz/scripts/bash/pb_washingmachine.sh). returned: 1536
2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb
- Mooseknuckle
- Posts: 43
- Joined: Sunday 08 March 2015 9:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Pushbullet-notification to multiple receivers
I don't really know. I use the script from a lua script and it works. Also if I run it from the commandline with:
This also works. Can you try that?
PS. Try adjusting the script to:
Code: Select all
./pushbullet.sh "test" "this is a test"
PS. Try adjusting the script to:
Code: Select all
#!/bin/bash
api=<Put_Your_API_KEY_HERE>
title="$1"
body="$2"
curl -u $api: https://api.pushbullet.com/v2/pushes -d type=note -d title="$title" -d body="$body"
RPI 3, Philips Hue,Toon Thermostat, Harmony Smart Control, Yeelights
Mysensors wifi gateway + sensors, RFXtrx433E, Kaku stuff, Xiaomi gateway + sensors
Domoticz controlled DIY ambilight, Selectplus chime, Mi-light led controller
Mysensors wifi gateway + sensors, RFXtrx433E, Kaku stuff, Xiaomi gateway + sensors
Domoticz controlled DIY ambilight, Selectplus chime, Mi-light led controller
-
- Posts: 113
- Joined: Thursday 20 November 2014 22:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Norway
- Contact:
Re: Pushbullet-notification to multiple receivers
That worked great! Thank you 

2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb
-
- Posts: 63
- Joined: Sunday 14 July 2013 11:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Ipswich, UK
- Contact:
Re: Pushbullet-notification to multiple receivers
OK! I give in..... Who sits by the washing machine waiting for it to finish then invoke these scripts? Oh! Perhaps you do it by electrickery. Exactly do you do that?
Peter
Peter
-
- Posts: 16
- Joined: Saturday 31 May 2014 23:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Latest B
- Location: Hilversum, The Netherlands
- Contact:
Re: Pushbullet-notification to multiple receivers
If we could push notifications to a pushbullet channel, (you create one on the website, and the both of you subscribe to that channel) then you will receive both the notification.
-
- Posts: 113
- Joined: Thursday 20 November 2014 22:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Norway
- Contact:
Re: Pushbullet-notification to multiple receivers
I'm not sure if I understood your question. I have a fibaro wall-plug that measures power-consumption, and when it drops below a given value, Domoticz invokes a script to notify me.commodore white wrote:OK! I give in..... Who sits by the washing machine waiting for it to finish then invoke these scripts? Oh! Perhaps you do it by electrickery. Exactly do you do that?
Peter
Although I haven't got it to work right yet. As of now I'm beeing flooded with notifications every time the machine has a pause in the program...
2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb
Re: Pushbullet-notification to multiple receivers
Actually you don't need a script for this. If you have created a channel in Pushbullet via https://www.pushbullet.com/my-channel you can push messages to it via custom HTTP notification (Custom HTTP/Action) type in settings and there can be any number of channel subscribers.
URL/Action:
https://api.pushbullet.com/v2/pushes
POST Data:
type=note&title=#SUBJECT&body=#MESSAGE&channel_tag=your_channel
POST Content-Type:
application/x-www-form-urlencoded
POST Headers:
Authorization: Basic <API Key hash>
You can get <API Key hash> calling https://api.pushbullet.com/v2/pushes via curl like this:
You will see Authorization header in verbose messages. Note the ":" after API key - there is no password.
Get your access token using https://www.pushbullet.com/#settings/account and pressing on "Create access token".
URL/Action:
https://api.pushbullet.com/v2/pushes
POST Data:
type=note&title=#SUBJECT&body=#MESSAGE&channel_tag=your_channel
POST Content-Type:
application/x-www-form-urlencoded
POST Headers:
Authorization: Basic <API Key hash>
You can get <API Key hash> calling https://api.pushbullet.com/v2/pushes via curl like this:
Code: Select all
curl -u"<API key>:" "https://api.pushbullet.com/v2/pushes" -d type=note -d title="Alert test" -d body="Body msg" -d channel_tag=your_channel -vvv
Get your access token using https://www.pushbullet.com/#settings/account and pressing on "Create access token".
Who is online
Users browsing this forum: No registered users and 1 guest