Announcement

Collapse
No announcement yet.

Issues with MiLight RGB setup

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

    Issues with MiLight RGB setup

    I have setup rgb light according to your document (mcsMQTT.pdf) everything is working perfect in homeseer, but Alexa voice and app only allow for color change. When I try and turn off/on or adjust brightness via alexa app or voice I get :
    Jan-31 11:57:23 PM Error Problem serializing data for JSON request: Object reference not set to an instance of an object.
    Also in your picture you show your parent device with the last received payload and mine does not.

    Please let me know if you see anything in images or logs that I can check.
    First few items in logs were executed from HS the last few were executed from alexa app.


    Thanks,
    Steven G
    Attached Files

    #2
    Your images all look fine and I looked at the debug. I see in the debug where the ON and OFF button for device 2210 was used. I annotated the sequence. It all looks very normal.

    HS uses a plugin's SetIOMulti method to request that it do something. It also requests the plugin do something when event action is the plugin's responsibility. The error message that you are getting is outside of the plugin. The issue is with HS. If I could help I would, but have no insight into what HS is doing with Alexa.

    You are correct about the parent device. Originally payload was put there, but request was that it just cluttered so I removed it. With HS4 the device would not hold this info either. I guess I need an update in the manual. I do try to keep it current but do miss things.

    Code:
    HS requests plugin to send OFF command
    2/1/2020 12:20:41 AM    18576    | SetIOMulti 2210, oCAPI.ControlType=Button  
    mcsMQTT sends request
    2/1/2020 12:20:41 AM    18587    | CommandControllableDevice milight/0x87AD/rgb_cct/1={"state":"OFF"}  
    light returns off status for two end points
    2/1/2020 12:20:41 AM    18587    | ActoOnMessageForTrigger Topic milight/0x87AD/rgb_cct/1,Payload={"state":"OFF"}  
    2/1/2020 12:20:41 AM    18830    | ActoOnMessageForTrigger Topic UPmilight/0x87AD/rgb_cct/1,Payload={"state":"OFF"}  
    mcsMQTT updates HS based upon received OFF status
    2/1/2020 12:20:41 AM    18875    | Update Accepted 2210 to OFF StatusType=1 Payload= OFF RegExValue=OFF  
    2/1/2020 12:20:41 AM    18877    | Updating Device from 1 PayloadNumeric=False  
    2/1/2020 12:20:41 AM    18877    | Button Value 0, prior value = 1, for VSP of OFF 
    HS notifies that device 2210 has changed value to 0 from 1 
    2/1/2020 12:20:41 AM    18879    | HSEvent VALUE_CHANGE| 1024| state_milight/0x87AD/rgb_cct/1| 0| 1| 2210 
    
    Same process as before with light being turned ON from HS
    2/1/2020 12:20:43 AM    20622    | SetIOMulti 2210, oCAPI.ControlType=Button  
    2/1/2020 12:20:43 AM    20635    | CommandControllableDevice milight/0x87AD/rgb_cct/1={"state":"ON"}  
    2/1/2020 12:20:43 AM    20636    | ActoOnMessageForTrigger Topic milight/0x87AD/rgb_cct/1,Payload={"state":"ON"}  
    2/1/2020 12:20:43 AM    20879    | ActoOnMessageForTrigger Topic UPmilight/0x87AD/rgb_cct/1,Payload={"state":"ON"}  
    2/1/2020 12:20:43 AM    20924    | Update Accepted 2210 to ON StatusType=1 Payload= ON RegExValue=ON  
    2/1/2020 12:20:43 AM    20929    | Updating Device from 0 PayloadNumeric=False  
    2/1/2020 12:20:43 AM    20930    | Button Value 1, prior value = 0, for VSP of ON  
    2/1/2020 12:20:43 AM    20931    | HSEvent VALUE_CHANGE| 1024| state_milight/0x87AD/rgb_cct/1| 1| 0| 2210

    Comment


      #3
      Ok trying something new using the RGB option and getting the # encoded to %23 when I use the payload template
      {"color":"$$VALUE:"} = {"color":"%23ff0000"} when published

      I have Send unencoded checked under URI Encode Topic

      If I leave payload template blank i get #ff0000 (wont work cause it needs {"color":"#ff0000"}

      Anything I can do for this?

      Thank you for helping work on this, I know I can get it working just have to find the right combination

      Thanks,
      Steven Giles

      Comment


        #4
        I setup a test where I used the following for the publish topic template of a device type is a RGB type from Edit page

        Code:
        {"color":"$$LABEL:"}
        From General tab in Outbound management I set the URI Encode Topic with radio set to "Send unencoded"

        I used the color picker from the HS device and what was published in payload was

        Code:
        {"color":"#aa56ff"}
        I think this is what you want.

        Comment


          #5
          Did not work for me still get %23 when using color picker (below is Red FF0000)

          Click image for larger version

Name:	44.PNG
Views:	197
Size:	83.6 KB
ID:	1359569
          And produces this status color should be #FF0000

          Click image for larger version

Name:	55.PNG
Views:	217
Size:	92.7 KB
ID:	1359577

          Here is setup
          Click image for larger version

Name:	22.PNG
Views:	212
Size:	12.0 KB
ID:	1359570

          Click image for larger version

Name:	33.PNG
Views:	197
Size:	31.7 KB
ID:	1359565


          Click image for larger version

Name:	11.PNG
Views:	199
Size:	90.8 KB
ID:	1359566

          If I submit the correct payload looks like this
          Click image for larger version

Name:	55.PNG
Views:	198
Size:	92.7 KB
ID:	1359573
          And this is topic I am looking for
          Click image for larger version

Name:	66.PNG
Views:	210
Size:	112.5 KB
ID:	1359574


          Thanks,
          Steven Giles
          Attached Files

          Comment


            #6
            So I created a new one to make sure it was not the original and the new device log:

            2/5/2020 8:13:50 PM 83859 | SetIOMulti 2296, oCAPI.ControlType=Color_Picker
            2/5/2020 8:13:50 PM 83878 | ParentCount 0
            2/5/2020 8:13:50 PM 83880 | ParentRef -1
            2/5/2020 8:13:50 PM 83889 | CommandControllableDevice milight/0x87AD/rgb_cct/0={"color":"%23ff0000"}
            2/5/2020 8:13:50 PM 83890 | ActoOnMessageForTrigger Topic milight/0x87AD/rgb_cct/0,Payload={"color":"%23ff0000"}
            2/5/2020 8:13:50 PM 84134 | ActoOnMessageForTrigger Topic UPmilight/0x87AD/rgb_cct/0,Payload={"color_temp":370}
            2/5/2020 8:13:50 PM 84180 | ActoOnMessageForTrigger Topic state_milight/0x87AD/rgb_cct/0,Payload={}
            2/5/2020 8:14:49 PM 142471 | HSEvent VALUE_CHANGE| 1024| 41.5D.46:1| 0| 100| 822
            2/5/2020 8:15:15 PM 168515 | HSEvent VALUE_CHANGE| 1024| 41.5D.46:1| 100| 0| 822
            2/5/2020 8:15:49 PM 202540 | HSEvent VALUE_CHANGE| 1024| 41.65.37:1| 100| 0| 743
            2/5/2020 8:15:55 PM 208558 | HSEvent VALUE_CHANGE| 1024| 41.5D.46:1| 0| 100| 822
            2/5/2020 8:16:05 PM 218575 | HSEvent VALUE_CHANGE| 1024| 41.5D.46:1| 100| 0| 822
            2/5/2020 8:16:31 PM 244602 | HSEvent VALUE_CHANGE| 1024| 41.65.37:1| 0| 100| 743
            2/5/2020 8:16:47 PM 260623 | HSEvent VALUE_CHANGE| 1024| 41.65.37:1| 100| 0| 743
            2/5/2020 8:16:51 PM 264376 | Page Timing Start
            2/5/2020 8:16:51 PM 264434 | Sort > 0
            2/5/2020 8:16:51 PM 264588 | Page Timing End
            2/5/2020 8:16:58 PM 271851 | Sort > 0
            2/5/2020 8:17:27 PM 300662 | HSEvent VALUE_CHANGE| 1024| 41.65.37:1| 0| 100| 743
            2/5/2020 8:17:47 PM 320687 | HSEvent VALUE_CHANGE| 1024| 41.65.37:1| 100| 0| 743
            2/5/2020 8:17:58 PM 332223 | Sort > 0
            2/5/2020 8:18:25 PM 358532 | SetIOMulti 2296, oCAPI.ControlType=Color_Picker
            2/5/2020 8:18:25 PM 358534 | ParentCount 0
            2/5/2020 8:18:25 PM 358536 | ParentRef -1
            2/5/2020 8:18:25 PM 358536 | CommandControllableDevice milight/0x87AD/rgb_cct/0={"color":"%230000ff"}
            2/5/2020 8:18:25 PM 358537 | ActoOnMessageForTrigger Topic milight/0x87AD/rgb_cct/0,Payload={"color":"%230000ff"}
            2/5/2020 8:18:25 PM 358731 | HSEvent VALUE_CHANGE| 1024| 41.65.37:1| 0| 100| 743
            2/5/2020 8:18:25 PM 358783 | ActoOnMessageForTrigger Topic UPmilight/0x87AD/rgb_cct/0,Payload={"color_temp":370}
            2/5/2020 8:18:25 PM 358832 | ActoOnMessageForTrigger Topic state_milight/0x87AD/rgb_cct/0,Payload={}
            2/5/2020 8:18:51 PM 384758 | HSEvent VALUE_CHANGE| 1024| 41.5D.46:4| 100| 0| 825
            2/5/2020 8:18:51 PM 384765 | HSEvent VALUE_CHANGE| 1024| 41.5D.46:4| 0| 100| 825
            2/5/2020 8:18:53 PM 386765 | HSEvent VALUE_CHANGE| 1024| 41.5D.46:4| 100| 0| 825
            2/5/2020 8:18:53 PM 386772 | HSEvent VALUE_CHANGE| 1024| 41.5D.46:4| 0| 100| 825
            2/5/2020 8:18:59 PM 392778 | HSEvent VALUE_CHANGE| 1024| 24.EE.03:1| 100| 0| 152
            2/5/2020 8:18:59 PM 392789 | HSEvent VALUE_CHANGE| 1024| 24.EE.03:8| 0| 100| 157

            Thanks,
            Steven G

            Comment


              #7
              From General tab in Outbound management I set the URI Encode Topic with radio set to "Send unencoded"
              I did not see any General tab screen shots. Do you have this one set to not do the URI encoding?

              Comment


                #8
                Click image for larger version

