Posts

Showing posts from 2018

Adventures with Raspberry Pi - Part 4

Image
As we saw in the previous post , we now have Raspberry Pi server setup and integrated with multiple mobile devices successfully, let's try a more complex integration. API's have become the de-facto standard for communicating between devices. But, if we also wanted to implement any logic, data transformation, loose coupling between devices, then we could use an ESB. One can think of the Mule ESB as another form of IFTTT. We can use the multiple connectors to link  up different kinds of devices, services and applications.  Let's two kinds of integrations - event driven and batch. Event Driven In this example, a service pushes data to the Raspberry Pi. Event Driven Flow I am using Anypoint Studio 7 and Mule Runtime 4. A mockup product API is created in the Mule project. This API is exposed as a REST API with a GET operation. When someone calls the API, the Mule flow is executed. In the Mule flow, the data is read from the API and sent via SFTP to a targ...

Adventures with Raspberry Pi - Part 3

Image
Continuing from the previous post , lets now build a Chatbot on the Raspberry Pi. If we have some digital media such as music, movies etc. stored in a media server on the Pi, these can be accessed using a Chatbot too. I have used Telegram to build the bot. The Telegram app is available for all platforms - iOS, Android, Web etc. Using the funnily named BotFather from Telegram, anyone can create a Bot account. Once the account is created, the "brain" of the Chatbot needs to be implemented using a programming language and framework. I have use the python based  chatterbot  framework to create a bot called - Frasier (named after the TV Series). The bot in turn interacts with the Plex Media Server API's to search and download the requested media such as a song, TV show or a movie. Telegram currently allows files up to 1.5 GB to be shared via the app. Telegram App in an iPhone requesting a song from a Chatbot running on a Raspberry Pi In the screenshot above, th...

Adventures with Raspberry Pi - Part 2

Image
Continuing from the previous post , let us now put the Pi to some practical uses. File Server The Pi can serve as a file server for home use. One could use it to store files for use across multiple computers, backup files, share media (songs, photos and videos) etc. As most of us use Windows at home, you can setup a Samba file server. You can read/write files easily from Windows computers.  In addition, there are Apps for iOS and Android, so you can access these files from mobile/tablets too. You can SSH into the Pi and run the following commands to install Samba sudo apt-get update sudo apt-get upgrade sudo apt-get install samba samba-common-bin You could give all access to the Public folder under /home/pi/ folder using the command -  chmod +777 . Create a Samba user and password using the command - sudo smbpasswd -a pi Configure Samba as shown below - Edit the Samba configuration - sudo vi /etc/samba/smb.conf [share] Comment = Pi shared folder Path...

Adventures with Raspberry Pi - Part 1

Raspberry Pi has been around for a few years. It was initially launched in 2012 by the UK based Raspberry PI foundation . Over the years, many flavors of the Raspberry PI have been created. While the Pi computer has been created as a learning tool, it can be used for some practical use cases too. These can be for both home and business use. Below is my Raspberry Pi setup at home. Imperial storm troopers protecting their precious cargo of Raspberry Pi, Mi power bank and Western Digital hard disk. All the secrets of the empire are safe! #starwars #raspberrypi #stormtrooper #maker #diy A post shared by Rajan (@rajanmanickavasagam) on May 9, 2018 at 8:33pm PDT The bill of parts for the above setup consists of (left to right) - Mi 20000 maH Power Bank USB to Micro USB cable with a power on/off switch Raspberry Pi case with heat sink Raspberry PI Model 3 Class 10 SD Card 16 GB capacity Western Digital 1 TB external hard drive The storm troopers just show...

Let Us Say Grace

Image
As we head into another new year, the calendar has changed to 2018. But the differences in the world continue to remain. As long as the human condition prevails, these differences will always exist. These differences periodically surface as flash points in politics, economics, societies, arts and personal freedoms. Saying Grace by Norman Rockwell (Source - Wikipedia) There is a painting "Saying Grace" by the iconic American illustrator Norman Rockwell. It was created for the cover of the Saturday Evening Post in 1951. As is characteristic of Norman Rockwell paintings, it captures an ordinary moment with extraordinary detail. A boy and his mother say their prayers in a restaurant before a meal in a restaurant. We can also see the reactions of the other diners, some fully, some partially and some not at all.  What is truth? What is justice? What is equality? What is morality? Before we even debate these topics, we must search for the meaning of them individ...