#architecture for MQTT conversion scripts

1 messages · Page 1 of 1 (latest)

vapid vapor
#

Hi,

I have a MQTT topic containing some data. The raw data cannot be used by Home Assistant. It is compressed JSON data that needs some lengthy transformations. It is trivial to do in JavaScript / Python, but would be a headache in Jinja2. Thus I have written a small Python script that listens for messages on the MQTT topic, converts the data and publishes the result on another topic. This feels like a common thing, but I couldn't find a lot of details on others doing something similar. Is there some kind of reference architecture for doing this? Is simply running my script on another machine good enough or are there better architecture patterns out there?