Problems with R2.0-dev12

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
leel1967l
Normal user
Posts: 73
Joined: 30 Nov 2017, 18:29

Problems with R2.0-dev12

#1 Post by leel1967l » 30 Nov 2017, 18:38

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
Attachments
R147-5.png
R147-5.png (120.81 KiB) Viewed 11542 times
R147-4.png
R147-4.png (133.17 KiB) Viewed 11542 times
R147-3.png
R147-3.png (134.54 KiB) Viewed 11542 times
R147-2.png
R147-2.png (119.94 KiB) Viewed 11542 times
R147-1.png
R147-1.png (156.56 KiB) Viewed 11542 times

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Problems with R2.0-dev12

#2 Post by grovkillen » 30 Nov 2017, 19:32

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 :idea: :idea: :idea:

leel1967l
Normal user
Posts: 73
Joined: 30 Nov 2017, 18:29

Re: Problems with R2.0-dev12

#3 Post by leel1967l » 30 Nov 2017, 21:29

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.

leel1967l
Normal user
Posts: 73
Joined: 30 Nov 2017, 18:29

Re: Problems with R2.0-dev12

#4 Post by leel1967l » 01 Dec 2017, 09:34

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?

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Problems with R2.0-dev12

#5 Post by vader » 01 Dec 2017, 10:20

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. :mrgreen: And your rules are wrong. Change it to:

on push1#state do
if [push1#state]=1
gpio 12,1
.....

leel1967l
Normal user
Posts: 73
Joined: 30 Nov 2017, 18:29

Re: Problems with R2.0-dev12

#6 Post by leel1967l » 01 Dec 2017, 10:47

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?

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Problems with R2.0-dev12

#7 Post by vader » 01 Dec 2017, 10:53

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.

leel1967l
Normal user
Posts: 73
Joined: 30 Nov 2017, 18:29

Re: Problems with R2.0-dev12

#8 Post by leel1967l » 01 Dec 2017, 10:57

ok. Will try and return.
thanks for your help.

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Problems with R2.0-dev12

#9 Post by vader » 01 Dec 2017, 15:10

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

leel1967l
Normal user
Posts: 73
Joined: 30 Nov 2017, 18:29

Re: Problems with R2.0-dev12

#10 Post by leel1967l » 01 Dec 2017, 16:30

Hi,
You mean adding:

Code: Select all

gpio,13,1
gpio,14,1
or do I have to write textually:

Code: Select all

inputswitchstate 0,1
inputswitchstate 1,1

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Problems with R2.0-dev12

#11 Post by vader » 01 Dec 2017, 16:32

Yep.

.....
gpio,16,1
inputswitchstate 0,1 (For push1 on task 1)
inputswitchstate 1,1 (For push2 on task 2)
endon
.....

leel1967l
Normal user
Posts: 73
Joined: 30 Nov 2017, 18:29

Re: Problems with R2.0-dev12

#12 Post by leel1967l » 01 Dec 2017, 16:41

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?

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Problems with R2.0-dev12

#13 Post by vader » 01 Dec 2017, 16:46

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

leel1967l
Normal user
Posts: 73
Joined: 30 Nov 2017, 18:29

Re: Problems with R2.0-dev12

#14 Post by leel1967l » 01 Dec 2017, 22:57

Hi vader, I just finished testing it and ... it WORKS PERFECTY as you said.

thanks a lot for your help!

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Problems with R2.0-dev12

#15 Post by vader » 01 Dec 2017, 23:22

No problemo. You are welcome. ;)

kimot
Normal user
Posts: 190
Joined: 12 Oct 2017, 20:46

Re: Problems with R2.0-dev12

#16 Post by kimot » 03 Dec 2017, 21:39

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.

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Problems with R2.0-dev12

#17 Post by vader » 03 Dec 2017, 21:51

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

kimot
Normal user
Posts: 190
Joined: 12 Oct 2017, 20:46

Re: Problems with R2.0-dev12

#18 Post by kimot » 03 Dec 2017, 23:03

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.

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Problems with R2.0-dev12

#19 Post by vader » 04 Dec 2017, 09:20

@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.... :)

danmero
Normal user
Posts: 64
Joined: 11 May 2017, 01:19

Re: Problems with R2.0-dev12

#20 Post by danmero » 04 Dec 2017, 16:54

Can you try using %eventvalue%

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
Regards,
Last edited by danmero on 05 Dec 2017, 14:05, edited 1 time in total.

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Problems with R2.0-dev12

#21 Post by vader » 04 Dec 2017, 17:33

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

danmero
Normal user
Posts: 64
Joined: 11 May 2017, 01:19

Re: Problems with R2.0-dev12

#22 Post by danmero » 05 Dec 2017, 14:07

Right, I correct my post , task value for inputswitchstate start at 0.

Regards,

leel1967l
Normal user
Posts: 73
Joined: 30 Nov 2017, 18:29

Re: Problems with R2.0-dev12

#23 Post by leel1967l » 06 Dec 2017, 11:07

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.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 26 guests