Mobile App communication with Inverter through Bluetooth

With Internet of Things (IoT) adoption, OEMs are building connected products. The first step to build connected ecosystem is to enable wireless communication on edge devices. The objective of this blog is to help how to use the Bluetooth technologies to communicate with devices wirelessly. Problem We are working with leading solar inverter manufacturer. They have requirement to monitor power generation, storage and consumption of remotely deployed rooftop solar panels. As remote location does not have GSM connectivity, it’s always challenge to retrive data. Considering scale and low cost business model, Bluetooth technology was clear choice solution. Solution We have build Mobile app that interact with Inverter over Bluetooth. Providing reliable and cost effective solution to the end user is main motto behind this. User has to pair with Inverter and click few buttons to retrive data. The same data would be uploaded to cloud when Mobile comes in wi-fi or data coverage. package com.example.bluetoothconnection; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; public class MainActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } } Source 1. Starting code The first programming step is to create a new Android Application Project in Android Studio. Doing so will generate code similar to that in Source 1. The first thing the program should do is determine if the Android device supports Bluetooth. To do this, create a BluetoothAdapter object using the function getDefaultAdapter(). If this returns null, then the Android device does not support Bluetooth. Source 2 shows how to do this. Add this code to OnCreate(). package com.example.bluetoothconnection; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); if (mBluetoothAdapter == null) {...

Customer segmentation using Machine Learning K-Means Clustering

Most of platforms build in Information Technologies are generating huge amount of data. This data is called as Big Data and it carries lots of business intelligence. This data is crossing boundaries to meet different goals and opportunities. There is opportunity to apply Machine Learning to create value for clients. Problems We have big data based platforms in Accounting and IoT domain that keep on generating customer behavior and device monitoring data. Identifying targeted customer base or deriving patterns based on different dimensions is key and really provide an edge to the platforms. Idea Imagine you got 1000’s of customers using your platform and vast amount of big data that’s keep on generating, any insight on this is really going to value add. As part of Machine Learning initiatives and innovative things that Patterns7 team keep on trying, we experimented on K-Means Clustering and value it brings to our Clients is awesome. Solution Clustering is the process of partitioning a group of data points into a small number of clusters. In this part, you will understand and learn how to implement the K-Means Clustering. K-Means Clustering K-means clustering is a method commonly used to automatically partition a data set into k groups. It is unsupervised learning algorithm. K-Means Objective The objective of k-means is to minimize the total sum of the squared distance of every point to its corresponding cluster centroid. Given a set of observations (x1, x2, …, xn), where each observation is a d-dimensional real vector, k-means clustering aims to partition the n observations into k (≤ n) sets S = {S1, S2, …, Sk} so as to...