Page 1 of 5

ESP made easy

Posted: Monday 31 August 2015 10:36
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/

Re: ESP made easy

Posted: Monday 31 August 2015 14:51
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.

Re: ESP made easy

Posted: Monday 31 August 2015 16:17
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.

Re: ESP made easy

Posted: Thursday 03 September 2015 9:57
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..

Re: ESP made easy

Posted: Friday 04 September 2015 15:47
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?

Re: ESP made easy

Posted: Friday 04 September 2015 16:27
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?

Re: ESP made easy

Posted: Friday 04 September 2015 19:11
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.

Re: ESP made easy

Posted: Sunday 06 September 2015 14:39
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...

Re: ESP made easy

Posted: Sunday 06 September 2015 15:20
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?

Re: ESP made easy

Posted: Sunday 06 September 2015 19:37
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.

Re: ESP made easy

Posted: Sunday 06 September 2015 21:05
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?

Re: ESP made easy

Posted: Sunday 06 September 2015 21:49
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.

Re: ESP made easy

Posted: Sunday 06 September 2015 22:17
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?

Re: ESP made easy

Posted: Sunday 06 September 2015 23:29
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?

Re: ESP made easy

Posted: Sunday 06 September 2015 23:50
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.

Re: ESP made easy

Posted: Monday 07 September 2015 0:09
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

Re: ESP made easy

Posted: Monday 07 September 2015 15:48
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?

Re: ESP made easy

Posted: Tuesday 08 September 2015 9:32
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

Re: ESP made easy

Posted: Tuesday 08 September 2015 9:46
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.

Re: ESP made easy

Posted: Tuesday 08 September 2015 10:00
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.