Announcement

Collapse
No announcement yet.

Pushbullet

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Pushbullet

    Just thought i'd share a simple idea I had for displaying messages on my PC when events are triggered.

    Currently I use the pushover plugin for push notifications to my mobile. Previously on HS2 I used Growl to display messages on my PC. But so far i've not seen support for Growl on HS3 so i've looked for alternatives for displaying messages on the PC.

    I've been running the homeseer speaker for a little while with it muted as it displays the text in the speech bubble but its a little buggy and sometimes gets stuck behind open windows so you can miss a message.

    Pushbullet is a similar push service to Pushover but Pushbullet also has a Chrome browser plugin as well as a Windows client which you can use to send messages to via their API. If you want you can also use it to push messages to your mobile/tablet like Pushover. For the moment I still like Pushover for this.

    You need to sign up an account with Pushbullet and then register a device by installing the client. Then call the API to get the iden of the device you want to send the message to. Include the iden in the script as the first parameter in the data variable. Below in my example my device iden is: ueyTddjAiZsKnETs.
    You also need to Base64 encode your Pushbullet API key and include this in the header to authenticate, as below you will see "Authorization: Basic dGhpc2lzYXRlc3RzdHJpbmc=" (I've changed my key and iden for demo purposes).

    Then just call the script with the title and message you want to send split by a hash. "Title#Message"

    The Pushbullet windows client is still in Beta but it seems to work well from my tests so far. Hope this is of some use to someone!

    PHP Code:
    Sub Main(ByVal params As String)

    dim sdatatitlemessage
    Dim paramArr
    ()
    const 
    server_url "https://api.pushbullet.com/api/pushes"
    const headers="Authorization: Basic dGhpc2lzYXRlc3RzdHJpbmc="

    paramArr params.Split("#")
    title paramArr(0)
    message paramArr(1)

    data "device_iden=ueyTddjAiZsKnETs&type=note&title="+title+"&body="+message

    hs.URLAction(server_url"POST"dataheaders)

    End Sub 

  • #2
    This seems pretty cool. I think a script that decodes the key for you, gets a list of devices you could send to, and lets you pass in a device name as a parameters would be the next step.

    I'm using c# scripting so I can't share what I've done yet (my C# scripting plugin has not been released yet), but I've got one that does nearly all of that stuff so far.
    Joe (zimmer62)

    BLSecurtiy, AC-RF2, RCS Serial Thermostats, RFXCOM SMarthome SwitchLinc, mcsXap, Global Cache GC100, SqueezeBox, TWA_ONKYOINTEGRA, BLLogMonitor, BLPlugins, BLRadar, BLSpeech, BLZLog.aspx, HSTouch (Windows, iPhone, iPod), USB Mimo touchscreens, VMWare Server, Vortexbox, Windows Home Server, MyMovies, Windows Media Center, X10, ZWave, and much much much more.

    Comment


    • #3
      The changes would be good. I could do them quickly in PHP but still very much a begginer with VB currently. Could also be modified to support the other call to send images, I may try some tests later to see how well it works as it would work nicely for security alerts when my alarm is triggered.

      Comment


      • #4
        The code I've got right now (still c#) is getting the devices and names for any number of pushbullet account API's (I have one, so does my girlfriend)

        I can then send a message by calling my script saying where I want to send the message

        SendBullet("Joe's iPhone","subject","message");

        It works pretty well, and actually guess the closest name for picking which device. So I I were do say Joe's phone it's still going to go through.

        More on that later.
        Joe (zimmer62)

        BLSecurtiy, AC-RF2, RCS Serial Thermostats, RFXCOM SMarthome SwitchLinc, mcsXap, Global Cache GC100, SqueezeBox, TWA_ONKYOINTEGRA, BLLogMonitor, BLPlugins, BLRadar, BLSpeech, BLZLog.aspx, HSTouch (Windows, iPhone, iPod), USB Mimo touchscreens, VMWare Server, Vortexbox, Windows Home Server, MyMovies, Windows Media Center, X10, ZWave, and much much much more.

        Comment


        • #5
          Hey
          i got the iden key but how the hell do i encode the usernameassword into the base64 key?
          anyone got a link?

          Comment


          • #6
            Easy plenty of tools online to do it - https://www.base64encode.org/ click the encode tab.

            Comment

            Working...
            X