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

Relay not switching from Domoticz #2034

Closed
lamptah opened this issue Dec 1, 2019 · 1 comment · Fixed by #2049
Closed

Relay not switching from Domoticz #2034

lamptah opened this issue Dec 1, 2019 · 1 comment · Fixed by #2049
Milestone

Comments

@lamptah
Copy link

lamptah commented Dec 1, 2019

Running the new 1.14.0 on a SONOFF BASIC. Noticed that a) on/off commands from domoticz are not being executed despite them showing up in the DEBUG window and b) only transitions from off to on are being reported to domoticz.

Looked at which changes were implemented between functioning 1.13.5 and 1.14.0 and narrowed it down to this:

bool _domoticzStatus(unsigned char id) {
  //  if (id >= _dcz_relay_state.size()) return false;  
    return _dcz_relay_state[id]; 
} 

void _domoticzStatus(unsigned char id, bool status) {
  //  if (id >= _dcz_relay_state.size()) return;
    _dcz_relay_state[id] = status;
    relayStatus(id, status);
} 

Commenting out the two if statements above as shown makes everything work smoothly again. I am not quite sure what those are supposed to do, maybe ">" instead of ">="? With only one relay, size() and id are both 0.

@mcspr
Copy link
Collaborator

mcspr commented Dec 1, 2019 via email

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 a pull request may close this issue.

2 participants