# 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:** 952

<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:** [May 3, 2021, 1:55pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/952 "2021-05-03T13:55:43Z")

</div>

**Version 3.4.0**

- MQTT Device: allow [mathJS](https://mathjs.org/) expressions as value template for incoming messages

Both [mathJS](https://mathjs.org/) & [jsonPath](https://github.com/dchester/jsonpath) expression are allowed as value template for incoming messages.  
The value is accessible via the `value` param if the message is a raw value.  
If the message is JSON formatted: `path.within.json` can be used to target the value.

Example: Convert incoming Wh to kWh

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

---

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