Introduction: Telegram With Intel Edison and Python
This instructables shows you how to configure the Yocto package manager and use a Telegram bot Python library. Although Intel Edison is the target board, it is possible to adapt the following steps to a similar hardware.
Step 1: Get Started With Intel Edison
Follow the get started steps available at the Intel website to update the board's firmware:
Step 2: How to Configure the Wi-Fi
To have an Internet connection, you should configure the Wi-Fi by running the following command from Yocto's terminal:
Step 3: How to Setup Opkg Package Manager
You should create a file in the following path: /etc/opkg/base-feeds.conf with the contents shown below (you may use another repository):
src/gz all http://repo.opkg.net/edison/repo/all
src/gz edison http://repo.opkg.net/edison/repo/edison
src/gz core2-32 http://repo.opkg.net/edison/repo/edison
Afterwards, execute the following command from Yocto's terminal:
Step 4: Install Telegram Python Library
To retrieve the files of the Telegram bot, you should first install python-pip by running the following command:
opkg install python-pip
You may now install the Telegram bot library using pip:
pip install python-telegram-bot
Step 5: Using Telegram Bot Library
The Telegram bot library installed by the previous step allows you to create a bot which responds to a set of commands sent by an arbitrary user. To get familiar with its functions, you should read the examples in its GitHub webpage as well as its documentation. The links follow:
We have implemented an Arduino-Telegram integration script during an Intel IoT Roadshow. It may be interesting to take a look at our code if your scenario is similar to ours. The Python script is inside ./python directory in our GitHub repository:
We have a be nice policy.
Please be positive and constructive.