# MQTT Hub/Gateway

**URL:** <https://community.homey.app/t/mqtt-hub-gateway/6766>\
**Category:** Apps\
**Created:** [January 14, 2019, 6:59pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766 "2019-01-14T18:59:50Z")\
**Posts on this page:** 1\
**Showing post:** 842

<div class="post-metadata">

**Author:** ![HarriedeGroot](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/harriedegroot/32/56160_2.png) [@HarriedeGroot](https://community.homey.app/u/HarriedeGroot)\
**Post date:** [March 28, 2021, 10:34pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/842 "2021-03-28T22:34:48Z")

</div>

MQTT Devices are now able to handle JSON input & output.

**Version 3.1.0**

- MQTT device: grab input value from json messages (jsonPath)
- MQTT device: format output message payload to json (JSON-T template)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/8/b81cb2dc0099574a2f519ea6a2356aafc92408d9.png)

I added two optional config parameters per capability:  
**value path** : point to a value within the JSON payload of the state messate using [JSONPath](https://github.com/dchester/jsonpath#readme).  
**output template** : format the output using [JSON-T](https://github.com/lightsofapollo/json-templater). Both string & object output are supported. All values from the device state (capabilities) can be inserted in the payload.

---

_[View the full topic](https://community.homey.app/t/mqtt-hub-gateway/6766)._
