{"version":"1.0","provider_name":"\u00c4lymaisteri","provider_url":"https:\/\/murto.net\/alymaisteri","author_name":"kpm","author_url":"https:\/\/murto.net\/alymaisteri\/author\/kpm\/","title":"Vamos Wemos - \u00c4lymaisteri","type":"rich","width":600,"height":338,"html":"<blockquote class=\"wp-embedded-content\"><a href=\"https:\/\/murto.net\/alymaisteri\/2020\/08\/21\/vamos-wemos\/\">Vamos Wemos<\/a><\/blockquote>\n<script type='text\/javascript'>\n<!--\/\/--><![CDATA[\/\/><!--\n\t\t\/*! This file is auto-generated *\/\n\t\t!function(d,l){\"use strict\";var e=!1,n=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!\/[^a-zA-Z0-9]\/.test(t.secret)){for(var r,i,a,s=l.querySelectorAll('iframe[data-secret=\"'+t.secret+'\"]'),n=l.querySelectorAll('blockquote[data-secret=\"'+t.secret+'\"]'),o=new RegExp(\"^https?:$\",\"i\"),c=0;c<n.length;c++)n[c].style.display=\"none\";for(c=0;c<s.length;c++)if(r=s[c],e.source===r.contentWindow){if(r.removeAttribute(\"style\"),\"height\"===t.message){if(1e3<(a=parseInt(t.value,10)))a=1e3;else if(~~a<200)a=200;r.height=a}if(\"link\"===t.message)if(i=l.createElement(\"a\"),a=l.createElement(\"a\"),i.href=r.getAttribute(\"src\"),a.href=t.value,o.test(a.protocol))if(a.host===i.host)if(l.activeElement===r)d.top.location.href=t.value}}},e)d.addEventListener(\"message\",d.wp.receiveEmbedMessage,!1),l.addEventListener(\"DOMContentLoaded\",t,!1),d.addEventListener(\"load\",t,!1);function t(){if(!n){n=!0;for(var e,t,r=-1!==navigator.appVersion.indexOf(\"MSIE 10\"),i=!!navigator.userAgent.match(\/Trident.*rv:11\\.\/),a=l.querySelectorAll(\"iframe.wp-embedded-content\"),s=0;s<a.length;s++){if(!(e=a[s]).getAttribute(\"data-secret\"))t=Math.random().toString(36).substr(2,10),e.src+=\"#?secret=\"+t,e.setAttribute(\"data-secret\",t);if(r||i)(t=e.cloneNode(!0)).removeAttribute(\"security\"),e.parentNode.replaceChild(t,e)}}}}(window,document);\n\/\/--><!]]>\n<\/script><iframe sandbox=\"allow-scripts\" security=\"restricted\" src=\"https:\/\/murto.net\/alymaisteri\/2020\/08\/21\/vamos-wemos\/embed\/\" width=\"600\" height=\"338\" title=\"&#8221;Vamos Wemos&#8221; &#8212; \u00c4lymaisteri\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" class=\"wp-embedded-content\"><\/iframe>","thumbnail_url":"https:\/\/murto.net\/alymaisteri\/wp-content\/uploads\/2020\/08\/d1_mini_v3_02-500x500-1.jpg","thumbnail_width":500,"thumbnail_height":500,"description":"DIY eli tee-se-itse alkoi kiinnostaa muutaman ensimm\u00e4isen viikon kotiautomaatioharjoittelun j\u00e4lkeen. Ensimm\u00e4inen kokeiluni oli AliExpressist\u00e4 tilaamani DHT22-l\u00e4mp\u00f6tila- ja kosteussensorin liitt\u00e4minen Raspberry Pi -korttitietokoneeseen. Liitt\u00e4minen ei kovin hankalaa ollut, ja sensorin arvojen lukemista varten l\u00f6ytyi valmista python-koodia, kuten esimerkiksi https:\/\/pypi.org\/project\/pigpio-dht\/. Sensorin arvot piti tietenkin saada siirretty\u00e4 Home Assistantiin, ja t\u00e4m\u00e4n toteutin aluksi File sensorina. Koska HA on [&hellip;]"}