Announcement

Collapse
No announcement yet.

Send HSV data to devices

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Send HSV data to devices

    I am trying to change the color of a light bulb using an external system (S7-1200 PLC)
    In the user interface I have made an RGB selector, this will be converted to HSV

    Click image for larger version

Name:	slider.png
Views:	68
Size:	40.5 KB
ID:	1382096

    I have a light Bulb in homeseer with the following device numbers :


    Click image for larger version

Name:	lightbulb.png
Views:	73
Size:	108.2 KB
ID:	1382095

    I want to send the RGB / HSV value from my external device by using the ASCII interface to Homeseer.

    Switching the bulb on/off I am using :

    cv,677,255 (on)
    cv,677,0 (off)

    this works.

    But how should I send the calculated color information to the devices?

    H = 213
    S = 81
    V = 80

    To what device I send what info?

    Any help will be welcome
    Attached Files

    #2
    Hi,

    Sorry for my late reply. I had to focus on sickness in the family and had no time or energy to be on the forum lately. Trying to catch up on the next few days :-)
    You would need to recalulate the values to the Philips standard of values for hue (0-65535) saturation (0-254) and brightness (0-255).

    Or you can send the RGB directly by scripting (check the documentation for this)

    SetLightsRGB

    Sets lights based on CIE color mode (“xy”)
    Returns a Boolean. True = successful, False = unsuccessful
    Parameters: 5
    Group : True/False – if True groups will be addressed by this command, otherwise lights
    Name : name of the group or light to be controlled
    Bright : Value of brightness to be set. Value can be between 0 and 255. To use the values from RGB calculation use ‘Nothing’. Setting Bright to 0 will result in an “off” for the light.
    RGB : Value of RGB to be set. Value is limited to RGB values “0,0,0” to “255,255,255”. To keep the current value use ‘Nothing’
    Transition : Value for transition time of the new setting. Value is in 1/10 of seconds. To have no transition use ‘Nothing’


    Syntax:

    Code:
     
     Dim test As Boolean = hs.PluginFunction("JowiHue", "", "SetLightsRGB", {True, "All Lights", Nothing, “255,255,0”, 20})

    -- Wim

    Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

    1210 devices/features ---- 392 events ----- 40 scripts

    Comment

    Working...
    X