Announcement

Collapse
No announcement yet.

"Color picker" support

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

    "Color picker" support

    I have an RGB LED strip that runs firmware with MQTT support. Homeseer supports a "color picker" control but it is apparently only available if the device is created via a plugin - can't be set manually, even though it is an option.

    Could it be as simple as adding a checkbox to the interface to make the created homeseer device have this option? If so, that would be great!!

    Thanks - love how easy this plugin is to use. Very intuitive!

    #2
    I can do a color picker to expand the control options beyond button button, box and list that are already available. It looks to me as if hex RRGGBB nomenclature is used, but not certain. What are you expecting the published payload to look like?

    Comment


      #3
      Added on Manual Tab as one of the five Control UI options. Payload is delivered in Hex RGB (e.g. 33A0FF). In 3.2.18.0.

      Comment


        #4
        Wow - a response and a release before I could turn around!

        That definitely gets me the color picker control - thanks! The RGB firmware I'm using, espurna, wants a leading # for the color payload (like #ffff56).

        Can I add that with the regex replacement stuff? I haven't totally wrapped my brain around that part yet.

        Comment


          #5
          No, regex is for subscribe. I do not have regex provisions for publish. I will put the # in front for you. If others have a need for it without then we will deal with it at that time. It is in Updater.

          Comment


            #6
            Coming back to this after finally getting the LEDs installed.

            Sending the color seems to work, but every time the status in Homeseer is updated to #FFFFFF

            I can't seem to make it reflect the same color it just selected once the color makes it to the device via mqtt and back.

            I'm using ESPURNA for the LED Controller firmware - here's the log from it. Any ideas?

            Code:
            [958705] [LIGHT] RGB: #ffaaaa
            [958707] [MQTT] Sending ESPURNA_BASEMENT/rgb => #FFAAAA (PID 1)
            [958708] [MQTT] Sending ESPURNA_BASEMENT/hsv => 0,33,100 (PID 1)
            [958710] [MQTT] Sending ESPURNA_BASEMENT/brightness => 255 (PID 1)
            [958716] [MQTT] Sending ESPURNA_BASEMENT/mired => 153 (PID 1)
            [958722] [MQTT] Sending ESPURNA_BASEMENT/channel/0 => 255 (PID 1)
            [958727] [MQTT] Sending ESPURNA_BASEMENT/channel/1 => 170 (PID 1)
            [958733] [MQTT] Sending ESPURNA_BASEMENT/channel/2 => 170 (PID 1)
            [958739] [MQTT] Sending ESPURNA_BASEMENT/channel/3 => 212 (PID 1)
            [958744] [MQTT] Sending ESPURNA_BASEMENT/channel/4 => 0 (PID 1)
            [010631] [MQTT] Received ESPURNA_BASEMENT/rgb/set => #ffd4aa
            [010634] [LIGHT] RGB: #ffd4aa
            [010636] [MQTT] Sending ESPURNA_BASEMENT/rgb => #FFD4AA (PID 1)
            [010638] [MQTT] Sending ESPURNA_BASEMENT/hsv => 30,33,100 (PID 1)
            [010640] [MQTT] Sending ESPURNA_BASEMENT/brightness => 255 (PID 1)
            [010646] [MQTT] Sending ESPURNA_BASEMENT/mired => 153 (PID 1)
            [010651] [MQTT] Sending ESPURNA_BASEMENT/channel/0 => 255 (PID 1)
            [010657] [MQTT] Sending ESPURNA_BASEMENT/channel/1 => 212 (PID 1)
            [010663] [MQTT] Sending ESPURNA_BASEMENT/channel/2 => 170 (PID 1)
            [010669] [MQTT] Sending ESPURNA_BASEMENT/channel/3 => 212 (PID 1)
            [010674] [MQTT] Sending ESPURNA_BASEMENT/channel/4 => 0 (PID 1)
            Code:
            Message History
             	
            P/S
             
            LastDate
             
            Topic
             
            Payload
            0	P	2018-06-25 17:37:03	ESPURNA_BASEMENT/rgb/set	#00ff00
            1	S	2018-06-25 17:37:03	ESPURNA_BASEMENT/rgb/set	#00ff00
            2	S	2018-06-25 17:37:03	ESPURNA_BASEMENT/rgb	#00FF00
            3	S	2018-06-25 17:37:03	ESPURNA_BASEMENT/hsv	120,100,100
            4	S	2018-06-25 17:37:03	ESPURNA_BASEMENT/brightness	255
            5	S	2018-06-25 17:37:03	ESPURNA_BASEMENT/mired	153
            6	S	2018-06-25 17:37:03	ESPURNA_BASEMENT/channel/0	0
            7	S	2018-06-25 17:37:03	ESPURNA_BASEMENT/channel/1	255
            8	S	2018-06-25 17:37:03	ESPURNA_BASEMENT/channel/2	0
            9	S	2018-06-25 17:37:03	ESPURNA_BASEMENT/channel/3	212
            10	S	2018-06-25 17:37:03	ESPURNA_BASEMENT/channel/4	0
            11	S	2018-06-25 17:37:08	ESPURNA_TEMP1/temperature	77.9
            12	S	2018-06-25 17:37:08	ESPURNA_TEMP1/humidity	51
            Last edited by mattster98; June 25, 2018, 04:41 PM. Reason: Added history from the plugin..

            Comment


              #7
              Nevermind - all of my RGB color pickers work the same way, for normal Z-Wave devices..

              Comment


                #8
                Was your prior question about the following not showing FFD4AA in HS?

                [010636] [MQTT] Sending ESPURNA_BASEMENT/rgb => #FFD4AA (PID 1)

                Are you assoicatied with HS device ESPURNA_BASEMENT/rgb in mcsMQTT that also has publish topic set to ESPURNA_BASEMENT/rgb/set?

                It may be that HS does not fully handle the color picker or it could be that the Zwave has the same issue. Let me know if you want to pursue it?

                I do know that if I publish a value of 1234 to a device of type Color Picker the Value of the color picker changes to 1234. If you are expecting to publish RGB then it needs to be converted to integer before storing the HS Device Value.

                Comment


                  #9
                  Yes - the issue is I'm using the color picker control to set a specific color (ex. #FFAABB) and while that color gets sent, the Homeseer device (the color picker) resets to #FFFFFF no matter what. I have the association set up as you describe.

                  No worries - I thought this plugin was not doing the same thing that other color picker controls did, but it's the same - they all seem to not get set from the response - it's a push-only.

                  My guess is this is a Homeseer bug/limitation rather than the plugin.
                  Other RGB Z-wave devices seem to send back an integer as you described, but it still doesn't correctly set the Color Picker control.

                  Happy to help troubleshoot if you're interested in pursuing. My setup is working well enough for now.

                  Comment


                    #10
                    I will be posting an update tonight or tomorrow where the subscribed topic RGB will be converted to integer and that stored in HS. That should show in the color picker as this is what happens when I do it manually.

                    I am assuming 7 characters with the last 6 used or 6 characters. Each is a hex digit. If neither of these then it assume it is a decimal value already and will use the numeric portion of it.

                    Comment


                      #11
                      You can give the color picker a try to see if the returned status is reflected in the HS device. It is 3.4.5.0 in updater.

                      Comment


                        #12
                        Thanks for the update! Closer, but not quite there yet.

                        I see the color report in the plugin screen (honestly don't recall if that was there before or not). It's displaying as the payload, like #FFBEEF.

                        It was generally reporting -1 still on the device, but I found that solid colors FF0000, 00FF00, 0000FF seem to return 23, 201, and 22 respectively.

                        Also found FFFFFF returns 24.

                        Everything else (that I've tried) returns -1.

                        Hopefully just a bug in the hex-to-integer conversion. It's expecting a number between 0 and 16777215 based on my Windows Calculator.

                        That would make FF0000 closer to the high end: 16711680 and 0000FF down at 255

                        Even still, when it's not -1, I expected the color picker to show the color the device is now set to (the one I just picked) instead of always reverting back to #FFFFFF. I guess that part is a Homeseer bug.

                        Comment


                          #13
                          The example I found via Google had the RGB to integer decoding with B having the most weight. I found that this is not what HS does and it also seemed odd to me. I reversed it in 3.4.5.2 and also added debug where the value is stored in HS Device. Debug on General tab needs to be enabled to see it and the file is in \Data\mcsMQTT\mcsMQTTDebug.txt.

                          When I was single testing in both directions it worked as I expected. Using your example of #FFBFEF resulted in the attached for my test device 750. The pink color and the status value of 16760559 look to me to be correct.

                          You may have some thing else going on to get 22, 23, 24 and FFFFFF as even with the B having highest weight these values would not be showing. Could it be something else is updated the device you are using? If you continue to have incorrect operation then post the debug.
                          Attached Files

                          Comment


                            #14
                            Thanks - I updated and saw no change immediately, so I unchecked and re-checked the associate box for the RGB topic and when I went back to Home, it showed the most recent color in the left-hand box. The color picker was still #FFFFFF.

                            Setting a color showed no difference from before - seemed to set it, but the color picker went back to #FFFFFF.

                            I can't imagine it matters, but I am on Linux.. figured that's worth sharing.

                            Debug log below. ESPURNA_BASEMENT/rgb is the one in question.

                            Code:
                            6/27/2018 7:29:23 PM    507807364       | Update Accepted 751 to 76.8 StatusType=2
                            6/27/2018 7:29:23 PM    507807375       | Updating Device from 76.9 PayloadNumeric=True
                            6/27/2018 7:29:23 PM    507807386       | ActoOnMessageFor Trigger Topic ESPURNA_TEMP1/temperature,Payload=76.8
                            6/27/2018 7:29:23 PM    507807387       | HSEvent Do= False VALUE_CHANGE for Device 751
                            6/27/2018 7:29:23 PM    507807403       | Update Accepted 752 to 49 StatusType=2
                            6/27/2018 7:29:23 PM    507807416       | Updating Device from 49 PayloadNumeric=True
                            6/27/2018 7:29:23 PM    507807426       | ActoOnMessageFor Trigger Topic ESPURNA_TEMP1/humidity,Payload=49
                            6/27/2018 7:29:26 PM    507810369       | HSEvent Do= False VALUE_CHANGE for Device 8
                            6/27/2018 7:29:26 PM    507810397       | HSEvent Do= False VALUE_CHANGE for Device 11
                            6/27/2018 7:29:26 PM    507810432       | HSEvent Do= False VALUE_CHANGE for Device 12
                            6/27/2018 7:29:26 PM    507810518       | HSEvent Do= False VALUE_CHANGE for Device 34
                            6/27/2018 7:29:27 PM    507810560       | HSEvent Do= False VALUE_CHANGE for Device 40
                            6/27/2018 7:29:35 PM    507819463       | SetIOMulti 756, oCAPI.ControlType=Color_Picker
                            6/27/2018 7:29:35 PM    507819515       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/rgb/set,Payload=#aa56ff
                            6/27/2018 7:29:36 PM    507819574       | Update Accepted 756 to #AA56FF StatusType=5
                            6/27/2018 7:29:36 PM    507819585       | Updating Device from -1 PayloadNumeric=False
                            6/27/2018 7:29:36 PM    507819598       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/rgb,Payload=#AA56FF
                            6/27/2018 7:29:36 PM    507819666       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/hsv,Payload=270,66,100
                            6/27/2018 7:29:36 PM    507819734       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/brightness,Payload=255
                            6/27/2018 7:29:36 PM    507819801       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/mired,Payload=153
                            6/27/2018 7:29:36 PM    507819808       | Update Accepted 749 to 170 StatusType=2
                            6/27/2018 7:29:36 PM    507819822       | Updating Device from 170 PayloadNumeric=True
                            6/27/2018 7:29:36 PM    507819835       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/channel/0,Payload=170
                            6/27/2018 7:29:36 PM    507819838       | Update Accepted 575 to 86 StatusType=2
                            6/27/2018 7:29:36 PM    507819849       | Updating Device from 255 PayloadNumeric=True
                            6/27/2018 7:29:36 PM    507819859       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/channel/1,Payload=86
                            6/27/2018 7:29:36 PM    507819860       | HSEvent Do= False VALUE_CHANGE for Device 575
                            6/27/2018 7:29:36 PM    507819862       | Update Accepted 576 to 255 StatusType=2
                            6/27/2018 7:29:36 PM    507819880       | Updating Device from 86 PayloadNumeric=True
                            6/27/2018 7:29:36 PM    507819892       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/channel/2,Payload=255
                            6/27/2018 7:29:36 PM    507819892       | HSEvent Do= False VALUE_CHANGE for Device 576
                            6/27/2018 7:29:36 PM    507819904       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/channel/3,Payload=212
                            6/27/2018 7:29:36 PM    507819911       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/channel/4,Payload=0
                            6/27/2018 7:29:43 PM    507827087       | SetIOMulti 756, oCAPI.ControlType=Color_Picker
                            6/27/2018 7:29:43 PM    507827136       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/rgb/set,Payload=#aad4ff
                            6/27/2018 7:29:43 PM    507827146       | Update Accepted 756 to #AAD4FF StatusType=5
                            6/27/2018 7:29:43 PM    507827159       | Updating Device from -1 PayloadNumeric=False
                            6/27/2018 7:29:43 PM    507827170       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/rgb,Payload=#AAD4FF
                            6/27/2018 7:29:43 PM    507827227       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/hsv,Payload=210,33,100
                            6/27/2018 7:29:43 PM    507827285       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/brightness,Payload=255
                            6/27/2018 7:29:43 PM    507827342       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/mired,Payload=153
                            6/27/2018 7:29:43 PM    507827346       | Update Accepted 749 to 170 StatusType=2
                            6/27/2018 7:29:43 PM    507827362       | Updating Device from 170 PayloadNumeric=True
                            6/27/2018 7:29:43 PM    507827373       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/channel/0,Payload=170
                            6/27/2018 7:29:43 PM    507827377       | Update Accepted 575 to 212 StatusType=2
                            6/27/2018 7:29:43 PM    507827389       | Updating Device from 86 PayloadNumeric=True
                            6/27/2018 7:29:43 PM    507827399       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/channel/1,Payload=212
                            6/27/2018 7:29:43 PM    507827400       | HSEvent Do= False VALUE_CHANGE for Device 575
                            6/27/2018 7:29:43 PM    507827402       | Update Accepted 576 to 255 StatusType=2
                            6/27/2018 7:29:43 PM    507827423       | Updating Device from 255 PayloadNumeric=True
                            6/27/2018 7:29:43 PM    507827432       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/channel/2,Payload=255
                            6/27/2018 7:29:43 PM    507827440       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/channel/3,Payload=212
                            6/27/2018 7:29:43 PM    507827448       | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/channel/4,Payload=0
                            6/27/2018 7:29:58 PM    507841836       | HSEvent Do= False VALUE_CHANGE for Device 43
                            6/27/2018 7:29:58 PM    507841930       | HSEvent Do= False VALUE_CHANGE for Device 8
                            6/27/2018 7:29:58 PM    507841948       | HSEvent Do= False VALUE_CHANGE for Device 9
                            6/27/2018 7:29:58 PM    507841965       | HSEvent Do= False VALUE_CHANGE for Device 10
                            6/27/2018 7:30:10 PM    507853646       | Page Timing Start
                            6/27/2018 7:30:10 PM    507853797       | Page Timing End
                            6/27/2018 7:30:23 PM    507867437       | Update Accepted 751 to 76.8 StatusType=2
                            6/27/2018 7:30:23 PM    507867448       | Updating Device from 76.8 PayloadNumeric=True
                            6/27/2018 7:30:23 PM    507867458       | ActoOnMessageFor Trigger Topic ESPURNA_TEMP1/temperature,Payload=76.8
                            6/27/2018 7:30:23 PM    507867476       | Update Accepted 752 to 49 StatusType=2
                            6/27/2018 7:30:23 PM    507867488       | Updating Device from 49 PayloadNumeric=True
                            6/27/2018 7:30:23 PM    507867498       | ActoOnMessageFor Trigger Topic ESPURNA_TEMP1/humidity,Payload=49
                            6/27/2018 7:30:29 PM    507873411       | HSEvent Do= False VALUE_CHANGE for Device 8
                            6/27/2018 7:30:29 PM    507873430       | HSEvent Do= False VALUE_CHANGE for Device 11
                            6/27/2018 7:30:29 PM    507873454       | HSEvent Do= False VALUE_CHANGE for Device 12
                            6/27/2018 7:30:29 PM    507873530       | HSEvent Do= False VALUE_CHANGE for Device 34
                            6/27/2018 7:30:30 PM    507873564       | HSEvent Do= False VALUE_CHANGE for Device 40

                            Comment


                              #15
                              Are you certain it is 3.4.5.2 and not an earlier one running? The debug that was added in this version is not showing up in your debug. I added some additional trace code in 3.4.5.3 that I am putting in the updater now. Also look at HS log to make certain no errors are being reported.


                              6/27/2018 7:29:35 PM 507819463 | SetIOMulti 756, oCAPI.ControlType=Color_Picker
                              6/27/2018 7:29:35 PM 507819515 | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/rgb/set,Payload=#aa56ff
                              6/27/2018 7:29:36 PM 507819574 | Update Accepted 756 to #AA56FF StatusType=5
                              6/27/2018 7:29:36 PM 507819585 | Updating Device from -1 PayloadNumeric=False

                              ******** Expecting here something like "RGB #aa56ff saved as 123456789" *********

                              6/27/2018 7:29:36 PM 507819598 | ActoOnMessageFor Trigger Topic ESPURNA_BASEMENT/rgb,Payload=#AA56FF


                              I do see that HS device value is -1 and unchanging.

                              Linux vs. Windows should not matter, but Mono is always lagging .NET and each has its own set of quirks.

                              Comment

                              Working...
                              X