ESP made easy

Everything about esp8266 and more.

Moderator: leecollings

rtenklooster
Posts: 36
Joined: Tuesday 23 December 2014 16:20
Target OS: Linux
Domoticz version:
Contact:

ESP made easy

Post by rtenklooster »

For a few months, we have been working on a completely configurable web interface for all esp modules.
Use an ESP8266 module as a wireless sensor for temperature, humidity, barometric pressure, LUX, etc. Or use it as an actuator to control Relays.

We mainly develop with Domoticz as target, but it is our goal to be more independent and support other Home Automation solutions as well.
Currently we support the following protocols:

* Domoticz HTTP
* Domoticz MQTT
* OpenHAB MQTT
* Nodo Telnet
* ThingSpeak webservice

Use devices like dallas ds18b20, DHT11, DHT22, BH1750, BMP085, Wiegand RFID and more to come...
The ESP is web configurable for both Wifi setup and device configuration.

Build upon the github Arduino ESP project:
https://github.com/esp8266/Arduino

For support:
- have a look at the wiki on http://www.esp8266.nu (in progress)
- join our forum on http://www.esp8266.nu/forum (just opened for public on 25th of august)

Image
Image
Image
Image
Image

Currently the project is hosted on source forge, but we are migrating it to github.
You can find the project here:
http://sourceforge.net/projects/espeasy/
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: ESP made easy

Post by ThinkPad »

Very nice, i will try it soon! I have a spare DHT22 lying around and a BH1750 will arrive soon, this comes in very handy.

Btw, on the wiki i see there is a PulseCounter sketch, but from your screenshots it looks like the sketch isn't needed because it is already supported by ESPEasy?
And what about the P1 meter part? Wiki page is empty.... i'm curious how it works :D

P.S. The <code> tags of your wiki are not working correctly, the Arduino sketch is messed up. I think you need to put a space before each code line or so.... In the current view it is almost not possible to copy the code.
I am not active on this forum anymore.
rtenklooster
Posts: 36
Joined: Tuesday 23 December 2014 16:20
Target OS: Linux
Domoticz version:
Contact:

Re: ESP made easy

Post by rtenklooster »

ThinkPad wrote: Btw, on the wiki i see there is a PulseCounter sketch, but from your screenshots it looks like the sketch isn't needed because it is already supported by ESPEasy?
That's true. ESP Easy has a built in pulsecounter. Stil working on the wiki will update it soon.
ThinkPad wrote: And what about the P1 meter part? Wiki page is empty.... i'm curious how it works :D
That's not implemented yet. I dont know the progress of p1 support. If there are any updates I will post an update.
ThinkPad wrote: P.S. The <code> tags of your wiki are not working correctly, the Arduino sketch is messed up. I think you need to put a space before each code line or so.... In the current view it is almost not possible to copy the code.
Thansk for the feedback. Don't know if that's fix-able but we will take a look at that.

I'm looking for a solution for the pulse counter - energy meter.
Currently an incremental meter is being used, because the combined rfxmeter (usage / current) needs client side counting. It would be nice if there was a solution for this case, being able to update the current wattage, and new pulses without client side counting.
User avatar
remb0
Posts: 499
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: ESP made easy

Post by remb0 »

I have now a piface for counting my water usage with an line tracker sensor, and use 4 outputs for controlling my ventilation system.
problem is: when I flush i see 7 pulses and piface register 1 in domoticz and after sometimes the piface doesn't count nothing anymore.
so totally not reliable.

I have ordered already an esp-07. I will try to use this as replacement? (then I have also a spare pi with piface1 : )

Very nice project..
mvdbro
Posts: 24
Joined: Saturday 31 January 2015 19:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP made easy

Post by mvdbro »

ThinkPad wrote:And what about the P1 meter part? Wiki page is empty.... i'm curious how it works :D
Same here :mrgreen:

I've tried to compile your Arduino AVR code on the ESP but it seems that the sscanf function call is not supported on ESP Arduino SDK. There's an issue for it on github (#404 and #488) but those are still unsolved. Besides that, my smartmeter doesn't have a P1 port, so development would be difficult.

So we need someone with a working P1 smartmeter, some programming skills and a workaround for the missing sscanf function call.

Any volunteers?
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: ESP made easy

Post by ThinkPad »

I tried the DHT22 in combination with Domoticz and worked fine.

I also tried the PulseCounter, but it doesn't count anything..... I made a "Counter incremental" (is not very clear on the wiki btw) in Domoticz, configured the IDX in the ESP and let the sensor module register some fake pulses (the led was blinking when i waved in front with a flashlight).

However the device in Domoticz isn't updating. I also updated the sensor in Domoticz myself (/json.htm?type=command&param=udevice&idx=IDX&svalue=COUNTER) but the value in the ESP table (value1/value2) stays at zero....
How can i fix this?
I am not active on this forum anymore.
User avatar
Mediacj
Posts: 74
Joined: Wednesday 11 February 2015 16:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: ESP made easy

Post by Mediacj »

ThinkPad wrote:I tried the DHT22 in combination with Domoticz and worked fine.

I also tried the PulseCounter, but it doesn't count anything..... I made a "Counter incremental" (is not very clear on the wiki btw) in Domoticz, configured the IDX in the ESP and let the sensor module register some fake pulses (the led was blinking when i waved in front with a flashlight).

However the device in Domoticz isn't updating. I also updated the sensor in Domoticz myself (/json.htm?type=command&param=udevice&idx=IDX&svalue=COUNTER) but the value in the ESP table (value1/value2) stays at zero....
How can i fix this?
I've also made a pulsecounter with espeasy and it is working fine, but I've had some problems to with getting the pulses to Domoticz two points to take care of although you may already done: be sure to have the right gpio port in the hardware and edit tabs and a extra reboot of esp(not a software reboot but power off) made it work for me.
mvdbro
Posts: 24
Joined: Saturday 31 January 2015 19:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP made easy

Post by mvdbro »

Mediacj wrote:... and a extra reboot of esp(not a software reboot but power off) made it work for me.
You're right about the necessary reboot with the current version. Currently the pulse interrupts are attached during boot. This will be addressed in the next release, where the specific device will be initialized after changing the device tab in the web gui. Then a reboot is no longer needed.

Currently you will experience a similar issue with the RFID device (also IRQ driven). Reboot needed in the current R16 release...
Raspberry Piet
Posts: 158
Joined: Saturday 11 January 2014 16:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: NL
Contact:

Re: ESP made easy

Post by Raspberry Piet »

Pulsecounters working perfect! (after reboot)

I choose "Counter Incremental" type.
Should be nice the icon would change accordingly the chosen type.
Image


Switch input working also perfect, but every time after a reboot the switch is fired (ON)
Is this normal behaviour, or am i doing something wrong?
mvdbro
Posts: 24
Joined: Saturday 31 January 2015 19:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP made easy

Post by mvdbro »

Raspberry Piet wrote:Switch input working also perfect, but every time after a reboot the switch is fired (ON)
Is this normal behaviour, or am i doing something wrong?
In R16 this is default behaviour because the init call does not read the current state during boot. This is fixed in R17.
There will also be a radio button to inverse input switch logic when needed.
Raspberry Piet
Posts: 158
Joined: Saturday 11 January 2014 16:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: NL
Contact:

Re: ESP made easy

Post by Raspberry Piet »

mvdbro wrote:
Raspberry Piet wrote:Switch input working also perfect, but every time after a reboot the switch is fired (ON)
Is this normal behaviour, or am i doing something wrong?
In R16 this is default behaviour because the init call does not read the current state during boot. This is fixed in R17.
There will also be a radio button to inverse input switch logic when needed.
Awesome!

Just another thing, I tried to control a relay attached to my nodemcu following the wiki.

Code: Select all

curl -s "http://192.168.1.20/control/?cmd=GPIO,0,1"
returns: Not found: /control/
Is it something i overlooked in settings?
mvdbro
Posts: 24
Joined: Saturday 31 January 2015 19:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP made easy

Post by mvdbro »

Raspberry Piet wrote:Just another thing, I tried to control a relay attached to my nodemcu following the wiki.

Code: Select all

curl -s "http://192.168.1.20/control/?cmd=GPIO,0,1"
returns: Not found: /control/
Is it something i overlooked in settings?
Nope, there's an error in the Wiki. Screendump is ok but Wiki text is wrong. The trailing / after control should not be in the command. This should work:

Code: Select all

curl -s "http://192.168.1.20/control?cmd=GPIO,0,1"
I will update the Wiki page.
Raspberry Piet
Posts: 158
Joined: Saturday 11 January 2014 16:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: NL
Contact:

Re: ESP made easy

Post by Raspberry Piet »

Thanks, relay activated now!

I really like this project!

I bought a LoLin-Board(NodeMCU) + Base wich works great for testing.

Other thought: will it be possible to wire multiple DS18b20 sensors to one GPIO port?
maluko
Posts: 105
Joined: Sunday 02 February 2014 23:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Portugal
Contact:

Re: ESP made easy

Post by maluko »

Raspberry Piet wrote:Other thought: will it be possible to wire multiple DS18b20 sensors to one GPIO port?
good question :)

