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

webdeck
Posts: 436
Joined: Sat May 07, 2005 11:27 pm

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

Post 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.
User avatar
FlyingDiver
Posts: 7312
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

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

Post by FlyingDiver »

Example?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
FlyingDiver
Posts: 7312
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

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

Post by FlyingDiver »

And which plugin are you actually using? Connector?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
webdeck
Posts: 436
Joined: Sat May 07, 2005 11:27 pm

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

Post 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.
User avatar
FlyingDiver
Posts: 7312
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

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

Post by FlyingDiver »

I'm not using commas as a delimiter, but something else is choking on it. I'll have to look into it.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
webdeck
Posts: 436
Joined: Sat May 07, 2005 11:27 pm

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

Post 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.
User avatar
FlyingDiver
Posts: 7312
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

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

Post 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.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
FlyingDiver
Posts: 7312
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

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

Post by FlyingDiver »

Release 2023.2.1 in plugin store. See viewtopic.php?f=316&t=27797
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
webdeck
Posts: 436
Joined: Sat May 07, 2005 11:27 pm

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

Post by webdeck »

That fixed it for me. Thank you so much for the quick turnaround!
Post Reply

Return to “MQTT”