{"id":1833,"date":"2015-02-06T00:50:24","date_gmt":"2015-02-05T23:50:24","guid":{"rendered":"http:\/\/www.jensd.de\/wordpress\/?p=1833"},"modified":"2015-02-06T00:56:21","modified_gmt":"2015-02-05T23:56:21","slug":"sweethomehub-home-control-with-raspberry-pi-and-mqtt-part-1","status":"publish","type":"post","link":"https:\/\/www.jensd.de\/wordpress\/?p=1833","title":{"rendered":"SweetHomeHub: Home Control with Raspberry Pi and MQTT &#8211; Part 1"},"content":{"rendered":"<p>Since quite a long time I am working on my universal Raspberry Pi based Intertechno-Remote (see former posts <a href=\"http:\/\/www.jensd.de\/wordpress\/?p=456\" title=\"RasPi does the Home Automation (Part I): Setting up the Pi\" target=\"_blank\">1<\/a> <a href=\"http:\/\/www.jensd.de\/wordpress\/?p=489\" title=\"RasPi does the Home Automation (Part II): Crossing the bridge to JavaFX\" target=\"_blank\">2<\/a> <a href=\"http:\/\/www.jensd.de\/wordpress\/?p=591\" title=\"RasPi does the Home Automation (Part III): \u2018Let\u2019s Put It All Together\u2019\" target=\"_blank\">3<\/a> <a href=\"http:\/\/www.jensd.de\/wordpress\/?p=638\" title=\"RasPi does the Home Automation (Part IV): Cut the \u2018rope\u2019\" target=\"_blank\">4<\/a>):<\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/intertechno-remote.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1898\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1898\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/intertechno-remote.jpg\" data-orig-size=\"458,270\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"intertechno remote\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/intertechno-remote-300x177.jpg\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/intertechno-remote.jpg\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/intertechno-remote.jpg\" alt=\"intertechno remote\" width=\"458\" height=\"270\" class=\"aligncenter size-full wp-image-1898\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/intertechno-remote.jpg 458w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/intertechno-remote-300x177.jpg 300w\" sizes=\"(max-width: 458px) 100vw, 458px\" \/><\/a><\/p>\n<p>I tried different approaches to trigger\/control my remote control service via a custom HTTPServer\/-Handler and a simple Vert.x verticle.<br \/>\nSince MQTT v3.1.1 turns out as on of the de-facto <a href=\"http:\/\/mqtt.org\/2014\/11\/mqtt-v3-1-1-now-an-oasis-standard\" title=\"http:\/\/mqtt.org\/2014\/11\/mqtt-v3-1-1-now-an-oasis-standard\">standard protocols for the IoT<\/a> I also implemented an MQTT client.<\/p>\n<p>This MQTT client basically follows two design patterns:<\/p>\n<p><strong>1. One topic for each device<\/strong><br \/>\nFor each device a topic is defined. Its state can be controlled by publishing a message with payload &#8220;ON&#8221; or &#8220;OFF&#8221;.<br \/>\n<strong>Pro:<\/strong><\/p>\n<ul>\n<li>the user must not know about the address code of the Intertechno device<\/li>\n<li>changes of the address must not be published<\/li>\n<li>the message is simply &#8220;ON&#8221; or &#8220;OFF to control the device<\/li>\n<\/ul>\n<p><strong>Contra:<\/strong><\/p>\n<ul>\n<li>the user must know the topic for each device<\/li>\n<li>the user can only control configured devices<\/li>\n<\/ul>\n<p><strong>2. One topic for a JSON message<\/strong><br \/>\n<strong>Pro:<\/strong> <\/p>\n<ul>\n<li>very flexible to control the devices<\/li>\n<\/ul>\n<p><strong>Contra:<\/strong><\/p>\n<ul>\n<li>the user must know about the syntax of the JSON and the coding of devices<\/li>\n<\/ul>\n<p><strong>Solution:<\/strong><br \/>\nProvide both options \ud83d\ude09<\/p>\n<p><strong>One topic for each device<\/strong> <\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/topics_table.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1885\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1885\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/topics_table.png\" data-orig-size=\"571,244\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"topics_table\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/topics_table-300x128.png\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/topics_table.png\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/topics_table.png\" alt=\"topics_table\" width=\"571\" height=\"244\" class=\"aligncenter size-full wp-image-1885\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/topics_table.png 571w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/topics_table-300x128.png 300w\" sizes=\"(max-width: 571px) 100vw, 571px\" \/><\/a><\/p>\n<p><strong>My configuration is very simple<\/strong><br \/>\nOn start-up the Client is searching for sweethomehub-config.xml in the users home directory which is then unmarshalled from JAXB.<br \/>\nThis configuration contains the codes and the topic for each device and the MQTT settings for the broker connection:<\/p>\n<p>[xml]<br \/>\n<configuration><br \/>\n    <devices><br \/>\n        <device><br \/>\n            <houseCode>a<\/houseCode><br \/>\n            <groupId>1<\/groupId><br \/>\n            <deviceId>1<\/deviceId><br \/>\n            <name>Light Front-Door<\/name><br \/>\n            <mqttTopic>front\/lights\/door<\/mqttTopic><br \/>\n        <\/device><br \/>\n        <device><br \/>\n            <houseCode>a<\/houseCode><br \/>\n            <groupId>1<\/groupId><br \/>\n            <deviceId>2<\/deviceId><br \/>\n            <name>Light Terrace<\/name><br \/>\n            <mqttTopic>garden\/lights\/terrace<\/mqttTopic><br \/>\n        <\/device><br \/>\n        <device><br \/>\n            <houseCode>a<\/houseCode><br \/>\n            <groupId>1<\/groupId><br \/>\n            <deviceId>3<\/deviceId><br \/>\n            <name>Fountain<\/name><br \/>\n            <mqttTopic>garden\/devices\/fountain<\/mqttTopic><br \/>\n        <\/device><br \/>\n        <device><br \/>\n            <houseCode>a<\/houseCode><br \/>\n            <groupId>1<\/groupId><br \/>\n            <deviceId>4<\/deviceId><br \/>\n            <name>Light Garden<\/name><br \/>\n            <mqttTopic>garden\/lights\/ambiente<\/mqttTopic><br \/>\n        <\/device><br \/>\n        <device><br \/>\n            <houseCode>a<\/houseCode><br \/>\n            <groupId>1<\/groupId><br \/>\n            <deviceId>3<\/deviceId><br \/>\n            <name>Light Living Room<\/name><br \/>\n            <mqttTopic>livingroom\/lights\/ambiente<\/mqttTopic><br \/>\n        <\/device><br \/>\n    <\/devices><br \/>\n    <mqttClientConfiguration><br \/>\n        <mqttClientId>SweethoemMQTTClientId<\/mqttClientId><br \/>\n        <mqttBrokerAddress>sweethome<\/mqttBrokerAddress><br \/>\n        <mqttBrokerPort>1883<\/mqttBrokerPort><br \/>\n        <mqttMessagesBaseTopic>sweethome<\/mqttMessagesBaseTopic><br \/>\n    <\/mqttClientConfiguration><br \/>\n<\/configuration><br \/>\n[\/xml]<\/p>\n<p>And there is one additional topic awaiting the JSON commands:<br \/>\n<code><strong>sweethome\/devices\/jsoncommand<\/strong><\/code><\/p>\n<pre>\r\n{\r\n  &quot;devices&quot;:[\r\n    {\r\n      &quot;device&quot;:{\r\n        &quot;name&quot;: &quot;Light Front-Door&quot;,\r\n        &quot;houseCode&quot;: &quot;a&quot;,\r\n        &quot;groupId&quot;: &quot;1&quot;,\r\n        &quot;deviceId&quot;: &quot;1&quot;\r\n      },\r\n      &quot;command&quot;:&quot;ON&quot;\r\n    },\r\n    {\r\n      &quot;device&quot;:{\r\n        &quot;name&quot;: &quot;Light Terrace&quot;,\r\n        &quot;houseCode&quot;: &quot;a&quot;,\r\n        &quot;groupId&quot;: &quot;1&quot;,\r\n        &quot;deviceId&quot;: &quot;2&quot;\r\n      },\r\n      &quot;command&quot;:&quot;ON&quot;\r\n    },\r\n    {\r\n      &quot;device&quot;:{\r\n        &quot;name&quot;: &quot;Light Living Room&quot;,\r\n        &quot;houseCode&quot;: &quot;a&quot;,\r\n        &quot;groupId&quot;: &quot;1&quot;,\r\n        &quot;deviceId&quot;: &quot;3&quot;\r\n      },\r\n      &quot;command&quot;:&quot;ON&quot;\r\n    }\r\n  ]\r\n}\r\n<\/pre>\n<p>The central method to handle arrived messages:<\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/MqttMessageReceiver.messageArrived.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1877\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1877\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/MqttMessageReceiver.messageArrived.png\" data-orig-size=\"788,440\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"MqttMessageReceiver.messageArrived\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/MqttMessageReceiver.messageArrived-300x168.png\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/MqttMessageReceiver.messageArrived.png\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/MqttMessageReceiver.messageArrived.png\" alt=\"MqttMessageReceiver.messageArrived\" width=\"788\" height=\"440\" class=\"aligncenter size-full wp-image-1877\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/MqttMessageReceiver.messageArrived.png 788w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/MqttMessageReceiver.messageArrived-300x168.png 300w\" sizes=\"(max-width: 788px) 100vw, 788px\" \/><\/a><\/p>\n<p><strong>The JsonDeviceCommandProcessor:<\/strong><\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/JsonCommandProcessor.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1880\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1880\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/JsonCommandProcessor.png\" data-orig-size=\"742,583\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"JsonCommandProcessor\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/JsonCommandProcessor-300x236.png\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/JsonCommandProcessor.png\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/JsonCommandProcessor.png\" alt=\"JsonCommandProcessor\" width=\"742\" height=\"583\" class=\"aligncenter size-full wp-image-1880\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/JsonCommandProcessor.png 742w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/JsonCommandProcessor-300x236.png 300w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/a><\/p>\n<p>And the <code><strong>doSwitch<\/strong><\/code> methods:<\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/DeviceControl.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1881\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1881\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/DeviceControl.png\" data-orig-size=\"915,287\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"DeviceControl\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/DeviceControl-300x94.png\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/DeviceControl.png\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/DeviceControl.png\" alt=\"DeviceControl\" width=\"915\" height=\"287\" class=\"aligncenter size-full wp-image-1881\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/DeviceControl.png 915w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/DeviceControl-300x94.png 300w\" sizes=\"(max-width: 915px) 100vw, 915px\" \/><\/a><\/p>\n<p><strong>MQTT Client running on the Raspberry Pi waiting for messages:<\/strong><br \/>\n<a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-receiver1.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1886\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1886\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-receiver1.png\" data-orig-size=\"766,405\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"mqtt-receiver\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-receiver1-300x159.png\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-receiver1.png\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-receiver1.png\" alt=\"mqtt-receiver\" width=\"688\" height=\"364\" class=\"aligncenter size-large wp-image-1886\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-receiver1.png 766w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-receiver1-300x159.png 300w\" sizes=\"(max-width: 688px) 100vw, 688px\" \/><\/a><\/p>\n<p><strong>&#8230; and receiving command messages:<\/strong><\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-receiver-commands.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1889\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1889\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-receiver-commands.png\" data-orig-size=\"768,175\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"mqtt-receiver-commands\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-receiver-commands-300x68.png\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-receiver-commands.png\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-receiver-commands.png\" alt=\"mqtt-receiver-commands\" width=\"768\" height=\"175\" class=\"aligncenter size-full wp-image-1889\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-receiver-commands.png 768w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-receiver-commands-300x68.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><\/p>\n<p>Testing the receiver with <a href=\"http:\/\/www.mqttfx.org\" title=\"http:\/\/www.mqttfx.org\" target=\"_blank\">MQTT.fx<\/a> &#8230; <\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-fx.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1894\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1894\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-fx.jpg\" data-orig-size=\"1026,765\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"mqtt-fx\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-fx-300x224.jpg\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-fx-1024x764.jpg\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-fx-1024x764.jpg\" alt=\"mqtt-fx\" width=\"688\" height=\"513\" class=\"aligncenter size-large wp-image-1894\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-fx-1024x764.jpg 1024w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-fx-300x224.jpg 300w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2015\/02\/mqtt-fx.jpg 1026w\" sizes=\"(max-width: 688px) 100vw, 688px\" \/><\/a><\/p>\n<p>Complete code can be found at <a href=\"https:\/\/bitbucket.org\/Jerady\/sweethomesmarthub\" title=\"https:\/\/bitbucket.org\/Jerady\/sweethomesmarthub\" target=\"_blank\">BitBucket<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since quite a long time I am working on my universal Raspberry Pi based Intertechno-Remote (see former posts 1 2 3 4): I tried different approaches to trigger\/control my remote control service via a custom HTTPServer\/-Handler and a simple Vert.x verticle. Since MQTT v3.1.1 turns out as on of the de-facto standard protocols for the&hellip; <span class=\"clear\"><\/span><a href=\"https:\/\/www.jensd.de\/wordpress\/?p=1833\" class=\"more-link read-more\" rel=\"bookmark\">Continue Reading <span class=\"screen-reader-text\">SweetHomeHub: Home Control with Raspberry Pi and MQTT &#8211; Part 1<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false,"jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[30,45,46,50,18],"tags":[91,43,102,106,86],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p38FCL-tz","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1833"}],"collection":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1833"}],"version-history":[{"count":31,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1833\/revisions"}],"predecessor-version":[{"id":1902,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1833\/revisions\/1902"}],"wp:attachment":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}