Pief, can you share your pulse project?
Raspberry Piet
Posts: 158
Joined: Saturday 11 January 2014 16:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: NL
Contact:

Re: ESP made easy

Post by Raspberry Piet »

maluko wrote:
Pief, can you share your pulse project?
Really easy, i followed this wiki
Attached TCR5000 modules to my NodeMCU.
I had to lookup the pin-out for right connection to the GPIO's
Then in the settings add the IDX numbers and GPIO numbers.
Image
Don't forget to reboot as mentioned earlier in this thread.
maluko
Posts: 105
Joined: Sunday 02 February 2014 23:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Portugal
Contact:

Re: ESP made easy

Post by maluko »

thanks pief, before i was testing with esp-01 without sucess now its work with esp-07

aprecieted your teach :)


For inverted switch on R16 i modified the "Controller" sketch

only have to change on to off, and off to on

Code: Select all

    case 10:                      // switch
      url = F("/json.htm?type=command&param=switchlight&idx=");
      url += idx;
      url += "&switchcmd=";
      if (UserVar[varIndex - 1] == 0)
        url += "On";
      else
        url += "Off";
      break;
  }
But will be implemented on R17, cool
tweaker
Posts: 10
Joined: Monday 24 August 2015 15:35
Target OS: -
Domoticz version:
Contact:

Re: ESP made easy

Post by tweaker »

I have two ESP unit's running now and I expected to see these units to appear in the node list on each ESP unit with their IP's, but that list is still empty.
The screenshot on sourceforge shows a list of nodes, how to get this?
BigDog
Posts: 82
Joined: Tuesday 17 September 2013 13:59
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.9269
Location: The Netherlands
Contact:

Re: ESP made easy

Post by BigDog »

i love this project its very easy looking :)
have ordered 5 esp-07
been wondering how it works with battery? or is it pulling to much power from the batterys that it dasnt hold a couple of days?

Greetz BigDog
1X Raspberry4B : Domoticz Version 2023.1 [Linux 5.10.63-v7l+ armv7l]
1X Conbee II : 2.25.3 - 26720700
1X RFXtrx433 USB Firmware:183
1X Mysensors Gateway 1.5 -3
6X ESP8266: Tosmota firmware
Zigbee : 6 Operators, 13 Sensors
rtenklooster
Posts: 36
Joined: Tuesday 23 December 2014 16:20
Target OS: Linux
Domoticz version:
Contact:

Re: ESP made easy

Post by rtenklooster »

tweaker wrote:I have two ESP unit's running now and I expected to see these units to appear in the node list on each ESP unit with their IP's, but that list is still empty.
The screenshot on sourceforge shows a list of nodes, how to get this?
You should fill-in te UDP port you want to use. As soon as that's filled in they notify eachother. Note: it may require a reboot of the units.
rtenklooster
Posts: 36
Joined: Tuesday 23 December 2014 16:20
Target OS: Linux
Domoticz version:
Contact:

Re: ESP made easy

Post by rtenklooster »

BigDog wrote:i love this project its very easy looking :)
have ordered 5 esp-07
been wondering how it works with battery? or is it pulling to much power from the batterys that it dasnt hold a couple of days?

Greetz BigDog
For now we are concentrating on adding more functionality and improving stability,
For what i have seen the ESP modules don't seem to be the first choice using as battery powered sensor.
I think there are more suitable sensors like NRF / 433 mhz modules etc.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest