Differentiate between SBB and Bridge

I know it’s been asked before - what’s the best way to find if it’s a Bridge or SBB?
In my HomeSeer integration I create a device for controlling the Bridge blue light. But SBB don’t have the blue light.

So I need to know - when mDNS finds the device - if it’s SBB or the Bridge.

I can use this (actually there’s no other choice) - but that feels wrong.
You should really use the mDNS properties to provide the device type info.

We actually use the ID on the apps too. Since the apps can connect to the bond through MQTT (cloud), mDNS properties wouldn’t do any good there.

We are using this regex:

BRIDGE -> "^(Z|[A-C])\w*\$"
SBB_CEILING_FAN -> "^K\w*\$"

If in the future we have other kinds of SBBs, they will start with another letter

When you connect to the device via MQTT - you already know what you are connecting to.
With mDNS - I just search on the network and create devices in HomeSeer automatically.
But I need to know the device type before I start communicating with it.
Is it difficult to add properties to mDNS? Every other mDNS implementation does have some device info, not just IP addr.

The regexes given by Marcio are guaranteed to work.

We have not prioritized adding fields to mDNS because it will not help our apps — the apps will still see the old behavior on all units that have already shipped. But I feel your pain as a 3rd party integrator. Hopefully we will see enough demand generation from pros that we can put some resources into the improvements you request.


@merck it shouldn’t take much resources, it’s one extra call

mdns_txt_item_t serviceTxtData[3] = {
    //set txt data for service (will free and replace current data)
    mdns_service_txt_set("_http", "_tcp", serviceTxtData, 3);

mDNS usually provides service properties, not just IP address