From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Using Pushetta with Labview

Code and Documents

Attachment

Overview

The Pushetta website (http://http://www.pushetta.com/) describes Pushetta as follows:

Pushetta is a system made to push realtime notifications to many different devices (mobile phones, browsers, smart TV, ...).

It address a simple problem: get realtime information without using outdated methods (someone said "emails"?).

It provides a fairly simple to use channel to send notifications to iOS, Android, etc. and a Chrome extension is also available.

It provides a fairly simple to use, web based API to send notifcations to iOS, Android, etc. and a Chrome extension is also available (although I couldn't get this to work).  I've used Pushetta so sent test system status notifications to my cell phone, and while this may not be the "pro" solutions, it works for me and there are loads of other things you could theoretically do with this.  You can think of it as a one way chat with client notification.

Description

Let's start at the beginning.  In order to get pushetta to work, you will need:

  1. An account on http://www.pushetta.com/
  2. A channel.  You can create a channel at pushetta when you have an account.  You can also hide channels so they don't show up in search results, make the channel non-public and manage channel subsribers there.
  3. Your authentication token.  You can find this on your dashboard once you have an account.

Once you have your authentication token and your channel, it's time to get started.


At http://www.pushetta.com/pushetta-api/ you will find a good description of the API and the associated functions.  Looking over it, you will find that "Pushetta use a very simple API, there are many example about using it from various languages, here there is documentations about endpoints for implementing custom interfaces. Authentication is token based, token is normally taken from the dashboard but can be obtained by calling auth endpoint."

OI'm going to skip retrieving the token over the interwebs and just assume you're going to copy and paste the token and use it as a input terminal into the pushetta vi.


Steps to Implement or Execute Code

  1. Load the vi below.
  2. Enter your channel name.
  3. Enter your authentication token.
  4. Enter your message.
  5. Enter your notification expiration date (this is optional).
  6. Run the vi.
  7. Watch the notification pop up on your device.

You can also use the vi below as a subvi and trigger messages anywhere in your code.

Requirements

Software

Labview + the HTTP client vis under Data Communication--> Protocols-->HTTP Client 

I think all Labview editions have these.  Please connect me if I'm wrong.

Client device running the pushetta app.  App links can be found here: http://www.pushetta.com/pushetta-downloads/

Hardware

You will need access to the internet and some sort of client device running the appropriate pushetta app.  On that device you will have to subsribe to your channel.  This is a fairly simple process.

Additional Images or Video

The block diagram:

Send_Pushetta_Messaged.jpg

Sample notification from my test channel on my android device.  As you can see, I need to charge my battery and I like Knorkator.  They're a good band.

Screenshot.jpg

Conclusion:

This works.  It may not be for everyone, but it's good enough for me and my needs, and after all, this is what it's all about, right?  If you have questions, please feel free to ask...


Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors