SpaceLogic KNX Forum
Schneider Electric SpaceLogic KNX forum to get support and share knowledge including selection, installation and troubleshooting for spaceLYnk, Wiser for KNX, eConfigure KNX, SpaceLogic KNX Hybrid module and other topics.
Link copied. Please paste this link to share this article on your social media post.
Hi
I've have some Philip Hue lamp, connect to KNX via Homelynk.
I've want to dim them from a KNX push button (4 bit object)
Is there someone there has made a solution how to dim ?
Switch on/off and 0 - 100% is show in AN020 but not 4 bit object
BR
Tommi Jensen
Link copied. Please paste this link to share this article on your social media post.
Hi Pawel
Thanks for the answer, there was a small bug in the script, but it working just fine now, see below
Br.
Tommi
--oprettes som permanent script med 0s
objekt_in_4b = grp.getvalue('1/0/4')
objekt_out_1B = '1/0/6'
skok = bit.band(objekt_in_4b, 0x07)
if skok ~= 0 then
brighter = bit.band(objekt_in_4b, 0x08) ~= 0
aktualna = grp.getvalue(objekt_out_1B) ------ This was corrected from grp.getaktualna to grp.getvalue
if brighter then nastepna = aktualna + 5
else nastepna = aktualna - 5
end
nastepna = math.min(nastepna, 100)
nastepna = math.max(nastepna, 0)
if aktualna ~= nastepna then
grp.write(objekt_out_1B, nastepna)
end
end
os.sleep(0.25)
Posted: 2017-07-14 01:57 AM
Link copied. Please paste this link to share this article on your social media post.
I'm not sure how fast we can send information to hue lamps via homeLYnk, but below you'll find a simple script which converts dimming object to value object (Resident script with interval 0s):
obiekt_in_4b = grp.getvalue('6/0/1')
obiekt_out_1B = '6/0/2'
skok = bit.band(obiekt_in_4b, 0x07)
if skok ~= 0 then
brighter = bit.band(obiekt_in_4b, 0x08) ~= 0
aktualna = grp.getvalue(obiekt_out_1B)
if brighter then nastepna = aktualna + 5
else nastepna = aktualna - 5
end
nastepna = math.min(nastepna, 100)
nastepna = math.max(nastepna, 0)
if aktualna ~= nastepna then
grp.write(obiekt_out_1B, nastepna)
end
end
os.sleep(0.25)
Link copied. Please paste this link to share this article on your social media post.
Hi Pawel
Thanks for the answer, there was a small bug in the script, but it working just fine now, see below
Br.
Tommi
--oprettes som permanent script med 0s
objekt_in_4b = grp.getvalue('1/0/4')
objekt_out_1B = '1/0/6'
skok = bit.band(objekt_in_4b, 0x07)
if skok ~= 0 then
brighter = bit.band(objekt_in_4b, 0x08) ~= 0
aktualna = grp.getvalue(objekt_out_1B) ------ This was corrected from grp.getaktualna to grp.getvalue
if brighter then nastepna = aktualna + 5
else nastepna = aktualna - 5
end
nastepna = math.min(nastepna, 100)
nastepna = math.max(nastepna, 0)
if aktualna ~= nastepna then
grp.write(objekt_out_1B, nastepna)
end
end
os.sleep(0.25)
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.