Page 1 of 1

Unable to subscribe to a topic with a comma in its name

PostPosted: Tue Feb 06, 2024 5:15 pm
by webdeck
I have some topics that have names that contain commas. When I attempt to subscribe to one of those topics, I get an error and it erases the entire subscribed topic list. I suspect internally the plugin is using commas to separate topic names, and this breaks when the topic name contains a comma.

Re: Unable to subscribe to a topic with a comma in its name

PostPosted: Tue Feb 06, 2024 5:17 pm
by FlyingDiver
Example?

Re: Unable to subscribe to a topic with a comma in its name

PostPosted: Tue Feb 06, 2024 5:18 pm
by FlyingDiver
And which plugin are you actually using? Connector?

Re: Unable to subscribe to a topic with a comma in its name

PostPosted: Tue Feb 06, 2024 5:33 pm
by webdeck
MQTTConnector

Try to add subscription to topic "sensor/emvue/261535-1,2,3" gives this error:

Code: Select all
   Error (client)                  illegal string for list ID subscriptions (ignoring): 0:sensor/emvue/261535-1,2,3

Then erases all the subscribed topics from the list.

Re: Unable to subscribe to a topic with a comma in its name

PostPosted: Tue Feb 06, 2024 5:35 pm
by FlyingDiver
I'm not using commas as a delimiter, but something else is choking on it. I'll have to look into it.

Re: Unable to subscribe to a topic with a comma in its name

PostPosted: Tue Feb 06, 2024 5:36 pm
by webdeck
Thanks.

I am working around this by subscribing to "sensor/emvue/#" but that's a ton of messages the plugin is now processing for no reason. Background is I am publishing energy usage from Emporia devices every 15 seconds, and I have a lot of devices. Their smart plugs have that "-1,2,3" at the end of their device names.

Re: Unable to subscribe to a topic with a comma in its name

PostPosted: Tue Feb 06, 2024 5:51 pm
by FlyingDiver
Looks to me like this is some sort of bug or limitation in the indigo.Dict class. It's erroring before it even gets to my code.

Re: Unable to subscribe to a topic with a comma in its name

PostPosted: Wed Feb 07, 2024 12:27 pm
by FlyingDiver
Release 2023.2.1 in plugin store. See viewtopic.php?f=316&t=27797

Re: Unable to subscribe to a topic with a comma in its name

PostPosted: Wed Feb 07, 2024 2:15 pm
by webdeck
That fixed it for me. Thank you so much for the quick turnaround!