Windows notifications?


#1

Can anyone here think of (or know of) an easy way to create notifications on windows?

Similar to how a notification would look for an email in outlook, for example.

I’m going through various ways this could be done, but I don’t want to waste my time going down all these roads, in case someone here happens to know of a way to do this.

I’m currently using Echo Speaks to help remind me of things around the house…but a lot of times, I have headphones on and don’t hear the notification…and also, a lot of times my phone is on silent, so I wouldn’t see a text or email notification.

However, I would definitely see a windows desktop notification, because most of the time I’m working on my computer.

I’ve done some limited research, but I’ve been looking at the microsoft documentation on WNS to see how that works, to see if I could throw together a simple app that can do that for me. Or maybe push bullet…or maybe something as simple as emails, and rules to auto-delete the email? I dunno.


#2

I’ve never looked into it, but if you have an Android phone, the ‘Your Phone’ app on Windows is said to be able to show you your phone notifications. I don’t think it has that functionality with iPhone.


#3

Yeah, that’s sort of the route I was thinking of going. Push Bullet I believe does the same thing (though, I didn’t think of the Your Phone app, that would probably be better integrated with windows).

The only down side is there isn’t much options for configuration…That might be the direction I need to go at first, but I’m hoping eventually I can find something that is a little simpler.

I’d also be interested in looking into Chrome notifications…like how some websites ask if they can notify you. Perhaps there’s something there, maybe even a feature request from the WebCoRE team? That would be kinda cool to look into.


#4

Pushover has a Desktop app for alerts in various browsers. Haven’t used it but it might work.


#5

I am a big fan of Join(created by the same programmer as Tasker)
They have an Android version, a Windows version, and a Chrome plugin…
The downloads are found at the above link for $1 - $2 each. (One time fee)

This is an amazingly powerful software, that does so much more than just notifications in Windows.
(API access, file transfers, automations, Clipboard sharing between devices, variables passed between devices, Google Assistant, Google Drive, EventGhost, IFTTT etc)


Warning:

The first link above has two videos that may blow your mind…


#6

Alternatively, you can install an Android emulator (such as BlueStacks) on your PC, and then all normal PUSH notifications will show on your Windows desktop… As long as you:

  • Have the emulator running
  • Have installed SmartThings Classic
  • Are logged into SmartThings

This method can be quick and easy, but an emulator takes a lot more resources than Join, and you loose all of the advanced options mentioned in my previous post.


My vote is to use Join unless you have other reasons to keep an Android emulator running 24/7.


#7

Ahh, thanks, I completely forgot about Join. I had read about it a long time ago, but never had a use for it.


#8

Thanks for the suggestion!! Got it all working.

I’m using Join’s API call to make a web request from a piston to send notifications directly to my windows 10 desktop, it works great!

Now I’m getting all kinds of ideas for building a set of pistons for working directly with Join. Like functions you can use anywhere…like setting which devices you want to use, the text, the title, etc.

There goes doing anything productive this weekend :joy:


#9

Personally, I think your ideas are productive… but then again, I do this for a living, so I may be a bit biased, LOL


#10

Could you please share how you got push notifications working with Join?


#11

I thought it worked right out of the box, but now that I think about it, you’ll likely need either the

Note, The Chrome extension is my preferred method, unless the client does not use that browser often.


#12

Thanks. I already use the Join Chrome extension to mirror SMSs and notifications between my phone and PC. How do you make the API call from a piston to Join to make the notification show up on Join-enabled devices? Would it be possible to see some sample code?


#13

I believe the app Join will “join” your devices. (phone to PC to tablet etc)
So the easiest way is to use Tasker to send the command to Join’s Chrome extension.

… and of course, there are many ways to get data from SmartThings into Tasker.
(although I have not tried going directly from webCoRE to Join yet)


#14

I just found this excerpt:

<quote>
With Join you can easily send pushes to your devices by using a simple URL.

To get started, go here, click on a device (in your case, Chrome) and then click the “JOIN API” button. You’ll be able to generate a URL that will send a push to your device.
</quote>


Once you follow the steps above, then add some text to these two sections:

pic

Then copy the URL near the top. (but do not share with anyone!)

Then back in webCoRE, the basic command is to make a GET request to that URL:

When the piston executes that line, you will see the PC Notification in Chrome:

pic


Of course, once your testing is working well, you can replace part of that long URL with variables, and they will be passed into future Notifications.


#15

I would do the test above first, just to confirm it is working on your end… but here is the next level of testing, where we use variables in that long URL:

1

The anonymized URL is something like this:
https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?text={msg}&title={title}&deviceId=XXX&apikey=XXX


Which pops up this Notification on my PC:

2


In this example, each time the piston runs, the PC notification will be different, because the weather would have changed.


Pro Tip:

Join also allows messages to be SPOKEN on the PC, using this parameter:

pic


#16

Holy cow, that was so smooth! I love your work!

I’m going to play around this a lot more. There’s a lot of potential in there. I’d love to find a way to turn this into a ‘library’ that I can call from other pistons as a standard notification mechanism.


#17

I can see the temptation, but I think it will be much less code, and much more streamlined if your pistons makes their own GET request directly. (since it only requires one line of code)

If it were me, I would copy that one GET request line to webCoRE’s clipboard… Then it will be easy to paste in that single line in any future pistons where you want to send notifications.

Something like:
Make a GET request to {@url}{title}{msg}

(notice in this example I am using a @global for the first part of the URL, since that portion will not change)

Just my two cents.


#18

That sounds like a much better approach. I’m not sure if I understand your sample code. I can imagine it looking like:
Make a GET request to {@url}{msg}&title={title}&deviceId=XXX&apikey=XXX
Am I off track?


#19

My apologies. I simplified it a bit…

A better example might be:
Make a GET request to {@url}{title}{msg}{@urlEnd}

In this example:

{@url}    = "https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?"
{title}   = "title=Cool title here"
{msg}     = "&text=Cool message here"
{@urlEnd} = "&deviceId=XXX&apikey=XXX"

Personal Thoughts:

If it were me, I’d probably shift those parameters around a bit (as my earlier example)
Make a GET request to {@url}{title}{msg}

In this example:

{@url}  = "https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?deviceId=XXX&apikey=XXX"
{title} = "&title=Cool title here"
{msg}   = "&text=Cool message here"

(notice I shifted the deviceid and apikey to the end of the @global)


Pro Tip:

If you wanted to keep your local varibles “pure”… you could add this line to your webCoRE clipboard instead:

Make a GET request to {@url}&title={title}&text={msg}


#20

I’ve been fighting illness the past week, but I’ve finally been able to get back to this.

I like your approach, and I’ve been playing around with it more to help me learn more about how variables work in WebCoRE. Here’s a sample:

The GET request just goes to {joinUrl}. Everything is defined via variables and global variables. I can save different device IDs as global variables and call the one I want as required.

I really appreciate your help on this. I’ve learnt so much!