Close
0%
0%

ESP8266 Based RSS Feed on color OLED

RSS FEED ON OLED USING ESP8266

Similar projects worth following
This is an example of RSS Feed implementaion on ESP8266 using MQTT as trasnport protocol and SSD1331 based color OLED screen as display

RSS FEED OLED ESP8266

ESP8266 Based RSS Feed on color OLED

This is an example of RSS Feed implementation on ESP8266 using MQTT as transport protocol and SSD1331 based color OLED screen as display


What is RSS?

RSS is a standard for publishing feeds to the clients. It is mostly used to get feeds regarding, news, blogs. etc.. There are various clients that are available, but the aim of the project is to show how that can be achieved at Hardware level, using a simple yet powerful microcontroller namely ESP8266. It also helps understand how to use the well known MQTT protocol and Python to parser the feed data. The primary feed are obtained from BBC, as they are easily parsed by using the feedparser module. The next update will include a little bit advance parser that will be based on Beautiful Soup module. The main benefit of RSS is that the user do not need to go the website to get the news, the news are pushed to the user.

What is MQTT?

MQTT is a light weight protocol that is designed on top of well known TCP/IP stack. The main benefit of MQTT is the library that are already available on all major languages. For this project I have used Python, as it is an easy to learn language for beginners, and its well known philosophy batteries included helps newcomer stay away from setting up all the necessary bits. MQTT follows the Publish-Subscribe model for data transport among the clients. In this model, there is a central broker that manages all the data transport, among the connected clients. This makes MQTT one of the best choice for IOT application.

Benefits of MQTT

  • It is extremely light weight (In terms of code)
  • Easy to implement (Library for many language)
  • Provides QoS (Helps ensure data delivery)
  • Low Bandwidth requirement (Can run on 2G, or Dial UP ;-) )
  • 250 MB Payload limit
  • Less Maintenance

There are three QoS level for message Delivery

  1. QoS 0
    1. Data is sent only once
    2. Do not survive connection loss
  2. QoS 1 (At least once)
    1. Data might be sent several time
    2. Survives connection loss
  3. QoS 2
    1. Data is sent only once never again
    2. Data survives connection loss

In this project I have used Mosquitto as the broker, and used Ubuntu Server running on Digital Ocean, they provide extremely cheap and easy to use service, the base one for just 5$ per month. The reason behind using a cloud based server, is that the server exposes a public IP, that can be easily connected from any network and prevents the so called connection dilemma caused by the clients being behind a NAT.

NAT is short for Network Address Translation, and this is used by almost every Internet Service Provider, as it is a really great and robust security measure, that helps prevent attack, till some client that is behind the NAT initiates the connection. This ability or a loophole in the system helps establish a connection without worrying about any security issues. As the client is opening a connection, the connection is considered authentic and not blocked at all.

The paho python client is used for establishing a connection to the server. Mosquitto server keeps on running in the background, and there is a python feed parser that parses the RSS feed and publish on a given topic, and the ESP client also connects to the same server and subscribes to the same topic.

Data is mostly sent as Strings directly, so sending image directly is not possible. So in python the data is first converted to bytearray and then sent using MQTT, and on the receiving end the byte data is written to a file, and then saved as an image file, which is then displayed on the OLED screen. The feed file in the repository have been commented for proper understanding.

On the ESP8266 side, the text data is obtained as string, so no further processing is needed, but for the images, the data needs to be combined in a file. So for this, the total length of the data is compared to the current size of the payload, if the size is equal, it means that string have been obtained, but if it is not equal, than it means a bigger data is obtained, and that...

Read more »

rssfeed_python_functions.py

RSS Feed python wrapper function

plain - 2.93 kB - 10/16/2016 at 22:34

Download

feed.py

Sample Feed

plain - 3.38 kB - 10/16/2016 at 22:34

Download

RSS_FEED_COLOR_OLED_MENU_FAST.ino

Main Arduino Code

ino - 19.55 kB - 10/16/2016 at 22:34

Download

  • The Demo Video is uploaded

    Harsh10/21/2016 at 17:53 0 comments

    You can check the demo video Now next is take care of the BBC Technology Feed and add Engadget Feed,

    This can not be directly parsed using feedparser. So I will need to make my own parser for those feeds.

  • Update-1

    Harsh10/20/2016 at 19:47 0 comments

    A video demo will be uploaded tomorrow....

View all 2 project logs

  • 1
    Step 1

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates