@Fjux @mwittig this is how I can imagine to have one plugin for multiple devices. I created a pull request including the specs for driver interfaces and necessary changes in the plugin. Please checkout this PR and feel free to comment.
-
Mi-light,IWY ect. and Wifi 370 integration
-
@philip1986 Commented! and i will check if i can make an example for my comment.
But i’m a bit new to the world of GIT (am used to SVN). So not sure how to get that example to you@Patjee That gui looks nice! Could you make it look like this post: http://forum.pimatic.org/topic/332/plugin-for-wifi-controlled-led-light-iwy-light/19 from @sweebee ?
because i think removing the dim bar would not be a great idea. A lot of the devices also have a White function. and you want to dim that.
And if you selected a color and later adjust the dim, it would be quite hard to keep the color right -
@philip1986 And i created a quick mock-up of my idea! and made a pull request.
https://github.com/philip1986/pimatic-led-light/pull/4 -
@Fjux Ok I got your point and I agree that this is the better solution.
Can you please crate your PR agin against the branch ‘feature/support_mutiple_devices’. I like to merge it and polish it up a bit to make it work for the current devices. And you can start to implement the MilightLed wrapper class.
-
@Fjux This is just skinning and adjusting the code a bit. It’s my goal to make it look like that, but that requires a different color picker.
At this moment the dim bar doesn’t work like it should. 100% white is 100% on the dim bar, but 100% red is only 42% on the dim bar.
For now I fixed the position of the color picker, but I did hide the dim bar. I couldn’t get it to scale properly and in my opinion its not really needed for RGB with the current color picker. I did see your plan to remove the switch, that could make the scaling easier.
Just like there are different devices, there are different subdevices. Each subdevice needs another GUI. There are RGB. RGBW and WW/W devices. Currently I only have RGB and WW/W devices.
This is how the GUI of my fork looks like now:
(on mobile the color picker is in the center, but on a computer its a bit shifted)My next goal is to integrate another color picker and bring back the dimmer, though with my current HTML5 knowlage this can take a while.
To get this GUI, the whole “app” folder needs to be replaced.
https://github.com/P4tje/pimatic-led-light/tree/master/appIn the next week I’ll create a branch with a dimmer that displays good in the mobile GUI.
-
@philip1986 and @Fjux: I have created a fork yesterday and pull request today for the separation into multiple device types and the integration of Milight. See comments on https://github.com/philip1986/pimatic-led-light/issues/5
btw. Milight as part of pimatic-led-light basically works Just the recovery of the power state from DB does not work properly. Note, it is not possible to query the state from a Milight device (comms is one-way).
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
@sweetpi said http://forum.pimatic.org/topic/332/plugin-for-wifi-controlled-led-light-iwy-light/2:
Looks very nice. Can’t wait to try the ui. If it’s ok I would like to transfer the ui into the framework / mobile-frontend to allow other plugins to use them as well in the future.
Will there be a DummyLedLightDevice or DummyColorPickerDevice class in the near future? Can’t wait to try it out before buying hardware.
Some Mobile GUI Dimmer and Color Picker variations:
-
@Pimagical Basically, the MilightDevice can act as Dummy as it just sending out UDP datagrams (comms with Milight is oneway). However, note, Milight integration has not been published yet as the pull request is still pending.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
I like to have a dummy as well, to control my moonlight https://www.youtube.com/watch?v=eJSG8-6Ldng
-
will close this threat for now in favor of this one here
http://forum.pimatic.org/topic/332/plugin-for-wifi-controlled-led-light-iwy-light
doesn’t make sense to discuss things twice
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !