Page 1 of 1

lastupdate include a AND

Posted: Friday 24 November 2017 13:02
by poudenes
Hi All,

Tried this but that doesn't work:

Code: Select all

local Version = '17.11.23'
return {
    active = true,
    on = {
        timer = {'Every 1 minutes'}
        },
    logging = {marker = 'CHECK LIGHT FOR 15MIN ' ..Version},
    execute = function(domoticz, device)

    if
    domoticz.devices(18).state == 'On' and domoticz.devices(18).lastUpdate.minutesAgo > 1 -- Bathroom sink
    then
        domoticz.log('--------------------==<[ Check light: Batchroom sink lights are on ]>==--------------------', domoticz.LOG_FORCE)
        os.execute('/home/pi/domoticz/scripts/Peter/speech.sh Bathroom sink lights are on')
        end
    end
}
when i remove the "domoticz.devices(18).state == 'On' and" then the script work. But i want do a check on the lastUpdate and when lamp is on. Otherwise it will loop all the time

Can someone help me?

Re: lastupdate include a AND

Posted: Friday 24 November 2017 14:48
by dannybloe
What kind of device is it?

Re: lastupdate include a AND

Posted: Friday 24 November 2017 15:02
by poudenes
dannybloe wrote: Friday 24 November 2017 14:48 What kind of device is it?
stupid me. I see that the state also can be 'Set Kelvin Level' so i changed it to:

Code: Select all

(domoticz.devices(18).state == 'Set Kelvin Level' or domoticz.devices(18).state == 'On') and 
    domoticz.devices(18).lastUpdate.minutesAgo > 1 -- Bathroom sink
now it work :)

Re: lastupdate include a AND

Posted: Friday 24 November 2017 15:26
by dannybloe
But what kind of device is it?

Re: lastupdate include a AND

Posted: Friday 24 November 2017 16:49
by poudenes
dannybloe wrote: Friday 24 November 2017 15:26 But what kind of device is it?
Its a milight lamp

Re: lastupdate include a AND

Posted: Friday 24 November 2017 16:53
by dannybloe
That's interesting. Can you do something for me?
Set the log level in domoticz settigns for dzVents to debugging. It will create a file domoticzData.lua in scripts/dzVents. Can you find the section in there that deals with this light and paste the data in here. Clearly we can improve the adapter for this device so we can extract the kelvin information etc.

(it will only create that file when at least one event has occured).

Re: lastupdate include a AND

Posted: Sunday 26 November 2017 10:41
by poudenes
dannybloe wrote: Friday 24 November 2017 16:53 That's interesting. Can you do something for me?
Set the log level in domoticz settigns for dzVents to debugging. It will create a file domoticzData.lua in scripts/dzVents. Can you find the section in there that deals with this light and paste the data in here. Clearly we can improve the adapter for this device so we can extract the kelvin information etc.

(it will only create that file when at least one event has occured).
The amount of text is to long to post

Re: lastupdate include a AND

Posted: Sunday 26 November 2017 10:49
by dannybloe
Only for that specific device.
So find the section in that dump and copy only that section. Each device is behind a numbered entry.

Re: lastupdate include a AND

Posted: Sunday 26 November 2017 11:08
by poudenes
dannybloe wrote: Sunday 26 November 2017 10:49 Only for that specific device.
So find the section in that dump and copy only that section. Each device is behind a numbered entry.
Do you mean this section:

Code: Select all

        [6] = {
                ["timedOut"] = false;
                ["description"] = "";
                ["batteryLevel"] = 255;
                ["data"] = {
                        ["hardwareName"] = "MiLight Controller 1";
                        ["levelVal"] = 99;
                        ["usedByCamera"] = false;
                        ["protected"] = false;
                        ["hardwareType"] = "Limitless/AppLamp/Mi Light with LAN/WiFi interface";
                        ["maxDimLevel"] = 100;
                        ["_nValue"] = 33;
                        ["unit"] = 1;
                        ["hardwareTypeValue"] = 22;
                        ["_state"] = "Set Kelvin Level";
                        ["hardwareID"] = 2;
                        ["icon"] = "dimmer";
                };
                ["name"] = "Slaapkamer";
                ["changed"] = false;
                ["lastUpdate"] = "2017-11-24 16:59:10";
                ["rawData"] = {
                        [1] = "10";
                };
                ["lastLevel"] = 99;
                ["signalLevel"] = 12;
                ["deviceID"] = "1";
                ["id"] = 7;
                ["switchType"] = "Dimmer";
                ["subType"] = "RGBWW";
                ["deviceType"] = "Lighting Limitless/Applamp";
                ["switchTypeValue"] = 7;
                ["baseType"] = "device";
        };

