Page 1 of 1

Xiaomi Cube + light

Posted: Saturday 11 February 2017 23:01
by DreaMare
Hi everyone,

I would like to know what combinaison of blocky i have to set for xiaomi cube :
- Shake
- 90°
- 180°
- move foward

?

Re: Xiaomi Cube + light

Posted: Sunday 12 February 2017 8:12
by woody4165

Re: Xiaomi Cube + light

Posted: Sunday 12 February 2017 13:01
by DreaMare
Yeah, thanks : )
I Saw it, but i'm bad in LUA ^_^,
I would like to know if it could be possible in blocky mode

Re: Xiaomi Cube + light

Posted: Tuesday 14 February 2017 19:56
by DreaMare
I have this error :
2017-02-14 19:56:00.053 Error: EventSystem: in cube test: [string "--..."]:29: attempt to index global 'devicechanged' (a nil value)

With this code :

Code: Select all

 commandArray = {}
if devicechanged['Xiaomi Cube Switch'] == "shake_air" then
    commandArray['Scene Tout éteindre'] = "On"     
elseif devicechanged['Xiaomi Cube Switch'] == "flip180" then   
    commandArray['Scene Catoune on'] = "On"    
elseif devicechanged['Xiaomi Cube Switch'] == "tap_twice" then
    commandArray['Scene Office on 1426365250000'] = "On"     
elseif devicechanged['Xiaomi Cube Switch'] == "flip90" then 
    commandArray['Scene Cinema on 1438118688000'] = "On"       
elseif devicechanged['Xiaomi Cube Switch'] == "move" then
    commandArray['Scene Saenger Sky on 1403011832000'] = "On"           
elseif devicechanged['Xiaomi Cube Switch'] == "clock_wise" then    
    commandArray['Scene 12th Man on 1403013718000'] = "On"       
elseif devicechanged['Xiaomi Cube Switch'] == "anti_clock_wise" then    
     commandArray['Scene Détente'] = "On"   

end
return commandArray

Re: Xiaomi Cube + light

Posted: Friday 24 February 2017 23:35
by imotakan
@DreaMare
You are almost there, just change the value 90 to "flip90" (it's another user value box).
domoticz-cube.PNG
domoticz-cube.PNG (17.55 KiB) Viewed 3723 times

Re: Xiaomi Cube + light

Posted: Friday 24 March 2017 17:32
by DreaMare
thank you : )
ATM I use Lua insteef blocky ^^