Tuesday, June 16, 2015

News from EspressIf

Few minutes after releasing the latest SDK 1.1.2, EspressIf made available on their websites a new "mesh" zip file.

Documentation is not yet available, it will soon be released.

I was looking for the new symbols that has the mesh word in them. Here is the list:

nm: err.o: no symbols
         U espconn_mesh_dhcp_start
         U espconn_mesh_dhcp_stop
espconn_mesh.o:
00001074 T espcon_mesh_big_small_endian
00001480 T espconn_mesh_adjust_tx_fifo
00000f1c T espconn_mesh_ap_disconn_request
000000a8 T espconn_mesh_ap_need_update
000001bc T espconn_mesh_bcast_router
00002768 T espconn_mesh_bss_enqueue
00002714 T espconn_mesh_bss_find
00004f28 T espconn_mesh_build_packet
000034a4 T espconn_mesh_clear_ap_context
000004b8 T espconn_mesh_conn_router
00000544 T espconn_mesh_delay_ms
00000e94 T espconn_mesh_dhcp_start
00000ef0 T espconn_mesh_dhcp_stop
00000e48 T espconn_mesh_dhcp_timeout
00000dc4 T espconn_mesh_disable
00000c1c T espconn_mesh_enable
00000668 T espconn_mesh_enable_request
00004750 T espconn_mesh_filter_connect
00001220 T espconn_mesh_flow_request_timeout
000043b4 T espconn_mesh_flow_response
00000064 T espconn_mesh_get_conn_pending
00000604 T espconn_mesh_get_max_hops
00000038 T espconn_mesh_get_pending_num
000009f0 T espconn_mesh_get_router
00000598 T espconn_mesh_get_status
00001094 T espconn_mesh_getul
0000000c T espconn_mesh_init
00001048 T espconn_mesh_is_hex
00000028 T espconn_mesh_is_on
0000116c T espconn_mesh_json_match
0000113c T espconn_mesh_json_match_deenter
00001108 T espconn_mesh_json_match_enter
00001974 T espconn_mesh_layer
0000194c T espconn_mesh_local_addr
00001f00 T espconn_mesh_process_digest
000033a4 T espconn_mesh_remove_context
0000039c T espconn_mesh_router_check
00002ff4 T espconn_mesh_scan_done
000012fc T espconn_mesh_sent_flow_request
00000608 T espconn_mesh_set_max_hops
00000a90 T espconn_mesh_set_router
000004e8 T espconn_mesh_setup_conn_router
00000618 T espconn_mesh_setup_timer
000019f0 T espconn_mesh_signal_user
00002ef8 T espconn_mesh_sta_check
00001b08 T espconn_mesh_sta_exception
000028dc T espconn_mesh_sta_got_ip
00000e2c T espconn_mesh_wifi_connect_cb
         U espconn_mesh_is_on


nm:          U espconn_mesh_is_on
tcpip.o: no symbols
         U espconn_mesh_is_on
         U espconn_mesh_init
         U espconn_mesh_sta_check
         U espconn_mesh_sta_got_ip
nm: ieee80211_hwmp.o: no symbols
nm: ieee80211_mesh.o: no symbols
ieee80211_mesh.o:
nm: ieee80211_node.o: no symbols
         U espconn_mesh_scan_done
nm: if_eagle.o: no symbols
nm: ate_test.o: no symbols
         U espconn_mesh_is_on
         U espconn_mesh_layer
         U espconn_mesh_scan_done



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.







Saturday, May 2, 2015

WiFi status LED

If you want to know if your ESP8266 is connected to your WiFi router, solution is to add a simple led to an not used GPIO ( can use also GPIO 0 for ESP-01) and call a function.

//install status wifi LED on GPIO0
#define WIFI_LED_IO_MUX     PERIPHS_IO_MUX_GPIO0_U
#define WIFI_LED_IO_NUM     0
#define WIFI_LED_IO_FUNC    FUNC_GPIO0



and call wifi status led function at the beginning of your user_init() function BEFORE any 
WIFI action to your router.

wifi_status_led_install(WIFI_LED_IO_NUM, WIFI_LED_IO_MUX, FUNC_GPIO0); 


Connected LED will  blink when trying to connect or having an error, it will switch off when everything is fine.


A short video with wifi status led:







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:











Tuesday, April 7, 2015

Post man #4

To extend the range ( which seems to be fine for my project at this time) I've ordered some 
19 cm mini PCI U.FL to RP-SMA WiFi Antenna Cable. My plan was to reuse the antenna from NRF240L01P modules but I didn't checked the connectors. 


SMA U.FL wifi antenna cable and antenna from NRF24L01



Murphy's law is applicable also in this case, so as you can guess they don't match. So the new antennas are on their way also.


I've received also the BMP180 sensors ( replace the old BMP085 version). 
  • Pressure sensing range: 300-1100 hPa (9000m to -500m above sea level)
  • Up to 0.03hPa / 0.25m resolution
  • -40 to +85°C operational range, +-2°C temperature accuracy
  • This board/chip uses I2C 7-bit address 0x77


BMP180 sensor bag

The sensor and its board is very small, which is great. 

So I have temperature and humidity from DHT22, pressure from BMP180, I can now predict the weather for my irrigation platform.