Programming the ESP8266

Everything about esp8266 and more.

Moderator: leecollings

Post Reply
User avatar
cobrp
Posts: 6
Joined: Tuesday 02 June 2015 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.8153
Location: Enschede, the Netherlands
Contact:

Programming the ESP8266

Post 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?
deennoo
Posts: 784
Joined: Wednesday 10 December 2014 13:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: Programming the ESP8266

Post by deennoo »

ESPEasy ? http://www.esp8266.nu

Is far the best one, easy to load, easy to configure, domoticz friendly.
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
User avatar
cobrp
Posts: 6
Joined: Tuesday 02 June 2015 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.8153
Location: Enschede, the Netherlands
Contact:

Re: Programming the ESP8266

Post 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!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest