Friday, August 5, 2016

Mqtt broker on ESP8266 #4


I have more progress in ESP8266 as MQTT broker.

What I have for now on this ESP8266 module:


  • MQTT broker functionality
  • Bridging data to/from and another MQTT broker ( usually a cloud MQTT instance)
  • websockets connectivity ( I can now connect with my Homy application directly to the ESP8266 acting as an MQTT broker)
  • OTA (Over The Air) updates. Every time I have a new software update the ESP8266 is updating itself so, I can say that I have continuous integration (CI) and continuous deployment(CD). Also all the modules are activated over the air.
With all those function in place I still have 34kb of heap available for other features and yes is running on an ESP with a minimum 1Mb of memory. ESP8285 is a good candidate for running the broker.

Is working also on and old ESP-01 with 512kb but without OTA functionality.

Friday, July 1, 2016

Space problem on VM solved by Gpart and Knoppix

Today I had to increase the space on one of my Virtual Machine. On my laptop the host is the Windows and my VMs are Linux. 

My machines are having vmdk as disk, so I had to convert first the vmdk to vdi


VBoxManage clonehd "source.vmdk" "cloned.vdi" --format vdi
VBoxManage modifyhd "cloned.vdi" --resize 16000

After that I've just used the vdi file for my new machine. Ok if the size was increased ( logically) lets do it also on the guest OS. For that I've tried the Gpart Live CD but it didn't work so I had to download the Knoppix LiveCD boot from it in the VM, delete the swap, extend the partition and then adding the swap partition again and of course with the help of the GPart. 

Sunday, June 26, 2016

More devices IN

I've completed to code to add more devices, so now the module as common code can:


  • update from OTA server if the version on server is bigger the its own version of code
  • get the data from AUTH server (topics, type, MQTT server etc, credentials)
  • get the time from NTP server
  • log data to an external server
  • log debug data to a DEBUG server
  • do  CRON tasks on GPIO pins based on schedule received from Android App
  • send status and its state to Android app.


All these features are part of the common code that will run an all my modules.
Now sky is the limit on what each module can do : 

  • temperature,
  • humidity, 
  • noise, 
  • presence,
  • gas detection, 
  • acceleration, 
  • vibration, 
  • measuring power consumption, 
  • controlling blinds, 
  • garage door, 
  • boiler, 
  • irrigation controller, 
  • fish tank, 
  • motors, 
  • air conditioning or a thermostat etc
  • coffee machines
  • washing machines
  • fridge
  • remote control substitute for TV, Satellite dish, Cable TV or any other IR
  • power sockets
  • exterior lights
  • interior lights
  • power sockets
  • air quality
And the beauty is that I am not limited by the WiFi, the same things I can do with my new LoRa modules.

The all power will be at your finger tips.


 Obs: Later I'll try to add some Artificial Intelligence (AI) to my system, because the IoT without AI  is pretty  much limited on manually or semi automatic control.





Tuesday, June 21, 2016

How big is an ESP8285?

It is small, very small and no more external flash. It has 1MB of flash memory on board. Let's see how OTA will do.




Tuesday, June 7, 2016

Keep your house cool with ESP8266 #2.

After doing the hardware part, intercepting the IR beams and make them play using the ESP8266, I've changed also my Homy3 application in order to accommodate the new device AirCon.


So after the app is starting is identifying all devices.



As you can see there is an AirCon device discovered.




Accessing the AirCon device allow me to turn it On or Off. I've kept the toggle button to display the current state of the air-conditioner. 




Perfect. Now I am sure that I will find a nice cooled air in the house by the time I get home.