<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://fukudat.net/w/index.php?action=history&amp;feed=atom&amp;title=Projects%2FSensors</id>
	<title>Projects/Sensors - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://fukudat.net/w/index.php?action=history&amp;feed=atom&amp;title=Projects%2FSensors"/>
	<link rel="alternate" type="text/html" href="https://fukudat.net/w/index.php?title=Projects/Sensors&amp;action=history"/>
	<updated>2026-05-29T19:28:15Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://fukudat.net/w/index.php?title=Projects/Sensors&amp;diff=388&amp;oldid=prev</id>
		<title>2020年6月3日 (水) 16:01にFukudatによる</title>
		<link rel="alternate" type="text/html" href="https://fukudat.net/w/index.php?title=Projects/Sensors&amp;diff=388&amp;oldid=prev"/>
		<updated>2020-06-03T16:01:06Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2020年6月3日 (水) 16:01時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;1行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;1行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;主に[[Cacti]]と連動することを目的に、センサー類から出る時系列データを収集したり、直近の一定期間の平均をとる　API を用意した。[[Category:How-To]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;主に[[Cacti]]と連動することを目的に、センサー類から出る時系列データを収集したり、直近の一定期間の平均をとる　API を用意した。[[Category:How-To]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;GM&lt;/del&gt;-10]], [[USBRH]], [[IIJmio]] はこれでデータを集めて、Cacti とつながっている。&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;gm&lt;/ins&gt;-10]], [[USBRH]], [[IIJmio]] はこれでデータを集めて、Cacti とつながっている。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== API ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== API ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l14&quot; &gt;14行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;14行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;センサーカテゴリには以下のものがありそう。&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;センサーカテゴリには以下のものがありそう。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* temperature: 温度・湿度計 [[USBRH]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* temperature: 温度・湿度計 [[USBRH]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* radiation: ガイガーカウンタ [[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;GM&lt;/del&gt;-10]] のdose rate&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* radiation: ガイガーカウンタ [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;gm&lt;/ins&gt;-10]] のdose rate&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* iijmio: IIJmioの通信容量 [[IIJmio]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* iijmio: IIJmioの通信容量 [[IIJmio]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki-ja:diff::1.12:old-386:rev-388 --&gt;
&lt;/table&gt;</summary>
		<author><name>Fukudat</name></author>
		
	</entry>
	<entry>
		<id>https://fukudat.net/w/index.php?title=Projects/Sensors&amp;diff=386&amp;oldid=prev</id>
		<title>Fukudat: ページの作成:「主にCactiと連動することを目的に、センサー類から出る時系列データを収集したり、直近の一定期間の平均をとる　API を用...」</title>
		<link rel="alternate" type="text/html" href="https://fukudat.net/w/index.php?title=Projects/Sensors&amp;diff=386&amp;oldid=prev"/>
		<updated>2020-06-03T15:58:45Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「主に&lt;a href=&quot;/wiki/Cacti&quot; title=&quot;Cacti&quot;&gt;Cacti&lt;/a&gt;と連動することを目的に、センサー類から出る時系列データを収集したり、直近の一定期間の平均をとる　API を用...」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;主に[[Cacti]]と連動することを目的に、センサー類から出る時系列データを収集したり、直近の一定期間の平均をとる　API を用意した。[[Category:How-To]]&lt;br /&gt;
&lt;br /&gt;
[[GM-10]], [[USBRH]], [[IIJmio]] はこれでデータを集めて、Cacti とつながっている。&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
どれもアクセスにはDigest認証が必要。&lt;br /&gt;
&lt;br /&gt;
=== デバイスリスト ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP GET /api/sensors/[センサーカテゴリ名]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
センサーカテゴリにあるデバイスIDのリストを返す。&lt;br /&gt;
&lt;br /&gt;
センサーカテゴリには以下のものがありそう。&lt;br /&gt;
* temperature: 温度・湿度計 [[USBRH]]&lt;br /&gt;
* radiation: ガイガーカウンタ [[GM-10]] のdose rate&lt;br /&gt;
* iijmio: IIJmioの通信容量 [[IIJmio]]&lt;br /&gt;
&lt;br /&gt;
=== 最新の値を登録する ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP POST /api/sensors/[センサーカテゴリ名]/[デバイスID]/[タイムスタンプ]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
指定したセンサーカテゴリに所属するデバイスIDのタイムスタンプ時点の値を追加・更新する。&lt;br /&gt;
&lt;br /&gt;
=== 最新の値を読む ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP GET /api/sensors/[センサーカテゴリ名]/[デバイスID]/last&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
指定したセンサーカテゴリに所属するデバイスIDのタイムスタンプ時点の一番新しい値を読む。&lt;br /&gt;
&lt;br /&gt;
== Cacti のための Script/Command ==&lt;br /&gt;
例えば、cacti-temperature コマンドは、cacti の poller が呼び出すコマンドで、現在の値を以下のような形式で返す。&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cacti-temperature [デバイスID]&lt;br /&gt;
t: 温度 h:湿度&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
これを Cacti が parse して Round Robin Database (RRD) に格納することで、cacti は時系列グラフを描画する。&lt;/div&gt;</summary>
		<author><name>Fukudat</name></author>
		
	</entry>
</feed>