Why not AWS, why Losant and Deep sleep on ESP8266

Why not AWS

I decided to start with Amazon AWS IoT. I didn’t had an account so I decided to register. They want me to register in my credit/debit card… Okay I want to use your free tier not to purchase anything at all, but they force you to register in your card because if you exceed your bandwidth/messages/devices/blabla. Registered my card, next step, register your number and verify it… Wait, what? For what do you need my number verified? Very determined to register and use AWS IoT, I added my phone number, pressed the verify button (do not remember exact name) and bang, they cannot verify phone numbers from Bulgaria. Still determined to register, I decide to write to the Support, in the time I’m waiting I decided to search for other IoT providers and bang bang baaaaang, I find Losant, the registration took less than a minute, the way it looked, the way it felt, goodbye Amazon.

 

Why Losant

The first thing I saw and immediately sold me was Alloy the Real-time workflow engine,  it’s so easy to use, I had my first workflow deployed in 2-3 minutes and it simply works, you can do anything, you can call even Google IoT or Amazon AWS IoT and etc. There is tons of documentation available, it’s simply amazing.

The second thing I find absolutely stunning is Aperture Data visualization and analytics. With about 3 clicks you can have a graph ready to visualize your data, GPS history/heatmap, charts and even button controls. With Aperture you can have beautiful looking tools to control and visualize your data in matter of seconds.

Losant has also Kiln, Edge, Helm

I had a question and wrote to the Support. I received fast and detailed answer.

Definitely recommend Losant, go check them out



 

Deep sleep on ESP8266

Didn’t want to waste а whole page on providers, so lets talk deep sleep.

There are 4 modes on ESP8266

  • No sleep
  • Modem sleep
  • Light sleep
  • Deep sleep

 

No sleep

In this mode everything will kept on, it’s the most inefficient mode and will drain the most current

Modem sleep

Modern sleep is the default mode when you are connected to access point (AP). In modem sleep, ESP8266 will try to disable unnecessary calls (don’t know the exact name) in the WLAN module. For example the DTIM Beacon intervals

Light sleep

Light sleep is kinda like Modem sleep but also different. In Light sleep the system clock is turned off and the CPU is set to IDLE state

Deep sleep

The most efficient mode, everything is off except the Real Time Clock (RTC).

Deep sleep is ideal when you read data from sensor in big period of time >= 10 minutes

For example, in IoT World Part 5: Measuring soil moisture over time, after we send the data to Losant we wait 10 minutes. Instead of waiting we can take a nap and save some power.

Go to line 109 and replace

delay(600000);

to

ESP.deepSleep(600000)
Warning, you can sleep no longer than ~71 minutes !

If you have any questions or suggestions, feel free to leave a comment.

Become a Patron!