That sounds good, Off to work now so will have a play when I get home then. thanks for the help
Mark
Mark
There is a soft-mute function which we use with the commands like "What song is this?" There is one for system volume, one for each of: MediaMonkey, XBMC, iTunes, MediaPortal.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: jitterjames on March 04, 2015, 01:28:55 PM
I probably didn't read the original post carefully enough. Sorry about that!
import ledcontroller
led = ledcontroller.LedController("ip.ad.re.ss")
led.on(1) # the commandpython ready
Line: 168 >>
TypeError: expected str, got bytes
import eg
import ledcontroller
led = ledcontroller.LedController("192.168.0.115")
red, royal_blue, green, yellow, white = "red", "royal_blue", "green", "yellow", "white"
a, b, c, d, e, f, g, h, i, j = "10", "20", "30", "40", "50", "60", "70", "80", "90", "100"
main_light, side_light, back_light, living_room_lights, dinning_room_light = 1, 4, 2, 0, 3
on = "on"
off = "off"
v = "set_brightness"
w = "set_color"
y = eg.event.payload[1]
x = eg.event.payload[2]
z = "led."
group = [main_light, side_light, back_light, living_room_lights, dinning_room_light]
power = [on, off]
colour = [red, royal_blue, green, yellow, white]
dim = [a, b, c, d, e, f, g, h, i, j,]
if x in group:
x = x
if y in power:
mycommand = z + y +"(" + (x) + ")"
exec mycommand
if y in colour:
mycommand = z + w + "(" + '"' + y + '"' + ", " + x + ")"
print mycommand
exec mycommand
if y in dim:
mycommand = z + v + "(" + y + ", " + x + ")"
exec mycommand
print x
print y
python is fun lol. This code works great, upon receiving payloads in eventghost from voxcommando.
but to make this easier for me now to right the code and later to share it with people it would be better if I could get the ledcontroller module to work in voxcommander so I dont have to go back and forth between Vox and Eg