Re: lastupdate include a AND

Posted: Sunday 26 November 2017 14:29
by dannybloe
Yes! That's the one. Now I'd like to have a few versions. First when the device is off. Then two or so where it is on with different kelvin levels.
As I don't have this device myself I'm curious how the GUI looks like for this device in Domoticz. Can you paste a couple of screenshots? What does Domoticz allow you to do with this device? Can you change the color or just the Kelvin level in the GUI?

Re: lastupdate include a AND

Posted: Monday 27 November 2017 6:32
by poudenes
dannybloe wrote: Sunday 26 November 2017 14:29 Yes! That's the one. Now I'd like to have a few versions. First when the device is off. Then two or so where it is on with different kelvin levels.
As I don't have this device myself I'm curious how the GUI looks like for this device in Domoticz. Can you paste a couple of screenshots? What does Domoticz allow you to do with this device? Can you change the color or just the Kelvin level in the GUI?
Here already the screenshots:
Screen Shot 2017-11-27 at 06.28.30.jpg
Screen Shot 2017-11-27 at 06.28.18.jpg
I took the dressoir now (light bulbs are same)
I can set Kelvin from 0,25,50,100 but i have a dummy device that send a kelvin level to my bulb using a link

http://127.0.0.1:8081/json.htm?type=com ... &kelvin=10

&kelvin=xx can be from 0 to 100

would be nice to have a slider for the kelvin as well same as brightness

When i have the other information i will post them

Re: lastupdate include a AND

Posted: Monday 27 November 2017 7:18
by dannybloe
Ok, coz I'm curious about the datagrams coming from Domoticz.

Re: lastupdate include a AND

Posted: Monday 27 November 2017 19:40
by dannybloe
Could you send me those data dumps for this device with different states/values/colors please? I need it to get a new version out soon.

Re: lastupdate include a AND

Posted: Tuesday 28 November 2017 9:37
by poudenes
Here the output with the 4 options for kelvin

I haver add 1 kelvin level in a dummy with to activate it in dzVents System using this link in the dummy switch selector:

http://127.0.0.1:8081/json.htm?type=com ... &kelvin=10

Kelvin 100%

Code: Select all

[7] = {                                                                                                                          
                ["lastUpdate"] = "2017-11-28 09:29:16";                                                                                  
                ["deviceType"] = "Lighting Limitless/Applamp";                                                                           
                ["signalLevel"] = 12;                                                                                                    
                ["id"] = 8;                                                                                                              
                ["lastLevel"] = 91;                                                                                                      
                ["name"] = "Dressoir";                                                                                                   
                ["rawData"] = {                                                                                                          
                        [1] = "100";                                                                                                     
                };                                                                                                                       
                ["timedOut"] = false;                                                                                                    
                ["data"] = {                                                                                                             
                        ["hardwareType"] = "Limitless/AppLamp/Mi Light with LAN/WiFi interface";                                         
                        ["icon"] = "dimmer";                                                                                             
                        ["hardwareID"] = 2;                                                                                              
                        ["levelVal"] = 91;                                                                                               
                        ["hardwareTypeValue"] = 22;                                                                                      
                        ["hardwareName"] = "MiLight Controller 1";                                                                       
                        ["_nValue"] = 33;                                                                                                
                        ["_state"] = "Set Kelvin Level";                                                                                 
                        ["usedByCamera"] = false;                                                                                        
                        ["maxDimLevel"] = 100;                                                                                           
                        ["protected"] = false;                                                                                           
                        ["unit"] = 2;                                                                                                    
                };                                                                                                                       
                ["baseType"] = "device";                                                                                                 
                ["switchTypeValue"] = 7;                                                                                                 
                ["batteryLevel"] = 255;                                                                                                  
                ["description"] = "";                                                                                                    
                ["switchType"] = "Dimmer";                                                                                               
                ["deviceID"] = "1";                                                                                                      
                ["subType"] = "RGBWW";                                                                                                   
                ["changed"] = false;                                                                                                     
        };
Kelvin 75%

Code: Select all

[7] = {                                                                                                                          
                ["deviceType"] = "Lighting Limitless/Applamp";                                                                           
                ["signalLevel"] = 12;                                                                                                    
                ["lastUpdate"] = "2017-11-28 09:31:41";                                                                                  
                ["id"] = 8;                                                                                                              
                ["batteryLevel"] = 255;                                                                                                  
                ["description"] = "";                                                                                                    
                ["timedOut"] = false;                                                                                                    
                ["rawData"] = {                                                                                                          
                        [1] = "75";                                                                                                      
                };                                                                                                                       
                ["switchType"] = "Dimmer";                                                                                               
                ["baseType"] = "device";                                                                                                 
                ["subType"] = "RGBWW";                                                                                                   
                ["data"] = {                                                                                                             
                        ["hardwareID"] = 2;                                                                                              
                        ["_state"] = "Set Kelvin Level";                                                                                 
                        ["hardwareType"] = "Limitless/AppLamp/Mi Light with LAN/WiFi interface";                                         
                        ["hardwareTypeValue"] = 22;                                                                                      
                        ["hardwareName"] = "MiLight Controller 1";                                                                       
                        ["levelVal"] = 91;                                                                                               
                        ["icon"] = "dimmer";                                                                                             
                        ["protected"] = false;                                                                                           
                        ["maxDimLevel"] = 100;                                                                                           
                        ["_nValue"] = 33;                                                                                                
                        ["usedByCamera"] = false;                                                                                        
                        ["unit"] = 2;                                                                                                    
                };                                                                                                                       
                ["lastLevel"] = 91;                                                                                                      
                ["name"] = "Dressoir";                                                                                                   
                ["switchTypeValue"] = 7;                                                                                                 
                ["changed"] = false;                                                                                                     
                ["deviceID"] = "1";                                                                                                      
        }; 
Kelvin 50%

Code: Select all

[7] = {                                                                                                                          
                ["signalLevel"] = 12;                                                                                                    
                ["lastUpdate"] = "2017-11-28 09:32:42";                                                                                  
                ["timedOut"] = false;                                                                                                    
                ["deviceID"] = "1";                                                                                                      
                ["batteryLevel"] = 255;                                                                                                  
                ["id"] = 8;                                                                                                              
                ["baseType"] = "device";                                                                                                 
                ["subType"] = "RGBWW";                                                                                                   
                ["data"] = {                                                                                                             
                        ["maxDimLevel"] = 100;                                                                                           
                        ["levelVal"] = 91;                                                                                               
                        ["_state"] = "Set Kelvin Level";                                                                                 
                        ["hardwareName"] = "MiLight Controller 1";                                                                       
                        ["icon"] = "dimmer";                                                                                             
                        ["usedByCamera"] = false;                                                                                        
                        ["hardwareTypeValue"] = 22;                                                                                      
                        ["unit"] = 2;                                                                                                    
                        ["hardwareType"] = "Limitless/AppLamp/Mi Light with LAN/WiFi interface";                                         
                        ["hardwareID"] = 2;                                                                                              
                        ["protected"] = false;                                                                                           
                        ["_nValue"] = 33;                                                                                                
                };                                                                                                                       
                ["switchTypeValue"] = 7;                                                                                                 
                ["rawData"] = {                                                                                                          
                        [1] = "50";                                                                                                      
                };                                                                                                                       
                ["changed"] = false;                                                                                                     
                ["switchType"] = "Dimmer";                                                                                               
                ["name"] = "Dressoir";                                                                                                   
                ["description"] = "";                                                                                                    
                ["lastLevel"] = 91;                                                                                                      
                ["deviceType"] = "Lighting Limitless/Applamp";                                                                           
        };
Kelvin 25%

Code: Select all

[7] = {                                                                                                                          
                ["timedOut"] = false;                                                                                                    
                ["data"] = {                                                                                                             
                        ["icon"] = "dimmer";                                                                                             
                        ["usedByCamera"] = false;                                                                                        
                        ["hardwareType"] = "Limitless/AppLamp/Mi Light with LAN/WiFi interface";                                         
                        ["protected"] = false;                                                                                           
                        ["hardwareID"] = 2;                                                                                              
                        ["_nValue"] = 33;                                                                                                
                        ["hardwareTypeValue"] = 22;                                                                                      
                        ["unit"] = 2;                                                                                                    
                        ["hardwareName"] = "MiLight Controller 1";                                                                       
                        ["levelVal"] = 91;                                                                                               
                        ["maxDimLevel"] = 100;                                                                                           
                        ["_state"] = "Set Kelvin Level";                                                                                 
                };                                                                                                                       
                ["switchTypeValue"] = 7;                                                                                                 
                ["deviceType"] = "Lighting Limitless/Applamp";                                                                           
                ["subType"] = "RGBWW";                                                                                                   
                ["rawData"] = {                                                                                                          
                        [1] = "25";                                                                                                      
                };                                                                                                                       
                ["name"] = "Dressoir";                                                                                                   
                ["deviceID"] = "1";                                                                                                      
                ["description"] = "";                                                                                                    
                ["switchType"] = "Dimmer";                                                                                               
                ["id"] = 8;                                                                                                              
                ["signalLevel"] = 12;                                                                                                    
                ["batteryLevel"] = 255;                                                                                                  
                ["lastLevel"] = 91;                                                                                                      
                ["lastUpdate"] = "2017-11-28 09:33:09";                                                                                  
                ["changed"] = false;                                                                                                     
                ["baseType"] = "device";                                                                                                 
        };
Kelvin 0%

Code: Select all

 [7] = {                                                                                                                          
                ["baseType"] = "device";                                                                                                 
                ["name"] = "Dressoir";                                                                                                   
                ["timedOut"] = false;                                                                                                    
                ["data"] = {                                                                                                             
                        ["maxDimLevel"] = 100;                                                                                           
                        ["hardwareName"] = "MiLight Controller 1";                                                                       
                        ["_state"] = "Set Kelvin Level";                                                                                 
                        ["hardwareTypeValue"] = 22;                                                                                      
                        ["_nValue"] = 33;                                                                                                
                        ["usedByCamera"] = false;                                                                                        
                        ["protected"] = false;                                                                                           
                        ["hardwareType"] = "Limitless/AppLamp/Mi Light with LAN/WiFi interface";                                         
                        ["icon"] = "dimmer";                                                                                             
                        ["levelVal"] = 91;                                                                                               
                        ["unit"] = 2;                                                                                                    
                        ["hardwareID"] = 2;                                                                                              
                };                                                                                                                       
                ["switchTypeValue"] = 7;                                                                                                 
                ["subType"] = "RGBWW";                                                                                                   
                ["lastUpdate"] = "2017-11-28 09:33:52";                                                                                  
                ["lastLevel"] = 91;                                                                                                      
                ["switchType"] = "Dimmer";                                                                                               
                ["deviceType"] = "Lighting Limitless/Applamp";                                                                           
                ["changed"] = false;                                                                                                     
                ["batteryLevel"] = 255;                                                                                                  
                ["rawData"] = {                                                                                                          
                        [1] = "0";                                                                                                       
                };                                                                                                                       
                ["id"] = 8;                                                                                                              
                ["signalLevel"] = 12;                                                                                                    
                ["deviceID"] = "1";                                                                                                      
                ["description"] = "";                                                                                                    
        };

Re: lastupdate include a AND

Posted: Tuesday 28 November 2017 9:42
by poudenes
Here with 4 different colours

Color RED but real color for this bulb is more purple

Code: Select all

