What is going on with our beloved Switch Input Plugin?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

What is going on with our beloved Switch Input Plugin?

#1 Post by ThomasB » 01 May 2019, 19:58

Late Nov 2018 the Switch Input Plugin Device experienced a significant change to its functionality. It eliminated the ability to read a GPIO output, despite this being a common thing to do. The details can be found in this Nov-30-2018 github issue ticket: https://github.com/letscontrolit/ESPEasy/issues/2112

The change broke many user rule files. Which has spawned forum discussions involving problems with the Switch Input Plugin. This seems odd to me because I thought the change was quickly reverted (old functionality was restored, per the github discussion).

So, what is the status of the Switch Plugin? Was the lost functionality fully restored, per the comments in the github ticket?

- Thomas

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

Re: What is going on with our beloved Switch Input Plugin?

#2 Post by TD-er » 01 May 2019, 20:42

As far as I am aware of, the changes were reverted to allow the old rules to be working again.
And there is some development in the background to make separate plugins to make it work like it should but just not breaking the old rules.

So if this is not the case, please let me know, since its intention is to keep old existing rules working (or else there is no need for new separate plugins)

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: What is going on with our beloved Switch Input Plugin?

#3 Post by ThomasB » 01 May 2019, 22:09

@TD-er, thanks for confirming the reversion occurred and is still present. Because of that unexpected change in the late Nov 2018 release I stopped using the legacy functionality. Instead I ported my rules to use variables for output state monitoring (versus reading outputs via the Switch Input). So I don't know if the reversion is 100% the same as before.

Pardon me, but I would like to share my opinion. Mainly because that functional change to the plugin was done without warning. Although there are only a small number of contributors, I consider ESPEasy to be a community driven project. So proposed functional changes that impact existing installations should require open community involvement.

Perhaps a feedback period on the forum. And prior to formal release the author/developer needs to clearly communicate the upcoming changes to the user base. Plus update the user documentation (i.e., wiki). No one likes to do this stuff, but without it the users will become frustrated.

Regarding the Switch Plugin development that is going on in the background, please don't remove the output read functionality. I could be wrong, but the main argument was that the Switch Input device does too much; Using it to read an output pin is a logical flaw. At least that is the main message I got from the Github discussion.

But "switching" that is based on a GPIO pin doesn't mean only one thing. That is to say, the word isn't limited to reading an input-only pin. Switching can occur based on reading an output state too. One is an electrical (direct wire) input, the other is a virtual connection.

I suggest leaving the existing functionality in place and simply rename "Switch Input Switch" to "Switch I/O Switch." That better describes its purpose. Feel free to expand its features, but don't remove any that already exist.

- Thomas

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

Re: What is going on with our beloved Switch Input Plugin?

#4 Post by TD-er » 01 May 2019, 22:22

The main idea is to make a plugin for using it as an input and one for using it as an output.
Even when using it as an output, you may still want to read its current state. That's what I read into your remarks, right?

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: What is going on with our beloved Switch Input Plugin?

#5 Post by ThomasB » 01 May 2019, 22:36

Even when using it as an output, you may still want to read its current state. That's what I read into your remarks, right?
Yes.

If this is for a new plugin then it would be great to have a checkbox that would choose between reading the output pin STATE (from the latch register) versus the actual pin VALUE read from the output pin. Those are two different things and some situations would prefer one over the other.

- Thomas

pw444
Normal user
Posts: 155
Joined: 23 Apr 2019, 15:34
Location: rio de janeiro

Re: What is going on with our beloved Switch Input Plugin?

#6 Post by pw444 » 03 May 2019, 01:48

something is not good on this plugin... a simple toggle switch and i'm not being able to get the state of the gpio.

HvdW
New user
Posts: 8
Joined: 05 May 2019, 01:15

Re: What is going on with our beloved Switch Input Plugin?

#7 Post by HvdW » 07 May 2019, 11:07

Will it be announced when changes have been applied?
In the mean time I'll bite a straw and wait.

Post Reply

Who is online

Users browsing this forum: No registered users and 104 guests