{"id":4609,"date":"2024-06-28T14:41:24","date_gmt":"2024-06-28T05:41:24","guid":{"rendered":"https:\/\/blog.smartlight.co.jp\/?p=4609"},"modified":"2024-07-12T16:59:13","modified_gmt":"2024-07-12T07:59:13","slug":"enocean%e6%b8%a9%e6%b9%bf%e5%ba%a6%e7%85%a7%e5%ba%a6%e3%82%bb%e3%83%b3%e3%82%b5%e3%81%ae%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92grafana%e3%81%a7%e5%8f%af%e8%a6%96%e5%8c%96%e3%81%95%e3%81%9b%e3%82%8b6","status":"publish","type":"post","link":"https:\/\/blog.smartlight.co.jp\/?p=4609","title":{"rendered":"EnOcean\u6e29\u6e7f\u5ea6\u7167\u5ea6\u30bb\u30f3\u30b5\u306e\u30c7\u30fc\u30bf\u3092Grafana\u3067\u53ef\u8996\u5316\u3055\u305b\u308b(6\u65e5\u76ee)"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-jin-gb-block-box-with-headline kaisetsu-box2\"><div class=\"kaisetsu-box2-title\">\u76ee\u6b21<\/div>\n<p><a href=\"#a\">\u306f\u3058\u3081\u306b<\/a><\/p>\n\n\n\n<p><a href=\"#a1\">\u4f7f\u7528\u30c7\u30d0\u30a4\u30b9<\/a><\/p>\n\n\n\n<p><a href=\"#b\">\u6e96\u5099<\/a><\/p>\n\n\n\n<p><a href=\"#a2\">\u30d5\u30ed\u30fc\u89e3\u8aac<\/a><\/p>\n\n\n\n<p><a href=\"#a3\">InfluxDB\u3067\u30c7\u30fc\u30bf\u3092\u683c\u7d0d<\/a><\/p>\n\n\n\n<p><a href=\"#a4\">Grafana\u3067\u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"a\">\u306f\u3058\u3081\u306b<\/h2>\n\n\n\n<p>\u4eca\u56de\u306f\u300cEnOcean IoT\u30de\u30eb\u30c1\u30bb\u30f3\u30b5\u30fc EMSIJ\u300d\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3055\u305b\u3066\u3044\u308bNode-RED\u306e\u4f5c\u6210\u6e08\u307f\u306e\u30d5\u30ed\u30fc\u306e\u89e3\u6790\u30fb\u89e3\u8aac\u3068\u3001\u305d\u3053\u304b\u3089\u53d6\u5f97\u3057\u305f\u30c7\u30fc\u30bf\u3092InfluxDB\u306b\u683c\u7d0d\u5f8c\u3001Grafana\u3067\u53ef\u8996\u5316\u3055\u305b\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3059\u308b\u3002<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"a1\">\u4f7f\u7528\u30c7\u30d0\u30a4\u30b9<\/h2>\n\n\n\n<p class=\"has-medium-font-size\"><span class=\"marker2\"><strong>\u30fbEnOcean IoT\u30de\u30eb\u30c1\u30bb\u30f3\u30b5\u30fcEMSIJ<\/strong><\/span><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1003\" height=\"753\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-271.png\" alt=\"\" class=\"wp-image-4620\" style=\"width:539px;height:auto\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-271.png 1003w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-271-300x225.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-271-768x577.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-271.png 856w\" sizes=\"auto, (max-width: 1003px) 100vw, 1003px\" \/><\/figure>\n<\/div>\n\n\n<p>\u88fd\u54c1\u60c5\u5831\uff1a<a href=\"https:\/\/www.enocean-alliance.org\/ja\/product\/emsij-iot-multisensor-928-mhz\/\">https:\/\/www.enocean-alliance.org\/ja\/product\/emsij-iot-multisensor-928-mhz\/<\/a><br>\u5f53\u793e\u5546\u54c1\u7d39\u4ecb\u30b5\u30a4\u30c8\uff1a<a href=\"https:\/\/smartlight.co.jp\/product\/enocean-iot-multi-sensor-emsij\/\">https:\/\/smartlight.co.jp\/product\/enocean-iot-multi-sensor-emsij\/<\/a><\/p>\n\n\n\n<p>EMSIJ\u306fEnOcean(928MHz)\u7121\u7dda\u898f\u683c\u306b\u57fa\u3065\u3044\u3066\u901a\u4fe1\u3059\u308b<strong>\u592a\u967d\u96fb\u6c60\u767a\u96fb\u306b\u3088\u308b\u7121\u7ddaIoT\u30bb\u30f3\u30b5\u30fc<\/strong>\u3002\u4e3b\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u300c<strong>\u6e29\u5ea6\u3001\u6e7f\u5ea6\u3001\u7167\u5ea6\u3001\u52a0\u901f\u5ea6\/\u59ff\u52e2\u306e\u6e2c\u5b9a<\/strong>\u300d\u306e\u305f\u3081\u306e\u58c1\u639b\u3051\u578b\u307e\u305f\u306f\u6a5f\u5668\u53d6\u308a\u4ed8\u3051\u578b\u306e\u30bb\u30f3\u30b5\u30fc\u3002iOS\u3084Android\u7528\u306eNFC\u30a2\u30d7\u30eaEnOceanTool\u3067\u8a2d\u5b9a\u3092\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3002<br><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><span class=\"marker2\"><strong>\u30fb<strong>EnOcean USB\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 USB400J<\/strong><\/strong><\/span><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter 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-7-1024x419.png\" alt=\"\" class=\"wp-image-4241\" style=\"width:452px;height:auto\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-7-1024x419.png 1024w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-7-300x123.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-7-768x315.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-7-1536x629.png 1536w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-7.png 1643w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-7-1024x419.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>\u88fd\u54c1\u60c5\u5831\uff1a<a href=\"https:\/\/www.switch-science.com\/products\/1845\">https:\/\/www.switch-science.com\/products\/1845<\/a><\/p>\n\n\n\n<p><strong>USB400J<\/strong>\u306f\u3001EnOcean\u306e\u7121\u7dda\u901a\u4fe1\u3092PC\u3084\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u306b\u7c21\u5358\u306b\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306eUSB\u30c7\u30d0\u30a4\u30b9\u3067\u3042\u308b\u3002\u3053\u306e\u30c7\u30d0\u30a4\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001EnOcean\u5bfe\u5fdc\u306e\u30bb\u30f3\u30b5\u30fc\u3084\u30b9\u30a4\u30c3\u30c1\u304b\u3089\u306e\u30c7\u30fc\u30bf\u3092\u53d7\u4fe1\u3057\u3001\u305d\u308c\u3092PC\u3084\u4ed6\u306e\u30c7\u30d0\u30a4\u30b9\u306b\u8ee2\u9001\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"b\">\u6e96\u5099<\/h2>\n\n\n\n<p>\u2460 <strong>\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/strong><\/p>\n\n\n\n<p>\u3000Node-RED\u3001InfluxDB\u3001Grafana\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3068\u8d77\u52d5\u306b\u95a2\u3057\u3066\u306f\u904e\u53bb\u306e\u30d6\u30ed\u30b0\u3092\u53c2\u7167<\/p>\n\n\n\nhttps:\/\/blog.smartlight.co.jp\/?p=4538&#038;preview_id=4538&#038;preview_nonce=495fd5eda8&#038;preview=true\n\n\n\n<p><br><strong>\u2781 USB\u30c9\u30f3\u30b0\u30eb\u633f\u5165<\/strong><br>\u300cEnOcean IoT\u30de\u30eb\u30c1\u30bb\u30f3\u30b5\u30fcEMSIJ\u300d\u30bb\u30f3\u30b5\u30fc\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u3001PC\u306bUSB\u30c9\u30f3\u30b0\u30eb\u3092\u633f\u5165\u3059\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"761\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-13-1024x761.png\" alt=\"\" class=\"wp-image-4251\" style=\"width:410px;height:auto\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-13-1024x761.png 1024w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-13-300x223.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-13-768x571.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-13.png 1137w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-13-1024x761.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"a1\">\u30d5\u30ed\u30fc\u89e3\u8aac<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"575\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-272-1024x575.png\" alt=\"\" class=\"wp-image-4621\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-272-1024x575.png 1024w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-272-300x169.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-272-768x432.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-272-1536x863.png 1536w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-272-320x180.png 320w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-272-640x360.png 640w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-272-1280x720.png 1280w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-272.png 1735w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-272-1024x575.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><span class=\"marker2\">\u2460 \u300c<strong>\u30b7\u30ea\u30a2\u30eb<\/strong>\u300d\u30ce\u30fc\u30c9<\/span><\/p>\n\n\n\n<p>\u3000\u30fbEnOcean\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u306e\u30b7\u30ea\u30a2\u30eb\u30c7\u30fc\u30bf\u3092USB400J\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u3089\u53d7\u4fe1\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><span class=\"marker2\">\u2781\u300c<strong>Function<\/strong>\u300d\u30ce\u30fc\u30c9(<strong>\u5909\u63db\u7528<\/strong>)<\/span><\/p>\n\n\n\n<p>\u3000\u30fb\u3053\u306e\u30ce\u30fc\u30c9\u306e\u76ee\u7684\u306f\u3001\u53d7\u4fe1\u3057\u305f\u8907\u96d1\u306a\u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf\u3092\u4eba\u9593\u3084\u30b7\u30b9\u30c6\u30e0\u304c\u6271\u3044\u3084\u3059\u3044\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u6b21\u306e\u30ce\u30fc\u30c9\u304c\u5fc5\u8981\u306a\u60c5\u5831\u306b\u7c21\u5358\u306b\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u3068\u306a\u308b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>\/\/ \u30c7\u30fc\u30bf\u305d\u306e\u3082\u306e\nvar buf = msg.payload;\n\/\/ \u30c7\u30fc\u30bf\u306e\u30b3\u30d4\u30fc\uff08\u691c\u8a3c\u7528\uff09\nvar rawData = buf.slice(0, buf.length);\n\/\/ \u53d6\u308a\u51fa\u3057\u3084\u3059\u3044\u3088\u3046\u306bhex\u5909\u63db\u3057\u305f\u3082\u306e\nvar rawByte = buf.toString(&quot;hex&quot;);\n\/\/ ESP3\u4ed5\u69d8\u306edataLength\u3092\u62fe\u3046\nvar dataLength = 255 * buf + buf;\n\/\/ ESP3\u4ed5\u69d8\u306eoptionalLength\u3092\u62fe\u3046\nvar optionalLength = buf;\n\/\/ packetType\nvar packetType = buf;\n\/\/ headerCRC\nvar headerCRC = buf[5];\n\/\/ dataLength\u306b\u57fa\u3065\u3044\u305f\u30c7\u30fc\u30bf\u90e8\u5206\u306e\u5207\u308a\u51fa\u3057\nvar rawDataByte = buf.slice(7, 7 + dataLength + 2);\n\nvar id = rawDataByte.slice(0, 4).toString(&quot;hex&quot;);\n\n\/\/ payload\u306b\u683c\u7d0d\nmsg.payload = {\n    rawData: rawData,\n    rawByte: rawByte,\n    dataLength: dataLength,\n    optionalLength: optionalLength,\n    packetType: packetType,\n    headerCRC: headerCRC,\n    rawDataByte: rawDataByte,\n    ID: id\n}\n\nreturn msg;<\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p><span class=\"marker2\">\u2782 \u300c<strong>Switch<\/strong>\u300d\u30ce\u30fc\u30c9<\/span><\/p>\n\n\n\n<p>\u3000\u30fb\u53d7\u4fe1\u3057\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u306eID\u306b\u57fa\u3065\u3044\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u7570\u306a\u308b\u51fa\u529b\u30dd\u30fc\u30c8\u306b\u632f\u308a\u5206\u3051\u308b\u5f79\u5272\u3092\u679c\u305f\u3059\u3002\u5177\u4f53\u7684\u306b\u306f\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u306eID\u304c\u7279\u5b9a\u306e\u5024\u306b\u4e00\u81f4\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3001\u4e00\u81f4\u3059\u308b\u5834\u5408\u306f\u5bfe\u5fdc\u3059\u308b\u51fa\u529b\u30dd\u30fc\u30c8\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"802\" height=\"1024\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-279-802x1024.png\" alt=\"\" class=\"wp-image-4628\" style=\"width:374px;height:auto\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><span class=\"marker2\">\u2783 \u300c<strong>Function<\/strong>\u300d\u30ce\u30fc\u30c9(<strong>\u89e3\u6790\u7528<\/strong>)<\/span><\/p>\n\n\n\n<p>\u3000\u30fb\u30bb\u30f3\u30b5\u30fc\u304b\u3089\u53d7\u4fe1\u3057\u305f\u30c7\u30fc\u30bf\u3092\u89e3\u6790\u3057\u3001\u5404\u7a2e\u30bb\u30f3\u30b5\u30fc\u5024\uff08\u6e29\u5ea6\u3001\u78c1\u529b\u3001\u7167\u5ea6\u3001\u6e7f\u5ea6\uff09\u3092\u62bd\u51fa\u3057\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u683c\u7d0d\u3059\u308b\u3002\u307e\u305f\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u3092\u4f7f\u3063\u3066\u7167\u5ea6\u306e\u6700\u5927\u5024\u3068\u6700\u5c0f\u5024\u3092\u8ffd\u8de1\u3059\u308b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>const rawData = msg.payload.rawDataByte;\n\n\/\/ Extract basic information\nmsg.id = rawData.slice(0, 4).toString(&#039;hex&#039;);\nmsg.dbm = rawData[15] * -1;\nmsg.stm550count = 1;\nmsg.type = &#039;STM550&#039;;\n\n\/\/ Extract data bytes\nconst d0 = 4;\nconst data = Array.from({ length: 9 }, (_, i) =&gt; rawData[d0 + i].toString(2).padStart(8, &#039;0&#039;));\n\nmsg.data = {\n    data_8: data[0],\n    data_7: data,\n    data_6: data,\n    data_5: data,\n    data_4: data,\n    data_3: data[5],\n    data_2: data[6],\n    data_1: data[7],\n    data_0: data[8]\n};\n\n\/\/ Calculate temperature\nconst temp = data[0] + data.slice(0, 2);\nmsg.temperature = Math.round((parseInt(temp, 2) \/ 10 - 40) * 100) \/ 100;\n\n\/\/ Calculate magnet\nmsg.magnet = parseInt(data[8].slice(3, 4), 2);\n\n\/\/ Calculate illumination\nconst illumination = data.slice(2) + data + data.slice(0, 3);\nmsg.illumination = parseInt(illumination, 2);\n\nconst IllValue = msg.illumination;\nlet IllmaxValue = global.get(&#039;maxIll2&#039;) || 0;\nlet IllminValue = global.get(&#039;minIll2&#039;) || 1000;\n\nif (IllmaxValue &lt; IllValue) {\n    IllmaxValue = IllValue;\n    global.set(&#039;maxIll2&#039;, IllmaxValue);\n}\nif (IllminValue &gt; IllValue) {\n    IllminValue = IllValue;\n    global.set(&#039;minIll2&#039;, IllminValue);\n}\n\nglobal.set(&#039;Ill&#039;, IllValue);\n\n\/\/ Calculate humidity\nconst humidity = data.slice(2, 6) + data.slice(0, 2);\nmsg.humidity = Math.round(parseInt(humidity, 2) * 20) \/ 10;\n\n\/\/ Aggregate data\nmsg.payload = {\n    id: msg.id,\n    dbm: msg.dbm,\n    stm550count: msg.stm550count,\n    type: msg.type,\n    temperature: msg.temperature,\n    magnet: msg.magnet,\n    illumination: msg.illumination,\n    humidity: msg.humidity,\n    time: Date.now()\n};\n\nreturn msg;<\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p><span class=\"marker2\">\u2784 \u300c<strong>MQTT\u30d6\u30ed\u30fc\u30ab\u30fc<\/strong>\u300d\u30ce\u30fc\u30c9<\/span><\/p>\n\n\n\n<p>\u3000\u30fb\u6307\u5b9a\u3055\u308c\u305fMQTT\u30d6\u30ed\u30fc\u30ab\u30fc\u306b\u5bfe\u3057\u3066\u5b89\u5168\u306b\u30c7\u30fc\u30bf\u3092\u9001\u4fe1\u3059\u308b\u3088\u3046\u306b\u69cb\u6210\u3055\u308c\u3066\u3044\u308b\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u89e3\u6790\u3055\u308c\u305fEnOcean\u30c7\u30fc\u30bf\u304c\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u4ed6\u306e\u30b7\u30b9\u30c6\u30e0\u3084\u30c7\u30d0\u30a4\u30b9\u306b\u914d\u4fe1\u3055\u308c\u308b\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><span class=\"marker2\">\u2784 \u300c<strong>\u30c7\u30d0\u30c3\u30b0<\/strong>\u300d\u30ce\u30fc\u30c9<\/span><\/p>\n\n\n\n<p>\u3000\u30fb\u30bb\u30f3\u30b5\u30fc\u306e\u30c7\u30fc\u30bf\u3092\u6b63\u5e38\u306b\u53d6\u5f97\u3067\u304d\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"615\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-275-1024x615.png\" alt=\"\" class=\"wp-image-4624\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-275-1024x615.png 1024w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-275-300x180.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-275-768x461.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-275-1536x923.png 1536w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-275-2048x1231.png 2048w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-275-1024x615.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u3000\u30fb\u4ee5\u4e0b\u306e\u5185\u5bb9\u304c\u53d6\u5f97\u3001\u30c7\u30d0\u30c3\u30b0\u3067\u8868\u793a\u3055\u308c\u308b<\/p>\n\n\n\n<div class=\"wp-block-jin-gb-block-box simple-box4\">\n<p>1. dbm = \u4fe1\u53f7\u5f37\u5ea6(\u5024\u304c\u4f4e\u3044\u307b\u3069\u4fe1\u53f7\u304c\u5f31\u3044)<br>2. temperature = \u6e29\u5ea6<br>3. magnet = \u78c1\u529b<br>4. illumination = \u7167\u5ea6(\u30eb\u30fc\u30e1\u30f3(\u7167\u5ea6\u306e\u5024))<br>5. humidity = \u6e7f\u5ea6(%)<br>6. time = \u30c7\u30fc\u30bf\u304c\u8a18\u9332\u3055\u308c\u305f\u6642\u9593<\/p>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">InfluxDB\u3067\u30c7\u30fc\u30bf\u3092\u683c\u7d0d<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><span class=\"marker2\">\u2460 Node-RED\u306e<strong>\u30d5\u30ed\u30fc\u5909\u66f4<\/strong><\/span><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p> \u300c<strong>MQTT-OUT<\/strong>\u300d\u30ce\u30fc\u30c9 \u2192\u300c<strong>Influxdb out<\/strong>\u300d\u30ce\u30fc\u30c9 <\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"145\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-282-1024x145.png\" alt=\"\" class=\"wp-image-4631\" style=\"width:700px;height:auto\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-282-1024x145.png 1024w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-282-300x42.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-282-768x109.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-282-1536x217.png 1536w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-282.png 1625w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-282-1024x145.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><span class=\"marker2\">\u2781 \u300c<strong>Influxdb out<\/strong>\u300d\u30ce\u30fc\u30c9 \u3092\u7de8\u96c6(\u8a2d\u5b9a\u3057\u305f\u5185\u5bb9\u3092\u5165\u529b)<\/span><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u3000\u30001. Organization \u30fb\u30fb\u30fb \u7d44\u7e54\u540d<br>\u3000\u30002. Bucket \u30fb\u30fb\u30fb \u30d0\u30b1\u30c3\u30c8\u540d<br>\u3000\u30003. Measurement \u30fb\u30fb\u30fb \u81ea\u8eab\u3067\u6307\u5b9a<br>\u3000\u30004. URL \u30fb\u30fb\u30fb http:\/\/localhost:8086<br>\u3000\u30005. Token \u30fb\u30fb\u30fbAPI\u30c8\u30fc\u30af\u30f3<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"402\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-286-1024x402.png\" alt=\"\" class=\"wp-image-4635\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-286-1024x402.png 1024w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-286-300x118.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-286-768x302.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-286-1536x603.png 1536w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-286.png 2042w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-286-1024x402.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><span class=\"marker2\">\u2782 InfluxDB\u306e<strong>DataExplorer<\/strong>\u3067\u30c7\u30fc\u30bf\u306e\u78ba\u8a8d<\/span><\/p>\n\n\n\n<p>\u3000 \u300c<strong>\u30d5\u30a3\u30fc\u30eb\u30c9<\/strong>\u300d\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u3067\u78ba\u8a8d\u3057\u305f\u3044\u30c7\u30fc\u30bf(\u7167\u5ea6\u30fb\u6e29\u5ea6\u30fb\u6e7f\u5ea6\u7b49)\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"496\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-288-1024x496.png\" alt=\"\" class=\"wp-image-4637\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-288-1024x496.png 1024w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-288-300x145.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-288-768x372.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-288-1536x744.png 1536w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-288-2048x992.png 2048w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-288-1024x496.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Grafana\u3067\u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316<\/h2>\n\n\n\n<p>\u2460 \u5de6\u4e0a\u306e\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u300c<strong>Connections<\/strong>\u300d\u2192\u300c<strong>Data Sources<\/strong>\u300d\u2192\u300c<strong>influxdb<\/strong>\u300d<br>\u3000 <strong>\u30d0\u30b1\u30c3\u30c8<\/strong>\u3084<strong>API\u30c8\u30fc\u30af\u30f3<\/strong>\u3092\u5909\u66f4\u3057\u305f\u5834\u5408\u306f\u3053\u3053\u3067\u7de8\u96c6\u3059\u308b<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"495\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-290-1024x495.png\" alt=\"\" class=\"wp-image-4640\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-290-1024x495.png 1024w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-290-300x145.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-290-768x371.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-290-1536x742.png 1536w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-290-2048x990.png 2048w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-290-1024x495.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>\u2781 \u5de6\u4e0a\u306e\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u300c<strong>Dashboards<\/strong>\u300d\u2192\u300c<strong>+ Create Dashboard<\/strong>\u300d \u2192 \u300c<strong>ADD Visualization<\/strong>\u300d \u2192 \u300c<strong>influxdb<\/strong>\u300d\u3092\u9078\u629e<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u2782 \u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u3092<strong>\u30af\u30a8\u30ea\u306b\u5165\u529b<\/strong> \u2192 \u300c<strong>Apply<\/strong>\u300d<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>from(bucket: &quot;mqtt&quot;)\n  |&gt; range(start: -30d) \/\/ \u904e\u53bb30\u65e5\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\n  |&gt; filter(fn: (r) =&gt; r._measurement == &quot;mqtt_influx&quot;)\n  |&gt; filter(fn: (r) =&gt; r._field == &quot;temperature&quot; or r._field == &quot;illumination&quot; or r._field == &quot;humidity&quot; or r._field == &quot;dbm&quot; or r._field == &quot;magnet&quot;)\n  |&gt; limit(n: 100) \/\/ \u76f4\u8fd1\u306e100\u4ef6\u3092\u8868\u793a<\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"497\" src=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-289-1024x497.png\" alt=\"\" class=\"wp-image-4638\" srcset=\"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-289-1024x497.png 1024w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-289-300x146.png 300w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-289-768x373.png 768w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-289-1536x746.png 1536w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-289-2048x995.png 2048w, https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/image-289-1024x497.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u2192 \u3053\u306e\u3088\u3046\u306a\u30b0\u30e9\u30d5\u304c\u8868\u793a\u3055\u308c\u308c\u3070\u53ef\u8996\u5316\u6210\u529f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u4eca\u56de\u306f\u300cEnOcean IoT\u30de\u30eb\u30c1\u30bb\u30f3\u30b5\u30fc EMSIJ\u300d\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3055\u305b\u3066\u3044\u308bNode-RED\u306e\u4f5c\u6210\u6e08\u307f\u306e\u30d5\u30ed\u30fc\u306e\u89e3\u6790\u30fb\u89e3\u8aac\u3068\u3001\u305d\u3053\u304b\u3089\u53d6\u5f97\u3057\u305f\u30c7\u30fc\u30bf\u3092InfluxDB\u306b\u683c\u7d0d\u5f8c\u3001Grafana\u3067\u53ef\u8996\u5316\u3055\u305b<\/p>\n","protected":false},"author":16,"featured_media":4644,"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-4609","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-intern"],"jetpack_featured_media_url":"https:\/\/blog.smartlight.co.jp\/wp-content\/uploads\/2024\/06\/\u30a2\u30a4\u30ad\u30e3\u30c3\u30c1.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/4609","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\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4609"}],"version-history":[{"count":7,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/4609\/revisions"}],"predecessor-version":[{"id":5286,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/4609\/revisions\/5286"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=\/wp\/v2\/media\/4644"}],"wp:attachment":[{"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.smartlight.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}