Author Topic: DreamColorRGB PlugIn  (Read 776 times)

Offline GreatGazoo

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
DreamColorRGB PlugIn
« on: January 19, 2018, 09:41:58 am »
DreamColor RGB PlugIn
 
This plugin is made to control the H806SB WiFi controller, this device is made to control individually addressable RGB LED-stips/grids.
Compatible protocols are :  WS-2811 / WS-2812 /  WS-2812 / DMX512 etc.

The big advantage above normal LED-strips are very nice effects, such as "waterfall" effect or the "knight Rider" effect.
The controller uses a SD-Card to store .dat effect files, with the plugin you can choose the effect-file (by number) and whether to use
single-file or loop-file modus.
Also speed adjustment (effects) is implemented and the brightness can be controlled to.
Beside this the LED-controller can be used to control like a normal RGB LED-strip, so the complete (red, blue) color can be selected. Take
in mind that only 340 leds are programmed so in case of a LED-strip with 60 leds/meter you can control about 5,5 meter.

The nice thing about the controller is that software can be downloaded on the website from the manufacturer to develop your own .dat effect
files. This software is for Windows. The software is very user friendly and gives a ton of possibilities to create your own effects.

With this plugin you can control your strip/grid :
 - In the User Interface from Vera 

Turn strip/grid on and off, brightness adjustment, speed adjustment, .dat effects file select and single-file or loop-file modus

 - With Http requests in your web-browser

turn strip/grid on/off
http://ip_address:3480/data_request?id=action&output_format=xml&DeviceNum=6&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0
http://ip_address:3480/data_request?id=action&output_format=xml&DeviceNum=6&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1

Don't forget to change the Vera's ip-address and your plugin device number !!!

Adjust Brightness:

http://ip_address:3480/data_request?id=action&output_format=json&DeviceNum=7&serviceId=urn:upnp-org:serviceId:Dimming1&action=SetLoadLevelTarget&newLoadlevelTarget=30

Adjust Speed for the Effects

http://ip_address:3480/data_request?id=action&output_format=json&DeviceNum=7&serviceId=urn:ggfiplupro-com:serviceId:DreamColorRGBW1&action=SetSpeedTarget&newSpeedTarget=10

Select .dat Effects File

http://ip_address:3480/data_request?id=action&output_format=json&DeviceNum=7&serviceId=urn:ggfiplupro-com:serviceId:DreamColorRGBW1&action=SetFileSelect&newFileSelect=1

Select Single- or Loop-File modus

http://ip_address:3480/data_request?id=action&output_format=json&DeviceNum=7&serviceId=urn:ggfiplupro-com:serviceId:DreamColorRGBW1&action=SetSingleFile&newSingleFile=1
http://ip_address:3480/data_request?id=action&output_format=json&DeviceNum=7&serviceId=urn:ggfiplupro-com:serviceId:DreamColorRGBW1&action=SetLoopFile&newLoopFile=1

Select RGB-Color

http://ip_address:3480/data_request?id=action&output_format=json&DeviceNum=7&serviceId=urn:micasaverde-com:serviceId:Color1&action=SetColorRGB&newColorRGBTarget=30,145,235

 - By LUA-script code

Switch power on/off
Code: [Select]
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {["newTargetValue"] = "0"}, 7)  <<7 is Device number>>
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {["newTargetValue"] = "1"}, 7)
Adjust brightness
Code: [Select]
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {["newLoadlevelTarget"] = "40"}, 7)Adjust speed
Code: [Select]
luup.call_action("urn:ggfiplupro-com:serviceId:DreamColorRGBW1", "SetSpeedTarget", {["newSpeedTarget"] = "10"}, 7)Select file
Code: [Select]
luup.call_action("urn:ggfiplupro-com:serviceId:DreamColorRGBW1", "SetFileSelect", {["newFileSelect"] = "3"}, 7)Select Single- or Loop-File modus
Code: [Select]
luup.call_action("urn:ggfiplupro-com:serviceId:DreamColorRGBW1", "SetSingleFile", {["newSingleFile"] = "1"}, 7)
luup.call_action("urn:ggfiplupro-com:serviceId:DreamColorRGBW1", "SetLoopFile", {["newLoopFile"] = "1"}, 7)
Select RGB-Color
Code: [Select]
luup.call_action("urn:micasaverde-com:serviceId:Color1", "SetColorRGB", {["newColorRGBTarget"] = "30,254,145"}, 7)

 - In ImperiHome app

This plugin is fully compatible with the Imperihome app, you can use the RGB-color wheel adjust the brightness and turn the device on/off.
Take in mind that the controller uses "Triple RGB-HEX" coding so colors are limited !!

The Controller can be bought at AliExpress or at the local LED-store :
https://www.aliexpress.com/item/led-WiFi-controller-1-port-control-max-2048-pixels-support-WS2811-WS2812-DMX512-etc-Controlled-by/32507572159.html?spm=2114.search0204.3.13.397b062nAXaz0&ws_ab_test=searchweb0_0,searchweb201602_3_10152_10151_10065_10344_10068_10342_10343_10313_10059_10340_10341_10534_100031_10084_10604_10083_10103_10304_10307_10615_10301_10142,searchweb201603_36,ppcSwitch_7_ppcChannel&algo_expid=6eab6bb4-5cdf-44b4-b54c-3881fc76d51a-2&algo_pvid=6eab6bb4-5cdf-44b4-b54c-3881fc76d51a&transAbTest=ae803_5&priceBeautifyAB=2

If you want to control a RGB-Strip (instead of a grid) you can use a WS2812/B LED-strip this can be bought at AliExpress or at your local LED-Store:
https://www.aliexpress.com/item/5M-30Pixel-M-150-5050-RGB-SMD-WS2811-IC-Built-in-WS2812B-WS2812-white-PCB-Addressable/32367479484.html?spm=2114.search0204.3.180.341ad19dNFh4yi&ws_ab_test=searchweb0_0,searchweb201602_3_10152_10151_10065_10344_10068_10342_10343_10313_10059_10340_10341_10534_100031_10084_10604_10083_10103_10304_10307_10615_10301_10142,searchweb201603_36,ppcSwitch_7_ppcChannel&algo_expid=9a7e0aa4-a73d-44c3-8d1a-c14fbd591e20-20&algo_pvid=9a7e0aa4-a73d-44c3-8d1a-c14fbd591e20&transAbTest=ae803_5&priceBeautifyAB=2

You need a 5v Power Supply for the strip and for the controller, for a WS2812B LED-strip every led consumes 0,06A, so for a 5 meter strip with 60 leds/meter you need 60x5x0,06 = 18 A !!! ;)
The Power Supply can be bought at AliExpress or at your local LED-Store:
https://nl.aliexpress.com/item/Redsky-freeshipping12-MEAN-WELL-original-LRS-100-5-5V-18A-meanwell-LRS-100-90W-Single-Output/32801775806.html?spm=a2g0z.search0104.3.8.39a32836TRY68Z&ws_ab_test=searchweb0_0,searchweb201602_5_10152_10151_10065_10344_10068_10342_10343_10313_10059_10340_10341_10534_100031_10084_10604_10083_10103_10304_10307_10615_10301_10142,searchweb201603_40,ppcSwitch_5&algo_expid=8f9b3f0d-3b43-4fa0-a639-f9b9dc66f6d2-1&algo_pvid=8f9b3f0d-3b43-4fa0-a639-f9b9dc66f6d2&priceBeautifyAB=5


You still need a power plug and electricity wires to connect the power supply to the controller and to a wallplug.

The plugin files are in the "DreamColor.zip" file, just select "Apps>Develop apps>Luup files" and upload all 4 files.
Next "Apps>Develop apps>Create Device", then type "D_DreamColorRGBW1.xml" at "Upnp Device Filename" and reload Luup.
The next thing is that the plugin asks for the controller Ip-adress, this has to be entered at "Advanced tab" in your new created Device under "Ip".
The default port from the controller is "4626" so you have to enter "<youripadress>:4626". Next reload Luup and you can start control
your strip/grid. If a red warning box is showed ("can't detect device") just reload Luup again and it will disapear.

