{"id":1502,"date":"2017-02-18T09:26:32","date_gmt":"2017-02-18T14:26:32","guid":{"rendered":"http:\/\/lisa.rushworth.us\/?p=1502"},"modified":"2017-08-18T09:43:54","modified_gmt":"2017-08-18T14:43:54","slug":"serial-port-sniffer","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=1502","title":{"rendered":"Serial Port Sniffer"},"content":{"rendered":"<p>We use a Wink hub to communicate with our ZigBee devices &#8211; scripts on the OpenHAB server make web calls over to the Wink hub to set bulb levels. Works great on outbound communication to the bulbs, but it is not real-time bi-directional (i.e. if a bulb level is changed elsewhere, OpenHAB would need to poll and get the new value). Doesn&#8217;t matter for the GE Link bulbs because there\u00a0<em>isn&#8217;t<\/em> another way they get set beyond dropping and returning power (which turns the bulb on at 100%), but we cannot use the Wink hub to communicate with interactive devices &#8212; unlock the door manually and OpenHAB has no idea the light should be turned on until the next polling cycle. And polling is a lot of extra overhead &#8211; check every device every minute 24&#215;7. And it&#8217;s slow &#8211; hit the polling cycle wrong and it takes a minute from unlocking the garage door before the light turns on.<\/p>\n<p>Had the idea of monitoring data that moves across the serial interfaces and use a script to communicate real-time inbound changes over to OpenHAB. Watching the serial interface, we get lots of cryptic traffic from socat:<\/p>\n<p>socat -x \/dev\/SerialPort,raw,echo=0,crnl PTY,link=\/dev\/ttyV1,raw,echo=0,crnl<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We use a Wink hub to communicate with our ZigBee devices &#8211; scripts on the OpenHAB server make web calls over to the Wink hub to set bulb levels. Works great on outbound communication to the bulbs, but it is not real-time bi-directional (i.e. if a bulb level is changed elsewhere, OpenHAB would need to &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63,30,29],"tags":[44,299,298],"class_list":["post-1502","post","type-post","status-publish","format-standard","hentry","category-home-automation","category-system-administration","category-technology","tag-openhab","tag-serial-sniffer","tag-socat"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/1502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1502"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/1502\/revisions"}],"predecessor-version":[{"id":1503,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/1502\/revisions\/1503"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1502"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}