HomeGenie Forum
Automation Program Plugins and Wizard Scripting => APP Contributions => Topic started by: saue0 on August 18, 2015, 06:58:37 PM
-
Hi All,
I am new to HG, and Love It.
Here is a remake for the Philips Hue.
It autocreate the module for the Light and the Groups.
It may be a litle bugged.
Please Give me somme feedback.
Thanks
Edit: New version ....
-
I am getting this error:
Runtime.Error = "CR: Invalid format."
-
Can you gime me the moment at witch your getting this error ?
- On startup of the script (Creation of the virtual module)
- Every 10 second (Refresh loop)
- On sending a command ?
This will help me finding the problem.
I have a system with 6 light (3 Hue and 3 Hue Lux)
and have 3 Groups.
-
Runtime.Error = "CR: Invalid format."
just guessing: perhaps different firmware version could give different output from what the app is expecting.
g.
-
It happens as soon as I try to activate the program. If fails loading and gives the error. I cannot load the program at all. I have updated the hub to the latest Philips pushed firmware - if that helps.
-
Here is a new version with some log info.
please retry it and attach the log file.
-
Attached is the recent part of the log where I attempted to run. I hope this helps.
-
Have you setup your bridge IP and User ?
The first thing i do is call the brigde to get the light config. and it seem not to be done
Why is this line not complete in the log ?
"2015-09-09T17:57:39.5577150+00:00 HomeAutomation.HomeGenie.Automation 1000 Automation Program Program.Notification {""Title"":""MyPhilipsHue """
It is missing "API Call" [ Program.Notify("MyPhilipsHue ", "API Call"); ]
-
Yes - I've set up and tested (via the api) the validity of the user and the IP. All seems to be good. I don't know why that part of the log is truncated. I'll delete and reinstall and try again.
-
I did a change, pleare retry
I also included an exemple of ly log file.
-
Problem solve,
I reinstall on a new PI 2 and I had the same problem.
Level and ColorHSB were not initialise on the first creation of the virtual module.
On my window system, the VM where there with valid data. so no bug.
Please retry , and use the new widget as well
-
saue0,
Very cool module. After your latest update, I'm not seeing the runtime errors either.
It looks like you have code to tell different light types? E.g. it looks like it can tell the difference between my hue color, and my non-color lights (I'm using GE Link bulbs, but I think for all intents and purposes they are identical to luxe).
It appears, however, that my Hue Bloom bulbs are being detected as non-color bulbs ?
------------ EDIT -----------------
Looking here:
if (ltype.Equals("Extended color light"))
Program.AddVirtualModule(MODULES_DOMAIN, idx.ToString(), "Dimmer", MODULES_WIDGET);
Philips Hue Bloom: "Color light"
GE Link Bulbs: "Dimmable light"
Philips Hue Bulb: "Extended color light"
So I think the if state should be:
if ((ltype.Equals("Color light")) || (ltype.Equals("Extended color light")))
-
The runtime errors are gone - however I cannot get a color selector on android client
-
gustavo, yes this is correck to support the other type.
I only have 2 types at the moment. If you know other type, i will add them as well,
Or is there an oderway of finding out if the light support colors ?
ebasta, change this line in the code ,
const string MODULES_WIDGET = "erx/philips/hue";
To "homegenie/generic/colorlight";
This will replace the widget with te original one, but you will loose the new buttons.
The android application do not know wat to do whit my widget.
-
I Have a small question,
Is the widget stats save somewhere ?
Because when a restart the software, some widget do not keep the last state they had
-
I believe all modules are initially off when you start up HG.
-
gustavo, yes this is correck to support the other type.
I only have 2 types at the moment. If you know other type, i will add them as well,
Or is there an oderway of finding out if the light support colors ?
The only other one I know of is "Color light" which is the bloom. I have all three types at my house - bloom, regular hue bulbs, and non-color hue bulbs (both the $12 GE Links and the $20 hue lux's). Your code works perfect with all of them when the single line fix I earlier suggested. E.g. if it's a Color light or Extended color light, treat it one way, otherwise treat it as a non-color light.
Thanks,
Gus
-
ebasta, change this line in the code ,
const string MODULES_WIDGET = "erx/philips/hue";
To "homegenie/generic/colorlight";
This will replace the widget with te original one, but you will loose the new buttons.
The android application do not know wat to do whit my widget.
Totally worked - thank you!!