Closed tracetechnical closed 1 year ago
Also appears that the --friendlynames flag itself doesn't work, in my testing.
It doesn't work where exactly? According to the code that I just checked it should work for all topics except the unified topic (where the uuid is always used).
this.mqtt.publish(`status/${this.topicId(d.Name, d.Uuid)}/avtransport`,data)
This is the result when I set SONOS2MQTT_FRIENDLYNAMES
to uuid
:
That means the config is loaded correctly.
The {prefix}/{player_uuid}
topic will never change, this message includes the complete status and will always use the uuid.
The SONOS2MQTT_FRIENDLYNAMES
setting only influences the distinct topics, that you need to activate by setting the SONOS2MQTT_DISTINCT
to true
(or by including the --distinct
flag.
Which will result in the following messages in the mqtt server.
set to uuid
Set to name
(or skipped because it's the default).
I think this might need addition explanation in the docs, but is works like I build it, so I'm closing this issue for now. You can always re-open if you think this is incorrect.
Setting SONOS2MQTT_FRIENDLYNAMES env var to "name" doesn't seem to set the friendlynames flag as expected.
Checked yargs docs to see if I was being daft, but it appears not.