Showing posts with label IoT plug. Show all posts
Showing posts with label IoT plug. Show all posts

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 2, 2015

Android application Homy

The new Android application that is connecting with my broker over web sockets is having now new features:

1. Auto-discovery. Each time the application is started, all devices are sending their status. Here there are 6 IoT devices discovered:

  • two plugs
  • two irritool ( one is in production for more then one month, and the other is for debugging and simulation ( NASA style :-)  )
  • two (dth - digital temperature and humidity sensors. They are mount on each irritool)


6 devices dicovered



2. Devices are presented on categories, based on the incoming  data from them. 
At  this stage the name is based on the unique device id and its type.

Plug devices discovered

3. Device detail. All the information about device is presented in here:
-device id
-ip address
-network type (B/G/N)
-up time ( if is configured to be transmitted)
and I am able to control the device ( like in plug/irritool case) or see the data for sensors.
Device detail - PLUG
Device detail - IRRITOOL 

Device detail - Sensor DTH


Looks ugly and hard to remember that the ESP_00A08478 is the name for irrigation controller so I've added the new option to rename the device name with whatever you want. This aliasing is persistent so every time I reopen the application, the mapping between device id and device alias is the same.


Here is a renamed plug:


Plug renamed 

Other feature is 7 day weather report for my location (need more work in presenting the data).

weather report next 7 days


I can declare now the application to be in alpha stage ....


4.Other option I have in the Menu:



Debug will be to see the messages received from broker.




There are a lot of picture in this post, but a picture is 1000 words.







Monday, April 20, 2015

First IoT device - Plug

Because was raining outside and I couldn't work in the backyard, I've made rapidly an IoT plug with ESP8266 .

Donor for the case was a timer plug that was in the house. After I've removed its content, I've added my stuff.

IoT plug
Inside the case I have:

  • power supply (220V-3v3 1A)
  • 5V relay ( is working fine on 3.3 V)
  • ESP-01 covered in blue tape 
And the final IoT plug:

IoT final plug



The ESP-01 is accepting JSON over MQTT from my mosquitto broker. 

To control the plug from my phone, I've created an android application that connects over
websockets to mosquitto broker and is sending commands. 

Plug is sending status every 15 seconds to its subscribers and a status after every command its receiving.

Cool.....now I can turn on or off  my  lamp with my IoT device. 

For Android application I've used for rapid development a template, but I am planning to build a totally new application that will discover the IoT devices and add them automatically to the control screen.



IoT Plug application
EDIT: The Android application is different now. See this post.

And a video: