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

Fix #945 ('Set Level' should turn on the light) #946

Closed
wants to merge 1 commit into from

Conversation

emontnemery
Copy link
Contributor

No description provided.

@arendst
Copy link
Owner

arendst commented Oct 2, 2017

Works if you only use Domoticz to control the device.
Fails as soon as you use the device webpage and want to power off the device; Domoticz will send power on the device as a result of power off message send by device.

The way this works is as follows:
1 - Webpage power button pressed to power on device
2 - Device is turned on and two messages are send to Domoticz; one with Dimmer info, the other with power info.
3 - Domoticz returns the messages as commands for both Dimmer setting and Power setting.
4 - As the Domoticz dimmer value equals the device dimmer setting nothing happens.
5 - As the Domoticz power value equals the device power setting nothing happens either.

Domoticz is a bit of a MQTT message generator resulting in this unwanted behavior. The original solution did work for both the webpage AND Domoticz as long as you do not expect to turn on the light by sending the same dimmer value; sending a power on does work though.

I've been trying some solutions but do not want to implement some kind of mutex where a message send by the device needs to be validated by a return from Domoticz as it may well be that a MQTT message from Domoticz is never received resulting in a miss-communication on next interrogation.

So I'm afraid I have to leave it as it is unless you come up with a very clever idea ;-)

@emontnemery
Copy link
Contributor Author

Here's a new attempt:
Send dimlevel together with the on/off status message. One potential concern is that Domoticz seems to ignore dimlevel sent with an "off" status message, I'm not sure if that will/might have side effects?
(I did mess up a bit when rebasing the pull request, sorry about that)

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.

2 participants