You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using gateway in order to convert BLE advertisments to MQTT and then mostly consume the MQTT messages from telegraf for further processing. I have enough BLE devices to publish tens to hundreds of messages per scan.
The problem is that the per-id topic is too fine whereas the top-level topic of gateway is too coarse.
It would be very helpful if one could define a publish_topic in the settings which contains placeholders (in whatever format or convention) corresponding to fields of the advertisment packet. For example, one could define a publish topic as follows:
home/TheengsGateway/BTtoMQTT/{address_safe} that would be what you get now, i.e. a fixed prefix plus the MAC/id in uppercase without the colons
home/{local_name:none}/{address_safe} where {local_name} would be the device name advertised in the BLE packet or none if it is not set
home/{manufacturer_id}-
etc
Following this idea, one could define placeholders even for vendor- or device- specific payload fields and just use a predefined string as default value in case that field is not defined in the message
This way I could define a much more focused topic e.g. in telegraf (let's say that would only match the manufacturer or a device local name) and reduce further processing requirements
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi there and thanks for the great work!
I am using
gateway
in order to convert BLE advertisments to MQTT and then mostly consume the MQTT messages from telegraf for further processing. I have enough BLE devices to publish tens to hundreds of messages per scan.The problem is that the per-id topic is too fine whereas the top-level topic of gateway is too coarse.
It would be very helpful if one could define a
publish_topic
in the settings which contains placeholders (in whatever format or convention) corresponding to fields of the advertisment packet. For example, one could define a publish topic as follows:home/TheengsGateway/BTtoMQTT/{address_safe}
that would be what you get now, i.e. a fixed prefix plus the MAC/id in uppercase without the colonshome/{local_name:none}/{address_safe}
where {local_name} would be the device name advertised in the BLE packet ornone
if it is not sethome/{manufacturer_id}
-Following this idea, one could define placeholders even for vendor- or device- specific payload fields and just use a predefined string as default value in case that field is not defined in the message
This way I could define a much more focused topic e.g. in telegraf (let's say that would only match the manufacturer or a device local name) and reduce further processing requirements
Beta Was this translation helpful? Give feedback.
All reactions