Are there any plans for simple BASIC rules in Easy ESP?
Moderators: grovkillen, Stuntteam, TD-er
Are there any plans for simple BASIC rules in Easy ESP?
It would be nice to have some simple node interactions hosted on the ESP itself. Right now, all of my commands four nodes require my MQT T broker to send commands from my controller via openhab. This creates lag and not very efficient .
Thank you for all your hard work.
Thank you for all your hard work.
Re: Are there any plans for simple BASIC rules in Easy ESP?
try under "devices" the level-control
source-code here:
https://github.com/ESP8266nu/ESPEasy/bl ... _Level.ino
if there is more than this, the developer has to tell you ...
source-code here:
https://github.com/ESP8266nu/ESPEasy/bl ... _Level.ino
if there is more than this, the developer has to tell you ...

Re: Are there any plans for simple BASIC rules in Easy ESP?
Having mixed central and decentral control of things could turn your Home Automation control into a mess. It will also make the ESP Easy much more complicated if things have to be synchronized with other systems as well (and that will be the next request I'm afraid).espfrm883 wrote:It would be nice to have some simple node interactions hosted on the ESP itself. Right now, all of my commands four nodes require my MQT T broker to send commands from my controller via openhab. This creates lag and not very efficient.
But if you have some "standalone" uses for ESP Easy, it could make sense to have some features build into ESP.
But then I need to know your definition of "simple" and "basic".
I have used a custom ESP Easy for my "RFID Tag reader test rig", looking like this: That would by my definition of "simple"...
We also have the "playground action event" plugin that might be able to do some basic stuff. I've also used that for the Tag reader test, but it took 5 tasks to manage the same result.
Re: Are there any plans for simple BASIC rules in Easy ESP?
Do you mind sharing your custom code to add rules?
This is my idea of simple as well. I have built an ESP into an old stop light that uses an HC-SR04 (Esp_Garage_Dist_Left) to measure distance. There are two different relays that are triggered based on the distance reading.
I'm using OpenHAB and here are the associated rules.
This is my idea of simple as well. I have built an ESP into an old stop light that uses an HC-SR04 (Esp_Garage_Dist_Left) to measure distance. There are two different relays that are triggered based on the distance reading.
I'm using OpenHAB and here are the associated rules.
Code: Select all
rule "Garage Left side trigger yellow"
when
Item Esp_Garage_Dist_Left changed
then
// if(Esp_Garage_Pir_Left.state == ON) {
if(Esp_Garage_Pir_Left.state == OPEN) {
if ((Esp_Garage_Dist_Left.state > 20) && (Esp_Garage_Dist_Left.state < 300)){
sendCommand(Esp_Garage_Relay_Ly, ON)
}
}
else {
sendCommand(Esp_Garage_Relay_Ly, OFF)
}
end
rule "Garage Left side trigger red"
when
Item Esp_Garage_Dist_Left changed
then
// if(Esp_Garage_Pir_Left.state == ON) {
if(Esp_Garage_Pir_Left.state == OPEN) {
if ((Esp_Garage_Dist_Left.state > 20) && (Esp_Garage_Dist_Left.state < 30)){
sendCommand(Esp_Garage_Relay_Lr, ON)
}
}
else {
sendCommand(Esp_Garage_Relay_Lr, OFF)
}
end
Re: Are there any plans for simple BASIC rules in Easy ESP?
Well my "simple" idea supports only one simple logic rule:
on <event>[compare][value] do [{]<action>[,<action>,..}]
The idea was based on the old Nodo project were we had a similar set of oneliner event/actions.
You have posted an entire script like LUA that needs a full blown scripting engine to process it. And that's were my basic development skills end
(and if I knew how to integrate a LUA engine into ESP Easy, it will likely not fit the available free RAM)
on <event>[compare][value] do [{]<action>[,<action>,..}]
The idea was based on the old Nodo project were we had a similar set of oneliner event/actions.
You have posted an entire script like LUA that needs a full blown scripting engine to process it. And that's were my basic development skills end

(and if I knew how to integrate a LUA engine into ESP Easy, it will likely not fit the available free RAM)
Re: Are there any plans for simple BASIC rules in Easy ESP?
could this logic engine go into a plugin?Martinus wrote:Well my "simple" idea supports only one simple logic rule ...

(is this your code: http://www.esp8266.nu/forum/viewtopic.php?f=2&t=47 , or there a github? )
or are you adventourous enough to put it on the plugin-playgound?

i think, i would be charming to have something like IFTTT (or similar condition-logic-engine) on the ESPeasy itself.

i played with this sometimes ago for my knx installation: https://sourceforge.net/p/linknx/wiki/C ... 7s_Syntax/ )
Re: Are there any plans for simple BASIC rules in Easy ESP?
Well, just to make clear I'm still on my discovering journey to find components for my system to build upon, therefore I have way more questions than answers.
I think to make a reliable home automation sytem there are cornerstones one should not bypass. As long as home automation is only turning a desktop lamp on and off the text below is redundant.
I consider basic functions with optional extras like remote contol.
First of all I believe we should (I will) not use cloud services. Home automation should work (even if any alarm system is involved) within a well secured 'intranet'. I don't think we may trust any services beyond our reach to operate flawlessly, and securely.
Zooming in to an example we may see the same aspect on a different scale, through this example below:
Kitchen light:
We have power and we have a lamp and a (momentary) switch on the wall. And we have a node with in- and outputs. Basic function is: you press the button and the node turns the light on. Extra: you can do the same via the controller and an UI on your smartphone, since the node sends the state of the output node to the contoller. Achievment: we can turn the light on even if there is no wifi, the router went crazy etc.
I'd like to have my system this way. This must be more complicated to make, but I believe it would work more solid than the other way where you are dependent on a wifi connection (and other aspects) just to turn a single light on and off. Besides, staying at a lifelike example when I'm walking into my kitchen I'd rather hit a button on the wall then start tapping my phone...
Some say ESPs are not stable enough for such tasks. I don't know yet. But if the price of the stability and the reliable workflow is that I have to use an Arduino as a node and use the ESP hooked onto as a communication device, so be it. It is not the part which would make the budget skyrocketing.
Any thoughts on this, Gentlemen?
I think to make a reliable home automation sytem there are cornerstones one should not bypass. As long as home automation is only turning a desktop lamp on and off the text below is redundant.
I consider basic functions with optional extras like remote contol.
First of all I believe we should (I will) not use cloud services. Home automation should work (even if any alarm system is involved) within a well secured 'intranet'. I don't think we may trust any services beyond our reach to operate flawlessly, and securely.
Zooming in to an example we may see the same aspect on a different scale, through this example below:
Kitchen light:
We have power and we have a lamp and a (momentary) switch on the wall. And we have a node with in- and outputs. Basic function is: you press the button and the node turns the light on. Extra: you can do the same via the controller and an UI on your smartphone, since the node sends the state of the output node to the contoller. Achievment: we can turn the light on even if there is no wifi, the router went crazy etc.
I'd like to have my system this way. This must be more complicated to make, but I believe it would work more solid than the other way where you are dependent on a wifi connection (and other aspects) just to turn a single light on and off. Besides, staying at a lifelike example when I'm walking into my kitchen I'd rather hit a button on the wall then start tapping my phone...
Some say ESPs are not stable enough for such tasks. I don't know yet. But if the price of the stability and the reliable workflow is that I have to use an Arduino as a node and use the ESP hooked onto as a communication device, so be it. It is not the part which would make the budget skyrocketing.
Any thoughts on this, Gentlemen?
Re: Are there any plans for simple BASIC rules in Easy ESP?
1 cloud services:
The owner of the cloud-server is harvesting a database with: IP , SSID end Password of all users. A potentially dangerous situation.
Just imagine the nightmare when the cloud-server gets hacked, the database leaked, or the cloud-service sold to another not trustable entity. Probably someone could do a FOTA on your device , turning your innocent IOT device into a relay, that sends certain traffic/information directly to a server under control of the hacker. I will avoid using cloud services as much as possible.
2 local AP:
Making it so that even without your device being connected to a network you can access the UI to do the normal control things.
It must be possible (not at the moment) to let the ESP act as AP and Station at the same time with the UI feature. Though most people would like to have a central home-server do all the control.
3 stability:
I find ESPEasy very stable. Here on a breadboard it works for thousands of hours without problems, these breadboard are known for their unreliable contacts !
After a reboot ESPEasy always reboots normally and connects again. Never experienced a crashed ESP that did not reboot normal.
The only requirement is a good powersupply and preferrable an extra 2.2uF capacitor over Vcc/Gnd directly on the ESP-module.
The owner of the cloud-server is harvesting a database with: IP , SSID end Password of all users. A potentially dangerous situation.
Just imagine the nightmare when the cloud-server gets hacked, the database leaked, or the cloud-service sold to another not trustable entity. Probably someone could do a FOTA on your device , turning your innocent IOT device into a relay, that sends certain traffic/information directly to a server under control of the hacker. I will avoid using cloud services as much as possible.
2 local AP:
Making it so that even without your device being connected to a network you can access the UI to do the normal control things.
It must be possible (not at the moment) to let the ESP act as AP and Station at the same time with the UI feature. Though most people would like to have a central home-server do all the control.
3 stability:
I find ESPEasy very stable. Here on a breadboard it works for thousands of hours without problems, these breadboard are known for their unreliable contacts !
After a reboot ESPEasy always reboots normally and connects again. Never experienced a crashed ESP that did not reboot normal.
The only requirement is a good powersupply and preferrable an extra 2.2uF capacitor over Vcc/Gnd directly on the ESP-module.
Re: Are there any plans for simple BASIC rules in Easy ESP?
Your point of having the ability to have a redundancy built-in for when your Wi-Fi down complements my request for simple or basic rules execution within the native ESP program. for instance the ability to turn on or off a switch with a pushbutton attached to the ESP.
As for cloud services I am a skeptic. Not due too to stability, but only to security. I don't trust the security of these cloud companies to have access to my home via the web. Therefore, my solution is to only allow access remotely via my home open VPN server. The exception is email out for SMS notifications.
My experience with the stability of ESP has been pretty good. Have a front door humidity and temperature sensor that has worked for weeks now.
As for cloud services I am a skeptic. Not due too to stability, but only to security. I don't trust the security of these cloud companies to have access to my home via the web. Therefore, my solution is to only allow access remotely via my home open VPN server. The exception is email out for SMS notifications.
My experience with the stability of ESP has been pretty good. Have a front door humidity and temperature sensor that has worked for weeks now.
Re: Are there any plans for simple BASIC rules in Easy ESP?
Actually I don't really want to access the node directly. I only want to keep basic functionality to be able to turn on the light manually if wifi was down for a reason.costo wrote:2 local AP:
Making it so that even without your device being connected to a network you can access the UI to do the normal control things.
It must be possible (not at the moment) to let the ESP act as AP and Station at the same time with the UI feature. Though most people would like to have a central home-server do all the control.
I have an ESP-07 test rig running for a while, with a (opto isolated) 8-way relay board hooked onto it. Power fed by a pro lab bench supply, set to 5V, the ESP gets 3V3 through a level converter and a 470uF cap. As others reported too I experience multiple spontaneous resets a day, AND what the real problem is during reboot some relays are clicking which means GPIOs act indeed unpredictable.costo wrote:3 stability:
I find ESPEasy very stable. Here on a breadboard it works for thousands of hours without problems, these breadboard are known for their unreliable contacts !
After a reboot ESPEasy always reboots normally and connects again. Never experienced a crashed ESP that did not reboot normal.
The only requirement is a good powersupply and preferrable an extra 2.2uF capacitor over Vcc/Gnd directly on the ESP-module.
Just imagine if those relays were connected to drive my workshop garage door...
Re: Are there any plans for simple BASIC rules in Easy ESP?
I think you make the mistake in believing bigger is better.Gorgo wrote: I have an ESP-07 test rig running for a while, with a (opto isolated) 8-way relay board hooked onto it. Power fed by a pro lab bench supply, set to 5V, the ESP gets 3V3 through a level converter and a 470uF cap. As others reported too I experience multiple spontaneous resets a day, AND what the real problem is during reboot some relays are clicking which means GPIOs act indeed unpredictable.
Just imagine if those relays were connected to drive my workshop garage door...
A 470 uF capacitor is usually a electrolytic type, the way how electrolytic caps are fabricated makes them unusable at (very) high frequencies.
Relais have the bad reputation for generating spurious interference with many high frequency components.
I advice you strongly to solder two capacitors right on the ESP-07 module as explained here: http://www.esp8266.nu/index.php/Power
a small ceramic capacitor , about 1nF, between the reset pin and the metal case and also a tantalium capacitor of a few uF right between the Vcc pin and the metal case of the ESP-07 module, both SMD type , if not available then normal wired types, soldered on the module with the shortest wires that are practically possible. This will certainly help to minimize sponteneous resets.
Re: Are there any plans for simple BASIC rules in Easy ESP?
Thank you costo, will try this way.
Nice to see new documentation pages, they seem pretty helpful.
Nice to see new documentation pages, they seem pretty helpful.
Re: Are there any plans for simple BASIC rules in Easy ESP?
I think that people that came from the nodo project would like this if it work like the eventlist from the Nodo. And others too but I remember that not everyone liked the eventlist. It is not so easy for everyone. But can do some local stuff and could be handy.Martinus wrote:Well my "simple" idea supports only one simple logic rule:
on <event>[compare][value] do [{]<action>[,<action>,..}]
The idea was based on the old Nodo project were we had a similar set of oneliner event/actions.
But is this planned to build for the next release?
Re: Are there any plans for simple BASIC rules in Easy ESP?
Try this link https://forum.pimatic.org/topic/1577/es ... a-relay/32Gorgo wrote:We have power and we have a lamp and a (momentary) switch on the wall. And we have a node with in- and outputs. Basic function is: you press the button and the node turns the light on. Extra: you can do the same via the controller and an UI on your smartphone, since the node sends the state of the output node to the contoller. Achievment: we can turn the light on even if there is no wifi, the router went crazy etc.
I'd like to have my system this way. This must be more complicated to make, but I believe it would work more solid than the other way where you are dependent on a wifi connection (and other aspects) just to turn a single light on and off. Besides, staying at a lifelike example when I'm walking into my kitchen I'd rather hit a button on the wall then start tapping my phone...
Post from @noxx seems to meet this criteria. I've tried it and it works but sometime a little lagged...
Re: Are there any plans for simple BASIC rules in Easy ESP?
You can send commands to the UART through rules? To send an SMS via modem
Who is online
Users browsing this forum: No registered users and 12 guests