raspberry-pi_connect to Paasmer IoT Platform copy-min

How to Connect Raspberry Pi 3 to the PAASMER IoT Platform


Srinidhi Murthy

In this blog series we look at how to connect a Raspberry PI 3 to the PAASMER IoT Platform.

The PAASMER IoT Platform makes it simple for Internet of Things companies to build and launch IoT-enabled hardware. PAASMER currently provides an SDK which can be installed on the hardware.

Modifying a few lines of code to provide the correct credentials and sensor information, it is ready to be connected to the PAASMER IoT Platform. The sensor data is then available on the PAASMER Developer Login, which can be utilized and actions taken by using the control fields to control various other sensors connected to the Hardware.

A pre-requisite for using the SBC-SDK is available of the Raspberry Pi 3 hardware running Raspbian Jessie OS. More hardware and software support would be added shortly.

An account created in http://developers.paasmer.co allows for a 30 day trial period to explore the PAASMER IoT platform. After creating and activating the account, the SDK for the appropriate hardware can be downloaded.

Given below are the detailed steps to be followed after downloading the SBC-SDK.

PAASMER IoT SDK for Single Board Computers Running Linux


The PAASMER SDK for Single Board Computers (SBC) like Raspberry-PI, Intel Edison, Beagle Bone is a collection of source files that enables you to connect to the PAASMER IoT Platform. It includes the transport client for MQTT with TLS support. It is distributed in source form and intended to be built into customer firmware along with application code, other libraries, and RTOS.


The SBC-SDK simplifies access to the Pub/Sub functionality of the PAASMER IoT broker via MQTT. The SDK has been tested to work on the Raspberry Pi 3 running Raspbian Jessie. Support for Other SBC’s running any flavors of Linux would be available shortly.

MQTT Connection

The SBC-SDK provides functionality to create and maintain a mutually authenticated TLS connection over which it runs MQTT. This connection is used for any further publish operations and allow for subscribing to MQTT topics which will call a configurable callback function when these topics are received.


Registration on the portal http://developers.paasmer.co is necessary to connect the devices to the PAASMER IoT Platform.The SDK has been tested on the Raspberry PI 3 with Raspbian Jessie (https://downloads.raspberrypi.org/raspbian_latest)


  • Download the SDK or clone it using the command below.
    • $ git clone github.com/PaasmerIoT/SBC-SDK.git
    • $ cd SBC-SDK
  • To connect the device to Paasmer IoT Platform, the following steps need to be performed.
    • $ cd external_libs/mbedTLS/
    • $ make
    • $ cd ../../
    • $ sudo ./install.sh
  • Upon successful completion of the above command, the following commands need to be executed.
    • $ sudo su
    • $ source ~/.bashrc
    • $ PAASMER
    • $ sed -i ‘s/alias PAASMER/#alias PAASMER/g’ ~/.bashrc
    • $ exit
  • Go to the directory below.
    • $ cd samples/linux/subscribe_publish_sample/
  • Edit the config.h file to include the username(Email), device name, feed names and GPIO pin details.
    #define UserName "Email Address" //your user name used in developer.paasmer.co for registration
    #define DeviceName "" //your device name
    #define feedname1 "feed1" //feed name used for display in the developer.paasmer.co
    #define sensorpin1 gpio-pin-no-for-sensor-1 //modify with the pin number which you connected the sensor, eg 6 or 7 or 22
    #define feedname2 "feed2" //feed name used for display in the developer.paasmer.co
    #define sensorpin2 gpio-pin-no-for-sensor-2 //modify with the pin number which you connected the sensor, eg 6 or 7 or 22
    #define feedname3 "feed3" //feed name used for display in the developer.paasmer.co
    #define sensorpin3 gpio-pin-no-for-sensor-3 //modify with the pin number which you connected the sensor, eg 6 or 7 or 22
    #define feedname4 "feed4" //feed name used for display in the developer.paasmer.co
    #define sensorpin4 gpio-pin-no-for-sensor-4 //modify with the pin number which you connected the sensor, eg 6 or 7 or 22
    #define controlfeedname1 "controlfeed1" //feed name used for display in the developer.paasmer.co
    #define controlpin1 3 //modify with the pin number which you connected the control device (eg.: motor)
    #define controlfeedname2 "controlfeed2" //feed name used for display in the developer.paasmer.co
    #define controlpin2 4 //modify with the pin number which you connected the control device (eg.: fan)
    #define timePeriod 15000 //change the time delay as you required for sending sensor values to paasmer cloud
  • Compile the code and generate the output file.
    • $ sudo make
  • Run the code using the command below.
    • $ sudo ./subscribe_publish_sample
  • The device would now be connected to the Paasmer IoT Platform and publishing sensor values are specified intervals.


The support forum is hosted on the GitHub, issues can be identified by users and the Team from Paasmer would be taking up requests and resolving them. You could also send a mail to support@paasmer.co with the issue details for a quick resolution.


Is Node Red the key to unlocking the potential of Internet of Things


Kavitha Gopalan

IOT is in forefront of all technology discussion. A lot of new tools, platforms, and product evolve every day to meet the growing needs of the IOT market.

