Fig. 1
For every system User Oriented, the User Interface is one of the most important building block, and you need to carefully think about it.In the past, the most used type of UI was a Web UI. Today, we tend to prefer a Mobile App, since our SmartPhone is (almost) always with us.
But we should be honest, a UI where we have to push buttons, move sliders, check boxes, is not the way we would love to work and live.
The dream, one of the dreams of AI, is to be able to use Natural Language to interact with a System, better through voice.
But this is still not so easy, everyone of us have at least one time laughed at the mistakes that SIRI does, sometime (or more often than that).
Surely, this can be, will be the future, but think about it: there are still moments when you can’t or don’t want to use voice (for example, don’t want to be heard by someone else).
Here comes ChatBot: chat were you’re interacting with a “Robot”.
If you want to understand better what a ChatBot is , maybe you can resort to Wikipedia. I don’t pretend to teach you this.
But, working on my Concept Prototype of IoT, my HomeAuto system, I decided that I wanted to explore how to use a ChatBot as interface.
I discovered that with Telegram you can easily set-up a Bot and, more important, Telegram has an Open API. This makes it easy to develop the System-User Interface.
More details: i don’t want to write code, or better, I prefer to write as little code as possible. Therefore I decided to find out if there are modules for NodeRED useful to simplify the interaction with a TelegramBot.
Yes, there are.
Therefore, the building blocks are:
- A Cloud Service, with an Open API, that enables you to create a Bot, enable to interact through API with the Bot and provides you a Mobile Apps; Telegram is Ok;
- A Middleware that enables you to visually develop flows to interact with your Things: NodeRED;
- A module for NodeRED that simplify the creation of flows capable to interact with the Bot: here I have found
All this pieces, in my Home, runs on a Raspberry PI 3.
It works!
- I can ask, using the Telegram App: “Show me T2” (Temperature in Room 2)
- I have developed a flow that checks the readings from a GAS sensor in the kitchen and, if the reading is above a certain threshold, it sends me an alert on Telegram (can be also a Voice Message)
- … I’ll do more in the next week
This is a snapshot of the NodeRED flow that implements the conversation above
Not complicated, really.
You can see in the picture “Telegram Receiver” and other nodes taken from node-red-chatbot.
Nice. Obviously the implementation of a “Language Interpreter” is the most difficult part. In my prototype, where I have used RiveScript, sentences recognized are very few and simple.
If you want to implement some serious thing, you need a NLP service: Natural Language Processing.
See you soon.
No comments:
Post a Comment