Problems with R2.0-dev12
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 73
- Joined: 30 Nov 2017, 18:29
Problems with R2.0-dev12
Hi all,
Here is my setup: ESP8266 (Wemos mini 4MB) + 2 relay board.
With version R147 everything was working fine.
Then I wanted to add the SHT30 temp module so I switched to R2.0 dev. 12.
But using the same exact configuration (without the SHT30) the board reacts strangely in R2-dev12.
It reboots randomly, or simply activates the relay but does not deactivate them, etc.
In other words it's not workable.
Attached the screenshots of the working configuration in R147 that does not perform correctly in R2-dev12.
Can someone help me finding out what is wrong?
thanks
Here is my setup: ESP8266 (Wemos mini 4MB) + 2 relay board.
With version R147 everything was working fine.
Then I wanted to add the SHT30 temp module so I switched to R2.0 dev. 12.
But using the same exact configuration (without the SHT30) the board reacts strangely in R2-dev12.
It reboots randomly, or simply activates the relay but does not deactivate them, etc.
In other words it's not workable.
Attached the screenshots of the working configuration in R147 that does not perform correctly in R2-dev12.
Can someone help me finding out what is wrong?
thanks
You do not have the required permissions to view the files attached to this post.
-
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
Re: Problems with R2.0-dev12
Did you redo all the settings and saved it? As of now the config file of old RXXX is not compatible/converted to the new 2.0.0+ standard.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



-
- Normal user
- Posts: 73
- Joined: 30 Nov 2017, 18:29
Re: Problems with R2.0-dev12
Yes of course. I forgot to mention but I erased the flash and manually reconfigured the unit with exactly as the R147 unit. Did it three times. Same result.
-
- Normal user
- Posts: 73
- Joined: 30 Nov 2017, 18:29
Re: Problems with R2.0-dev12
Another info: I tested also with ESPurnia compiling myself the firmware and everything works fine.
Only R2-dev12 has problems for me.
Do you see anything wrong in my config?
Only R2-dev12 has problems for me.
Do you see anything wrong in my config?
-
- Normal user
- Posts: 241
- Joined: 21 Mar 2017, 17:35
Re: Problems with R2.0-dev12
Delete the entries for the relays in the device table. They don't need one, because they are controled directly by GPIO commands in your rules. A relay is no input switch.
And your rules are wrong. Change it to:
on push1#state do
if [push1#state]=1
gpio 12,1
.....

on push1#state do
if [push1#state]=1
gpio 12,1
.....
-
- Normal user
- Posts: 73
- Joined: 30 Nov 2017, 18:29
Re: Problems with R2.0-dev12
Hi vader,
the logic I want to achieve is to toggle the relay when I click a button.
I might be wrong, but the way I understood is:
a) the rule should check the relay status and change it for every button click.
b) in order to refer to a relay in a rule I have to define in the device tab with a name
I am wrong?
the logic I want to achieve is to toggle the relay when I click a button.
I might be wrong, but the way I understood is:
a) the rule should check the relay status and change it for every button click.
b) in order to refer to a relay in a rule I have to define in the device tab with a name
I am wrong?
-
- Normal user
- Posts: 241
- Joined: 21 Mar 2017, 17:35
Re: Problems with R2.0-dev12
In your case there should only the 2 switches in the device list. Done. Make the rules for each switch like I wrote in my last post and all is good. 