Developing IOT applications can be a daunting task. There are so many pieces to be glued together for the IOT product or solution from sensors, gateways, cloud, middleware, analytics and so on and not to mention the task of understanding the various application development frameworks and standards that come with it.

IBM’s open source project Node Red is intended to reduced the software complexity of building IOT project and help in the rapid development of applications.

Node Red is a powerful open source visual tool used for building IOT applications. It revolves around the concept of wiring together the different pieces of blocks to create the functionality. It has multiple pre-built code blocks known as “Node” which can be called to perform a task. For example, if you want to turn on your LED bulb with a twitter hashtag #Led you can simply connect the twitter node, trigger node, and your bulb.Node red is a flow-based programming tool where series of nodes represents events and trigger based on the event can be programmed.

Programming Visually With Node-RED: Wiring Up The Internet Of Things With Ease written by Jesus Dario Rivera from Toptal gives a very good introduction into using Node red to create smart home application

He writes

“To demonstrate how Node-RED fits into the realm of Internet of Things, let us build an application to change the color of a smart bulb. Not everyone may have the same smart lighting system at their disposal, but there is nothing to worry about, as you can find the appropriate Node-RED module from the official flow repository. However, to make things even easier let us go for something smarter”
Read mode here https://www.toptal.com/nodejs/programming-visually-with-node-red

Also, read PAASMER’s blog on How to connect devices to AWS IOT in this blog


How to setup Stream Analytics for IoT


Srinidhi Murthy

What is Stream Analytics
Stream analytics or Streaming analytics typically means making analytically informed decisions in milliseconds, while examining many thousands of events per second, generated from many millions of devices which can also be enriched by many other disparate sources of data.

Stream analytics is important for institutions and individuals alike. We need to know what is happening now and not miss out on anything important. An event with a particular machine at my productions plant or someone breaking and entering my home is of importance to me now and not later as this helps me in immediately initiating remedial actions based on events.

IoT is a typical use case for Stream Analytics as we have millions of things generating many million events which need to analyze on the fly and make informed choices either automatically or by human intervention.


A Streaming analytics platform has the following features:-

  • Data or events are analyzed in almost real time.
    • They may be routine monitoring, counting, alerting and reporting of data.
    • They may also include this filtered data or enriched data to be fed into complex decision-making systems for training and predictive analytics.
  • Every incoming event is distinctly processed.
  • Events may be stored for future usage.
  • Immediate actions are possible after processing of events, albeit simple actions like sending alerts, emails, streaming etc.

Advantages of Streaming Analytics:-

  • Business value of data diminishes with age. With streaming analytics, an immediate action based on data is possible.
  • Immediate threats to life, infrastructure is drastically reduced.
  • Predictive maintenance to cut future losses.

Conclusion: We have options from all three major IoT platform providers AWS, Azure and Google to do stream Analytics. A detailed study on each of this platform will be published as the whitepaper, watch our resource page for this whitepaper click here.


Smart Home :- A protected Nest or an Open Book


Kavitha Gopalan

IOT is revolutionizing several industries including the consumer industry. Smart home has emerged as one of the top adopters of IOT with some of the cool innovative products. And it’s growing at a phenomenal phase. In 2016, 80 million smart home devices were delivered worldwide, a 64 percent increase from 2015, according to IHS Markit. CES 2017 saw around 190 exhibitors showcasing some of the innovative and futuristic smart home offerings.

The idea of connecting the everyday home devices to the Internet and its ability to be controlled from anywhere was refreshing and everyone jumped on the smart home train. Answering your door even while you are on a vacation, turning on your sprinkler while you are away from home, getting your coffee ready while you still asleep all these looked like a dream from a SCi-FI movie and yet it was affordable and adoptable. This helped in the steep growth of smart home products in the last couple of years. Definitely smart home is taking the concept of home to a new level.

However, the question remains if the privacy and security which is the foundation of the home will get lost as we move into the era of the smart home. Is my private data safe anymore? Am I the only one who knows about me?

Home Smart Home: Domesticating the Internet of Things written by Kent Mundle of toptal discuss this key aspect.

He says “The home is the original security device – the original firewall. But now, as we allow the entire world to float through our walls and into our homes, have we deflated the entire meaning of our home that has stood for millennia? We speak of security and privacy now in the context of technical systems and hardware. But have we forgotten the origin of what privacy meant? In the spaces where we were once the most intimate, by inviting the world in we are becoming the most exposed. To adopt the Smart Home, must we forfeit the home?

Read more here https://www.toptal.com/designers/interactive/smart-home-domestic-internet-of-things

The Smart home devices have become the hub for several security attacks. The recent Mirai security attack used smart home devices as a botnet to create havoc. Hence it becomes imperative to secure the connected devices to prevent any unwarranted usage.

PAASMER IOT platform follows a ground-up implementation to ensure data from the device to cloud and beyond is secure and no data compromise happens. It also ensures that the devices are not exposed to any kind of attack.

Read more about how PAASMER IOT platform help to build secure IOT products and solutions.