It would be nice if we can share .dat effect files, so if you made a nice effect and you think it's worth it ............ !!
I hope many people will starting to use my plugin, and start to create their own .dat effect files, enjoy !!  :)
« Last Edit: January 20, 2018, 03:28:13 am by GreatGazoo »

Offline samyoue

  • Jr. Member
  • **
  • Posts: 59
  • Karma: +3/-3
Re: DreamColorRGB PlugIn
« Reply #1 on: January 19, 2018, 05:51:46 pm »
wow the plugin I never knew I needed! Just getting fed up with my buggy Raspberry Pi controlling my WS2812 LEDs i flushed into my floor couple years ago, didn't know there was a wifi controller available! have to order one and try out your plugin, thank you in advance!

Offline GreatGazoo

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: DreamColorRGB PlugIn
« Reply #2 on: January 20, 2018, 03:16:38 am »
Hello,

 samyoue , thanks for your reply.
I thought about using a raspberry (or a clone) in first instance, but I read the next article on the internet and it changed my mind:

" This is all to say that the interface is very time-specific. To run the LEDs you?ll need a real-time processor, like an Arduino; microprocessors like those on the Raspberry Pi or pcDuino can?t give you a reliably-timed pulse. Even if one bit is less than a microsecond off, that could mean the difference between purple and maroon. "

The next thing is that the software provided by the manufacturer, to create your own .dat effect files, saves a lot of programming time !!
Hope you will enjoy the plugin !!

Offline automizer

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: DreamColorRGB PlugIn
« Reply #3 on: January 24, 2018, 12:33:35 pm »
Hello

This looks great.
I have been looking for a way to create a permanent holiday light install on my house (I hate digging out the ladder and climbing up 30+ feet to hang the lights)

This looks like a perfect solution.
My one question is how well dose this work with multiple controllers? With your rough math of 5.5m per controller capacity I would be looking at a minimum of 10 controllers.
I would be looking at using the DMX512 protocol if that changes anything.


Offline GreatGazoo

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: DreamColorRGB PlugIn
« Reply #4 on: January 25, 2018, 09:36:38 pm »
Hello,

Quote
My one question is how well dose this work with multiple controllers? With your rough math of 5.5m per controller capacity I would be looking at a minimum of 10 controllers.
I would be looking at using the DMX512 protocol if that changes anything.

The controller H806SB has a maximum of 2048 LEDs who can be controlled, this means if we're speaking about a strip with 60 LEDs/m, 2048:60=34 meter!!
I think that will be enough for your whole house !!  :)
This is a standard feature and you have to program that yourself in the .dat effect files.

When I was talking about "Beside this the LED-controller can be used to control like a normal RGB LED-strip" it's something I implemented in the plugin, it's not standard.
If you want I can adjust an Implementaton file so that you can use the normal RGB colors on your strip, but I cannot test this so I don't know if this will work !!




Offline GreatGazoo

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: DreamColorRGB PlugIn
« Reply #5 on: February 01, 2018, 07:23:15 am »
DreamColor PlugIn Update

I made some changes on the coding and now it's possible to choose more RGB colors,
the downside is that, with some colors, the brightness adjustment isn't optimal.
So if you prefer brightness control above more colors you can stick to the original plugin.

The best result will be achieved by choosing brightness level 50%, and in the RGB color
picker you have to select the colors on the right side of the palette.

Hope you like it !!
« Last Edit: February 02, 2018, 10:04:58 am by GreatGazoo »

Offline GreatGazoo

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: DreamColorRGB PlugIn
« Reply #6 on: June 12, 2018, 08:27:29 pm »
DreamColor PlugIn Update

thanks to "thistle2015" I could fix a little bug in the DreamColorRGB plugin.
The fileselector selected 1 file above, it selected file no. 2 instead of no.1 etc.
The adjusted implementation file you can find within this post.

Hope you like it !!