Name:	77.PNG
Views:	193
Size:	6.2 KB
ID:	1359601

                From ini
                DontHTMLEncodeSpace="1"

                Thanks,
                Steven G

                Comment


                  #9
                  Next suggestion is to use current version as that is what I used for my evaluation. 5.1.1.3 was submitted to updater today. It is also available at http://mcsSprinklers.com/mcsMQTT_5_1_1_3.zip. Two files are needed HSPI_MCSMQTT.exe goes into the HS folder. mcsMQTT_2020.dll goes into the \bin\mcsMQTT folder.

                  I do not recall when the change was made to apply the URI encoding setting to payload. It was originally designed for the topic, but I do know there are some features requested that required playing in this sandbox.

                  Comment


                    #10
                    That did the trick
                    {"color":"#7fff00"}
                    {"state":"OFF","brightness":255,"saturation":100,"color": "#7fff00"}



                    Thanks,
                    Steven Giles

                    Comment


                      #11
                      So I have all the Old devices working properly with HS and Alexa now - Thank you for all your help
                      Click image for larger version  Name:	win.PNG Views:	0 Size:	65.4 KB ID:	1359964

                      I have the Milight WiFi Gateway Emulator on an ESP8266 running 7 zones (15 lights) controllable by Homeseer and Alexa (voice and app)
                      There is alot of people using the MiLight/LimitlessLED so if anyone has questions please let me know.

                      Now questions for Michael

                      I am trying to create new devices, but they are not updating HS
                      I have tried single device and Device/Parent (with Create both Parent full payload and Child JSON keys checked)

                      here is log entry when trying an ON/OFF action:
                      2/6/2020 3:58:46 PM 5372605 | SetIOMulti 2318, oCAPI.ControlType=Button
                      2/6/2020 3:58:46 PM 5372610 | ParentCount 1
                      2/6/2020 3:58:46 PM 5372622 | ParentRef 2317
                      2/6/2020 3:58:46 PM 5372624 | CommandControllableDevice milight/0x1E76/rgb_cct/3={"state":"OFF"}
                      2/6/2020 3:58:46 PM 5372645 | SetIOMulti 2318, oCAPI.ControlType=Button
                      2/6/2020 3:58:46 PM 5372653 | ParentCount 1
                      2/6/2020 3:58:46 PM 5372660 | ParentRef 2317
                      2/6/2020 3:58:46 PM 5372662 | CommandControllableDevice milight/0x1E76/rgb_cct/3={"state":"OFF"}
                      2/6/2020 3:58:47 PM 5372869 | ActoOnMessageForTrigger Topic UPmilight/0x1E76/rgb_cct/3,Payload={"state":"OFF"}
                      2/6/2020 3:58:47 PM 5372914 | ActoOnMessageForTrigger Topic state_milight/0x1E76/rgb_cct/3,Payload={"state":"OFF","brightness":120,"saturation":100," color":"#FF0000"}
                      2/6/2020 3:58:47 PM 5373110 | ActoOnMessageForTrigger Topic UPmilight/0x1E76/rgb_cct/3,Payload={"state":"OFF"}
                      2/6/2020 3:58:47 PM 5373372 | ActoOnMessageForTrigger Topic state_milight/0x1E76/rgb_cct/3,Payload={"state":"OFF","brightness":120,"saturation":100," color":"#FF0000"}

                      Looks to have correct information but it never performs an Update.

                      Is there a trick with the new update?

                      Thanks,
                      Steven Giles

                      Comment


                        #12
                        What I see from your log is a command to the milight of milight/0x1E76/rgb_cct/3={"state":"OFF"}

                        milight responds with state on Topic milight/0x1E76/rgb_cct/3 with a Payload of {"state":"OFF","brightness":120,"saturation":100," color":"#FF0000"}

                        What I expect your setup in mcsMQTT to be is accepting four items for "milight/0x1E76/rgb_cct/3: state, milight/0x1E76/rgb_cct/3:brightness, milight/0x1E76/rgb_cct/3:saturation and milight/0x1E76/rgb_cct/3:color. I would have selected the first to be a button, the next two to be sliders and the last to be color picker and all associated to HS devices.

                        Can you show your association tab for these end points?

                        The setting for storing info in parent device is being phased out since HS4 does not support this capability

                        Comment


                          #13
                          Well I rebuilt them and still no go

                          Click image for larger version  Name:	88.PNG Views:	0 Size:	59.8 KB ID:	1360022

                          Also when i removed them to rebuild they would not show back up in the Association Table I had to use Edit/Add to add the topics/devices, so not sure what happened there but I did check and tried a few other new fake commands and they showed up in the Association Table so it was just these.

                          The Association Table also does not get updated with payload (see image above)(the ON does not change for state as well)

                          Here is new devices. They do operate the lights correctly so its just not updating HS
                          Click image for larger version  Name:	100.PNG Views:	0 Size:	29.2 KB ID:	1360031

                          Log from a few commands:
                          2/6/2020 7:05:09 PM 2797868 | SetIOMulti 2321, oCAPI.ControlType=Color_Picker
                          2/6/2020 7:05:09 PM 2797873 | ParentCount 1
                          2/6/2020 7:05:09 PM 2797881 | ParentRef 2323
                          2/6/2020 7:05:09 PM 2797881 | CommandControllableDevice milight/0x1E76/rgb_cct/3={"color":"#ffffff"}
                          2/6/2020 7:05:10 PM 2798132 | ActoOnMessageForTrigger Topic UPmilight/0x1E76/rgb_cct/3,Payload={"color_temp":155}
                          2/6/2020 7:05:10 PM 2798181 | ActoOnMessageForTrigger Topic state_milight/0x1E76/rgb_cct/3,Payload={"state":"ON","brightness":255}
                          2/6/2020 7:05:14 PM 2802848 | SetIOMulti 2322, oCAPI.ControlType=Button
                          2/6/2020 7:05:14 PM 2802851 | ParentCount 1
                          2/6/2020 7:05:14 PM 2802859 | ParentRef 2323
                          2/6/2020 7:05:14 PM 2802863 | CommandControllableDevice milight/0x1E76/rgb_cct/3={"state":"OFF"}
                          2/6/2020 7:05:14 PM 2803114 | ActoOnMessageForTrigger Topic UPmilight/0x1E76/rgb_cct/3,Payload={"state":"OFF"}
                          2/6/2020 7:05:15 PM 2803159 | ActoOnMessageForTrigger Topic state_milight/0x1E76/rgb_cct/3,Payload={"state":"OFF","brightness":255}
                          2/6/2020 7:05:17 PM 2805215 | HSEvent VALUE_CHANGE| 1024| BLDenon_001_Z1Volume| 56| 54| 235
                          2/6/2020 7:05:19 PM 2807767 | SetIOMulti 2322, oCAPI.ControlType=Button
                          2/6/2020 7:05:19 PM 2807773 | ParentCount 1
                          2/6/2020 7:05:19 PM 2807778 | ParentRef 2323
                          2/6/2020 7:05:19 PM 2807780 | CommandControllableDevice milight/0x1E76/rgb_cct/3={"state":"ON"}
                          2/6/2020 7:05:19 PM 2808033 | ActoOnMessageForTrigger Topic UPmilight/0x1E76/rgb_cct/3,Payload={"state":"ON"}
                          2/6/2020 7:05:19 PM 2808077 | ActoOnMessageForTrigger Topic state_milight/0x1E76/rgb_cct/3,Payload={"state":"ON","brightness":255}
                          2/6/2020 7:05:21 PM 2809930 | HSEvent VALUE_CHANGE| 1024| 41.5D.46:4| 100| 0| 825
                          2/6/2020 7:05:21 PM 2809937 | HSEvent VALUE_CHANGE| 1024| 41.5D.46:4| 0| 100| 825
                          2/6/2020 7:05:21 PM 2809947 | HSEvent VALUE_CHANGE| 1024| 41.5D.46:11| 70.7| 67.8| 828
                          2/6/2020 7:05:23 PM 2811274 | SetIOMulti 2324, oCAPI.ControlType=ValuesRangeSlider
                          2/6/2020 7:05:23 PM 2811281 | ParentCount 1
                          2/6/2020 7:05:23 PM 2811286 | ParentRef 2323
                          2/6/2020 7:05:23 PM 2811288 | CommandControllableDevice milight/0x1E76/rgb_cct/3={"brightness":"255"}
                          2/6/2020 7:05:23 PM 2811544 | ActoOnMessageForTrigger Topic UPmilight/0x1E76/rgb_cct/3,Payload={"brightness":255}
                          2/6/2020 7:05:23 PM 2811590 | ActoOnMessageForTrigger Topic state_milight/0x1E76/rgb_cct/3,Payload={"state":"ON","brightness":255}
                          2/6/2020 7:05:23 PM 2811928 | HSEvent VALUE_CHANGE| 1024| 41.5D.46:4| 100| 0| 825
                          2/6/2020 7:05:23 PM 2811937 | HSEvent VALUE_CHANGE| 1024| 41.5D.46:4| 0| 100| 825
                          2/6/2020 7:05:25 PM 2813291 | CommandControllableDevice milight/0x1E76/rgb_cct/3={"brightness":"255"}
                          2/6/2020 7:05:25 PM 2813536 | ActoOnMessageForTrigger Topic UPmilight/0x1E76/rgb_cct/3,Payload={"brightness":255}
                          2/6/2020 7:05:25 PM 2813579 | ActoOnMessageForTrigger Topic state_milight/0x1E76/rgb_cct/3,Payload={"state":"ON","brightness":255}


                          Also I added a few devices via the "a" check box and then deleted them via the Delete Sub and Ref button this does not remove from the Association Table but once you uncheck the a box they are removed and I cannot get them back even if I publish the same topics. I have to create device manually using Edit/Add tab.

                          Also the items in the Association Table (unchecked a items / not devices) do not update payload if i send a matching topic and I think they use too.
                          Just trying to give as much information as I can

                          Thanks,
                          Steven G
                          Attached Files

                          Comment


                            #14
                            Let me work through what you have reported and I will get back a little later.

                            Comment


                              #15
                              Also Scripts and Events are not working for existing devices, they do work for non-device topics (events tested)
                              Can you explain this a little further? I am not understanding what you are reporting.

                              Also when i removed them to rebuild they would not show back up in the Association Table I had to use Edit/Add to add the topics/devices, so not sure what happened there but I did check and tried a few other new fake commands and they showed up in the Association Table so it was just these.
                              I am also confused on this. How did you remove them? If you used the "r"eject checkbox then mcsMQTT needs to observe the topic again before it will be visible on the Association tab. If you used the "a"ssociate checkbox then they should still be present, but the HS device no longer exists.

                              What may be happening is that the MQTT page you are making edits is not connected to HS. If the clock is not updating its time then it is no longer connected. This would also explain the lack of Payload updates. mcsMQTT disconnects the browser if there has not been any activity for approx 15 minutes.

                              Comment

                              Working...
                              X