No announcement yet.

Line 0 Length cannot be less than zero

  • Filter
  • Time
  • Show
Clear All
new posts

  • Line 0 Length cannot be less than zero

    My absolutely first venture into MQTT. I built something called a QuinLed, it's a sort of controller for LED strips. The guy who designs this uses Home Assistant and as such the guides that exist only works for HA. But I figured, how hard could it be.. well turns out it's not so easy haha.

    In any case, I installed my MQTT broker and mcsMQTT, but struggle with how to send new statuses.. I ended up installing Home Assistant to actually see the device worked as expected and it does.

    I'm suspecting some of my problems relate to an error I get when starting the plugin. I get 4x this error (for Output1, output2,3&4)

    ParseJSON homeassistant/light/q1_quinled_quad/q1_led_light_ouput4/config:device:sw_version=
    {"identifiers":"840d8e383244","name":"q1_quinled_quad","sw_version":"esphomelib v1.10.1 Mar 26 2019, 21:32:59",
    "model":"MH ET LIVE ESP32DevKIT","manufacturer":"espressif" Line 0 Length cannot be less
    than zero. Parameter name: length
    This is what I see on the association tab:
    Click image for larger version  Name:	Capture.PNG Views:	1 Size:	425.8 KB ID:	1295539

    Any suggestions?

  • #2
    It looks to me as if the mcsMQTT parser included the colons in the time as syntax rather than data. I need to confirm. I doubt if this is an issue for you however.

    What is the actual behavior that you are getting or not getting?

    I doubt if you want to associate the parent topic into HS device. More likely some of the JSON payload such as state and brightness.

    It also seems odd that a config payload would contain information such as state and brightness. Topic for this are more like status rather than config. This is just a function of whatever the device is publishing.


    • #3
      I fixed the JSON parsing issue in It is at I will be submitting soon to the updater.