This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

getting started with hue
#1
Hi,

never ever seen lua scripts before I got this wiser. Huh
So:
I have to ask if some one can guide me in the right direction.
My mission is to get hue lamps work with the knx/ wiser.

SO I am following the application note from Schneider El; Philips Hue lamps controlled from Wiser for KNX.
It stops for me at step 9, I cant get any thing from the hue bridge!
Should I fill in something in the code? I just created a start-up(init) script and paste the code in step 9.

Step 1 Open Wiser for KNX Configurator in your browser.
Step 2 Go to Configurator >> Scripting >> User libraries.
Step 3 Click button Add new library in left bottom corner on the screen.
Step 4 Into field Script name, write upnp. Uncheck Auto load library and click Save.
Step 5 In column Editor, click the icon on the row with created upnp library.
Step 6 Open upnp.lua library attached to this application note and copy the content
to this script opened
in Step 5.
Step 7 Click Save and close.
Step 8 Repeat steps 3 - 7 for the second library named hue.
Step 9 Create e. g. Event script and paste there following code:
local Bridge = require('user.hue').Bridge
log(Bridge.discover())
Step 10 Save and Run script.
Step 11 In the left bottom corner on the screen click Logs. Write down the IP address
of discovered bridg
e(s), it will be needed later. Pay attention information
abou
t https. This parameter indicates the bridge’s capability to communicate
via https protocol. When you see this parameter is set to false, you must
expli
citly set it to false when instantiating class Bridge.


Tanks
Best Regards
NewBee to wiser
Reply
#2
Hi,

I use my own script, and have not tested this one, but for the IP address you don't realy need a command, you can see it in the HUE app if needed.

Try to skip step 9 and fill in the IP from the app, and see if you can continue the next steps..

Otherwise you might want to use my version of the HUE scripts, see: https://forum.logicmachine.net/showthrea...49#pid6549

BR,

Erwin
Reply
#3
Tank you Erwin,

that did do the trick. Smile
Best Regards
NewBee to wiser
Reply
#4
Hallo,

Is there a way to read status of groups(rooms) as I understand it, the HUE bridge gives the following status of groups: any_on, all_on, off. How do I read this status in wiser?

BR
Magnus
Reply
#5
Hi,

See this topic: https://forum.logicmachine.net/showthrea...50#pid6250

BR,

Erwin
Reply
#6
(13.05.2020, 17:38)Erwin van der Zwart Wrote: Hi,

See this topic: https://forum.logicmachine.net/showthrea...50#pid6250

BR,

Erwin

Hi,

I have had a look, and I do not understand how to read the status on an entire group.
I et statsus for one lamp, but not for a group.

I'm interested in seeing if any of the outdoor lights are on.

I'm new to Wiser for KNX, and the LUA language.
Any help is appreciated. 

BR Magnus
Reply
#7
I never used this script but if you can read individual lamp from a group then you can use it as a group feadback. It is the same when you control them together.
------------------------------
Ctrl+F5
Reply
#8
Hi,

Currently the feedback script uses the command getHueLights() to get the JSON response from the bridge for the induvidual lamps, and this response is processed further to sync the KNX objects according the light states.

If you want this also for groups you need to use the command getHueGroups() and change the feedback script so it will process the JSON response from the bridge in the same way.

So i'ts possible but takes a bit of work.

BR,

Erwin
Reply


Forum Jump: