Xiaomi Cube + light

Moderator: leecollings

Post Reply
DreaMare
Posts: 26
Joined: Friday 03 February 2017 16:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Xiaomi Cube + light

Post 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

?
Attachments
cube.png
cube.png (7.2 KiB) Viewed 3884 times
woody4165
Posts: 476
Joined: Monday 14 March 2016 13:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: Xiaomi Cube + light

Post by woody4165 »

Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
DreaMare
Posts: 26
Joined: Friday 03 February 2017 16:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Xiaomi Cube + light

Post 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
DreaMare
Posts: 26
Joined: Friday 03 February 2017 16:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Xiaomi Cube + light

Post 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
imotakan
Posts: 1
Joined: Friday 24 February 2017 23:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Xiaomi Cube + light

Post 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 3718 times
DreaMare
Posts: 26
Joined: Friday 03 February 2017 16:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Xiaomi Cube + light

Post by DreaMare »

thank you : )
ATM I use Lua insteef blocky ^^
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest