Incoming dimmer-values sets Switch state to 0

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
EDsteve
Normal user
Posts: 61
Joined: 11 May 2018, 21:13

Incoming dimmer-values sets Switch state to 0

#1 Post by EDsteve » 23 May 2018, 21:45

Hi,

my "simple" aim is to control the speed of a computer-fan with ESPeasy running on Sonoff S20. So i set up a dimmer in ESPeasy and gave a value over http but after many hours and many tutorials i always get the same result.

What i have: ESPeasy (Built 20100 (core 2_3_0) ---- (ESPeasy_event_driven_WiFi) Somehow that is the ONLY bin that works for me

What i did in devices:
devices.PNG
devices.PNG (24.5 KiB) Viewed 3334 times
What i do to set a dimmer value for testing:
Open this URL in browser http://192.168.168.115/control?cmd=PWM,14,500
with this result: { "log": "GPIO 14 Set PWM to 500", "plugin": 1, "pin": 14, "mode": "PWM", "state": 500 }

What i get in serial output:

Code: Select all

2545723 : WD : Uptime 42 ConnectFailures 0 FreeMem 15688
2559965 : SW : GPIO 14 Set PWM to 500
2560159 : SW : Switch state 1 Output value 0
2560161 : EVENT: Dimmer#Switch=0.00
2560534 : SW : GPIO 14 Set PWM to 0
2560561 : SW : Switch state 0 Output value 0
2560563 : EVENT: Dimmer#Switch=0.00
2561255 : EVENT: Dimmer#Switch=0.00
2561764 : SW : GPIO 14 Set PWM to 0
2563810 : EVENT: Dimmer#Switch=0.00
2576665 : WD : Uptime 43 ConnectFailures 0 FreeMem 15688
Sometimes these two lines run in a continuous loop when i send a dimmer value:

Code: Select all

2560159 : SW : Switch state 1 Output value 0
2560161 : EVENT: Dimmer#Switch=0.00
What is it i am doing wrong? Right now there is nothing connected to GPIO-14. Hope that is not the problem. I tried on two different devices. Do i need rules for it? I didn't see any rules in the tutorials.
My nerves appreciate any help. My status: Noob

Thank you
Last edited by EDsteve on 24 May 2018, 01:32, edited 1 time in total.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Any dimmer-value sets Switch state to 0

#2 Post by TD-er » 23 May 2018, 22:22

Please change the switch type to switch, save the settings, change to dimmer back and save the settings.
Or remove the Switch plugin and add it again.

User avatar
EDsteve
Normal user
Posts: 61
Joined: 11 May 2018, 21:13

Re: Any dimmer-value sets Switch state to 0

#3 Post by EDsteve » 24 May 2018, 00:58

I guess removing Plugins works only when i compile myself. Unfortunately my Arduino IDE is a bit messed up. And i don't really know how to remove plugins.
Switching from Dimmer to Switch and back i tried. No changes :(

I made a fresh install on a brand new device (Sonoff S20) with the newest release from yesterday. Still same strange behavior.


Green is my action via http://192.168.168.117/control?cmd=PWM,14,XXX and everything else in this log happens automatically and i have no idea where that comes from.

527879: SW : GPIO 14 Set PWM to 334
527923: SW : Switch state 0 Output value 0
541047: WD : Uptime 9 ConnectFailures 0 FreeMem 19496
546053: SW : GPIO 14 Set PWM to 434
546122: SW : Switch state 1 Output value 255
565168: SW : GPIO 14 Set PWM to 234
565223: SW : Switch state 0 Output value 0
571047: WD : Uptime 10 ConnectFailures 0 FreeMem 18392
588345: SW : GPIO 14 Set PWM to 500
601047: WD : Uptime 10 ConnectFailures 0 FreeMem 19496
611920: FILE : Saved config.dat
612539: FILE : Saved config.dat

612618: SW : Switch state 1 Output value 255
626679: SW : GPIO 14 Set PWM to 400
626718: SW : Switch state 0 Output value 0
631047: WD : Uptime 11 ConnectFailures 0 FreeMem 18336
646543: SW : GPIO 14 Set PWM to 450
646618: SW : Switch state 1 Output value 255

This one from Wemos D1:

Code: Select all

67137: FILE : Saved config.dat
104925: SW : GPIO 14 Set PWM to 450
104935: SW : Switch state 0 Output value 0
111728: WIFI : Set WiFi to STA
111761: AP Mode: Client disconnected: 38:A4:ED:03:2A:24 Connected devices: 0
126396: SW : GPIO 14 Set PWM to 455
151655: SW : GPIO 14 Set PWM to 550
151735: SW : Switch state 1 Output value 0
167487: SW : GPIO 14 Set PWM to 220
167535: SW : Switch state 0 Output value 0
189070: SW : GPIO 14 Set PWM to 250
189135: SW : Switch state 1 Output value 0
Another one from Wemos D1 where i get less errors (no clue why):

Code: Select all

589783: SW   : GPIO 14 Set PWM to 250
607561: SW   : GPIO 14 Set PWM to 210
621410: SW   : GPIO 14 Set PWM to 110
636397: SW   : GPIO 14 Set PWM to 80
644668: SW   : GPIO 14 Set PWM to 85
644691: SW   : Switch state 1 Output value 255
657265: SW   : GPIO 14 Set PWM to 87
657291: SW   : Switch state 0 Output value 0
669244: SW   : GPIO 14 Set PWM to 90
687942: SW   : GPIO 14 Set PWM to 99
746029: SW   : GPIO 14 Set PWM to 120
763386: SW   : GPIO 14 Set PWM to 200
777290: SW   : GPIO 14 Set PWM to 150
805751: SW   : GPIO 14 Set PWM to 110
894583: SW   : GPIO 14 Set PWM to 90
907031: SW   : GPIO 14 Set PWM to 95
923608: SW   : GPIO 14 Set PWM to 180
939921: SW   : GPIO 14 Set PWM to 500
945688: SW   : GPIO 14 Set PWM to 600
960428: SW   : GPIO 14 Set PWM to 550
960491: SW   : Switch state 1 Output value 255
975441: SW   : GPIO 14 Set PWM to 330
975491: SW   : Switch state 0 Output value 0
991872: SW   : GPIO 14 Set PWM to 320

I tried it on a Sonoff Basic, on two Sonoff S20 and a brand new Wemos D1. It behaves differently, but never as it should.
Only the dimmer function gives me these headaches. I have six other Sonoff devices running (switches and sensors) since weeks without problems.

Anything else i am able to do or try? Where does it come from?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Incoming dimmer-values sets Switch state to 0

#4 Post by TD-er » 25 May 2018, 20:34

Is it connected to some MQTT broker and some domotica system that can switch this one?

By "Removing plugins" I meant to remove it from the settings and add it again to the settings.
Also make sure to have this switch at one of the first few (3? 4?) plugin positions.

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests