We have moved at community.getvera.com

Author Topic: MiLight/Easybulb/LimitlessLED Plugins  (Read 288429 times)

Offline RexBeckett

  • Moderator
  • Master Member
  • *****
  • Posts: 3891
  • Karma: +483/-12
Re: MiLight/Easybulb/LimitlessLED Plugins
« Reply #15 on: April 29, 2013, 03:38:21 pm »
Quote
nice work, BTW
Thank you. I appreciate the feedback. Coming from someone with your level of experience makes it even more valued.

Quote
Like all LEDs, direction is an issue and when placed in a table lamp pointing up, they barely light up the table.
Yes, I agree. They all have hemispherical light distribution. I guess it contributes to the high efficiency. They do work much better as ceiling lamps. If you put them in a shade, it reflects enough light upwards to give a little ambiance.

Offline RexBeckett

  • Moderator
  • Master Member
  • *****
  • Posts: 3891
  • Karma: +483/-12
Re: MiLight/Easybulb/LimitlessLED Plugins
« Reply #16 on: April 30, 2013, 03:02:04 am »
Quote
do you accept patches?
I just noticed that I didn't respond to your question. I'm not sure whether this is a reference to boy-scouts or software bugs. If the former, you'd have to sew it on - I'm not good with needles. If the latter, sock it to me.
 

Offline zedrally

  • Hero Member
  • *****
  • Posts: 1224
  • Karma: +15/-5
  • Black Cat Control Systems
Re: MiLight/Easybulb/LimitlessLED Plugins
« Reply #17 on: May 06, 2013, 10:38:31 pm »
Mine arrived yesterday and after a couple of email exchanges with Hamish, I managed to get them up and running.
Rex's Plugin works well except I'm used to seeing the bulb extinguished with OFF selected (is it just me that has noticed this?). ???

Living in the Land of Oz, give me a vegemite sandwich. Home Seer, Vera Lite & Edge, Popp, Black Cat Smart Hub & Vera G, Black Cat Lite 1 & 2's a Black Cat Dimmer or 2, Fantem Tec and then some  Black Cat Cat's Eye PIR's & Door-Window Sensors, RFXComm, Broadlink RMPro & Mini plus a Z-UNO or 2.

Offline LimitlessLED

  • Sr. Newbie
  • *
  • Posts: 36
  • Karma: +0/-0
Re: MiLight/Easybulb/LimitlessLED Plugins
« Reply #18 on: May 06, 2013, 11:35:55 pm »
Are you referring to the Light icon in the plugin? Because the Lighting System is wireless IP UDP remote control, there is no status feedback, so you won't know the status of the bulb if other remotes or iPhones change the light status directly.

Offline RexBeckett

  • Moderator
  • Master Member
  • *****
  • Posts: 3891
  • Karma: +483/-12
Re: MiLight/Easybulb/LimitlessLED Plugins
« Reply #19 on: May 07, 2013, 12:36:24 am »
Quote
Rex's Plugin works well except I'm used to seeing the bulb extinguished with OFF selected (is it just me that has noticed this?).
Which of the three four possible device types are you using: MiLightW; MiLightWU; MiLightWD; MilightRGB? Is your issue that the lamp doesn't go completely off? How are you issuing the Off command: From the plugin UI; From a scene; From a mobile app?

Offline zedrally

  • Hero Member
  • *****
  • Posts: 1224
  • Karma: +15/-5
  • Black Cat Control Systems
Re: MiLight/Easybulb/LimitlessLED Plugins
« Reply #20 on: May 07, 2013, 01:27:28 am »
Sorry Rex, I should have made myself more clear.
It's the UI that has the globe "illuminated". ;D
 
Now, if we could only "hack" the Bridge so we can access multiple RGB's.... :D

« Last Edit: May 07, 2013, 01:31:37 am by zedrally »
Living in the Land of Oz, give me a vegemite sandwich. Home Seer, Vera Lite & Edge, Popp, Black Cat Smart Hub & Vera G, Black Cat Lite 1 & 2's a Black Cat Dimmer or 2, Fantem Tec and then some  Black Cat Cat's Eye PIR's & Door-Window Sensors, RFXComm, Broadlink RMPro & Mini plus a Z-UNO or 2.

Offline RexBeckett

  • Moderator
  • Master Member
  • *****
  • Posts: 3891
  • Karma: +483/-12
Re: MiLight/Easybulb/LimitlessLED Plugins
« Reply #21 on: May 07, 2013, 09:52:25 am »
Quote
It's the UI that has the globe "illuminated".
I thought you'd found a bug for me to fix. ;)

I set the icons for MiLightW and MiLightRGB to fixed ones because there is no feedback from the lamp to steer different states - as mentioned by LimitlessLED. These two plugins were just intended to emulate the remotes via the bridge for experimenting.

The icon state for MiLightWU is driven from the dim level. I personally hate the way that normal dimmer UIs turn the lamp on and off by changing the dim level to 100% or 0% defeating the object of the dimmer module retaining its last level setting. So, I use the PowerSwitch1 SetTarget action to turn the lamps on and off whilst leaving the dimmer setting alone - so the icon reflects what the lamp will do when it is switched back on. ;D It would be very easy to fix this by adding another state variable to drive the icon. I'll consider whether this has any implications for mobile apps - probably not. Watch this thread for news.

Meanwhile, if it bugs you, you could always switch to using the D_MiLightWD1.xml device_file which uses the standard DimmableLight UI so sets the level to 0% for off and 100% for on. See: this post.

Quote
Now, if we could only "hack" the Bridge so we can access multiple RGB's....
That would be nice but don't hold your breath. I suspect that the one-RGBlamp-per-bridge limitation is in the design of the lamp rather than the bridge.

BTW: I do plan to write a DimmableLight type plugin for the RGB lamps. The issue at the moment is how to achieve color control in a sensible way. I may just steal @intveltr's good work on the Hue plugin. ;D It isn't high on my priority list at the moment as I'm not actually using the RGB lamp apart from when testing stuff. If anyone is waiting for this, do let me know.

Offline RexBeckett

  • Moderator
  • Master Member
  • *****
  • Posts: 3891
  • Karma: +483/-12
Re: MiLight/Easybulb/LimitlessLED Plugins
« Reply #22 on: May 07, 2013, 07:48:24 pm »
I have uploaded a new version of MiLightWU1 to the link in the first post. This plugin provides a DimmableLight-type device that looks and behaves similar to a normal dimmer but with added features. The upload includes updated instructions for installation and use.

New features
There is now a button on the Control tab to set Nightlight mode.
There is now an input field and button to set Color Temperature in degrees-K (2700-5000).
SetNightMode is now available as an action for use by scenes and other plugins.
SetColorTemperature is now available as an action for use by scenes and other plugins.
You can now set zone to 0 to control all four zones simultaneously.
The device UI icon now reflects the complete lamp state - not just the dim level.

I think this plugin now fully supports the features of the White MiLight/Easybulb/LimitlessLED lamps. Barring bug fixes or suggestions for new features, I'm not planning any more changes. I now intend to implement similar functionality for the RGB version of these lamps.
« Last Edit: May 08, 2013, 02:58:51 am by RexBeckett »

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: MiLight/Easybulb/LimitlessLED Plugins
« Reply #23 on: May 08, 2013, 07:03:33 pm »
Hi RexBeckett,

I've had a chance to play with the current version of the White light files.  They look damn good.  Here's some feedback.

So far your device file still announces itself as a UPnP DimmableLight1 device.  You'll need to change that to use your own device type string.  The reason is that MiOS will only associate one static JSON file with each device type.  Hence if you stick with the same device type as other dimmable lights then you can only change the dashboard appearance of all dimmable lights on Vera, including normal Z-Wave ones. So change D_MiLightWU1.xml like this:
Code: [Select]
<deviceType>urn:schemas-dcineco-com:device:DimmableLight:1</deviceType>
<staticJson>D_MiLightWU1.json</staticJson>
<Category_Num>2</Category_Num>
And change D_MiLightWU1.json like this:
Code: [Select]
"DeviceType": "urn:schemas-dcineco-com:device:DimmableLight:1",
"device_type": "urn:schemas-dcineco-com:device:DimmableLight:1"
With both those changes I see your new UI.  Remote apps will still work because you haven't changed the services, and it's the services that remotes (should) look at, not the device types.  Setting the category helps there too, as in my code snippet.

You may as well delete all the Get... actions from the service and implementation files.  As you've seen from another thread, Vera can't return anything from an action, by MCV's design.

I notice when I turn the light on from 0% to 10% that it goes right up to full brightness and then down to 10%.  I know why you've done it that way, but it messes with my plans to create a wakeup-ramp light with these lamps.  WAKE UP!!! I mean, (wake up).  I'm thinking that if the plugin were to alter the "off" behaviour so that it dims the lamp down to the lowest setting before sending the "off" packet, then it could just send the "on" packet rather than "full" when turning the lamp back on again.  The tradeoff is that turning the lamp off becomes a fade rather than instant.  What do you reckon?  (Edit: I see the phrase "personally hate" coming up again in 3, 2, 1...)

Pet peeve: It's not "Degrees Kelvin".  It's just "Kelvin", symbol "K".
« Last Edit: May 08, 2013, 07:06:55 pm by futzle »

Offline RexBeckett

  • Moderator
  • Master Member
  • *****
  • Posts: 3891
  • Karma: +483/-12
Re: MiLight/Easybulb/LimitlessLED Plugins
« Reply #24 on: May 08, 2013, 10:26:15 pm »
Hi futzle,

Thank you very much for your constructive feedback. I really appreciate the guidance.

OK on the device types. I don't have any real dimmers so didn't see a problem. I'll change the device types as you suggest.

Quote
You may as well delete all the Get... actions from the service and implementation files.  As you've seen from another thread, Vera can't return anything from an action, by MCV's design.
I had been wondering about that. I think I copied the idea from another plugin believing it to be necessary. I'll remove them.

Quote
I notice when I turn the light on from 0% to 10% that it goes right up to full brightness and then down to 10%.  I know why you've done it that way, but it messes with my plans to create a wakeup-ramp light with these lamps.  WAKE UP!!! I mean, (wake up).  I'm thinking that if the plugin were to alter the "off" behaviour so that it dims the lamp down to the lowest setting before sending the "off" packet, then it could just send the "on" packet rather than "full" when turning the lamp back on again.  The tradeoff is that turning the lamp off becomes a fade rather than instant.  What do you reckon?
Funny you should mention that. I'm just coding the RGB version of this plugin and realised that I'd missed doing that in the white version so I went back and changed it. I'll upload it when I've fixed the other bits. Do yourself a favour and don't try using the RGB lamps in your bedroom. They go to full brightness whenever you change the white/colour/effects mode and I can't drag them down quick enough to avoid the semi-strobe effect. Not what you want first thing in the morning.  :o   

Quote
Pet peeve: It's not "Degrees Kelvin".  It's just "Kelvin", symbol "K".
Now you're just being picky. I went to a lot of trouble to put the degree symbol into the json. OK, it may not be SI but they only changed it in 1967 and I learned the previous form at school. We measure colour using the CIE XYZ color space defined in 1931 when degrees-K was standard practice. To be equally picky, SI defines it as kelvin not Kelvin. :P  I shall give due consideration to removing the offending glyph.

Thanks again for taking the trouble to tell me this stuff.
« Last Edit: May 09, 2013, 05:17:25 am by RexBeckett »

Offline RexBeckett

  • Moderator
  • Master Member
  • *****
  • Posts: 3891
  • Karma: +483/-12
Re: MiLight/Easybulb/LimitlessLED Plugins
« Reply #25 on: May 09, 2013, 05:09:05 am »
OK @zedrally and anyone else who's interested, the dimmable-light plugin for the RGB lamps is ready for testing. This is probably an alpha test. It's working fine on my system but it is new so may need a tweak or two. The download link is on the first post in this thread. Look for MiLightCU1.

Like its brother for white lamps, this plugin emulates a dimmable-light but with additions to support the features of the RGB lamp. The extra features are set on the device's Control tab - or by action calls from scenes and other plugins. Functions are provided to set Hue for coloured light, EffectsMode for disco-type effects, EffectsRate for the speed of the effects and White to do what its name suggests. There is also an Enroll button for use when enrolling a new lamp onto a WiFi Bridge.

As with the white dimmable-light, the plugin cannot read the state of the lamps so must assume it alone is controlling them. If you change the state of the lamps with a hardware remote or MiLightRGB plugin, things will get out of sync. You can resynchronise any parameter by setting the value to zero. This will reset the lamp to the minimum setting for that parameter after which you can set the value you want. The dimming level and EffectsRate are automatically resynchronised whenever the EffectsMode is changed to work around an oddity in the lamp behavior.

@futzle, this plugin incorporates all the changes you suggested for the white version and there is no mention of degrees-Kelvin. ;D
« Last Edit: May 09, 2013, 05:12:48 am by RexBeckett »

Offline zedrally

  • Hero Member
  • *****
  • Posts: 1224
  • Karma: +15/-5
  • Black Cat Control Systems
Re: MiLight/Easybulb/LimitlessLED Plugins
« Reply #26 on: May 09, 2013, 06:27:44 am »
Thanks Rex, but RL work calls until Monday for in depth testing. :'(
UI looks great.
« Last Edit: May 09, 2013, 04:28:11 pm by zedrally »
Living in the Land of Oz, give me a vegemite sandwich. Home Seer, Vera Lite & Edge, Popp, Black Cat Smart Hub & Vera G, Black Cat Lite 1 & 2's a Black Cat Dimmer or 2, Fantem Tec and then some  Black Cat Cat's Eye PIR's & Door-Window Sensors, RFXComm, Broadlink RMPro & Mini plus a Z-UNO or 2.

Offline RexBeckett

  • Moderator
  • Master Member
  • *****
  • Posts: 3891
  • Karma: +483/-12
Re: MiLight/Easybulb/LimitlessLED Plugins
« Reply #27 on: May 09, 2013, 08:31:13 am »
If you already downloaded the files for MiLightCu1, go get the latest version. I fixed a bug.

Offline RexBeckett

  • Moderator
  • Master Member
  • *****
  • Posts: 3891
  • Karma: +483/-12
Re: MiLight/Easybulb/LimitlessLED Plugins
« Reply #28 on: May 09, 2013, 08:50:04 am »
I have uploaded a new version of MiLightWU1 (dimmable-light emulator for white lamps). This version incorporates the changes suggested by @futzle so it will play nicely with normal dimmers.

It should now give a much nicer response to setting the LoadLevelTarget to 0. This should give you a smooth fade down and finally switch the lamp off. If, when a lamp has been dimmed to 0, you set a LoadLevelTarget of 100, the lamp will switch on at full brightness. If, however, you set a value of 99 or less, the lamp should fade smoothly up to this value.

I've also added an Enroll button to add new lamps to the WiFi Bridge. At other times, the button does the same as On.

Finally, in deference to @futzle, the color temperature is now labelled Color Temp. K and the button is Set K. ;D

If you have this plugin installed, please upload all four new files (D_MiLightWU1.xml, D_MiLightWU1.json, I_MiLightWU1.xml and S_MiLightWU1.xml and then Save/Reload followed by a browser page reload.

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: MiLight/Easybulb/LimitlessLED Plugins
« Reply #29 on: May 09, 2013, 05:42:28 pm »
It should now give a much nicer response to setting the LoadLevelTarget to 0. This should give you a smooth fade down and finally switch the lamp off. If, when a lamp has been dimmed to 0, you set a LoadLevelTarget of 100, the lamp will switch on at full brightness. If, however, you set a value of 99 or less, the lamp should fade smoothly up to this value.

This works great.  I'll have to tie up the Wakeup Ramp plugin to it and see how well it works.  Wonder if I can make it ramp the colour temperature at the same time...  (Another Vera UI shortcoming, you can't have more than one slider; otherwise it'd be cool to be able to adjust the colour temperature by dragging a slider.)

Quote
Finally, in deference to @futzle, the color temperature is now labelled Color Temp. K and the button is Set K. ;D

We in the SI cabal thank you.