Last edited by vader on 01 Dec 2017, 16:48, edited 1 time in total.
-
- Normal user
- Posts: 73
- Joined: 30 Nov 2017, 18:29
Re: Problems with R2.0-dev12
ok. Will try and return.
thanks for your help.
thanks for your help.
-
- Normal user
- Posts: 241
- Joined: 21 Mar 2017, 17:35
Re: Problems with R2.0-dev12
You use on system#boot, as I can see, so don't forget to set the switch state also to 1 like the both relays.
E.g.
inputswitchstate 0,1
inputswitchstate 1,1
E.g.
inputswitchstate 0,1
inputswitchstate 1,1
-
- Normal user
- Posts: 73
- Joined: 30 Nov 2017, 18:29
Re: Problems with R2.0-dev12
Hi,
You mean adding:
or do I have to write textually:
You mean adding:
Code: Select all
gpio,13,1
gpio,14,1
Code: Select all
inputswitchstate 0,1
inputswitchstate 1,1
-
- Normal user
- Posts: 241
- Joined: 21 Mar 2017, 17:35
Re: Problems with R2.0-dev12
Yep.
.....
gpio,16,1
inputswitchstate 0,1 (For push1 on task 1)
inputswitchstate 1,1 (For push2 on task 2)
endon
.....
.....
gpio,16,1
inputswitchstate 0,1 (For push1 on task 1)
inputswitchstate 1,1 (For push2 on task 2)
endon
.....
-
- Normal user
- Posts: 73
- Joined: 30 Nov 2017, 18:29
Re: Problems with R2.0-dev12
I wasn't aware of this rule sintax.
So in my configuration it would be:
.....
GPIO,16,1
inputswitchstate 1,1 (For push1 on task 1)
inputswitchstate 3,1 (For push2 on task 3)
endon
.....
Correct?
So in my configuration it would be:
.....
GPIO,16,1
inputswitchstate 1,1 (For push1 on task 1)
inputswitchstate 3,1 (For push2 on task 3)
endon
.....
Correct?
-
- Normal user
- Posts: 241
- Joined: 21 Mar 2017, 17:35
Re: Problems with R2.0-dev12
No. Exactly like I wrote:
.....
gpio,16,1
inputswitchstate 0,1
inputswitchstate 1,1
endon
.....
Copy and paste it
And don't forget to delete the 2 relay entries! So you have only the 2 buttons in the table. Push1 on task 1, Push2 on task 2.
explanation:
inputswitchstate 0,1 => 0=task number -1, 1=value/state
.....
gpio,16,1
inputswitchstate 0,1
inputswitchstate 1,1
endon
.....
Copy and paste it

explanation:
inputswitchstate 0,1 => 0=task number -1, 1=value/state
-
- Normal user
- Posts: 73
- Joined: 30 Nov 2017, 18:29
Re: Problems with R2.0-dev12
Hi vader, I just finished testing it and ... it WORKS PERFECTY as you said.
thanks a lot for your help!
thanks a lot for your help!
-
- Normal user
- Posts: 241
- Joined: 21 Mar 2017, 17:35
Re: Problems with R2.0-dev12
No problemo. You are welcome. 

-
- Normal user
- Posts: 190
- Joined: 12 Oct 2017, 20:46
Re: Problems with R2.0-dev12
vader,
can you explain why we need this inputswitchstate command please?
I see, there are pull up resistors on inputs, so they hold 1( high) state all the time.
Except, when switch is pushed.
So why set it to 1 by sw command.
Thank you very much.
PS
By the way. Where we can find list and description of all actual commands for ESPeasy v2.0
Like this "inputswitchstate", "notify" etc.
can you explain why we need this inputswitchstate command please?
I see, there are pull up resistors on inputs, so they hold 1( high) state all the time.
Except, when switch is pushed.
So why set it to 1 by sw command.
Thank you very much.
PS
By the way. Where we can find list and description of all actual commands for ESPeasy v2.0
Like this "inputswitchstate", "notify" etc.
-
- Normal user
- Posts: 241
- Joined: 21 Mar 2017, 17:35
Re: Problems with R2.0-dev12
That's easy explained. You set with GPIO,16,1 only the output to 1, but the state of GPIO 12 (push1) remain on 0! So you have to manually set it also to 1 with a command. Make a // before the inputswitchstate commands and see what's happening after boot-up. You have to press the button twice for turning on/off the relay. But this is only 1 time after boot-up. Button and relay are "in sync" for now...
https://www.letscontrolit.com/wiki/inde ... _Reference
https://www.letscontrolit.com/wiki/inde ... _Reference
-
- Normal user
- Posts: 190
- Joined: 12 Oct 2017, 20:46
Re: Problems with R2.0-dev12
GPIO12 rele1 output - task2
GPIO16 rele2 output - task4
GPIO13 push1 input - task1 button to ground with pull up ( to change state of rele1 )
GPIO14 push2 input - task3 button to ground with pull up ( to change state of rele2 )
Pull up means, that there are internal resistor to +3.3V .
So logical 1 every time. How it can remain 0, like you wrote?
And your suggestion:
gpio,16,1
inputswitchstate 0,1 (For push1 on task 1)
inputswitchstate 1,1 (For push2 on task 2) // ?? this switch on task2 which is rele1 not push2. Why, when there is command gpio,12,1 in system boot event a few lines above?
And on your command reference, are you able find something about "inputswitchstate" or "notify" ?
I am not, unfortunately.
Therefore my question about this "secret" commands.
I am able find some infos there and there, but noting complex and on one place.
GPIO16 rele2 output - task4
GPIO13 push1 input - task1 button to ground with pull up ( to change state of rele1 )
GPIO14 push2 input - task3 button to ground with pull up ( to change state of rele2 )
Pull up means, that there are internal resistor to +3.3V .
So logical 1 every time. How it can remain 0, like you wrote?
And your suggestion:
gpio,16,1
inputswitchstate 0,1 (For push1 on task 1)
inputswitchstate 1,1 (For push2 on task 2) // ?? this switch on task2 which is rele1 not push2. Why, when there is command gpio,12,1 in system boot event a few lines above?
And on your command reference, are you able find something about "inputswitchstate" or "notify" ?
I am not, unfortunately.
Therefore my question about this "secret" commands.
I am able find some infos there and there, but noting complex and on one place.
-
- Normal user
- Posts: 241
- Joined: 21 Mar 2017, 17:35
Re: Problems with R2.0-dev12
@kimot: You seem not to be up-to-date. Have you read post #14? It's already done. So he shouldn't have task 3 and 4. Instead of "inputswitchstate" you can also use "taskvalueset".
E.g.
inputswitchstate 0,1 = taskvalueset 1,1,1
Both do the same. No secrets....
E.g.
inputswitchstate 0,1 = taskvalueset 1,1,1
Both do the same. No secrets....

-
- Normal user
- Posts: 64
- Joined: 11 May 2017, 01:19
Re: Problems with R2.0-dev12
Can you try using %eventvalue%
Regards,
Code: Select all
On System#Boot do
inputswitchstate 0,1
gpio,12,1
inputswitchstate 2,1
gpio,16,1
endon
on push1#state do
gpio,12,%eventvalue%
endon
on push2#state do
gpio,16,%eventvalue%
endon
Last edited by danmero on 05 Dec 2017, 14:05, edited 1 time in total.
-
- Normal user
- Posts: 241
- Joined: 21 Mar 2017, 17:35
Re: Problems with R2.0-dev12
That is wrong! inputswitchstate is task number -1.
On System#Boot do
inputswitchstate 0,1
gpio,12,1
inputswitchstate 2,1
gpio,16,1
endon
On System#Boot do
inputswitchstate 0,1
gpio,12,1
inputswitchstate 2,1
gpio,16,1
endon
-
- Normal user
- Posts: 64
- Joined: 11 May 2017, 01:19
Re: Problems with R2.0-dev12
Right, I correct my post , task value for inputswitchstate start at 0.
Regards,
Regards,
-
- Normal user
- Posts: 73
- Joined: 30 Nov 2017, 18:29
Re: Problems with R2.0-dev12
Hi vader,
after several tests, I had to return to R147 as V2-dev12 is not stable with my boards (WEMOS MINI) and the push buttons rules controlling relays.
With my rules, V2-dev12 keeps rebooting and hanging.
Instead version R147 is absolutley stable and works perfectly.
I am using V2-dev12 with SHT30 and door contacts with the same board and this works perfectly.
So there must be some incompatibility somewhere.
thanks for your help.
after several tests, I had to return to R147 as V2-dev12 is not stable with my boards (WEMOS MINI) and the push buttons rules controlling relays.
With my rules, V2-dev12 keeps rebooting and hanging.
Instead version R147 is absolutley stable and works perfectly.
I am using V2-dev12 with SHT30 and door contacts with the same board and this works perfectly.
So there must be some incompatibility somewhere.
thanks for your help.
Who is online
Users browsing this forum: No registered users and 23 guests