Real State of IoT and the Security challenges


Chandramouli Srinivasan

In a recent article by our friend Nermin at Toptal says “The Internet of Things (IoT) has been an industry buzzword for years, but sluggish development and limited commercialization have led some industry watchers to start calling it the “Internet of NoThings”. Double puns aside, IoT development is in trouble. Aside from spawning geeky jokes unfit for most social occasions, the hype did not help; and, in fact, I believe it actually caused a lot more harm than good. There are a few problems with IoT, but all the positive coverage and baseless hype are one we could do without. The upside of generating more attention is clear: more investment, more VC funding, more consumer interest”

He also says the top two challenges that continue to haunt IoT as “1) Security – Just not the vulnerable devices that get hacked but also the misuse of the data collected from devices. 2) Hardware pain points – Security needs to be built from hardware and that comes at an additional cost”

While the concerns are genuine on security, we have been talking to a few IoT device manufacturers on the need to increase their budget for hardware and software to secure the devices they use or sell. Most of these cases, we still a lot of reluctance to implement additional security at an additional cost on the consumer side while enterprises are willing to secure the devices at an additional cost. Also the new software paradigms of “IoT on ToR” and “IoT on BlockChain” are also starting to get traction and they also are going to come at additional cost. It appears like it will take many more massive security attacks like Anti-DDoS to shift the mindset to put security first in IoT product designs. The questions remain as “Are we willing to pay the price for what?”

Read full article from Nermin in this link: https://www.toptal.com/it/are-we-creating-an-insecure-internet-of-things

Also check out our article on “IoT on BlockChain” in this link: http://blogs.paasmer.co/a-marriage-made-in-heaven-iot-blockchain/


The Choice of IOT network – LPWAN leading the way?


Kavitha Gopalan

IOT is the next technology transition where devices allow us to sense, control and manage the devices by making them smarter and connecting them through an intelligent network.

If you look at the building blocks of IoT there are four main blocks 1) Sensors or things or Edge as you may call it 2) The Local Network; this can include a gateway, which translates proprietary communication protocols to Internet Protocol 3) Internet 4) Back-end services.

The local network or the network that connects the “things” and places them on the internet is what we will focus today. Choosing the right communication technology is crucial to the success of building an efficient IOT system.

There are many choices available like cellular, Wi-Fi, ZigBee, Z-Wave, En-Ocean, 6LoWPAN and LPWAN. Most of these technologies except cellular and LPWAN are mostly suited for short range communication typically an indoor kind of application. IOT connects millions of sensors to the internet. For connecting these devices to the internet and to be able to control and manage from anywhere would require us to use either cellular or LPWAN.

Here is a simple comparison of various IOT networks available and their distinctive features.

Long RangeYesYesNoNoLimited 1.5KmYes
Tx Current Consumption500-1000mA600-1100mA19-400mA34mA35mA20-70mA
Operating Battery Life2-4 hours2-3 hours2-8 hours60 hoursVariable10 to 20 years
Module Cost$35-$50$40-$80$5-$8$6-$12$3$2-$5

Long Range, Low power consumption, long battery life and low cost are the key factors which make LPWAN ideal network of choice for IOT. Let’s dig a bit deeper into this.

In a typical IOT implementation, there could be multiple sensors which could be sensing and transmitting the data. These are readings like the temperature or moisture level etc. which are the short and simple message. For examples the Sensors in the factory floor sending data or sensors in the crop field sending the moisture level or location information send by fleets.

Using cellular for transmitting these simple message is overkill. It consumes more power and it is going to be costly. Cellular connections for streaming video, games, and conversation require relatively huge bandwidth compared to the simple status reports that will make up the bulk of Internet of Things transmissions.

The other challenge in an IOT application is the power consumption. LPWAN consumes extremely low power and can operate for years on a battery.

LPWAN provides long range communication, consumes low power and costs very less compared to a cellular network. Many service providers are already considering LPWAN.

What is LPWAN?

LPWAN stands for Low Power Wide Area Network. Long Range, Low Power, and Low data throughput are the key characteristics of LPWAN. LPWAN sits in a sweet spot of IOT – Long range and Low bandwidth.


Some of the characteristics of LPWAN

SpectrumUnlicensed <1GHz, 2.4GHz
Long Range10s Km
Battery LifeUpto 20 years
Low BandwidthUpto 100Kbit/s
Low Chip cost<$5
Low subscription Costs<$10
LatencyUpto Mins

LPWAN typical use cases involve long range communications even in dense urban areas or Remote application requiring long battery life. Examples would include Smart city, smart lighting, smart metering, smart factory, Smart grid, Smart agriculture.

There are multiple long range low power networks evolving like SIGFOX, LoRA, WAVIOT. Ingenu, weightless-N.

LoRA and Sigfox are in the top of LPWAN lists with good hardware availability and maturity. Both companies have different technologies and business model but their goal is to make more and more mobile network operators to adopt their technology.And the comparison between them are for another blog.

For now, it looks like LPWAN will be leading the way for IOT networks but if 5G comes with a bang to take IOT head on then the table could turn. Only time will tell!