Page 1 of 1

Programming the ESP8266

Posted: Sunday 12 June 2016 10:15
by cobrp
Using the ESP8266 chip, a sensor and some programming you can integrate 'other' sensors in Domoticz by defining a virtual sensor. The data is send to Domoticz using a json request.

To program the ESP8266 you can use the programming lanuage Lua as can do within Domoticz or an other language for instance the language used while programming an Arduino, looks like cpp.

Using Lua on a ESP8266 requires to install a LUA interpreter on the soc. Then you can write your program and make your life a lot easier using Esplorer (watch the 's'). In my experience this solution is stabile, but not in the long run. After 3 months or less the ESP8266 crashes.

Programming, compiling and flashing the ESP8266 with platformIO using an Arduino program is a better solution. My sensor now is rock solid.

Anyone with the same experiences?

Re: Programming the ESP8266

Posted: Sunday 12 June 2016 12:23
by deennoo
ESPEasy ? http://www.esp8266.nu

Is far the best one, easy to load, easy to configure, domoticz friendly.

Re: Programming the ESP8266

Posted: Tuesday 14 June 2016 11:00
by cobrp
Ok, I will try ESPEasy.

Installing ESPEasy is NOT simple. It took me some time to figure out how to flash my ESP8266 on a Mac.
The command is:

Code: Select all

esptool.py --port=/dev/<my usb-device> write_flash 0x00000 ESPEasy_R78_1024.bin -fs 8m -fm dio -ff 40m
, watch for the -fs 8m. It's 8m for a 1MB device. For a 4 MB device its;s 32m (i.e. nodeMCU)

After installing, adding a DS18B20 is easy. Connecting it to a virtual device is easy.
But that is about it, the user is limited to the devices pre-installed within ESPEasy. Connecting an APDS-9968 sensor (movement, proximity, light) is a problem. PlatformIO has the driver ready for you.

I'm curious about the stability. I will watch and see.

It's very nice that you can use up to 4 devices on the same SoC. However finding a port that actually will work on a nodeMCU takes some time. That means that not all suggestions from ESPeasy give a result!