After a while tinkering with Domoticz including Z-Wave and RFLink i thought it would be time for something challenging.
So on to My Sensors.
I build a RGB Led Strip controller with the help from http://www.engineerathome.com/elektroni ... troller/11 and http://www.jerome-bernard.com/blog/2013 ... n-arduino/
I used this sketch :
- Spoiler: show
After connecting and configuring in Domoticz i got a dimmable RGB switch with a color picker.
Not happy with the functions it provided, I was reading in to RGB control from Domoticz i understood that this is in re-design and may be available in March.
viewtopic.php?f=6&t=10458&p=76600#p76600
So for as i understood, domoticz is only sending hue information and no RGB.
Then I created a dummy switch, which triggers a script when on, and in the script i check if the switch is set to off to end the script, so i created a light show from my RGB strip.
Code: Select all
#!/usr/bin/python
from random import randint
import json
import urllib2
import time
off = True
while (off):
color = randint(1,800)
brightness = randint(50,100)
urlrgb = "http://domoticzurl:port/json.htm?type=command¶m=setcolbrightnessvalue&idx=178&hue=%d&brightness=%d&iswhite=false" % (color, brightness)
urlswitch = "http://domoticzurl:port/json.htm?type=devices&rid=179"
data = json.load(urllib2.urlopen(urlrgb))
data = json.load(urllib2.urlopen(urlswitch))
time.sleep(1)
if (data["result"][0]["Status"] == "Off"):
urlswitch = "http://domoticzurl:port/json.htm?type=command¶m=switchlight&idx=178&switchcmd=Off"
data = json.load(urllib2.urlopen(urlswitch))
off = False
I don't know the range of the hue value's so i picked 1 through 800, and it seems that I get a lot of colors.
To do : add sound detection, and react on that.
Any feedback is appreciated.
Regard's Peer