<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Walter Martins on Medium]]></title>
        <description><![CDATA[Stories by Walter Martins on Medium]]></description>
        <link>https://medium.com/@wdmartins?source=rss-263bff5a27a6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*jsL6C8Abw2ybrkwEZyq_zg.jpeg</url>
            <title>Stories by Walter Martins on Medium</title>
            <link>https://medium.com/@wdmartins?source=rss-263bff5a27a6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 00:20:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wdmartins/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Active/Passive Kubernetes deployment for high availability stateful applications]]></title>
            <link>https://medium.com/swlh/active-passive-kubernetes-deployment-for-high-availability-stateful-applications-b7e6fa068944?source=rss-263bff5a27a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7e6fa068944</guid>
            <category><![CDATA[stateful-applications]]></category>
            <category><![CDATA[high-availability]]></category>
            <category><![CDATA[sidecar-pattern]]></category>
            <category><![CDATA[mission-critical]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Walter Martins]]></dc:creator>
            <pubDate>Tue, 28 Dec 2021 14:53:56 GMT</pubDate>
            <atom:updated>2021-12-28T14:53:56.876Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gm6D9p2hRSU3H3GKwgcnVg.jpeg" /></figure><p>This article describes an implementation concept of Active/Passive Kubernetes deployment for highly available mission-critical stateful applications.</p><p>This is nothing new under the sun, however, based on specific non-functional requirements we had to implement an alternative version of an already known solution.</p><h3>About the application</h3><p>The application is a Node.js service that interfaces between the emergency call network and emergency text call takers consoles that are not able to handle SIP and MSRP protocols. Our application then takes care of the complexities of SIP calls processing and text media session handling and ‘translates’ them into a simple REST interface.</p><p>This means the service is stateful as we cannot have different instances of the application handling SIP and MSRP (text) messages for the same call.</p><p>High availability then is achieved by having one (or more) passive instances of the service on standby, ready to take over in case of active instance failure.</p><p>The application is already deployed on the Azure government cloud using AKS (Managed Azure Kubernetes Service)</p><h3>Leader election</h3><p>Leader election is the Kubernetes pattern of choice to achieve high availability as required by our application. Usually, the leader election mechanism is based on Kubernetes endpoints. This is very well <a href="https://kubernetes.io/blog/2016/01/simple-leader-election-with-kubernetes/">explained on Kubernetes blog</a>. The election is based on Endpoint resources, that hold annotation about the current leader and its leadership lease time. If the leader dies, other instances of the service are free to take over the record.</p><p>In practical terms, the leader election mechanism uses sidecar applications so the leader election is handled transparently to the service. In Kubernetes, Pods are made up of one or more containers. Oftentimes, this means that you add sidecar containers to your main application to make up a Pod.</p><h3>A different leader election solution</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*susNK--esdvzVq57BJQamw.jpeg" /><figcaption>Leader election without sidecars</figcaption></figure><p>Our team wanted to have the fastest take-over possible in case of leader failure. It also considered the sidecar application as a single point of failure.</p><p>Because of that, we implemented a leader election with the following characteristics:</p><ul><li><strong>Service state is saved in persistent memory</strong></li></ul><p>The requirement for an application that handles telephony calls is that any established call shall remain established in the event of a service instance failure. So, all data of already established calls are stored in persistent memory. We use Redis for persistent data storage.</p><ul><li><strong>No sidecar</strong></li></ul><p>The functionality of the sidecar is implemented by the service itself.</p><ul><li><strong>The service instances compete for the leadership</strong></li></ul><p>Upon startup, each service instance will compete to register themselves as a leader by storing their IP address and port into common persistent storage using a predefined key (We take advantage of Redis as it is already used by the application). The instance registering first will declare itself active, while the other will be on standby.</p><ul><li><strong>The resulting passive instance pings the active one</strong></li></ul><p>The passive instance knows the active instance IP address and port from reading the persistent storage when losing the leadership race. So, it starts sending a heartbeat to the active instance and waiting for a response. It does this every one second.</p><ul><li><strong>Use Pod labels and service selector to direct the traffic</strong></li></ul><p>Each service instance, acting as Kubernetes client patches the Pod data where they are running with a special label, let’s call it mode . So the mode label is set to active by the leader instance, and stand-by by the passive instance.</p><p>A selector mode=active is defined to direct traffic to the active Pod only.</p><ul><li><strong>Takeover upon heartbeat failure</strong></li></ul><p>Upon failing the heartbeat, the passive instance will become active by setting its own IP address and port in the common persistent storage and patching its own Pod data with label mode=active.</p><ul><li><strong>Check for inconsistencies and fix them</strong></li></ul><p>Although it should never happen, a separate audit service runs in another Pod that periodically checks for Pods labels mode. If they are inconsistent (both are active or both are standby), both Pods are restarted. Depending on the nature of the application it can also be fixed by patching one of the Pods.</p><p>This solution allowed us to have a fast recovery while keeping the state of the service, meaning all established calls survive a failover.</p><h3>Example</h3><p>For illustration purposes, I have implemented a small application applying this concept. You can check the whole code on my <a href="https://github.com/wdmartins/active-standby">Github repository</a>.</p><p>The <a href="https://github.com/wdmartins/active-standby#readme">README.md</a> file explains how to install the example. Follow the next steps to test a takeover.</p><p>Once the Pods are running check that one instance is active and the other is on standby by listing the Pods with the --show-labels parameter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2J909YwQJoRtBKrMwe9ZaA.png" /></figure><p>Notice that the Pods also have the label app, which is also used by the Kubernetes service to route traffic to a Pod matching app=app and mode=active.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/74ba721c8ee0821ccea76a518cdb65bd/href">https://medium.com/media/74ba721c8ee0821ccea76a518cdb65bd/href</a></iframe><p>The example application is a simple web service that keeps a state. Let’s open the browser to the main page using the minikube service command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_eLY57O9J7JWvIhUDUTT3A.png" /></figure><p>On the browser, we see a greeting message with the serving Pod name (hostname).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PbGf8p1c7g4PEuFp7LRSCg.png" /></figure><p>If we issue the /state request we will see the state kept by the app is Idle</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1_F2zmc66Zjpoo0VFEnepg.png" /></figure><p>Let’s issue the /start request to change the state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TGbgZu401CAy_mVpZOuT7g.png" /></figure><p>The current state is now running. Notice the serving Pod name is always the same, that is the name of the active Pod.</p><p>To initiate a takeover we will delete the active Pod.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xd2z7gdt_HZ5W-YNGMKL1A.png" /></figure><p>Notice that the previously passive instance has become the active one. So, if we issue a /state request:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c9Q6_EtL8TMxKHPrIEmUwQ.png" /></figure><p>we notice that the service Pod name has changed while keeping the state of the service.</p><p>To test the audit function we need to generate an inconsistent state by changing one of the Pod’s mode labels to match the other Pod.</p><p>After a few seconds, the inconsistency is detected by the audit application and fixed by restarting both Pods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VGG48hsfzxSNKq86BlJcqA.png" /></figure><h3>Conclusion</h3><p>Although this concept matches very closely the leader election with sidecar its implementation is different. We considered this implementation allows for faster recovery without a single point of failure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7e6fa068944" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/active-passive-kubernetes-deployment-for-high-availability-stateful-applications-b7e6fa068944">Active/Passive Kubernetes deployment for high availability stateful applications</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Raspberry PI Robot Car Controlled by Node.js]]></title>
            <link>https://medium.com/swlh/raspberry-pi-robot-car-controlled-by-node-js-3d9c27c5b16f?source=rss-263bff5a27a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d9c27c5b16f</guid>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Walter Martins]]></dc:creator>
            <pubDate>Wed, 14 Oct 2020 21:28:48 GMT</pubDate>
            <atom:updated>2020-10-26T22:01:40.063Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TWHiNzXulurCYALU6Bmy7Q.jpeg" /><figcaption>Credit: UCTRONICS</figcaption></figure><p>When you do not have a Robot Car, you would think there are plenty of things to do with it, like see what’s going on around the house without moving from your couch, scare your cat, annoy your significant other, etc. Well, when I finally got one, I did all that the first day, and then put it on a shelf.</p><p>The purpose of this article is to show how I replaced the C language server that controls the Robot Car hardware using Javascript (Node.js)</p><p>This article does not intend to be a product review but I have to give it to the guys at UCTRONICS. Their <a href="https://amzn.to/3dhvFIv">Robot Car Kit for Raspberry PI</a> is great for anyone interested in getting started with robotics. From the packaging, through the instructions, to the general quality of the materials, UCTRONICS does a great job. You would have as much fun putting it together as you will have using it, and it works the first time.</p><h3>Back from the shelf…</h3><p>I picked up my robot car, powered it up, ssh’d to the Raspberry PI, and start looking around. I found what they use to stream video, <a href="https://github.com/cncjs/cncjs/wiki/Setup-Guide:-Raspberry-Pi-%7C-MJPEG-Streamer-Install-&amp;-Setup-&amp;-FFMpeg-Recording">MJPEG streamer</a>, and a WebSocket server.</p><p>With a little research, I found the C language code repository on <a href="https://github.com/UCTRONICS/UCTRONICS_Smart_Robot_Car_RaspberryPi">Github</a> and started reading it.</p><p>I have written code in C and C++ language for many years and what I found would have not survived a peer review. Lack of good structure, poor documentation, inconsistent coding style, commented out code,… it just looked like a first prototype, but it works.</p><p>It was then that I decided if I want to enhance, modify, or add features to the robot car, I was not going to do it using that codebase. So, I started from scratch.</p><h3>Requirements</h3><p>Although I have experience in C and C++ language, today I work mostly with Javascript on Node.js, so those are the language and framework of choice.</p><p>I also wanted to be able to control the robot car from the internet, not just within my home network.</p><p>Main features like manual control, obstacle avoidance, and line tracking shall work similarly to the original</p><p>I will not support the UCTRONICS mobile app as it would not be useful outside my home network, and instead, write a basic web app to control the robot car using any browser.</p><p>Finally, it has to be open-source, of course. Here is the link to my <a href="https://github.com/wdmartins/pi-robot-car">Github repository</a>.</p><h3>Big Picture</h3><p>Several choices had to be made in terms of server and reactive web frameworks, node modules, client-server protocol, etc.</p><p>Since my requirement was to be able to control the robot car securely from the internet I decided to use NGINX as a web server and reverse proxy.</p><p>Finding the right node.js module to control the Raspberry PI GPIO was not a trivial task, as I needed to be able to access some GPIO ports that are not available through the filesystem. The performance was also a factor. After trying several modules I decided to use <a href="https://www.npmjs.com/package/pigpio">pigpio</a>. It has all the functionality I needed. The pigpio node module is a wrapper to the <a href="https://github.com/joan2937/pigpio">pigpio C library</a>.</p><p>Finally, I chose <a href="https://vuejs.org/">Vue.js</a> to implement a simple, rudimentary web application for testing and demonstration purposes, that would communicate to the backend server using secure WebSocket through NGINX.</p><p>So, here is how the big picture looks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*Wt309k2BWnswX-F0jx390A.png" /><figcaption>Big picture</figcaption></figure><h3>Software structure</h3><p>Besides the camera module accessed by the MJPEG streamer, there are basically 6 pieces of hardware to control.</p><p>Each one is represented by a Node.js module that abstracts the GPIO writing and reading and provides simple APIs, for instance, the echoSensor.js does all the hardware setup and initialization and just provides an API to get the distance to the obstacle in front.</p><p>All those modules also provide an API to register a listener for hardware status changes.</p><p>Here is an example from echoSensor.js:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0cba91c4e427eafa72f695ae3a5034cd/href">https://medium.com/media/0cba91c4e427eafa72f695ae3a5034cd/href</a></iframe><p>On top of these modules, there is the carRobot.js module. This module is responsible for instantiating and initialize all the hardware wrappers, and register the listeners for hardware status changes as shown in the snippet below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/68e8ebc9d6954e16502a03c3d393900e/href">https://medium.com/media/68e8ebc9d6954e16502a03c3d393900e/href</a></iframe><p>This module is also responsible for processing command from the client to move the robot, turn lights on and off, beeping, orienting the camera module, and implements automatic driving functions like obstacle avoidance and line tracking.</p><p>Finally, the server.js module sets up the WebSocket connections with the clients and implements a rudimentary protocol consisting of commands from the client to the server and events (feedback) from the server to the client.</p><h3>GPIOs</h3><p>Finding how the Robot Car kit uses the Raspberry PI GPIO was done mostly by reading the original C code, but also some trial and error iterations.</p><p>Whoever has experience with Raspberry PI knows that there are at least three ways to number a GPIO pin: physical, Broadcom, and WiringPi.</p><p>You may find useful this <a href="https://github.com/wdmartins/pi-robot-car/blob/master/server/rpiGpioDef.js">javascript file</a> where all the GPIO numbers are defined as constants on all three schemes. Those constants will be referenced below.</p><p>Here is the list of GPIO pins for each piece of hardware using the Broadcom denomination:</p><h4>Buzzer</h4><p>Very simple: just write ‘1’ to GPIO 26 to beep.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/56a258157748fe3918eb294a04adaca2/href">https://medium.com/media/56a258157748fe3918eb294a04adaca2/href</a></iframe><h4>Camera Servo Motors</h4><p>The camera can be moved using servo motors both horizontally and vertically. pigpio node.js module makes it very easy by providing a <em>servoWrite</em> API.</p><p>Just right anything between 500 and 2500 to move it from one extreme to the other while writing 1500 to both servos will basically center the camera.</p><p>The horizontal servo motor is controlled by GPIO 7 and GPIO 6 controls the vertical one.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b0d8a3bb4fd131be12c569a7777b0ce6/href">https://medium.com/media/b0d8a3bb4fd131be12c569a7777b0ce6/href</a></iframe><h4>Line Tracker</h4><p>The line tracker function uses three IR reflective switches. By reading and comparing the values (‘high’ or ‘low’) of these switches the robot knows whether is center on the line or deviating to the left or right and apply the corresponding corrections.</p><p>GPIO 0, 2, and 3 are used for the left, center, and right IR reflective switches respectively.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bbbafc23ab754951ac61df9579cb8a1e/href">https://medium.com/media/bbbafc23ab754951ac61df9579cb8a1e/href</a></iframe><h4>Echo Sensor</h4><p>To measure the distance to an object in front, an echo sensor needs to emit a signal and read the reflection on that object. Therefore two GPIO pins are needed. The trigger (which emits the signal) is controlled by GPIO 26 while the echo (which reads the reflected signal) is read on GPIO 23.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ed474ba20cde46cb27f00b1abf69231b/href">https://medium.com/media/ed474ba20cde46cb27f00b1abf69231b/href</a></iframe><h4>LED Strip</h4><p>The kit uses an addressable LED strip called ws281x. To render the LED light and colors I used another Node.js module that wraps pigpio for this specific purpose, the <a href="https://www.npmjs.com/package/rpi-ws281x-native">rpi-ws281x-native</a>. It cannot be easier to render any color by providing a combination of 3 integers which are the intensity (0–255) of the blue, red, and green. The GPIO used for this is GPIO 1</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/30041639c12b3a103cea9b73c2c4c472/href">https://medium.com/media/30041639c12b3a103cea9b73c2c4c472/href</a></iframe><h4>DC Motors</h4><p>The DC motors used to drive the robot car cannot be powered directly by the Raspberry PI GPIO since they consume more current than the RPI GPIO can provide. That’s why additional hardware is needed to provide enough power. The robot car kit uses a couple of half-H bridges to power the wheels DC motors.</p><p>To actually power 4 DC motors we would need 8 GPIOs but instead, the kit uses a shift register. In digital circuits, a shift register is a cascade of flip flops, sharing the same clock, in which the output of each flip-flop is connected to the “data” input of the next flip-flop in the chain, resulting in a circuit that shifts by one position the “bit array” stored in it, “shifting in” the data present at its input and ‘shifting out’ the last bit in the array, at each transition of the clock input. So, a cascade of 8 flip-flops would produce an 8 bits output. The 8 bits array would have 128 combinations where the DC motors would not run (0–0, and 1–1), and 128 combinations where one or more DC motors would run (forward or backward). Of course, not all combinations make sense. Here is the list of the combinations that I needed to implement the robot car movements.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9bff4d4f582c11e1c3bdecdcf21b56e6/href">https://medium.com/media/9bff4d4f582c11e1c3bdecdcf21b56e6/href</a></iframe><p>By using a shift register we only need three GPIOs, one to enter the data (1 bit at a time), one clock to shift the data through the cascade of flip-flops, and finally, one GPIO to latch the output. The GPIO pin numbers are 27 for “Data”, 28 for “Clock” and 29 for “Latch”.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5e4ffbd61ddc834e8f9c9ccea637e570/href">https://medium.com/media/5e4ffbd61ddc834e8f9c9ccea637e570/href</a></iframe><p>The speed of the motors is controlled with 4 GPIOs used as output PWM. The pins are GPIO 21, 22, 23, and 24.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/54507245caf61c47ca67acca8863755c/href">https://medium.com/media/54507245caf61c47ca67acca8863755c/href</a></iframe><h3>Serving the Web application</h3><p>As I mentioned before I wanted to be able to access the robot car server from the internet. The easiest way to achieve that was to get a free DNS service from <a href="https://www.duckdns.org/">DuckDNS</a>, by choosing a subdomain like ‘example.duckdns.org’ and point it to my ISP IP address.</p><p>Next, I used <a href="https://letsencrypt.org/">Let’s encrypt</a> to obtain the TLS signed certificate. Let’s Encrypt is a nonprofit certificate authority.</p><p>Finally, I set up my router to forward traffic on port 443 to my Raspberry Pi.</p><h3>Conclusion</h3><p>All the steps to set up this project and all the code, for both the server and the web application are available on my <a href="https://github.com/wdmartins/pi-robot-car">GitHub repository</a>.</p><p>Just remember although this project was built to run the UCTRONICS Robot Car kit, it can as well run any other with similar hardware just by changing the GPIO numbers as needed.</p><p>I hope you enjoyed the article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d9c27c5b16f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/raspberry-pi-robot-car-controlled-by-node-js-3d9c27c5b16f">Raspberry PI Robot Car Controlled by Node.js</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Controlling IoT devices using Circuit SDK]]></title>
            <link>https://wdmartins.medium.com/controlling-iot-devices-using-circuit-sdk-b27afb44faa3?source=rss-263bff5a27a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b27afb44faa3</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[mqtt]]></category>
            <category><![CDATA[circuit]]></category>
            <category><![CDATA[esp8266]]></category>
            <dc:creator><![CDATA[Walter Martins]]></dc:creator>
            <pubDate>Sun, 20 Oct 2019 20:17:44 GMT</pubDate>
            <atom:updated>2019-10-20T20:17:44.101Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5I7ErYR3H8p4dTeOlZbCkQ.jpeg" /></figure><p><a href="https://www.circuit.com/">Circuit</a> is a team collaboration software supporting chat, voice, video, screen share and much more. It’s available on the browser, as a desktop application, iOS, and Android. The free version allows up to 100 users and 3 users per conference.</p><p>For an introduction to Circuit APIs, you may want to read <a href="https://medium.com/@rurscheler/introducing-the-circuit-apis-f98285f470f0">this article</a>.</p><p>In this article, we will use the <a href="https://circuit.github.io/">Circuit SDK</a> to control an IoT device through <a href="http://mqtt.org/">MQTT</a> and <a href="https://circuit.github.io/jssdk-interactiveforms.html">Circuit forms</a> to let Circuit users control the device directly from their Circuit clients.</p><p>The IoT device is an <a href="https://github.com/wdmartins/rgbw-ligth-ctrl">RGBW LED strip controller</a>. The controller itself is outside of the scope of the article so we can concentrate on the main topics:</p><ul><li>How to request user input with <a href="https://circuit.github.io/jssdk-interactiveforms.html">Circuit forms</a>.</li><li>How to write a <a href="https://circuit.github.io/nodejs.html">Circuit Node.js</a> to control the IoT device.</li></ul><p>Here is the big picture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*D3jD7-omsZJ0BrTuw7TCCg.jpeg" /></figure><p>The node application will use the Circuit SDK to login to Circuit, post a form to a Circuit conversation and received the post submission. At the same time, the application will connect to the MQTT broker to publish the desired status of the LED strip and will also subscribe to updates coming from the LED strip controller.</p><h3>MQTT</h3><p>MQTT, as defined by mqtt.org, is a lightweight machine-to-machine protocol designed to transport publish/subscribe messaging. It is ideal for IoT (Internet of Things) because of its small size, low power usage, minimized data packages, and efficient distribution of information to one or many receivers. Within MQTT, connected clients, subscribe and publish ‘topics’, and these topics have an optional payload with the topic data.</p><p>In this project the Nodejs application and the LED strip controller communicate through a Publish/Subscribe MQTT messaging.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*LYOEPpEVXohk8rbqJNqP8A.jpeg" /></figure><p>So the node app subscribes to the ‘state’ topic published by the LED controller with the actual status of the LED strip and publishes the ‘set’ topic to change the status of the lights which the controller is subscribed to.</p><h3>Circuit</h3><p>Circuit clients and the Nodejs app communicate by posting and submitting web forms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*B2hVQnUSYKYlEYd3VTKHZQ.jpeg" /></figure><p>Let’s see how the Nodejs application logs into Circuit and connects to the MQTT broker to complete the end to end communication.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dded7a048812fd0f67ac268cd340c8b1/href">https://medium.com/media/dded7a048812fd0f67ac268cd340c8b1/href</a></iframe><p>Logging into Circuit is fairly easy after instantiating the Circuit client just invoke logon API. Notice how the application adds an event listener for the ‘formSubmission’ event. The application will receive this event when the user submits the control form from the Circuit client.</p><p>Connecting to the MQTT broker is also straightforward thanks to the <a href="https://www.npmjs.com/package/mqtt">mqtt node module</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1a397694b0bd88f6a78af764a6f57704/href">https://medium.com/media/1a397694b0bd88f6a78af764a6f57704/href</a></iframe><p>Also, in this case, the application needs to register handlers for some events like ‘connect’, ‘error’ and ‘message’. This last one is the handler that will be invoked when the ‘topic’ we subscribed for is being published. So, that is next, let subscribe for the event the RGBW LED controller will publish to report the actual state of the lights</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/029a84fac531252a5b69b6951cb4a88a/href">https://medium.com/media/029a84fac531252a5b69b6951cb4a88a/href</a></iframe><p>With this, the app is initialized. Let’s post the lights control form to a Circuit conversation by means of the Circuit SDK API addTextItem:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2e168201f97e2f69501a1e1e75c85162/href">https://medium.com/media/2e168201f97e2f69501a1e1e75c85162/href</a></iframe><p>Notice how the item contains a form object with different kinds of controls, the options values, and defaults. When posting it into a Circuit conversation, it looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*9w6GmCfvTZRqS_GfMKNzWA.jpeg" /></figure><p>Now, the Circuit client user can select the brightness, color or a flashing effect and submit the form. At this time the node application receives the ‘formSubmission’ event with the form controls values. Based on those values it builds the JSON object that is then published to the MQTT broker.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2a2a3f0dcdc76134fe91c161b022c1fc/href">https://medium.com/media/2a2a3f0dcdc76134fe91c161b022c1fc/href</a></iframe><p>Finally, the controller receives the MQTT message and sets the lights accordingly.</p><p>Let watch a short video demonstration:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Ffy1eVIWqK-M%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dfy1eVIWqK-M&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Ffy1eVIWqK-M%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7e185042a06068b86f9d7510c8b2ea37/href">https://medium.com/media/7e185042a06068b86f9d7510c8b2ea37/href</a></iframe><h3>Wrap up</h3><p>If you got here you are probably thinking there are more ‘practical’ ways of controlling an LED light, and you would be right. However, this article is intended to show how powerful the Circuit platform is, and how easy is to integrate anything by using the Circuit SDK.</p><p>Regardless, if you want to replicate the experiment <a href="https://github.com/wdmartins/rgbw-ligth-ctrl">here </a>you can find not only the software but also all the schematics to build the RGBW controller.</p><figure><img alt="The LED strip controller runs on a SoC ESP8266" src="https://cdn-images-1.medium.com/max/800/1*AXe29vtl19YyyvvhzZqRsA.jpeg" /><figcaption>The LED strip controller runs on an SoC ESP8266</figcaption></figure><p>For practical reasons I made both the node application and the MQTT broker running on the same machine (Raspberry PI 3B+) but, of course, they could be on different machines or devices as long as they have TCP connectivity over the broker port, typically 1883.</p><p>I used the <a href="https://mosquitto.org/">Eclipse Mosquitto MQTT broker</a>. Installation on the Raspberry PI cannot be easier as it is available through the main Raspberry repository.</p><p>Both the instructions to install Mosquitto, and configure and run the Nodejs application are on <a href="https://github.com/wdmartins/circuit-mqtt">Github</a>.</p><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b27afb44faa3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Circuit communication device using Raspberry PI]]></title>
            <link>https://wdmartins.medium.com/building-a-circuit-communication-device-using-raspberry-pi-716a30bc60a7?source=rss-263bff5a27a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/716a30bc60a7</guid>
            <category><![CDATA[ato]]></category>
            <category><![CDATA[circuit]]></category>
            <category><![CDATA[circuit-sdk]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[unify]]></category>
            <dc:creator><![CDATA[Walter Martins]]></dc:creator>
            <pubDate>Sat, 12 Jan 2019 20:33:08 GMT</pubDate>
            <atom:updated>2019-01-13T15:12:19.426Z</atom:updated>
            <content:encoded><![CDATA[<p>This article intends to show the <a href="https://github.com/circuit/circuit-sdk">Circuit SDK’s</a> portability and how it can be easily integrated with inexpensive hardware to build all kind of communication devices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5bPQKn9q_1sZh7s3KscR3g.jpeg" /></figure><p><a href="https://www.circuit.com/">Circuit</a> is a team collaboration software supporting chat, voice, video, screen share and much more. It’s available on the browser, as desktop application, iOS and Android. The free version allows up to 100 users and 3 users per conference call without any feature limitation.</p><p>For an introduction to Circuit APIs you may want to read <a href="https://medium.com/@rurscheler/introducing-the-circuit-apis-f98285f470f0">this article</a>.</p><h4>Circuit Receptionist Kiosk</h4><p>This application can be ideal for office buildings with restricted access and without a human receptionist. This is how it works:</p><p>When the application starts (kiosk mode), it presents a splash screen (or idle screen) while it initializes all sensors, logs into Circuit, and updates the bottom bar with date, time, temperature and humidity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*SHxOTAm-xnqYmD5W2-Dyng.jpeg" /><figcaption>Idle screen</figcaption></figure><p>When the presence of the visitor is detected, the application shows several options such as start typing the name, speak the name, or calling the receptionist. The receptionist is actually a Circuit group conversation where any of the participants can answer the call.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*mQZ_jRFDw-yAv9gGhs70Kw.jpeg" /><figcaption>Input screen</figcaption></figure><p>As the visitor types, a user search is requested to the back end and results are presented on the screen. For every change in the search string a new search is performed, and any previous pending search is cancelled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*IhaXN6ctxlvsmOfx6lqAlw.jpeg" /><figcaption>User search screen</figcaption></figure><p>Once the user search is successful the visitor taps on the user’s avatar and the application sets up a video call with the Circuit user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*CX8yYJW1lB48sIBXZUux8Q.jpeg" /><figcaption>Calling selected Circuit user</figcaption></figure><p>The user inside the office, is alerted of the incoming call and is allowed to answer it using just voice or video.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*GQbFFTP_YPY3tWSwKC8TuA.jpeg" /><figcaption>Call presented to Circuit user</figcaption></figure><p>Once the Circuit user answers the call, video and voice communication is established.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*MwOFFtenPA-Rp8EF0gAAAw.jpeg" /><figcaption>Visitor and Circuit user communicate using voice and video</figcaption></figure><p>At the same time the Circuit user is prompted with two options, reject the visit and terminate the call, or allow access to the visitor. When the Circuit user clicks on the option to allow access, the device unlocks the door, and the video call is terminated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*5AqawSi4npncuntgS1RNEA.jpeg" /><figcaption>User is prompted to remotely unlock the door</figcaption></figure><h4>About the hardware</h4><p>Below is the list of the hardware components with a brief description. If you are already familiar with these components just refer to <a href="https://github.com/wdmartins/circuitKiosk/blob/master/README.md">GitHub </a>for the complete list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*Kxct-7O3LA6C7C-f9zjm8w.jpeg" /><figcaption>Raspberry Pi</figcaption></figure><p><strong>Raspberry Pi</strong>: The Raspberry Pi is a small, affordable, and amazingly capable, credit card size computer. It is developed by the <a href="https://www.raspberrypi.org/">Raspberry Pi Foundation</a>, and it might be the most versatile tech ever created. At the time of these writing you can buy it for less than US$40.-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*tmy27nXD4HXzJ7VQBsJ8mQ.jpeg" /><figcaption>Raspberry Pi 7&quot; Touchscreen Display</figcaption></figure><p><strong>Raspberry Pi 7&quot; Touchscreen Display</strong>: Raspberry Pi touchscreens can be easily connected using a DSI ribbon cable and be powered from the GPIO. The full color display outputs up to 800 x 480 and features a capacitive touch sensing capable of detecting 10 fingers. It costs about US$70.-</p><p>When using the touchscreen display, a suitable case to house both the Raspberry Pi and the display makes it safer to handle. There are a couple of inexpensive options out there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/227/1*c4OW905yLDYP_WFHFANosg.jpeg" /><figcaption>microSD Card and adapter</figcaption></figure><p><strong>MicroSD Card</strong>: This is the persistent storage for the Raspberry Pi. Although 8Gb should be enough for this project, 16Gb is recommended. The adapter may come handy to flash Raspbian on a computer with a regular SD card reader slot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/237/1*v8lC4UlVpZ3RwsvHfbeLVg.jpeg" /><figcaption>Raspberry Camera Module</figcaption></figure><p><strong>Raspberry Camera Module (V2)</strong>: The Camera Module can be used to take high-definition video, as well as stills photographs. It’s easy to use for beginners, but has plenty to offer advanced users. It is connected to the Raspberry Pi using a CSI ribbon cable. In this project we will use the camera module to stream the reception feed when the call between the visitor and the Circuit user is established. You can learn more about the Raspberry Camera Module on the <a href="https://www.raspberrypi.org/search/Camera+Module">Raspberry Pi Foundation</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*VuViLjDN9nSgMd7Ys0XWlQ.jpeg" /><figcaption>Breadboard and GPIO extension</figcaption></figure><p><strong>Breadboard</strong>: Although not necessary, it is very convenient to quickly setup the electronic circuit, specially if soldering is not your thing. If you use a breadboard you will find the breadboard extension for the Raspberry Pi GPIO (General Purpose Input Output) very convenient. Also some jumpers (male-male and female-male) are needed.</p><p><strong>Speaker and Microphone</strong>: Both are needed for this project and here you may have several options. Computer speaker with a 3.5mm jack, USB speakers or microphones, headsets or any combination. You may even use a webcam with microphone if you do not count with the Raspberry Camera Module.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*gqakqMog3epr6Be9bUoWbA.jpeg" /><figcaption>Infrared Motion Sensor HC SR501</figcaption></figure><p><strong>Infrared Motion Sensor</strong>: This sensor is used to detect the presence of the visitor and switch the user interface view accordingly. I used HC SR501 which is inexpensive and can be adjusted for sensitivity and output timing using the on board variable resistors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*IxhuFqvCtiVlfmQxi_TrPA.jpeg" /><figcaption>LED</figcaption></figure><p><strong>Green LED</strong>: Not strictly necessary. In my project the LED flashes when the app is listening the visitor speak the name she is looking for. It also remains ON when the door is being unlocked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*OS1tQIYUjY0gNF2MRDW3og.jpeg" /><figcaption>Active Buzzer</figcaption></figure><p><strong>Active Buzzer</strong>: The active buzzer is a placeholder. It represents whatever relayed mechanism would be needed to unlock a door. Any real application may need different electronic components to achieve that objective.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*HGaTrzVVL9oM2XISR8JpWA.jpeg" /><figcaption>Hygrotermograph sensor DHT11</figcaption></figure><p><strong>Hygrotermograph Sensor</strong>: This sensor provides information about the temperature and humidity in the room. Not very functional to this specific application but I decided to include just because… I can. I used the inexpensive DHT11. You can use any other, or none.</p><p><strong>Other components</strong>: If you use all the same sensors, LED and buzzer you will need one NPN transistor (S8050) and three resistors (1KΩ, 10KΩ, and 220Ω).</p><p><strong>Electronic Circuit Schematic Diagram</strong>: Below you can see how the components shall be connected. You may use different GPIO pins, just remember to update the code in gpioWrapper.js</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*-r3nw1PSO4PzcbzTQezWHg.png" /></figure><h4>About the software</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/100/1*0IIwuuMh2scILq2rPvbrqA.png" /></figure><p><strong>Operating System</strong>: The Raspberry Pi runs Raspbian Stretch with is the latest version of the Debian Linux distribution specifically for Raspberry Pi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/100/1*lCiXg3gyaCJDJgiHSfYpFQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/100/1*w9yakStLAcWwWciw32TgcA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/100/1*g1d6Y--KyIylSWjJEsS7tA.png" /></figure><p><strong>Framework</strong>: The application is a <a href="https://nodejs.org/en/">nodejs</a> process using <a href="https://electronjs.org/">electron</a> to have access to Chromium WebRTC APIs needed by the Circuit SDK to established a WebRTC communication. So, it is not an actual electron desktop application… but it could have been as well.</p><p><em>Caution</em>: the nodejs (and npm) versions on the Debian repository are not the latest and this project needs the latest ones, so do not use apt-get, instead follow the instructions on my <a href="https://github.com/wdmartins/circuitKiosk#install-node-and-npm">GitHub</a> repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/100/1*LhWXcB7SfRJUzLMI82drvg.png" /></figure><p><strong>Vue</strong>: Although I am more familiar with AngularJS, I decided to go with <a href="https://vuejs.org/">Vue</a> to handle the user interface. Vue is very lightweight in comparison and has a quick learning curve.</p><p><strong>BCM2835</strong>: bcm2835 library. This C library for Raspberry Pi provides access to GPIO and other IO functions on the Broadcom BCM 2835 chip. Instructions to download and build the library can be found also on my <a href="https://github.com/wdmartins/circuitKiosk#install-and-build-bcm2835-library">GitHub</a> repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/100/1*R5O7WSKpd7AeV1WwoRKqSQ.png" /></figure><p><strong>Google Cloud Services</strong>: As I mentioned before the visitor can type on the touch screen to find the Circuit user, or just speak the name. For transcription I decided to use Google Cloud Speech API. The setup is outside the scope of this article but can learn all you need to know for this application with the <a href="https://cloud.google.com/speech/docs/quickstart">Google Cloud Speech Quick Start</a>. For speech recording I used <a href="http://sox.sourceforge.net/">sox</a>.</p><h3>Circuit SDK usage</h3><p>On the <a href="https://github.com/wdmartins/circuitKiosk">GitHub circuitKiosk</a> repository you will find examples on how to use some of the capabilities of the Circuit platform using the Javascript SDK. You will see how to instantiate the Circuit client, set the log levels, add event handlers, log your application, search for users, and process those search results. You will also learn how to find and create Circuit conversations, send text items, and process received ones. The application also makes use of Circuit forms that are sent as text items. Forms submissions are received as text items, and you will see how to process them. In the code you will also find how to setup a video call, process call events and handle the call media by getting the remote streams from the instantiated Circuit client.</p><p>Let’s see some specific examples:</p><p>In order to <a href="https://circuitsandbox.net/sdk/classes/Client.html">instantiate a Circuit client</a> your code will look something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/181e98d67b49898fd9e1a60317a04c19/href">https://medium.com/media/181e98d67b49898fd9e1a60317a04c19/href</a></iframe><p>Notice on line #1 the Circuit log level is set.</p><p>Besides logging in your application into Circuit, this has to <a href="https://circuitsandbox.net/sdk/classes/Client.html#method_addEventListener">add event handlers</a>. Circuit raises a ton of different events. For this application we are just interest in a few of them.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a3ba88c937e15499a852d0390139b41d/href">https://medium.com/media/a3ba88c937e15499a852d0390139b41d/href</a></iframe><p>Basically the application needs to listen for new text items for maintenance commands, call events to handle WebRTC communications, formSubmission events to accept a command for a Circuit user (i.e. unlock the door), and search results to find specific Circuit users.</p><p>Finding a Circuit user it is an asynchronous process. So the application invokes the <a href="https://circuitsandbox.net/sdk/classes/Client.html#method_startUserSearch">startUserSearch</a> API, and wait for the corresponding events with the search results for which we already set the listeners above.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c167e3d1b20a5e44e54377b73d9d0fb/href">https://medium.com/media/3c167e3d1b20a5e44e54377b73d9d0fb/href</a></iframe><p>Once the user is found and selected to establish a communication the one to one conversation between the user and the application needs to be find, and if it doesn’t exist, then it needs to be created. Once the conversation is known then the call can be made. However, the SDK API <a href="https://circuitsandbox.net/sdk/classes/Client.html#method_makeCall"><em>makeCall</em></a> does all this for you. You just need to know the id of the user destination of the call.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fdca537805f39c14eeb8be1ccc4a1f80/href">https://medium.com/media/fdca537805f39c14eeb8be1ccc4a1f80/href</a></iframe><p>As the call is being setup Circuit will raise<em> callStatus</em> events that need to be handled accordingly to properly setup the user interface and, eventually when the call is answer set the audio and video elements sources with the remote streams.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/84d6101b5cb302c2a2609bb612e808f5/href">https://medium.com/media/84d6101b5cb302c2a2609bb612e808f5/href</a></iframe><p>Now the call is setup and both parties can talk and see each other. Note line #10, here the application will send a form to the user with two buttons, one to unlock the door, and the other to reject the visitor by terminating call. Circuit SDK makes it easy to submit a form as a text message using the <a href="https://circuitsandbox.net/sdk/classes/Client.html#method_addTextItem"><em>addTextItem</em></a> API.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dc120ba4aabac1da73c2bb5aa1db1197/href">https://medium.com/media/dc120ba4aabac1da73c2bb5aa1db1197/href</a></iframe><p>Finally as the user chooses to unlock the door for the visitor the application will process the form result.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ae6dc6702c35ed8159a556ad2b46d91e/href">https://medium.com/media/ae6dc6702c35ed8159a556ad2b46d91e/href</a></iframe><h3>Let’s build it</h3><p>Just follow the step-by-step instructions on <a href="https://github.com/wdmartins/circuitKiosk">GitHub circuitKiosk repository README.md</a> . Here is a short video demonstration:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F6hbeP-hpG6k%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D6hbeP-hpG6k&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F6hbeP-hpG6k%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1954b8ee909eae307aa5e456a541dfd3/href">https://medium.com/media/1954b8ee909eae307aa5e456a541dfd3/href</a></iframe><p>As you may already know the only limitation is your imagination. All the parts are out there, get them and build something cool and you will learn a lot in the process, after all there are only two kinds of adventure in life: love and knowledge.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=716a30bc60a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>