# MQTT example in combination with Raspberry Pi

**URL:** https://community.homey.app/t/mqtt-example-in-combination-with-raspberry-pi/9131
**Category:** Questions & Help
**Created:** [February 13, 2019, 8:29am UTC](https://community.homey.app/t/mqtt-example-in-combination-with-raspberry-pi/9131 "2019-02-13T08:29:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Canedje](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/canedje/32/8324_2.png) [@Canedje](https://community.homey.app/u/Canedje)
#### Post date: [February 13, 2019, 8:29am UTC](https://community.homey.app/t/mqtt-example-in-combination-with-raspberry-pi/9131/1 "2019-02-13T08:29:23Z")

</div>

In the past I did write my own Thermostat using a Raspberry Pi (RPI) and a relais.  
Now I do like to start to use Homey to control the heating.  
For that I think MQTT it is a nice option for controlling the heating relais at the RPI from Homey using MQTT switching on and off the heating.

Is somebody over here doing this also?  
So if yes is it possible to give some example code (python?) for the RPI and an example how to use MQTT on Homey and the RPI?
