{"id":4232,"date":"2024-06-17T17:42:58","date_gmt":"2024-06-17T08:42:58","guid":{"rendered":"https:\/\/blog.smartlight.co.jp\/?p=4232"},"modified":"2024-06-17T17:43:00","modified_gmt":"2024-06-17T08:43:00","slug":"enocean-easyfit-single%e3%82%92node-red%e3%81%a7%e5%8b%95%e3%81%8b%e3%81%97%e3%81%a6%e3%81%bf%e3%82%88%e3%81%86","status":"publish","type":"post","link":"https:\/\/blog.smartlight.co.jp\/?p=4232","title":{"rendered":"EnOcean Easyfit Single\u3092Node-RED\u3067\u52d5\u304b\u3057\u3066\u307f\u3088\u3046"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u306f\u3058\u3081\u306b<\/h2>\n\n\n\n<p>\u4e2d\u7551\u3055\u3093\u306b\u3001\u30c7\u30d0\u30a4\u30b9\u3092\u8cb8\u3057\u3066\u9802\u3044\u305f\u306e\u3067\u52d5\u4f5c\u3055\u305b\u3066\u307f\u308b<br>\u4eca\u56de\u306fNode-RED\u3092\u4f7f\u7528\u3057\u3066\u52d5\u4f5c\u3092\u3055\u305b\u3066\u3044\u304f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30c7\u30d0\u30a4\u30b9<\/h2>\n\n\n\n<p class=\"has-text-align-left\">\u30fb<strong>Easyfit Single<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-left\">EasyfitSingle\u306f\u3001\u96fb\u6c60\u3084\u914d\u7dda\u304c\u4e0d\u8981\u306a\u30ef\u30a4\u30e4\u30ec\u30b9\u30a8\u30cd\u30eb\u30ae\u30fc\u30cf\u30fc\u30d9\u30b9\u30c6\u30a3\u30f3\u30b0\u30b9\u30a4\u30c3\u30c1\u3067\u3059<br>\u30b9\u30a4\u30c3\u30c1\u3092\u62bc\u3059\u305f\u3073\u306b\u767a\u751f\u3059\u308b\u6a5f\u68b0\u7684\u30a8\u30cd\u30eb\u30ae\u30fc\u3092\u96fb\u6c17\u306b\u5909\u63db\u3057\u3001EnOcean\u6280\u8853\u3067\u7121\u7dda\u4fe1\u53f7\u3092\u9001\u4fe1\u3057\u307e\u3059<br>\u88fd\u54c1URL:<a href=\"https:\/\/00m.in\/NnbOS\">https:\/\/00m.in\/NnbOS<\/a><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1005\" height=\"1024\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-43-1005x1024.png\" alt=\"\" class=\"wp-image-4287\" style=\"width:497px;height:auto\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-43-1005x1024.png 1005w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-43-294x300.png 294w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-43-768x783.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-43.png 1104w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-43-1005x1024.png 856w\" sizes=\"auto, (max-width: 1005px) 100vw, 1005px\" \/><\/figure>\n<\/div>\n\n\n<p>\u30fb<strong>EnOcean USB\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 USB400J<\/strong><br>EnOcean USB\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 USB400J\u306f\u3001EnOcean\u7121\u7dda\u901a\u4fe1\u3092PC\u3084\u4ed6\u306eUSB\u5bfe\u5fdc\u30c7\u30d0\u30a4\u30b9\u306b\u7c21\u5358\u306b\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306e\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u3067\u3059<br>\u3053\u306e\u30c7\u30d0\u30a4\u30b9\u306f\u3001EnOcean\u306e\u7121\u7dda\u30bb\u30f3\u30b5\u30fc\u3084\u30a2\u30af\u30c1\u30e5\u30a8\u30fc\u30bf\u30fc\u3068\u901a\u4fe1\u3057\u3001\u30c7\u30fc\u30bf\u3092PC\u3084\u30b9\u30de\u30fc\u30c8\u30db\u30fc\u30e0\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u306b\u9001\u4fe1\u3059\u308b\u30d6\u30ea\u30c3\u30b8\u3068\u3057\u3066\u6a5f\u80fd\u3057\u307e\u3059<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"419\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-44-1024x419.png\" alt=\"\" class=\"wp-image-4288\" style=\"width:700px;height:auto\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-44-1024x419.png 1024w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-44-300x123.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-44-768x314.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-44-1536x629.png 1536w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-44.png 1600w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-44-1024x419.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8b\u524d\u6e96\u5099<\/h2>\n\n\n\n<p>\u4eca\u56de\u306f\u3001Easyfit\u3092\u52d5\u304b\u3059\u306e\u306bNode-RED\u3092\u4f7f\u7528\u3059\u308b<br>\u6e96\u5099\u3059\u308b\u7269\u3068\u3057\u3066\u306f\u4ee5\u4e0b\u304c\u5fc5\u8981\u3067\u3059<br>\u30fbUSB\u3092USBport\u306b\u633f\u5165\u3059\u308b<br>\u30fbNode-RED\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br>\u30fbNode-RED\u5185\u3067node-red-node-serialport\u3092\u8ffd\u52a0\u3059\u308b<br>\u3053\u3053\u304b\u3089\u306fnode-red-node-serialport\u306e\u8ffd\u52a0\u65b9\u6cd5\u3092\u8a18\u3057\u3066\u3044\u304d\u307e\u3059<br>\u6700\u521d\u306bNode-RED\u3092\u958b\u3044\u3066\u53f3\u4e0a\u306e\u30cf\u30f3\u30d0\u30fc\u30ac\u30fc\u30e1\u30cb\u30e5\u30fc\u3092\u9078\u629e\u3057\u307e\u3059<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"515\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-134123-1024x515.png\" alt=\"\" class=\"wp-image-4245\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-134123-1024x515.png 1024w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-134123-300x151.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-134123-768x386.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-134123.png 1533w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-134123-1024x515.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u6b21\u306b\u30d1\u30ec\u30c3\u30c8\u306e\u7ba1\u7406\u3092\u62bc\u4e0b\u3057\u307e\u3059<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"541\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-134437-1024x541.png\" alt=\"\" class=\"wp-image-4247\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-134437-1024x541.png 1024w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-134437-300x158.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-134437-768x406.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-134437-1536x812.png 1536w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-134437.png 1853w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-134437-1024x541.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u30ce\u30fc\u30c9\u306e\u8ffd\u52a0\u3092\u62bc\u4e0b\u5f8c\u3001node-red-node-serialport\u3092\u9078\u629e\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"560\" height=\"315\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-103005.png\" alt=\"\" class=\"wp-image-4248\" \/><\/figure>\n\n\n\n<p>\u8ffd\u52a0\u5f8c\u306b\u30d1\u30ec\u30c3\u30c8\u3092\u898b\u308b\u3068\u4ee5\u4e0b\u306e\u753b\u50cf\u306e\u30ce\u30fc\u30c9\u304c\u8ffd\u52a0\u3055\u308c\u3066\u3044\u307e\u3059<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"126\" height=\"146\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-103136.png\" alt=\"\" class=\"wp-image-4250\" \/><\/figure>\n\n\n\n<p>\u3053\u308c\u3067\u4e8b\u524d\u6e96\u5099\u306fOK\u3067\u3059<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Noed-RED\u3067\u52d5\u304b\u3059<\/h2>\n\n\n\n<p>\u3053\u3053\u304b\u3089\u306fNode-RED\u3092\u4f7f\u3063\u3066EASYFIT\u3092\u62bc\u3057\u305f\u3089\u3001ON\u30fbOFF\u3092\u5207\u308a\u66ff\u3048\u308b\u3092\u76ee\u6307\u3057\u3066\u3044\u304d\u307e\u3059<\/p>\n\n\n\n<p>\u307e\u305a\u306f\u6700\u521d\u306b\u3001\u7c21\u5358\u306b\u52d5\u304b\u3057\u3066\u307f\u307e\u3057\u3087\u3046<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"484\" height=\"212\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-140522.png\" alt=\"\" class=\"wp-image-4253\" \/><\/figure>\n\n\n\n<p>\u914d\u7f6e\u3057\u3066\u7e4b\u3044\u3060\u3060\u3051\u3067\u306f\u52d5\u304b\u306a\u3044\u3067\u306eserial\u306e\u8a2d\u5b9a\u3092\u3057\u3066\u3044\u307e\u3059<br>serial in\u306e\u30ce\u30fc\u30c9\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u958b\u304d\u307e\u3059<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"495\" height=\"240\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-20.png\" alt=\"\" class=\"wp-image-4259\" \/><\/figure>\n\n\n\n<p>\u30da\u30f3\u306e\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u3068\u3053\u308d\u304c\u51fa\u3066\u304d\u307e\u3059<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"497\" height=\"635\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-23.png\" alt=\"\" class=\"wp-image-4262\" \/><\/figure>\n\n\n\n<p>\u3053\u3053\u307e\u3067\u6765\u305f\u3089\u4e00\u5ea6\u3069\u3053\u306eUSBport\u306bUSB\u304c\u523a\u3055\u3063\u3066\u3044\u308b\u304b\u78ba\u8a8d\u306e\u70ba\u306b\u3001\u30c7\u30d0\u30a4\u30b9\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u306b\u884c\u304d\u307e\u3059<br>\u4eca\u56de\u306fCOM6\u306b\u523a\u3055\u3063\u3066\u3044\u305f\u306e\u3092\u78ba\u8a8d\u3057\u307e\u3057\u305f<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"401\" height=\"87\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-24.png\" alt=\"\" class=\"wp-image-4263\" \/><\/figure>\n\n\n\n<p>\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u3092\u8a2d\u5b9a\u3059\u308b\u70ba\u306b\u3001\u6a2a\u306e\u866b\u773c\u93e1\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u307e\u3059<br>\u4eca\u56de\u306fCOM6\u306b\u523a\u3057\u3066\u3044\u305f\u306e\u3067COM6\u3092\u9078\u629e<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"525\" height=\"947\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-25.png\" alt=\"\" class=\"wp-image-4264\" \/><\/figure>\n\n\n\n<p>\u5f8c\u306e\u8a2d\u5b9a\u306f\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u306b\u3057\u307e\u3057\u305f<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"497\" height=\"541\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-35.png\" alt=\"\" class=\"wp-image-4274\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>\u5f8c\u306fserial in node\u304c\u63a5\u7d9a\u6e08\u306b\u306a\u3063\u3066\u3044\u305f\u3089\u5927\u4e08\u592b\u3067\u3059<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"130\" height=\"43\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-29.png\" alt=\"\" class=\"wp-image-4268\" style=\"width:432px;height:auto\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>\u4e00\u5ea6\u62bc\u3057\u3066\u307f\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u69d8\u306a\u7d50\u679c\u304c\u8fd4\u3063\u3066\u6765\u307e\u3057\u305f<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"553\" height=\"146\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-32.png\" alt=\"\" class=\"wp-image-4271\" \/><\/figure>\n\n\n\n<p>\u3053\u308c\u3067\u306f\u5168\u304f\u4f55\u304c\u60c5\u5831\u3068\u3057\u3066\u5e30\u3063\u3066\u6765\u3066\u3044\u308b\u304b\u5206\u304b\u3089\u306a\u3044\u306e\u3067\u3001\u79c1\u305f\u3061\u304c\u5206\u304b\u308b\u3088\u3046\u306b\u51e6\u7406\u3092\u52a0\u3048\u307e\u3059<\/p>\n\n\n\n<p>Fuction node\u306b\u51e6\u7406\u3092\u66f8\u3044\u3066\u52a0\u3048\u3066\u884c\u304d\u307e\u3059<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"658\" height=\"86\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-33.png\" alt=\"\" class=\"wp-image-4272\" \/><\/figure>\n\n\n\n<p>\u4eca\u56de\u306f\u51e6\u7406\u306e\u53c2\u7167\u306b\u30a2\u30fc\u30df\u30f3\u682a\u5f0f\u4f1a\u793e\u306e\u670d\u90e8\u3055\u3093\u304c\u516c\u958b\u3057\u3066\u3044\u308b\u3082\u306e\u5c11\u3057\u624b\u3092\u52a0\u3048\u3066\u4f7f\u7528\u3057\u305f<br>\u53c2\u7167\uff1a<a href=\"https:\/\/ermine.co.jp\/2017\/10\/08\/node-red_enocean\/\">Node-RED\u3067EnOcean\u306e\u96fb\u6587\u3092\u30c7\u30b3\u30fc\u30c9\u3059\u308b\u30ce\u30fc\u30c9\u3092\u8a66\u4f5c\u3057\u307e\u3057\u305f<\/a><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>var date = new Date();\n\/\/\nvar ESP3_Packet = msg.payload;\n\/\/\nvar Header = ESP3_Packet.slice(1, 5);\nvar DataLength = 256 * ESP3_Packet<img decoding=\"async\" class=\"ranking-number\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/themes\/jin\/img\/rank01.png\" \/> + ESP3_Packet<img decoding=\"async\" class=\"ranking-number\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/themes\/jin\/img\/rank02.png\" \/>;\n\/\/\nvar RawData = ESP3_Packet.slice(6, 6 + DataLength);\nvar ERP2_Header = RawData.slice(0, 1).toString(&quot;hex&quot;);\nvar EEP = &quot;RPS&quot;;\nvar OriginatorID = &quot;00000000&quot;;\nvar Data1 = &quot;00&quot;;\nvar Data4 = &quot;00000000&quot;;\n\/\/\nvar OptionalData = ESP3_Packet.slice(6 + DataLength, 8 + DataLength);\nvar SubTelNum = OptionalData.slice(0, 1);\nvar dBm = OptionalData.slice(1, 2);\n\/\/\nswitch (ERP2_Header) {\n    \/\/normal telegram\n    case &quot;20&quot;:\/\/RPS telegram\n        EEP = &quot;RPS&quot;;\n        OriginatorID = RawData.slice(1, 5).toString(&quot;hex&quot;);\n        Data1 = RawData.slice(5, 6).toString(&quot;hex&quot;);\n        break;\n    case &quot;21&quot;:\/\/1BS normal telegram\n        EEP = &quot;1BS&quot;;\n        OriginatorID = RawData.slice(1, 5).toString(&quot;hex&quot;);\n        Data1 = RawData.slice(5, 6).toString(&quot;hex&quot;);\n        break;\n    case &quot;22&quot;:\/\/4BS normal telegram\n        EEP = &quot;4BS&quot;;\n        OriginatorID = RawData.slice(1, 5).toString(&quot;hex&quot;);\n        Data4 = RawData.slice(5, 9).toString(&quot;hex&quot;);\n        break;\n    \/\/teach-in telegram\n    case &quot;61&quot;:\/\/1BS teach-in telegram\n        EEP = &quot;1BS teach-in&quot;;\n        OriginatorID = RawData.slice(3, 7).toString(&quot;hex&quot;);\n        Data1 = RawData.slice(7, 8).toString(&quot;hex&quot;);\n        break;\n    case &quot;62&quot;:\/\/4BS teach-in telegram\n        EEP = &quot;4BS teach-in&quot;;\n        OriginatorID = RawData.slice(3, 7).toString(&quot;hex&quot;);\n        Data4 = RawData.slice(7, 11).toString(&quot;hex&quot;);\n        break;\n    default:\n        break;\n}\n\nmsg.payload = {\n    Time: date.toString(),\n    OriginatorID: OriginatorID,\n    EEP: EEP,\n    Data1: Data1,\n    Data4: Data4,\n    SubTelNum: SubTelNum,\n    dBm: dBm,\n};<\/code><\/pre><\/div>\n\n\n\n<p><br>\u30c7\u30d7\u30ed\u30a4\u3092\u3057\u307e\u3059\u3002\u4eca\u56de\u306f\u5206\u304b\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u4e0a\u306eData1\u304c84\u306e\u6642\u306f\u62bc\u3057\u305f\u6642\u3001\u4e0b\u306e<br>Data1\u304c00\u306e\u6642\u306f\u30dc\u30bf\u30f3\u3092\u8a71\u3057\u305f\u6642\u3067\u3059<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"455\" height=\"458\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-155126.png\" alt=\"\" class=\"wp-image-4276\" \/><\/figure>\n\n\n\n<p>\u3053\u3053\u307e\u3067\u3067EASYFIT\u3092\u62bc\u3057\u305f\u3068\u304d\u306b\u3001Node-RED\u5074\u3067\u30dc\u30bf\u30f3\u306e\u62bc\u4e0b\u306e\u60c5\u5831\u3092\u53d7\u4fe1\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3057\u305f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u3089ON\u30fbOFF\u3092\u5207\u308a\u66ff\u3048\u308b<\/h2>\n\n\n\n<p>\u3053\u3053\u304b\u3089\u306fEASYFIT\u3092\u62bc\u3057\u305f\u3089\u3001ON\u30fbOFF\u3092\u5207\u308a\u66ff\u3048\u308b\u3092\u3084\u3063\u3066\u3044\u304d\u307e\u3059<br>\u5148\u307b\u3069\u306ebebug\u3067\u898b\u305fData1\u306b\u5165\u3063\u3066\u3044\u305f84\u3068\u3044\u3046\u6570\u5b57\u304c\u3042\u308a\u307e\u3059<br>EASYFIT\u306f\u30dc\u30bf\u30f3\u306e\u5224\u5b9a\u304c\u4e0a\u4e0b\u306b\u3042\u308a\u3001\u4e0a\u306f84\u4e0b\u306f88\u3068\u306a\u3063\u3066\u3044\u307e\u3059<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"857\" height=\"288\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-160630.png\" alt=\"\" class=\"wp-image-4279\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-160630.png 857w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-160630-300x101.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-160630-768x258.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-160630.png 856w\" sizes=\"auto, (max-width: 857px) 100vw, 857px\" \/><\/figure>\n\n\n\n<p>84\u306888\u304c\u30dc\u30bf\u30f3\u3092\u62bc\u4e0b\u3055\u308c\u305f\u3068\u3044\u3046\u610f\u5473\u306a\u306e\u3067\u3001function\u306784\u306888\u304c\u62bc\u4e0b\u3055\u308c\u305f\u3089\u3053\u3061\u3089\u5074\u3067ON\u30fbOFF\u3092\u5207\u308a\u66ff\u3048\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u304d\u307e\u3059<br>\u30dc\u30bf\u30f3\u3092\u96e2\u3057\u305f\u6642\u306e00\u306f\u4f55\u3082\u8fd4\u3057\u307e\u305b\u3093<br>\u307e\u305f\u30b9\u30a4\u30c3\u30c1\u306e\u72b6\u614b\u3092\u4fdd\u6301\u3059\u308b\u70ba\u306b\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u306b\u683c\u7d0d\u3057\u3066\u3001\u3069\u3053\u304b\u3089\u3067\u3082\u72b6\u614b\u3092\u307f\u308c\u307e\u3059<br>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u6700\u521d\u306fOFF\u306b\u306a\u3063\u3066\u3044\u307e\u3059<br>\u5148\u307b\u3069\u51fa\u3057\u305f\u30b3\u30fc\u30c9\u306b\u624b\u3092\u52a0\u3048\u307e\u3057\u305f<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>var date = new Date();\n\/\/\nvar ESP3_Packet = msg.payload;\n\/\/\nvar Header = ESP3_Packet.slice(1, 5);\nvar DataLength = 256 * ESP3_Packet<img decoding=\"async\" class=\"ranking-number\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/themes\/jin\/img\/rank01.png\" \/> + ESP3_Packet<img decoding=\"async\" class=\"ranking-number\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/themes\/jin\/img\/rank02.png\" \/>;\n\/\/\nvar RawData = ESP3_Packet.slice(6, 6 + DataLength);\nvar ERP2_Header = RawData.slice(0, 1).toString(&quot;hex&quot;);\nvar EEP = &quot;RPS&quot;;\nvar OriginatorID = &quot;00000000&quot;;\nvar Data1 = &quot;00&quot;;\nvar Data4 = &quot;00000000&quot;;\n\/\/\nvar OptionalData = ESP3_Packet.slice(6 + DataLength, 8 + DataLength);\nvar SubTelNum = OptionalData.slice(0, 1);\nvar dBm = OptionalData.slice(1, 2);\n\/\/\nswitch (ERP2_Header) {\n    \/\/normal telegram\n    case &quot;20&quot;:\/\/RPS telegram\n        EEP = &quot;RPS&quot;;\n        OriginatorID = RawData.slice(1, 5).toString(&quot;hex&quot;);\n        Data1 = RawData.slice(5, 6).toString(&quot;hex&quot;);\n        break;\n    case &quot;21&quot;:\/\/1BS normal telegram\n        EEP = &quot;1BS&quot;;\n        OriginatorID = RawData.slice(1, 5).toString(&quot;hex&quot;);\n        Data1 = RawData.slice(5, 6).toString(&quot;hex&quot;);\n        break;\n    case &quot;22&quot;:\/\/4BS normal telegram\n        EEP = &quot;4BS&quot;;\n        OriginatorID = RawData.slice(1, 5).toString(&quot;hex&quot;);\n        Data4 = RawData.slice(5, 9).toString(&quot;hex&quot;);\n        break;\n    \/\/teach-in telegram\n    case &quot;61&quot;:\/\/1BS teach-in telegram\n        EEP = &quot;1BS teach-in&quot;;\n        OriginatorID = RawData.slice(3, 7).toString(&quot;hex&quot;);\n        Data1 = RawData.slice(7, 8).toString(&quot;hex&quot;);\n        break;\n    case &quot;62&quot;:\/\/4BS teach-in telegram\n        EEP = &quot;4BS teach-in&quot;;\n        OriginatorID = RawData.slice(3, 7).toString(&quot;hex&quot;);\n        Data4 = RawData.slice(7, 11).toString(&quot;hex&quot;);\n        break;\n    default:\n        break;\n}\n\nvar SwitchState = global.get(&#039;buttonState_&#039; + OriginatorID) || &quot;OFF&quot;;\n\nif (Data1 === &quot;84&quot; || Data1 === &quot;88&quot;) { \/\/ \u30dc\u30bf\u30f3\u62bc\u4e0b\u6642\u306e\u30c7\u30fc\u30bf\n    SwitchState = (SwitchState === &quot;OFF&quot;) ? &quot;ON&quot; : &quot;OFF&quot;;\n    global.set(&#039;buttonState_&#039; + OriginatorID, SwitchState); \/\/ \u65b0\u3057\u3044\u72b6\u614b\u3092\u4fdd\u5b58\n}else if(Data1===&quot;00&quot;){\n    return null;\n}\n\nmsg.payload = {\n    Time: date.toString(),\n    OriginatorID: OriginatorID,\n    SwitchState: SwitchState,\n    EEP: EEP,\n    Data1: Data1,\n    Data4: Data4,\n    SubTelNum: SubTelNum,\n    dBm: dBm,\n};\n\nreturn msg;\n<\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>\u8ffd\u52a0\u3067\u3001\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066\u3044\u306a\u3044\u6642\u3067\u3082\u4e0d\u660e\u306a\u53d7\u4fe1\u3092\u3057\u3066\u3044\u308b\u306e\u3067debeg\u3067\u306f\u3001\u6307\u5b9a\u3057\u3066\u3044\u308b\u30e2\u30ce\u4ee5\u5916\u306e\u60c5\u5831\u3092\u8868\u793a\u3057\u305f\u304f\u306a\u3044\u306e\u3067switch node\u3092\u631f\u307f\u307e\u3057\u305f (\u9ed2\u77e2\u5370\u4ee5\u4e0b\u4e0d\u660e\u306a\u53d7\u4fe1)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"973\" height=\"641\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-161854.png\" alt=\"\" class=\"wp-image-4283\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-161854.png 973w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-161854-300x198.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-161854-768x506.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-06-17-161854.png 856w\" sizes=\"auto, (max-width: 973px) 100vw, 973px\" \/><\/figure>\n\n\n\n<p>\u6700\u7d42\u7684\u306anode\u914d\u7f6e<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"748\" height=\"101\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-40.png\" alt=\"\" class=\"wp-image-4284\" \/><\/figure>\n\n\n\n<p>switch node\u8a2d\u5b9a<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"970\" height=\"618\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-41.png\" alt=\"\" class=\"wp-image-4285\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-41.png 970w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-41-300x191.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-41-768x489.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-41.png 856w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/figure>\n\n\n\n<p><strong>\u7d50\u679c\u3068\u3057\u3066\u306f\u3001\u30dc\u30bf\u30f3\u3092\u62bc\u4e0b\u3057\u305f\u5ea6\u306bON\u30fbOFF\u3092\u5207\u308a\u66ff\u3048\u308b\u4e8b\u304c\u51fa\u6765\u305f<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"637\" height=\"1024\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-42-637x1024.png\" alt=\"\" class=\"wp-image-4286\" style=\"width:480px;height:auto\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u4e2d\u7551\u3055\u3093\u306b\u3001\u30c7\u30d0\u30a4\u30b9\u3092\u8cb8\u3057\u3066\u9802\u3044\u305f\u306e\u3067\u52d5\u4f5c\u3055\u305b\u3066\u307f\u308b\u4eca\u56de\u306fNode-RED\u3092\u4f7f\u7528\u3057\u3066\u52d5\u4f5c\u3092\u3055\u305b\u3066\u3044\u304f \u30c7\u30d0\u30a4\u30b9 \u30fbEasyfit Single EasyfitSingle\u306f\u3001\u96fb\u6c60\u3084\u914d\u7dda\u304c\u4e0d\u8981\u306a\u30ef\u30a4\u30e4\u30ec\u30b9\u30a8\u30cd\u30eb\u30ae<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"","_jin_last_featured_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-4232","post","type-post","status-publish","format-standard","hentry","category-intern"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/4232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4232"}],"version-history":[{"count":2,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/4232\/revisions"}],"predecessor-version":[{"id":4291,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/4232\/revisions\/4291"}],"wp:attachment":[{"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}