Dummy device, dimmer value missing

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post
simply
Posts: 19
Joined: Sunday 01 February 2015 18:42
Target OS: Raspberry Pi
Domoticz version:
Location: sthlm, sweden
Contact:

Dummy device, dimmer value missing

Postby simply » Wednesday 11 January 2017 23:54

Version: 3.6333
Build Hash: 2e6733e
Compile Date: 2017-01-11 20:07:58
Platform: RPI

I've got two dummy dimmer devices for controlling a Yeelight RGB bulb via a LUA event scripts provided here somewhere.
One is for controlling the white "Temperature" and the other device for controlling the Brightness.
I can control them pretty good with the sliders and I can turn them OFF with the "button" - but not turn them ON.

A little troubleshooting revealed that I don't get the Slider/Dimmer value in the variables for the device, when I click on the ON/OFF button,
it only gives me 0.

Part of the code for the Dimmer device. It takes the current temperatur value from the Temperature device, and the Brightness-level
from the Dimmer-device to set the correct color temp and brightness:

Code: Select all

    TempValue = otherdevices_svalues[TempDevice];
    CalcValue = ((TempValue-1) * 48)+1700;
    DomValue = otherdevices_svalues[DomDevice];
    print("Temp="..TempValue);
    print("Dimmer="..DomValue);


The two print statements give me:
LUA: Temp=50
LUA: Dimmer=0
(Dimmer slider is actually at about 50%)

It's a little strange that I can get the temperature slider value correctly from the other dummy device, but not from the device I'm clicking on (the brightness device) !?!?!

Am I doing something wrong, is this by design (strange!) or a bug?!

Thanks!
/Andreas

simply
Posts: 19
Joined: Sunday 01 February 2015 18:42
Target OS: Raspberry Pi
Domoticz version:
Location: sthlm, sweden
Contact:

Re: Dummy device, dimmer value missing

Postby simply » Friday 13 January 2017 1:16

After more investigation, seems like it's only the "Status" or "Data" variable that is provided to the event scripts.

I would think it should be good to also be able to get the "Level" variable. Not all devices "remember" their settings,
so being able to set the values at On or Off would be appreciated...


Unless someone knows another easy way to get hold of those values...?!

//A


Return to “Bugs and Problems”

Who is online

Users browsing this forum: No registered users and 7 guests