[7] = {                                                                                                                          
                ["switchType"] = "Dimmer";                                                                                               
                ["baseType"] = "device";                                                                                                 
                ["deviceType"] = "Lighting Limitless/Applamp";                                                                           
                ["batteryLevel"] = 255;                                                                                                  
                ["deviceID"] = "1";                                                                                                      
                ["rawData"] = {                                                                                                          
                        [1] = "100";                                                                                                     
                };                                                                                                                       
                ["id"] = 8;                                                                                                              
                ["lastLevel"] = 92;                                                                                                      
                ["timedOut"] = false;                                                                                                    
                ["lastUpdate"] = "2017-11-28 09:37:56";                                                                                  
                ["switchTypeValue"] = 7;                                                                                                 
                ["changed"] = false;                                                                                                     
                ["description"] = "";                                                                                                    
                ["data"] = {                                                                                                             
                        ["hardwareType"] = "Limitless/AppLamp/Mi Light with LAN/WiFi interface";                                         
                        ["unit"] = 2;                                                                                                    
                        ["hardwareName"] = "MiLight Controller 1";                                                                       
                        ["hardwareTypeValue"] = 22;                                                                                      
                        ["_nValue"] = 15;                                                                                                
                        ["levelVal"] = 92;                                                                                               
                        ["maxDimLevel"] = 100;                                                                                           
                        ["icon"] = "dimmer";                                                                                             
                        ["hardwareID"] = 2;                                                                                              
                        ["protected"] = false;                                                                                           
                        ["usedByCamera"] = false;                                                                                        
                        ["_state"] = "Set Level";                                                                                        
                };                                                                                                                       
                ["subType"] = "RGBWW";                                                                                                   
                ["signalLevel"] = 12;                                                                                                    
                ["name"] = "Dressoir";                                                                                                   
        };
Color YELLOW

Code: Select all

 [7] = {                                                                                                                          
                ["timedOut"] = false;                                                                                                    
                ["description"] = "";                                                                                                    
                ["deviceID"] = "1";                                                                                                      
                ["name"] = "Dressoir";                                                                                                   
                ["id"] = 8;                                                                                                              
                ["rawData"] = {                                                                                                          
                        [1] = "100";                                                                                                     
                };                                                                                                                       
                ["batteryLevel"] = 255;                                                                                                  
                ["switchTypeValue"] = 7;                                                                                                 
                ["lastLevel"] = 100;                                                                                                     
                ["lastUpdate"] = "2017-11-28 09:39:32";                                                                                  
                ["changed"] = false;                                                                                                     
                ["signalLevel"] = 12;                                                                                                    
                ["subType"] = "RGBWW";                                                                                                   
                ["deviceType"] = "Lighting Limitless/Applamp";                                                                           
                ["data"] = {                                                                                                             
                        ["_state"] = "Set Level";                                                                                        
                        ["icon"] = "dimmer";                                                                                             
                        ["unit"] = 2;                                                                                                    
                        ["usedByCamera"] = false;                                                                                        
                        ["protected"] = false;                                                                                           
                        ["maxDimLevel"] = 100;                                                                                           
                        ["hardwareTypeValue"] = 22;                                                                                      
                        ["_nValue"] = 15;                                                                                                
                        ["hardwareName"] = "MiLight Controller 1";                                                                       
                        ["hardwareType"] = "Limitless/AppLamp/Mi Light with LAN/WiFi interface";                                         
                        ["hardwareID"] = 2;                                                                                              
                        ["levelVal"] = 100;                                                                                              
                };                                                                                                                       
                ["baseType"] = "device";                                                                                                 
                ["switchType"] = "Dimmer";                                                                                               
        };
Color GREEN

Code: Select all

   [7] = {                                                                                                                          
                ["name"] = "Dressoir";                                                                                                   
                ["lastUpdate"] = "2017-11-28 09:40:17";                                                                                  
                ["switchType"] = "Dimmer";                                                                                               
                ["lastLevel"] = 100;                                                                                                     
                ["signalLevel"] = 12;                                                                                                    
                ["changed"] = false;                                                                                                     
                ["switchTypeValue"] = 7;                                                                                                 
                ["data"] = {                                                                                                             
                        ["levelVal"] = 100;                                                                                              
                        ["hardwareType"] = "Limitless/AppLamp/Mi Light with LAN/WiFi interface";                                         
                        ["_state"] = "Set Level";                                                                                        
                        ["maxDimLevel"] = 100;                                                                                           
                        ["usedByCamera"] = false;                                                                                        
                        ["protected"] = false;                                                                                           
                        ["hardwareName"] = "MiLight Controller 1";                                                                       
                        ["hardwareID"] = 2;                                                                                              
                        ["icon"] = "dimmer";                                                                                             
                        ["_nValue"] = 15;                                                                                                
                        ["unit"] = 2;                                                                                                    
                        ["hardwareTypeValue"] = 22;                                                                                      
                };                                                                                                                       
                ["subType"] = "RGBWW";                                                                                                   
                ["deviceType"] = "Lighting Limitless/Applamp";                                                                           
                ["batteryLevel"] = 255;                                                                                                  
                ["timedOut"] = false;                                                                                                    
                ["description"] = "";                                                                                                    
                ["id"] = 8;                                                                                                              
                ["deviceID"] = "1";                                                                                                      
                ["baseType"] = "device";                                                                                                 
                ["rawData"] = {                                                                                                          
                        [1] = "100";                                                                                                     
                };                                                                                                                       
        }; 
Color BLUE

Code: Select all

    [7] = {                                                                                                                          
                ["name"] = "Dressoir";
                ["id"] = 8;
                ["switchType"] = "Dimmer";
                ["baseType"] = "device";
                ["signalLevel"] = 12;
                ["rawData"] = {
                        [1] = "100";
                };
                ["switchTypeValue"] = 7;
                ["deviceID"] = "1";
                ["data"] = {
                        ["hardwareType"] = "Limitless/AppLamp/Mi Light with LAN/WiFi interface";
                        ["_state"] = "Set Level";
                        ["hardwareName"] = "MiLight Controller 1";
                        ["levelVal"] = 100;
                        ["usedByCamera"] = false;
                        ["maxDimLevel"] = 100;
                        ["hardwareID"] = 2;
                        ["unit"] = 2;
                        ["icon"] = "dimmer";
                        ["_nValue"] = 15;
                        ["protected"] = false;
                        ["hardwareTypeValue"] = 22;
                };
                ["subType"] = "RGBWW";
                ["changed"] = false;
                ["timedOut"] = false;
                ["description"] = "";
                ["lastUpdate"] = "2017-11-28 09:41:06";
                ["lastLevel"] = 100;
                ["batteryLevel"] = 255;
                ["deviceType"] = "Lighting Limitless/Applamp";
        };

Re: lastupdate include a AND

Posted: Tuesday 28 November 2017 9:46
by poudenes
Lamp is off

Code: Select all

  [7] = {                                                                                                                          
                ["batteryLevel"] = 255;                                                                                                  
                ["rawData"] = {                                                                                                          
                        [1] = "100";                                                                                                     
                };                                                                                                                       
                ["lastUpdate"] = "2017-11-28 09:42:34";                                                                                  
                ["switchTypeValue"] = 7;                                                                                                 
                ["deviceID"] = "1";                                                                                                      
                ["lastLevel"] = 100;                                                                                                     
                ["signalLevel"] = 12;                                                                                                    
                ["changed"] = false;                                                                                                     
                ["subType"] = "RGBWW";                                                                                                   
                ["name"] = "Dressoir";                                                                                                   
                ["baseType"] = "device";                                                                                                 
                ["data"] = {                                                                                                             
                        ["levelVal"] = 100;                                                                                              
                        ["maxDimLevel"] = 100;                                                                                           
                        ["icon"] = "dimmer";                                                                                             
                        ["hardwareID"] = 2;                                                                                              
                        ["hardwareTypeValue"] = 22;                                                                                      
                        ["hardwareName"] = "MiLight Controller 1";                                                                       
                        ["_state"] = "Off";                                                                                              
                        ["protected"] = false;                                                                                           
                        ["usedByCamera"] = false;                                                                                        
                        ["_nValue"] = 0;                                                                                                 
                        ["hardwareType"] = "Limitless/AppLamp/Mi Light with LAN/WiFi interface";                                         
                        ["unit"] = 2;                                                                                                    
                };                                                                                                                       
                ["switchType"] = "Dimmer";                                                                                               
                ["deviceType"] = "Lighting Limitless/Applamp";                                                                           
                ["id"] = 8;                                                                                                              
                ["timedOut"] = false;                                                                                                    
                ["description"] = "";                                                                                                    
        }; 
Lamp just turned on without change other old values

Code: Select all

   [7] = {                                                                                                                          
                ["signalLevel"] = 12;                                                                                                    
                ["deviceID"] = "1";                                                                                                      
                ["timedOut"] = false;                                                                                                    
                ["lastLevel"] = 100;                                                                                                     
                ["switchTypeValue"] = 7;                                                                                                 
                ["switchType"] = "Dimmer";                                                                                               
                ["lastUpdate"] = "2017-11-28 09:43:31";                                                                                  
                ["batteryLevel"] = 255;                                                                                                  
                ["data"] = {                                                                                                             
                        ["hardwareID"] = 2;                                                                                              
                        ["_nValue"] = 1;                                                                                                 
                        ["_state"] = "On";                                                                                               
                        ["maxDimLevel"] = 100;                                                                                           
                        ["hardwareTypeValue"] = 22;                                                                                      
                        ["protected"] = false;                                                                                           
                        ["icon"] = "dimmer";                                                                                             
                        ["levelVal"] = 100;                                                                                              
                        ["unit"] = 2;                                                                                                    
                        ["usedByCamera"] = false;                                                                                        
                        ["hardwareType"] = "Limitless/AppLamp/Mi Light with LAN/WiFi interface";                                         
                        ["hardwareName"] = "MiLight Controller 1";                                                                       
                };                                                                                                                       
                ["description"] = "";                                                                                                    
                ["name"] = "Dressoir";                                                                                                   
                ["rawData"] = {                                                                                                          
                        [1] = "100";                                                                                                     
                };                                                                                                                       
                ["id"] = 8;                                                                                                              
                ["changed"] = false;                                                                                                     
                ["subType"] = "RGBWW";                                                                                                   
                ["baseType"] = "device";                                                                                                 
          
Lamp in disco modus. I have add 1 disco modus in a dummy switch to activate it:

http://127.0.0.1:8081/json.htm?type=com ... um1&idx=18

Code: Select all

     [7] = {                                                                                                                          
                ["lastLevel"] = 100;                                                                                                     
                ["lastUpdate"] = "2017-11-28 09:43:55";                                                                                  
                ["switchType"] = "Dimmer";                                                                                               
                ["id"] = 8;                                                                                                              
                ["rawData"] = {                                                                                                          
                        [1] = "0";                                                                                                       
                };                                                                                                                       
                ["baseType"] = "device";                                                                                                 
                ["timedOut"] = false;                                                                                                    
                ["changed"] = false;                                                                                                     
                ["data"] = {                                                                                                             
                        ["hardwareType"] = "Limitless/AppLamp/Mi Light with LAN/WiFi interface";                                         
                        ["usedByCamera"] = false;                                                                                        
                        ["icon"] = "dimmer";                                                                                             
                        ["maxDimLevel"] = 100;                                                                                           
                        ["hardwareName"] = "MiLight Controller 1";                                                                       
                        ["hardwareTypeValue"] = 22;                                                                                      
                        ["protected"] = false;                                                                                           
                        ["_nValue"] = 24;                                                                                                
                        ["_state"] = "Disco Mode 1";                                                                                     
                        ["hardwareID"] = 2;                                                                                              
                        ["unit"] = 2;                                                                                                    
                        ["levelVal"] = 100;                                                                                              
                };                                                                                                                       
                ["signalLevel"] = 12;                                                                                                    
                ["subType"] = "RGBWW";                                                                                                   
                ["deviceID"] = "1";                                                                                                      
                ["batteryLevel"] = 255;                                                                                                  
                ["description"] = "";                                                                                                    
                ["deviceType"] = "Lighting Limitless/Applamp";                                                                           
                ["switchTypeValue"] = 7;                                                                                                 
                ["name"] = "Dressoir";                                                                                                   
        };

Re: lastupdate include a AND

Posted: Tuesday 28 November 2017 9:56
by dannybloe
Thanks!