Announcement

Collapse
No announcement yet.

WLED/mcsMQTT - HSTouch integration

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

  • Michael McSharry
    replied
    "Unable to send WLED command to xxxxxx because no IP associated with this WLED device."

    It will only show up for Segment commands. Full strips use MQTT commands.

    Leave a comment:


  • 123qweasd
    replied
    that was it.. IP's were missing.
    Not sure when, but I probably deleted the fields while troubleshooting

    Thx for the additional HS logging;
    Would you mind confirming what the HS log message would look like?; I have a script scrubbing the log daily for keywords ("error", "warning", etc.) ; Will ensure the McsMQTT error messages are captured just in case.

    Will finalize testing this week as I need to deploy a few more strips.

    Absolutely love the flexibility WLED offers along with McsMQTT and addressable Leds.

    Thx again.
    Cheers.

    Yann

    Leave a comment:


  • Michael McSharry
    replied
    The errors in the log are due to not having the IP entered on the Local Page, WLED tab. Since segment are not supported by MQTT in WLED a REST communication is needed and this communication requires an IP. I suspect you had the IP's entered earlier but they became lost somehow. I tried to replicate them being lost but could not.

    I did make some updates to get a consistent HS device naming conventions for full and segments. I also put the check in for a missing IP and wrote to the HS log if it is missing. Most of the effort on the update was to properly create the sliders when reconstructing missing devices from the database. They are a special case where there is no MQTT topic for the sliders as they are only a conversion from the color topic.

    Let me know if the attached helps. Most important though is to have the IP entered on the Local page.
    Attached Files

    Leave a comment:


  • 123qweasd
    replied
    Thx,
    Debug log sent to your email address.

    WLED1 and WLED2 configured with 3 segments each;

    Leave a comment:


  • Michael McSharry
    replied
    I setup a test with Segment 0 with 0 to 9. Segment 1 with 0 to 5 and Segment 2 with 6 to 9 on WLED 0.12.0. I controlled Segment 1 from HS Devices. First the color picker. Then twice with the Hue control. In all cases I obtained the expected JSON and RGB/HSB conversions. The first line is command sent from HS. The next four lines are the response from WLED with which the HS color and HSB slider devices were updated. I did the evaluation using HS3 plugin on both HS3 and HS4 with the same result. I do not now have the JSON communication in the debug log. I was using VS Debugger to capture it. I added the JSON command and response t the debug in the attached it if you continue to have issue.

    Code:
    Segment 1 color to blue HSB = [COLOR=#0000ff]240,100,100[/COLOR]
    "{""on"":true,""bri"":250,""transition"":7,""ps"":3,""pl "":-1,""ccnf"":{""min"":1,""max"":5,""time"":12},""nl"":{""on"": false,""dur"":60,""fade"":true,""mode"":1,""tbri"":0,""rem"" :-1},""udpn"":{""send"":false,""recv"":true},""lor"":0,""mains eg"":0,""seg"":[
    {""id"":0,""start"":0,""stop"":9,""len"":9,""grp"":1,""spc"" :0,""on"":true,""bri"":255,""col"":[[28,255,8],[0,0,0],[0,0,0]],""fx"":0,""sx"":128,""ix"":128,""pal"":0,""sel"":true,""rev "":false,""mi"":false},
    {""id"":1,""start"":0,""stop"":5,""len"":5,""grp"":1,""spc"" :0,""on"":true,""bri"":127,""col"":[[[COLOR=#0000ff]0,0,255[/COLOR]],[0,0,0],[0,0,0]],""fx"":0,""sx"":128,""ix"":128,""pal"":0,""sel"":true,""rev "":false,""mi"":false},
    {""id"":2,""start"":5,""stop"":9,""len"":4,""grp"":1,""spc"" :0,""on"":true,""bri"":255,""col"":[[28,255,8],[0,0,0],[0,0,0]],""fx"":0,""sx"":128,""ix"":128,""pal"":0,""sel"":true,""rev "":false,""mi"":false}]}"
    
    Segment 1 hue to 360 (red) RGB = [COLOR=#c0392b]255,0,0 HSB = 0,100,100[/COLOR]
    "{""on"":true,""bri"":250,""transition"":7,""ps"":3,""pl "":-1,""ccnf"":{""min"":1,""max"":5,""time"":12},""nl"":{""on"": false,""dur"":60,""fade"":true,""mode"":1,""tbri"":0,""rem"" :-1},""udpn"":{""send"":false,""recv"":true},""lor"":0,""mains eg"":0,""seg"":[
    {""id"":0,""start"":0,""stop"":9,""len"":9,""grp"":1,""spc"" :0,""on"":true,""bri"":255,""col"":[[28,255,8],[0,0,0],[0,0,0]],""fx"":0,""sx"":128,""ix"":128,""pal"":0,""sel"":true,""rev "":false,""mi"":false},
    {""id"":1,""start"":0,""stop"":5,""len"":5,""grp"":1,""spc"" :0,""on"":true,""bri"":127,""col"":[[[COLOR=#c0392b]255,0,0[/COLOR]],[0,0,0],[0,0,0]],""fx"":0,""sx"":128,""ix"":128,""pal"":0,""sel"":true,""rev "":false,""mi"":false},
    {""id"":2,""start"":5,""stop"":9,""len"":4,""grp"":1,""spc"" :0,""on"":true,""bri"":255,""col"":[[28,255,8],[0,0,0],[0,0,0]],""fx"":0,""sx"":128,""ix"":128,""pal"":0,""sel"":true,""rev "":false,""mi"":false}]}"
    
    Segment 1 hue to 188 (cyan) [COLOR=#3498db]RGB = 0, 221, 255 HSB = 188, 100, 100[/COLOR]
    "{""on"":true,""bri"":250,""transition"":7,""ps"":3,""pl "":-1,""ccnf"":{""min"":1,""max"":5,""time"":12},""nl"":{""on"": false,""dur"":60,""fade"":true,""mode"":1,""tbri"":0,""rem"" :-1},""udpn"":{""send"":false,""recv"":true},""lor"":0,""mains eg"":0,""seg"":[
    {""id"":0,""start"":0,""stop"":9,""len"":9,""grp"":1,""spc"" :0,""on"":true,""bri"":255,""col"":[[28,255,8],[0,0,0],[0,0,0]],""fx"":0,""sx"":128,""ix"":128,""pal"":0,""sel"":true,""rev "":false,""mi"":false},
    {""id"":1,""start"":0,""stop"":5,""len"":5,""grp"":1,""spc"" :0,""on"":true,""bri"":127,""col"":[[[COLOR=#3498db]0,221,255[/COLOR]],[0,0,0],[0,0,0]],""fx"":0,""sx"":128,""ix"":128,""pal"":0,""sel"":true,""rev "":false,""mi"":false},
    {""id"":2,""start"":5,""stop"":9,""len"":4,""grp"":1,""spc"" :0,""on"":true,""bri"":255,""col"":[[28,255,8],[0,0,0],[0,0,0]],""fx"":0,""sx"":128,""ix"":128,""pal"":0,""sel"":true,""rev "":false,""mi"":false}]}"
    Click image for larger version  Name:	Capture2.PNG Views:	0 Size:	36.2 KB ID:	1509321

    Click image for larger version  Name:	Capture1.PNG Views:	0 Size:	37.1 KB ID:	1509322

    Click image for larger version  Name:	Capture.PNG Views:	0 Size:	13.2 KB ID:	1509323

    Leave a comment:


  • 123qweasd
    replied
    Hi Michael, thanks for the new version;
    just installed and all devices/sliders get created now;
    however, only the main controls work. All sub-segments are not functionnal.
    you can move the sliders and change colors but values stay at 0, nothing gets updated.
    Would you mind having a quick look to see if you can replicate?
    Thank you,

    Leave a comment:


  • Michael McSharry
    replied
    This turned out to be a hard one. Single step with the debugger works fine, but letting is free run then is usually, but not always, fails to generate the slider controls. Turns out it was related to the HS PluginExtraData object. Sometimes it would return a null object. Sometimes it would return an object with a null contents. In HS4 there is a conversion step needed by the plugin to convert HS3 PluginExtraData to HS4 PluginExtraData so mcsMQTT always returned a consistent null object when this object had no data. Apparently HST had covered the cross-version correctly, but the original HS3 native implementation seems to be flawed or I do not understand the limits of HS3.

    It is fixed in 5.21.7.0

    HS3: http://mcssprinklers.com/mcsMQTT_5_21_7_0.zip
    HS4: http://mcssprinklers.com/HSPI_mcsMQTT_5_21_7_0.zip

    This version also contains the ability to clear the retain messages is the MQTT Broker. It operates just like the Obsolete text box on the General Tab. It will remove the retain status for any message that fits the wildcard template entered and the topic has been previously recognized by mcsMQTT. The clients that have the annoying retain set in my environment are the homeassistant/../config messages that support HomeAssistant discovery, WLED, and espresence/ . For those that use the internal broker this is not an issue as the internal broker does not persist retained messages through a restart. HomeAssistants internal MQTT broker also does not persist messages on a HA restart.

    Leave a comment:


  • 123qweasd
    replied
    Thanks for double checking Michael.
    glad you could reproduce and hopefully not too complicated to fix.
    Cheers.

    Leave a comment:


  • Michael McSharry
    replied
    Confirmed that running HS3 plugin under HS3 gives a different result than running HS3 pluign under HS4 and the slider controls are not present.

    Leave a comment:


  • Michael McSharry
    replied
    Motion. Am not at a computer now, but a shot in the dark is if the MISC property for status only is set. It seems the controls are being removed after creation. I will load the plugin on a HS3 install to see if the behavior is any different.

    Leave a comment:


  • 123qweasd
    replied
    Did you delete mcsMQTT_2020.dll from HS root folder?
    It was not in the root folder to begin with.
    what is your method to delete the Mosquitto database ? I still get the old topics after a restart.

    Originally posted by Michael McSharry View Post

    On the Association tab for the /c:RRGGBB sub topic is there a text box pub topic? If it is not blank then a control should be generated for all four HS devices. Since the color picker is shown I believe the pub topic is not blank.
    yes, textbox is there (wled/WLEDCONTROL1/col)
    Edit tab shows "HSB" as UI
    controls are created for all four HS devices

    Look at /deviceutility for Hue device. It should have Control Status of both, range 0 to 360, control type of slider. Control use Dim.
    Under "Status graphics" tab (Am using HS3), only "status graphics" is populated with the icons. "status text" is empty (see my screenshot in post #32.







    Leave a comment:


  • Michael McSharry
    replied
    I confirmed that the H,S,B and Color devices update based upon received /c topic and commands from any of the four controls results in the proper /col command.

    On the Asdociation tab for the /c:RRGGBB sub topic is there a text box pub topic? If it is not blank then a control should be generated for all four HS devices. Since the color picker is shown I believe the pub topic is not blank.

    Look at /deviceutility for Hue device. It should have Control Status of both, range 0 to 360, control type of slider. Control use Dim.

    Leave a comment:


  • Michael McSharry
    replied
    I see that the HSB sliders are created, but they are the top and not after the color device. I will look again at these devices being updated as the color device is updated.

    Leave a comment:


  • Michael McSharry
    replied
    Did you delete mcsMQTT_2020.dll from HS root folder?

    WLED sends its messages with retain bit set do broker resend to subscribed clients each time the client connects to broker.

    You need to delete them from broker database. I delete the mosquito database to do it. There are other techniques.

    Leave a comment:


  • 123qweasd
    replied
    stopped HS

    Copied 5.21.5.0 files

    HSPI_MCSMQTT.exe
    HSPI_MCSMQTT.pdb

    in root folder and

    MCSMQTT_2020.dll
    MCSMQTT_2020.pdb

    in bin folder

    restarted HS
    unassociated all wled topics, obsoleted wled topic, stopped new topic discovery
    stopped HS

    opened database to ensure no traces left of wled (ok)

    restarted HS
    enabled new topic discovery
    restarted wled

    Sliders still doesn't work and it automatically re-creates the 2 test topics I've use prior (WLED1, WLED01) + the current one WLED1A ???
    don't know where it takes the data to re-create deleted topics but it's probably related to the device issues I guess.

    Let me know what you think.

    Thx,



    Click image for larger version  Name:	eee.PNG Views:	0 Size:	457.4 KB ID:	1508014








    Leave a comment:

Working...
X