Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interlock PR Merge request #5014

Closed
wants to merge 232 commits into from

Conversation

stefanbode
Copy link
Contributor

Ok, second try after lots of fight with GITHUB. Change should now be clear. Other language files must be updated too.

@arendst arendst self-assigned this Jan 24, 2019
@arendst
Copy link
Owner

arendst commented Jan 24, 2019

Great! Will investigate.

arendst added a commit that referenced this pull request Jan 25, 2019
6.4.1.11 20190124
 * Remove command SetOption14 as it has been superseded by command Interlock
 * Remove command SetOption63 as it has been superseded by command Interlock
 * Add command Interlock 0 / 1 / 1,2 3,4 .. to control interlock ON/OFF and add up to 8 relays in 1 to 4 interlock groups (#5014)
@arendst arendst removed their assignment Jan 25, 2019
@arendst
Copy link
Owner

arendst commented Jan 25, 2019

Thx for your ideas and implementation.

I choose another approach where the user can group up to four sets of relays of any amount and have them interlocked within the group. Currently supports up to eight relays as does the rest of Tasmota.

On a Sonoff 4CH this allows for interlock relays 2 and 3 while 1 and 4 are still being used as single relays. The Interlock command would be interlock 2,3 and to enable interlock interlock 1 or interlock on.

@arendst arendst closed this Jan 25, 2019
@meingraham
Copy link
Collaborator

meingraham commented Jan 25, 2019

@arendst

Examples:

  • SetOption14 1 - Interlock all relays
  • Backlog SetOption14 0; Interlock 1,2; Interlock 1 - Group 1 & 2. Remaining relays are self-locking
  • Backlog SetOption14 0; Interlock 2,4; Interlock 1 - Group 2 & 4. Remaining relays are self-locking
  • Backlog SetOption14 0; Interlock 1,3,4; Interlock 1 - Group 1, 3, & 4. Remaining relays are self-locking
  • Backlog SetOption14 0; Interlock 1,2,3; Interlock 1 - Group 1-3. Remaining relays are self-locking
  • Backlog SetOption14 0; Interlock 1,3; Interlock 2,4; Interlock 1 - Group 1 & 3 and Group 2 & 4. Remaining relays (if any) are self-locking

Is this how it would work?

Mike

@arendst
Copy link
Owner

arendst commented Jan 25, 2019

Yes, but the commands SetOption14 and SetOption63 have been removed.

I just updated the wiki commands with this:

Interlock   Show current relay interlock mode and group selection(s) 6.4.1.11
Interlock 0 / off (default) Set self-locking mode for all relays 6.4.1.11
Interlock 1 / on Set interlock mode for selected relays 6.4.1.11
Interlock 1,2 3,4 Select relays 1 and 2 and 3 and 4 in two interlock groups 6.4.1.11
Interlock 1,2,3 Select relays 1, 2 and 3 in one interlock group 6.4.1.11

So every time you execute command interlock <relay set> you delete the current groups and add new groups up to four. A group needs to contain at least two relays.

@arendst
Copy link
Owner

arendst commented Jan 25, 2019

The relays within a group are separated by a comma, the groups are separated by a space.

@meingraham
Copy link
Collaborator

meingraham commented Jan 25, 2019

Can you specify this kind of interlock?

Interlock 1,3 2,3

In this scenario, 1&2 would not be interlocked together with each other but only interlocked, individually, with 3.

I have a ceiling fan scenario where:

  • Low - 1 is on by itself
  • Medium - 1&2 are on together
  • High - 3 is on by itself

Mike

@stefanbode
Copy link
Contributor Author

stefanbode commented Jan 25, 2019

Arendt, i‘m Fine with the approach and it will add even more flexibility. I will remove it from my fork and happy to get less changed code. Great work.

@arendst
Copy link
Owner

arendst commented Jan 25, 2019

@meingraham no you can't. Well you can but the input corrector won't allow it as the same relay is used in two groups.

In your case going from 3 to 1 wouldn't work as it will keep 3 on while turning 1 on too.

See wat happens with interlock 1,2,3

@meingraham
Copy link
Collaborator

Interlock 1,2,3 won't allow 1&2 to be on at the same time, which the circuitry in the fan requires for selecting Medium speed. I can implement Interlock 1,3 which is one step closer. I'll manage 2,3 with a Rule.

Feature request - cross-lock? 😁

Interlock 1,3 2,3

Mike

gemu2015 pushed a commit to gemu2015/Sonoff-Tasmota that referenced this pull request Jan 27, 2019
6.4.1.11 20190124
 * Remove command SetOption14 as it has been superseded by command Interlock
 * Remove command SetOption63 as it has been superseded by command Interlock
 * Add command Interlock 0 / 1 / 1,2 3,4 .. to control interlock ON/OFF and add up to 8 relays in 1 to 4 interlock groups (arendst#5014)
@meingraham meingraham mentioned this pull request Jan 28, 2019
@stefanbode stefanbode deleted the pr_interlock branch October 8, 2019 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants