Yes this one looks really nice and I would love to use it, if can provide HTML and CSS.
-
Plugin for WIFI controlled LED light (IWY-Light)
-
@sweebee Thats exactly what i always thought is the best Color-picker method! Let me change some small things:
The right slider doesnt have to be that big. I guess it should be as long as the normal dimmer devices.
That means there is more space for the color-picker button and we can expand it a little bit, so its easier to press on mobile devices.
regarding the button-press:
I think the best method is that you hold down your finger on the button and the color-wheel appears. if you release your finger it disappears again. If you hold down your finger and then swipe on top of the color-wheel you are able to chose a new color “on the fly”. The numbers should also change live so you always see where you are. -
Here are some nice ones:
http://www.script-tutorials.com/html5-color-picker-canvas/
especially demo 4 and 5.
-
Great development! I don’t have IWY at home, but I do have a wifi-370 rgb led strip controller. The protocol is almost the same. I can confirm the on / off button works with the wifi-370, the color picker doesn’t.
Does the IWY works with “zones” like the Mi Light or is one ip address one RGB device?
-
Very nice! I didn’t know the WIFI-370 before, but I after a quick search (I found this https://github.com/secesh/node-rgb) I can also confirm that the protocol is quite similar. When I have some time will try to extend my driver to support WIFI-370.
@Patjee to answer your question: every IWY Master devices has a own IP, but there are also other IWY products which require a gateway.
-
@philip1986
good to hear! we have had a workaround for the time being with https://github.com/b4cedev/node-light-wifi370
am curious about the adaption with your plugin!
pimatic/pimatic#348pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
That would be great. I’m going to the code a bit, but Javascript and coffeescript are a bit new to me. I do a lot of C and VB programming, so it shouldn’t be too hard. And I played Screeps for a few days :P.
The read function works with the wifi 370. The color picker shows the color I’ve set with my phone.
On the color picker:
With the current calculation, full colors get a max dimming of 40 / 50 %, depending on the color. Only full white can get a 100%. That is because dimming is calculated on the total RGB value.For RGB led control, I think a picker that selects full colors and white wil be best. Like the one sweebee suggested:
http://www.script-tutorials.com/demos/315/index4.html (Tough the white center needs to be a bit bigger)This way the dimming value can be calculated: The highest value (R, G or B ) / 255 * 100%. On full color, one value is always 255. When dimmed to to 10%, that value will be 25. When setting the color, the send RGB value is Dimmer value * full RGB color value.
Edit:
I found this one: https://github.com/fujaru/jquery-wheelcolorpicker
I got it to this now, with the dimming feature integrated:
$(’#color-inline1’).wheelColorPicker({ sliders: “v”, preview: false, format: “rgb” });
The background color is set in the css file.
-
@philip1986 Your plugin is a fork of the pimatic-plugin-template. To get full control you should ask github support to
delete the fork dependency. This way users will be able to file issues which is also useful to keep a history on merges, pull requests and such. Seehttp://stackoverflow.com/questions/16052477/delete-fork-dependency-of-a-github-repository
Btw. I have received my Milight package and a new pimatic-milight plugin written by @Fjux just popped up. Very nice! However, I still would like to integrate the Milight core into your plugin for better user experience. I’ll create a fork for this.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
@Patjee nice ideas about the color picker, we definitely have to improve this.
In the meantime I updated the plugin to support wifi370. Now you can set a device via the config see here: https://www.npmjs.com/package/pimatic-iwy-light-master. Can you please check if it works with your lights.@mwittig thanks for the advice, the repo is now detached from the parent.
-
@mwittig yes we should investigate if its possible to integrate Milight. Unfortunately I couldn`t find the code of this plugin.
-
I think too, you guys should migrate the plugins and give it a more common name like pimatic-wifi-rgb or so.
pimatic rocks!!!
-
@philip1986 said:
@mwittig yes we should investigate if its possible to integrate Milight. Unfortunately I couldn`t find the code of this plugin.
I dont think that would be The best option as they both work completly different. Only thing is that they are RGB.
But i do think that The gui part should be either in both apps or in pimatic to be used as a device template.
-
@philip1986 The Milight Core is https://github.com/oeuillot/node-milight - The code is pretty bad and has multiple errors, but I’ll take care of this. There also some gists with code snippets, e.g. https://gist.github.com/AppLamp-API/5576325. There four different versions of Milight, at least, but we should start with Milight Version 2.0. It has 4 zones which can be switched & controlled individually or as a whole (zone 0). So I’ll we need to add a zoneId to the device configuration essentially.
EDIT: I think @Fjux holds a fork of node-milight. He already fixed some of the errors. See also http://forum.pimatic.org/topic/361/milight-plugin/3
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
@philip1986 Just added the new files an it’s working great, thank you! Only on restarting Pimatic, there are a few errors. It does’t stop the plugin from working.
23:35:15.407 [pimatic-iwy-light-master] error: [Error: connection timeout]
23:35:15.417 [pimatic-iwy-light-master] error: [Error: This socket is closed.]
23:35:15.425 [pimatic-iwy-light-master] error: [Error: This socket is closed.]
23:35:15.430 [pimatic-iwy-light-master] error: [Error: This socket is closed.]Is there special way to install the plugin? I got a question from someone how I got it working, but it took me a while before the plugin worked.
I’m learning HTML5 + CSS + JS now, but I have no idea how long it will take me to create a nice color picker. I want it to look like a combination of sweebee’s dropdown menu and the color picker I posted.
-
tried it with the wifi370 device but doesn’t work!
could you please have a closer look.
using version 0.0.3here’s the debug message :
http://www.youscreen.de/hocvlwsg66.jpg)
and my device :
{ "id": "tvmoodlight", "name": "TV Moodlight", "class": "IwyLightMaster", "location": "living room", "addr": "192.168.178.46", "device": "wifi370" },
the device is not listed and cannot be added to the gui.
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
@leader21 I fixed it by adding the extra files from the github in the pimatic-iwy-light-master folder https://github.com/philip1986/pimatic-iwy-light-master (I added the “app” folder to the mobile-fronted too, don’t know if that is necessary). And iwy_master needs to be installed.
npm install iwy_master
I successfully tested the plugin with the wifi370 yesterday.
-
@Patjee
thanks for this hint! i added the files of the app directory to the mobile frontend app folder and copied the missing files from the git repo to the pimatic-iwy-light-master folder. now it’s working!@philip1986
good workthanks for that!
maybe for improvement - adding two or three buttons for preselected colors “somehow” and what about a color fading option …pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
Hello, got also problems with the plugin:
error [pimatic]: Error loading device kueche_rgb: You must assign the config to your device in the the constructor function of your device: "@config = config"
13:11:45error [pimatic-iwy-light-master]: unknown devicegot:
{ "id": "kueche_rgb", "name": "rgb_kueche", "class": "IwyLightMaster", "location": "kueche", "addr": "192.168.178.40", "device": "wifi370" },
Still on 0.2.1, maybe it´s because of the update ? I can´t update it through pimatic…
-
Oh yes, unfortunately “npm install pimatic-iwy-light-master” does not fetch to hole repo. I`ll try to fix it. @hyperx could this also be the issue in your case?
About the color picker topic, I am open for any changes to improve the UX, but at this point I don`t know that is the best way to do it. Some help would be awesome.
About color fading option, I am not really sure what it really means. I guess it is supported by the devices itself. I saw some e.g RedGradualChange or BlueStrobeFlash. @leader21 Did you mean this?
@Fjux what are your concerns about merging the stuff? I would argue that the functionalities from the users point of view are the same. So the difference is just the way commands are send to the device. And this problem we can abstract into the drivers. I would like to have tow drivers (one for IWY and WIFI370 and one for Milight) with an equal interface. So the user can decide via the config which driver resp. device type he like to use.
-
So i have updated the files,
but now i´m running into new problems:
I can add my device, but can´t see it, also got these error:
error [pimatic-mobile-frontend]: Client error: Uncaught Error: Unable to process binding “template: function (){return { name:$root.getItemTemplate,foreach:$data.getUngroupedDevices(),afterRender:$data.afterRenderDevice} }” Message: Cannot find template with ID iwy-light-master-template
15:33:09error [pimatic-mobile-frontend]: Client error: Uncaught Error: Unable to process binding “template: function (){return { name:$root.getItemTemplate,foreach:$data.getUngroupedDevices(),afterRender:$data.afterRenderDevice} }” Message: Cannot find template with ID iwy-light-master-template