{"id":614,"date":"2016-11-23T19:59:22","date_gmt":"2016-11-24T02:59:22","guid":{"rendered":"http:\/\/www.mjblythe.com\/hacks\/?p=614"},"modified":"2021-12-22T00:01:01","modified_gmt":"2021-12-22T07:01:01","slug":"getting-started-with-mqtt","status":"publish","type":"post","link":"http:\/\/www.mjblythe.com\/hacks\/2016\/11\/getting-started-with-mqtt\/","title":{"rendered":"Getting started with MQTT"},"content":{"rendered":"<p>At this point, I have a few IOT things on my home network.  The first were a couple of EcoPlugs Wifi outlets that I use to control my gutter heaters in the winter, and the next was a custom garage door controller.  For the former, I&#8217;m basically controlling them by using a replay attack (I hope to make a post about this soon)&#8230;re-sending packets that I observed the EcoPlugs app sending.  For the latter, I&#8217;m using a custom http interface.  Since both of these contain an ESP8266, I&#8217;d like re-program them and unify them both to use the MQTT protocol.<\/p>\n<p>While browsing <a href=\"http:\/\/hackaday.com\">Hackaday<\/a>, I came across their <a href=\"http:\/\/hackaday.com\/tag\/minimal-mqtt\/\">Minimal MQTT series<\/a>.  In this post, I&#8217;ll begin by walking through that series, noting my thoughts, then conclude by getting things set up the way I want.<br \/>\n<!--more--><\/p>\n\n<h2>Building a Broker<\/h2>\n<p><a href=\"http:\/\/hackaday.com\/2016\/05\/09\/minimal-mqtt-building-a-broker\/\">Link to article<\/a><\/p>\n<p>Not really much to say here.  On Ubuntu, I ran the following commands to install a recent version of <code>mosquitto<\/code>:<\/p>\n<blockquote><p><code>> sudo add-apt-repository ppa:mosquitto-dev\/mosquitto-ppa<br \/>\n> sudo apt-get update<br \/>\n> sudo apt-get install mosquitto mosquitto-clients<\/code><\/p><\/blockquote>\n<p>The example <code>mosquitto_sub<\/code> and <code>mosquitto_pub<\/code> commands work&#8230;good.<\/p>\n<h2> Networked Nodes<\/h2>\n<p><a href=\"http:\/\/hackaday.com\/2016\/05\/17\/minimal-mqtt-networked-nodes\/\">Link to article<\/a><\/p>\n<p>In my experience, NodeMCU sucks.  It&#8217;s quick for prototyping, but it doesn&#8217;t have the fine-grained control that I want, and it&#8217;s unreliable.  I&#8217;ll use the Arduino IDE instead.<\/p>\n<p><a href=\"https:\/\/www.baldengineer.com\/mqtt-tutorial.html\">This blogger<\/a> recommends <a href=\"https:\/\/github.com\/knolleary\/pubsubclient\">PubSubClient<\/a>.  The library doesn&#8217;t support publishing as QoS=1, but does support &#8220;retain&#8221;, which is really what I want anyway.<\/p>\n<p>The library is really easy to install in Arduino IDE.  In the menu, do <code>Sketch->Include Library->Manage Libraries...<\/code> then search for PubSubClient, select it, and click install.<\/p>\n<p>The example code works perfectly.<\/p>\n<ol>\n<li>In the menu, <code>File->Examples->PubSubClient->mqtt_esp8266<\/code><\/li>\n<li>change SSID, Password, and mqtt server<\/li>\n<li>upload the sketch<\/li>\n<li>start serial monitor<\/li>\n<li>On a linux terminal (not the serial monitor), run:\n<ol>\n<li><code>mosquitto_sub  -h localhost -v -t \"outTopic\"<\/code><\/li>\n<li><code>mosquitto_pub  -h localhost -t \"inTopic\" -m \"1\"<\/code><\/li>\n<li><code>mosquitto_pub  -h localhost -t \"inTopic\" -m \"0\"<\/code><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>The &#8220;inTopic&#8221; messages show up in the serial output, but don&#8217;t toggle the LED for me.  I think I selected the wrong board&#8230;  Yes, when I programmed as &#8220;WeMos D1 R2 &#038; mini&#8221; instead of &#8220;Adafruit HUZZAH ESP8266&#8221; the LED works as expected!<\/p>\n<p>Next, I modified the code to publish a &#8220;retain&#8221; message for the LED state, and it works great:<\/p>\n<blockquote><p><code>  \/\/ Switch on the LED if an 1 was received as first character<br \/>\n  if ((char)payload[0] == '1') {<br \/>\n    digitalWrite(BUILTIN_LED, LOW);   \/\/ Turn the LED on (Note that LOW is the voltage level<br \/>\n    client.publish(\"LED_state\", \"ON\", true);<br \/>\n    \/\/ but actually the LED is on; this is because<br \/>\n    \/\/ it is acive low on the ESP-01)<br \/>\n  } else {<br \/>\n    digitalWrite(BUILTIN_LED, HIGH);  \/\/ Turn the LED off by making the voltage HIGH<br \/>\n    client.publish(\"LED_state\", \"OFF\", true);<br \/>\n  }<br \/>\n<\/code><\/p><\/blockquote>\n<p>And from a terminal:<\/p>\n<blockquote><p><code>> mosquitto_sub -h localhost -v -t \"LED_state\"<br \/>\nLED_state ON<br \/>\n<\/code><\/p><\/blockquote>\n<h2>Control and Clients<\/h2>\n<p><a href=\"http:\/\/hackaday.com\/2016\/05\/27\/minimal-mqtt-control-and-clients\/\">Link to Article<\/a><\/p>\n<p>Probably the most useful part is the &#8220;MQTT Dashboard&#8221; Android app.  There isn&#8217;t much else interesting to me here.<\/p>\n<h2>Power and Privacy<\/h2>\n<p><a href=\"http:\/\/hackaday.com\/2016\/06\/02\/minimal-mqtt-power-and-privacy\/\">Link to Article<\/a><\/p>\n<p>The power stuff isn&#8217;t too interesting&#8230;my devices will have constant power, not battery (for now).<\/p>\n<p>Privacy is more interesting, but it doesn&#8217;t really describe what I want.<\/p>\n<h2>My custom setup &#8211; investigation<\/h2>\n<p>I want:<\/p>\n<ol>\n<li>anonymous access on the local network<\/li>\n<li>username\/password required on a TLS port that I&#8217;ll port-forward to the internet<\/li>\n<\/ol>\n<p>This section is kind of stream-of-consciousness notes of my trial-and-error in trying to accomplish these stated goals.  If you just want to see when I ended up with, then skip to the <a href=\"#My_custom_setup_8211_final_configuration\">next section<\/a>.<\/p>\n<p>Unfortunately, the <code>allow_anonymous<\/code> config option is a global option, not per-listener (see the <a href=\"https:\/\/mosquitto.org\/man\/mosquitto-conf-5.html\">mosquitto.conf man page<\/a>).<\/p>\n<p>Sounds like <a href=\"https:\/\/www.justinribeiro.com\/chronicle\/2012\/11\/08\/securing-mqtt-communication-between-ardruino-and-mosquitto\/\">these folks<\/a> bridge two brokers to accomplish this, but I&#8217;d rather just run a single instance of <code>mosquitto<\/code>.<\/p>\n<p><a href=\"http:\/\/serverfault.com\/questions\/771554\/allow-anonymous-only-read-in-mosquitto\">Maybe ACLs?<\/a><br \/>\nThe ACL description in <code>acl_file<\/code> (in the mosquitto-conf documentation linked above) doesn&#8217;t sound like you can ACL based on IP or anything.<\/p>\n<p><a href=\"https:\/\/groups.google.com\/forum\/#!searchin\/mqtt\/PSK%7Csort:relevance\/mqtt\/bDdSmQgNe74\/dU4tXNM8EQAJ\">This guy<\/a> uses a PSK to accomplish it.  Ok, so how do I use a PSK on my phone?  &#8220;MQTT Dashboard&#8221; has something for a BSK file&#8230;<\/p>\n<p>I guess what I really want isn&#8217;t &#8220;PSK&#8221;, but it&#8217;s the keyfile.<\/p>\n<p>Use <a href=\"http:\/\/portecle.sourceforge.net\/\"><code>portecle<\/code><\/a> to create a BKS file, and export the key to PEM format for <code>mosquitto<\/code>.  NOTE: I had to use <code>java-9-oracle<\/code>, and I had to do this:<\/p>\n<blockquote><p><code>> sudo update-alternatives --config java<br \/>\n(select java-9-oracle)<br \/>\n> cd \/usr\/lib\/jvm\/java-9-oracle\/lib\/security\/<br \/>\n> sudo mkdir limited_policy<br \/>\n> sudo cp *.jar limited_policy\/<br \/>\n> sudo cp unlimited_policy\/*.jar .\/<\/code><\/p><\/blockquote>\n<p>my <code>\/etc\/mosquitto\/conf.d\/local.conf<\/code>:<\/p>\n<blockquote><p><code>port 1883<\/p>\n<p>listener 8883<br \/>\ncapath \/etc\/ssl\/certs<br \/>\ncertfile \/etc\/ssl\/private\/server_4096_2016.crt<br \/>\nkeyfile \/etc\/mosquitto\/certs\/mqtt.pem<br \/>\nrequire_certificate true<br \/>\nuse_identity_as_username true<\/code><\/p><\/blockquote>\n<p>After a reload, I get this error:<\/p>\n<blockquote><p><code>1479358332: Error: Unable to load server key file \"\/etc\/mosquitto\/certs\/mqtt.pem\". Check keyfile.<\/code><\/p><\/blockquote>\n<p>Duh, I realized that the &#8220;keyfile&#8221; isn&#8217;t the key from the client that I want to trust, it&#8217;s the SSL\/TLS key that the server uses.<\/p>\n<p>I also read that mosquitto may not have access to \/etc\/ssl\/private (due to apparmor?), so I copied the keys into the mosquitto directory<\/p>\n<blockquote><p><code>port 1883<\/p>\n<p>listener 8883<br \/>\ntls_version tlsv1.2<br \/>\ncapath \/etc\/ssl\/certs<br \/>\ncertfile \/etc\/mosquitto\/certs\/server_4096_2016.crt<br \/>\nkeyfile \/etc\/mosquitto\/certs\/server_4096.pem<br \/>\nrequire_certificate true<br \/>\nuse_identity_as_username true<\/code><\/p><\/blockquote>\n<p>And it loads now!<\/p>\n<p>So, now to create a client key&#8230;<\/p>\n<p>Back in <code>portecle<\/code>, I created a new BKS keystore, generated a key pair, then generated a certification request for that key.<\/p>\n<p>Now, I&#8217;m using the <a href=\"https:\/\/mosquitto.org\/man\/mosquitto-tls-7.html\">mosquitto-tls man page<\/a> as a guide: <\/p>\n<p>I ran this command to create a new CA for myself:<\/p>\n<blockquote><p><code>openssl req -new -x509 -days <duration> -extensions v3_ca -keyout ca.key -out ca.crt<\/code><\/p><\/blockquote>\n<p>Then, I already had the server side set up, and I already had the client through the certificate signing request, so I only had to run this command to sign the key (created by <code>portecle<\/code>) with my newly-created CA key:<\/p>\n<blockquote><p><code>openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt -days <duration><\/code><\/p><\/blockquote>\n<p>Then, back in <code>portecle<\/code>, I imported the trusted certificate.  It gave me some grief because my self-created CA isn&#8217;t trusted, but it gives you the option of manually trusting it anyway.<\/p>\n<p>Now, I think I have to get <code>mosquitto<\/code> to trust my CA key as well.  I&#8217;ll try adding it as a <code>cafile<\/code>&#8230;hopefully <code>mosquitto<\/code> will support having both a <code>capath<\/code> and a <code>cafile<\/code> at the same time. (Note: it does.)<\/p>\n<p><code>mosquitto<\/code> doesn&#8217;t barf, but the app won&#8217;t connect&#8230;I get this:<\/p>\n<blockquote><p>1479444878: New connection from 192.168.1.1 on port 8883.<br \/>\n1479444878: OpenSSL Error: error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown<br \/>\n1479444878: OpenSSL Error: error:140940E5:SSL routines:ssl3_read_bytes:ssl handshake failure<br \/>\n1479444878: Socket error on client <unknown>, disconnecting.<\/p><\/blockquote>\n<p>Ok, so I&#8217;m getting somewhere&#8230;Let&#8217;s try this without involving the app.<\/p>\n<p>client side:<\/p>\n<blockquote><p><code>> mosquitto_pub -h home.mblythe.net -p 8883 --cert ~\/Downloads\/mqtt.crt --key ~\/Downloads\/mqtt.pem --capath \/etc\/ssl\/certs --cafile ~\/Downloads\/mblythe_ca.crt -t \"inTopic\" -m 1 -d<br \/>\nEnter PEM pass phrase:<br \/>\nClient mosqpub\/23189-bruce sending CONNECT<br \/>\nError: A TLS error occurred.<\/code><\/p><\/blockquote>\n<p>server error:<\/p>\n<blockquote><p><code>1479450665: New connection from 192.168.1.1 on port 8883.<br \/>\n1479450672: OpenSSL Error: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca<\/code><\/p><\/blockquote>\n<hr>\n<p>A new day&#8230;let&#8217;s start over a bit.<\/p>\n<p>Let&#8217;s walk through the steps on the <a href=\"https:\/\/mosquitto.org\/man\/mosquitto-tls-7.html\">mosquitto-tls man page<\/a> again: <\/p>\n<blockquote><p><code>> cd mqtt_key_stuff\/<br \/>\n> openssl genrsa -des3 -out mqtt2.key 2048<br \/>\n> openssl req -out mqtt2.csr -key mqtt2.key -new<br \/>\n> sudo openssl x509 -req -in mqtt2.csr -CA mblythe_ca.crt -CAkey \/etc\/ssl\/private\/ca.key -CAcreateserial -out mqtt2.crt -days 90<br \/>\n> mosquitto_pub -h home.mblythe.net -p 8883 --cert ~\/mqtt_key_stuff\/mqtt2.crt --key ~\/mqtt_key_stuff\/mqtt2.key --capath \/etc\/ssl\/certs --cafile ~\/mqtt_key_stuff\/mblythe_ca.crt -t \"inTopic\" -m 1 -d<br \/>\n> mosquitto_pub -h home.mblythe.net -p 8883 --cert ~\/mqtt_key_stuff\/mqtt2.crt --key ~\/mqtt_key_stuff\/mqtt2.key --capath \/etc\/ssl\/certs --cafile ~\/mqtt_key_stuff\/mblythe_ca.crt -t \"inTopic\" -m 0 -d<br \/>\n<\/code><\/p><\/blockquote>\n<p><b>It works!!!<\/b><\/p>\n<p>Let&#8217;s remove this line from <code>\/etc\/mosquitto\/conf.d\/local.conf<\/code> and make sure it fails (i.e. we&#8217;re actually authenticating the client cert).<\/p>\n<blockquote><p><code>cafile \/etc\/mosquitto\/certs\/mblythe_ca.crt<\/code><\/p><\/blockquote>\n<p>Good, it fails:<\/p>\n<blockquote><p><code>> mosquitto_pub -h home.mblythe.net -p 8883 --cert ~\/Downloads\/mqtt2.crt --key ~\/Downloads\/mqtt2.key --capath \/etc\/ssl\/certs --cafile ~\/Downloads\/mblythe_ca.crt -t \"inTopic\" -m 0 -d<br \/>\nEnter PEM pass phrase:<br \/>\nClient mosqpub\/7388-bruce sending CONNECT<br \/>\nError: A TLS error occurred.<br \/>\n<\/code><\/p><\/blockquote>\n<p>Ok, let&#8217;s fire up <code>portecle<\/code> again and add this key &#038; cert to a BKS keystore.  Looks like it won&#8217;t import the key&#8230;it&#8217;s looking for a PKCS12 file type.  Conversion command from <a href=\"https:\/\/www.paypal-knowledge.com\/infocenter\/index?page=content&#038;widgetview=true&#038;id=FAQ1020\">here<\/a>.<\/p>\n<blockquote><p><code>> openssl pkcs12 -export -inkey mqtt2.key -in mqtt2.key -out mqtt2.p12<br \/>\nEnter pass phrase for mqtt2.key:<br \/>\nunable to load certificates<br \/>\n<\/code><\/p><\/blockquote>\n<p><a href=\"https:\/\/www.ssl.com\/how-to\/create-a-pfx-p12-certificate-file-using-openssl\/\">This site<\/a> clued me into the fact that the <code>-in<\/code> option should be the certificate, not the key again<\/p>\n<blockquote><p><code>> openssl pkcs12 -export -inkey mqtt2.key -in mqtt2.crt -out mqtt2.p12<br \/>\nEnter pass phrase for mqtt2.key:<br \/>\nEnter Export Password:<br \/>\nVerifying - Enter Export Password:<\/code><\/p><\/blockquote>\n<p>Great!<\/p>\n<p>In the meantime, I&#8217;ve upgraded Ubuntu.  For whatever reason, the changes I made above to enable the unlimited crypto stuff are no longer there, and there&#8217;s not even the <code>unlimited_policy<\/code> directory anymore.  <a href=\"http:\/\/stackoverflow.com\/a\/39889731\">This<\/a> lead me to <a href=\"http:\/\/stackoverflow.com\/a\/39872144\">this<\/a> which lead me to <a href=\"http:\/\/mail.openjdk.java.net\/pipermail\/security-dev\/2016-October\/014943.html\">this<\/a>, which describes the change.<\/p>\n<p>I made the following change to <code>\/etc\/java-9-oracle\/conf\/security\/java.security<\/code><br \/>\nBefore:<\/p>\n<blockquote><p><code>crypto.policy=limited<\/code><\/p><\/blockquote>\n<p>After:<\/p>\n<blockquote><p><code>crypto.policy=unlimited<\/code><\/p><\/blockquote>\n<p>I made the BKS file (with both the key cert, and even the CA cert), and MQTT Dashboard still fails to connect.  The server gives me this error:<\/p>\n<blockquote><p>1479961185: OpenSSL Error: error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown<br \/>\n1479961185: OpenSSL Error: error:140940E5:SSL routines:ssl3_read_bytes:ssl handshake failure<\/p><\/blockquote>\n<p>I also found the log that the android app creates (from the <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.thn.iotmqttdashboard&#038;hl=en\">app webpage<\/a>):<\/p>\n<blockquote><p>You can find the error log in: External storage (SD-card) \/ mqtt-dashboard \/ log<\/p><\/blockquote>\n<p>In that logfile:<\/p>\n<blockquote><p>#ERROR at 21:20:05 Client failed to connect<br \/>\nMqttException (0) &#8211; javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.<br \/>\n\tat org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(Unknown Source)<br \/>\n\tat org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(Unknown Source)<br \/>\n\tat java.lang.Thread.run(Thread.java:818)<br \/>\nCaused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.<br \/>\n\tat com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:322)<br \/>\n\tat org.eclipse.paho.client.mqttv3.internal.SSLNetworkModule.start(Unknown Source)<br \/>\n\t&#8230; 2 more<br \/>\nCaused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.<br \/>\n\tat com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:324)<br \/>\n\tat com.android.org.conscrypt.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:225)<br \/>\n\tat com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:114)<br \/>\n\tat com.android.org.conscrypt.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:550)<br \/>\n\tat com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)<br \/>\n\tat com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:318)<br \/>\n\t&#8230; 3 more<br \/>\nCaused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.<br \/>\n\t&#8230; 9 more<\/p><\/blockquote>\n<p>So, it looks like the app wants my client key cert to have a proper chain of trust.  Lame.<\/p>\n<p>I tried signing my client cert with my server&#8217;s private key, but I couldn&#8217;t figure out the right commands for openssl, and I&#8217;m not sure the app would accept it anyway.  I also couldn&#8217;t find anyone who did free client certificate signing.  (Well, StartSSL might, but most of the web browsers don&#8217;t trust that CA anymore.)<\/p>\n<h2>My custom setup &#8211; final configuration<\/h2>\n<p>As I said above, I originally wanted:<\/p>\n<ol>\n<li>anonymous access on the local network<\/li>\n<li>username\/password required on a TLS port that I&#8217;ll port-forward to the internet<\/li>\n<\/ol>\n<p>Unfortunately, <code>mosquitto<\/code> doesn&#8217;t support requiring username &#038; password authentication on only one listener.  Also, the other forms of SSL-based authentication didn&#8217;t pan out, so I think I&#8217;ll have to compromise on #1, and just require username &#038; password for all MQTT clients (including my IOT devices themselves).<\/p>\n<p>Ok, so what does that look like&#8230;<\/p>\n<p>In the configuration file <code>\/etc\/mosquitto\/conf.d\/local.conf<\/code> (or just in <code>\/etc\/mosquitto\/mosquitto.conf<\/code>, if you prefer):<\/p>\n<blockquote><p><code>port 1883<br \/>\nlistener 8883<br \/>\ntls_version tlsv1.2<br \/>\ncapath \/etc\/ssl\/certs<br \/>\ncertfile \/etc\/mosquitto\/certs\/mqtt_combined.crt<br \/>\nkeyfile \/etc\/mosquitto\/certs\/server_4096.pem<br \/>\nallow_anonymous false<br \/>\npassword_file \/etc\/mosquitto\/users.passwd<br \/>\n<\/code><\/p><\/blockquote>\n<p>To create the password file:<\/p>\n<blockquote><p><code>> sudo mosquitto_passwd -c \/etc\/mosquitto\/users.passwd testuser<br \/>\nPassword:<br \/>\nReenter password:<br \/>\n> sudo chown mosquitto:mosquitto \/etc\/mosquitto\/users.passwd<br \/>\n> sudo chmod 600 \/etc\/mosquitto\/users.passwd<br \/>\n<\/code><\/p><\/blockquote>\n<p>To add more MQTT users:<\/p>\n<blockquote><p><code>> sudo mosquitto_passwd \/etc\/mosquitto\/users.passwd testuser2<br \/>\nPassword:<br \/>\nReenter password:<br \/>\n<\/code><\/p><\/blockquote>\n<p>And let&#8217;s restart <code>mosquitto<\/code> to pick up these changes:<\/p>\n<blockquote><p><code>> sudo service mosquitto restart<\/code><\/p><\/blockquote>\n<p>In my Arduino code:<\/p>\n<blockquote><p><code>    if (client.connect(\"ESP8266Client\", mqtt_user, mqtt_pass)) {<\/code><\/p><\/blockquote>\n<p>On the command line:<\/p>\n<blockquote><p><code>mosquitto_sub  -h localhost -t \"LED_state\" -u testuser -P testpass<\/code><\/p><\/blockquote>\n<p>or<\/p>\n<blockquote><p><code>mosquitto_sub  -h home.mblythe.net -p 8883 -t \"LED_state\" -u testuser -P testpass --capath \/etc\/ssl\/certs<\/code><\/p><\/blockquote>\n<p>And the config in MQTT-Dashboard is straightforward.<\/p>\n<p>Also, my intention is to have the SSL\/TLS protected port be exposed to the wider internet.  This will vary from router to router, but I set up a port-forwarding rule to forward internet traffic on port 8883 to my MQTT server&#8217;s port 8883.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>At this point, I have a few IOT things on my home network. The first were a couple of EcoPlugs Wifi outlets that I use to control my gutter heaters in the winter, and the next was a custom garage door controller. For the former, I&#8217;m basically controlling them by using a replay attack (I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[12,7,13,11,15],"tags":[],"class_list":["post-614","post","type-post","status-publish","format-standard","hentry","category-esp8266","category-howto","category-iot","category-linux","category-trial-and-error"],"_links":{"self":[{"href":"http:\/\/www.mjblythe.com\/hacks\/wp-json\/wp\/v2\/posts\/614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.mjblythe.com\/hacks\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.mjblythe.com\/hacks\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.mjblythe.com\/hacks\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mjblythe.com\/hacks\/wp-json\/wp\/v2\/comments?post=614"}],"version-history":[{"count":27,"href":"http:\/\/www.mjblythe.com\/hacks\/wp-json\/wp\/v2\/posts\/614\/revisions"}],"predecessor-version":[{"id":680,"href":"http:\/\/www.mjblythe.com\/hacks\/wp-json\/wp\/v2\/posts\/614\/revisions\/680"}],"wp:attachment":[{"href":"http:\/\/www.mjblythe.com\/hacks\/wp-json\/wp\/v2\/media?parent=614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mjblythe.com\/hacks\/wp-json\/wp\/v2\/categories?post=614"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mjblythe.com\/hacks\/wp-json\/wp\/v2\/tags?post=614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}