Request: Pushbullet Support

The recent 707 update added Pushover notification service support, which is a great addition, but I would love to see Pushbullet support since it support a much wider range of devices and browser extensions.

https://docs.pushbullet.com/

Thanks!

Support for the fantastic Join API would also be a welcome addition.
https://joaoapps.com/join/api/

Just checked this out and it looks promising. If I hadn’t already invested $5 in pushover, I probably would have tried to make this work as well. I used his autoapps with tasker a while back and love his work. Didn’t realize he took over the entire Tasker project now as well.

I got a 30 day trial of the Join API and like the fact that I can choose my own status bar icons and can have have the notification open a webpage (Cloud dashboard) so I just threw this together. I’m not sure I will switch to this app (another 5 bucks is steep for an icon) but I thought I’d share what I made. If someone is really interested they could easily expand and adapt it to include more functionality. This is based off the Pushover driver that @ogiewon and I built previously.

/**
*  Join API Device
*
*
*  Copyright 2018 Stephan Hackett
*
*  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
*  in compliance with the License. You may obtain a copy of the License at:
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
*  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
*  for the specific language governing permissions and limitations under the License.
*
*
*/
def version() {"v1.0.20180411"}

preferences {
    input("apiKey", "text", title: "API Key:", description: "Join API Key")
    if(getValidated()){
  		input("deviceName", "enum", title: "Select Device:", description: "", multiple: true, required: false, options: getValidated("deviceList"))
        input("myTitle", "text", title: "Notification Title:", description: "")
  		//input("priority", "enum", title: "Default Message Priority (Blank = NORMAL):", description: "", defaultValue: "0", options:[["-1":"LOW"], ["0":"NORMAL"], ["1":"HIGH"]])
  		//input("sound", "enum", title: "Notification Sound (Blank = App Default):", description: "", options: getSoundOptions())
        input("myImage", "text", title: "Image/Icon URL:", description: "Image will be displayed in notification as well as status bar (transparent png preferred)")
  		input("url", "text", title: "URL:", description: "URL is opened when Notification is clicked:")
    }
}

metadata {
  	definition (name: "Join API Device", namespace: "stephack", author: "Stephan Hackett") {
    	capability "Notification"
    	capability "Actuator"
    	capability "Speech Synthesis"
  	}
}

def installed() {
 	initialize()
}

def updated() {
 	initialize()   
}

def initialize() {
    state.version = version()
}

def getValidated(type){
    if(type=="deviceList"){log.debug "Generating Device List..."}
	else {log.debug "Validating Key..."}
    
    def validated = false
	
    def params = [
        uri: "https://joinjoaomgcd.appspot.com/_ah/api/registration/v1/listDevices?apikey=${apiKey}",
  	]
    //log.info params
    
    if ((apiKey =~ /[A-Za-z0-9]{30}/)) {
        try{
        	httpGet(params){response ->
      			if(response.status != 200) {
        			log.error "Received HTTP error ${response.status}. Check your keys!"
      			}
      			else {
                    if(type=="deviceList"){
                        log.debug "Device list generated"
                        deviceOptions = response.data.records.deviceName
                        //log.info deviceOptions
                    }
                    else {
                        log.debug "Keys validated"
                        validated = true
                    }
      			}
    		}
        }
        catch (Exception e) {
        	log.error "An invalid key was probably entered. Join API Server Returned: ${e}"
		} 
    }
    else {
    	log.error "API key '${apiKey}' is not properly formatted!"
  	}
    if(type=="deviceList") return deviceOptions
    return validated
    
}

def speak(message) {
    deviceNotification(message)
}

def deviceNotification(message) {
	
  	if (deviceName) { log.debug "Sending Message: ${message} to Device: $deviceName"}
  	//else {log.debug "Sending Message: [${message}] Priority: [${priority}] to [All Devices]"}

    def apiUri =  "https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?apikey=${apiKey}"
    def apiParams = ""
    if(deviceName) apiParams += "&deviceNames=" + URLEncoder.encode(deviceName, "UTF-8")
    if(myTitle) apiParams += "&title=" + URLEncoder.encode(myTitle, "UTF-8")
    if(message) apiParams += "&text=" + URLEncoder.encode(message, "UTF-8")
    if(myImage) apiParams += "&icon=" + URLEncoder.encode(myImage, "UTF-8")
    if(url) apiParams += "&url=" + URLEncoder.encode(url, "UTF-8")
    
    def params = [
        uri: apiUri + apiParams,
    ]
    //log.info params
  	
    if ((apiKey =~ /[A-Za-z0-9]{30}/)) {
    	httpGet(params){response ->
      		if(response.status != 200) {
        		log.error "Received HTTP error ${response.status}. Check your keys!"
      		}
      		else {
        		log.debug "Message Received by Join API Server"
      		}
    	}
  	}
  	else {
    	log.error "API key '${apiKey}' is not properly formatted!"
    }
}
3 Likes

Wow! That’s crazy quick :open_mouth: Thanks for sharing this!
I have found Join to be very reliable and actively developed. In fact, the shared clipboard, file sharing and notification push are the features I use the most. Further, the possibility of interacting with notifications remotely, comes in handy quite often.

1 Like

Yeah, it seems to be really powerful and I’m sure the direct integration with Tasker makes it infinitely more so. Kinda wish I didn’t already invest in Pushover.

I’m glad you did invest your time and talent into Pushover! Join does not appear to support iOS… :frowning:

1 Like

Lol…but not surprising as the developer works with Tasker which is one of the most powerful automation tools for android users.

Whoa I’ve been waiting for someone to make a direct integration with autoapps. I look forward to seeing g this expand.

I'm definitely late to see this, but, for me, the answer is for Sharp Tools to be ported to HE. @josh was an early HE adopter and he's said elsewhere that HE is on his roadmap.

1 Like

I agree I would love to see sharptools ported as well. I believe the developer stated he had some other things going on that were higher priority atm.

For now between being able to send join notifications and I can control hubitat through my HousePanel local endpoints it gives a fair bit of functionality.

2 Likes

Community created/ported.

1 Like