<<
2021.1
>>
[nao-pon/blog] |
||||||
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
二酸化炭素濃度を簡易的に測れるセンサー CCS811 は、起動時出来るだけ早く適切な値が得られるようにするには Baseline 値が結構重要。なので、Baseline値をセンサーとして観察したい。
それには、ESPHome のソースコードを変更する必要があるけど、custom_components ディレクトリを使用することで、簡単にハックできる。
早速、いじってみた。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
| - - | | | - | ! | - | | | ! | | | - - ! | | | - ! | | - ! | | - ! | - ! | | | | | | | | | | - - ! ! ! - | | | - ! - | | | ! | | | | - ! | - | ! | | | | | | | | | | | | | ! - | | | | | | | | | | | | | - ! | - ! | | ! - | | | | | | - | - | ! - - | | | | | | | | | | | | | | | | | | | ! ! ! | ! ! |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
Keyestudio CCS811 carbon dioxide, air quality sensor mainly uses the CCS811 chip. It is an ultra-low-power miniature digital gas sensor that can detect a wide range of volatile organic compounds (TVOCs), including equivalent carbon dioxide (eCO2) and metal oxide (MOX) levels. Equivalent carbon dioxide (eCO2) is measured in the range of 400 to 29206 ppm (parts per million), and various volatile organic compounds (TVOC) ranges from 0 to 32768ppb(parts per billion). 3mm diameter position hole on sensor contributes to fix on the other device.
Keyestudio CCS811 二酸化炭素、大気質センサーは主にCCS811チップを使用します。 これは、二酸化炭素相当値(eCO2)および金属酸化物(MOX)レベルを含む、広範囲の揮発性有機化合物(TVOC)を検出できる超低電力の小型デジタルガスセンサーです。 二酸化炭素相当値(eCO2)は400〜29206 ppm(parts per million)の範囲で測定され、さまざまな揮発性有機化合物(TVOC)は0〜32768ppb(parts per Billion)の範囲です。 センサーの直径3mmの取り付け穴は、他のデバイスへの固定に利用できます。
GND | ground |
VCC | Input power |
SDA | I2C data pin |
SCL | I2C clock pin |
RST | Reset pin: connect to ground, sensor will automatically reset. |
WAKE | WAKE pin should connect to ground to communicate with sensor conveniently. WAKEピンは、センサーと簡単に通信できるようにアースに接続する必要があります。 |
INT | This is the interrupt output pin that detects when a new reading is read or the reading becomes too high or too low. これは、新しい読み取り値が読み取られたとき、または読み取り値が高すぎたり低すぎたりしたときに検出する割り込み出力ピンです。 |
NOTE:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
X-elFinder 2.25 をリリースしました。ベースの elFinder は今日の時点の最新 Nightly (2.1.29 + Nightly: e9d7e60) になっています。
ベースの elFinder は色々と機能追加したり、パフォーマンスの改善、バグ修正などを行っています。
また、X-elFinder 独自の機能としてマネージャーから XOOPS ログイン/ログアウトができるようになりました。
X-update でアップデート可能です。お試しください。
Google のAPIには、サービスアカウントというものがあり、個人のアカウントとは独立したサービスを受けることができます。
GoogleDrive をサービスアカウントで利用すると、そのサービスアカウントでしかアクセスできない独立したドライブスペースの割当*1を受けることができます。そのドライブスペースを X-elFinder の微リュームとしてマウントして利用してみよう!という話です。
ダウンロードした JSON ファイルを xoops_trust_path/upload/xelfinder に保存します。
前回の「ネットワークで同一セグメント内の複数のゲートウェイに対応する」で設定したルーティングが調子がいいので、Raspberry Pi の Web サーバー(pi2.hypweb.net, phpng.pi2.hypweb.net) にも適用してみます。
Raspberry Pi の Webサーバーは、公開 Web サーバーに受けた pi2.hypweb.net, phpng.pi2.hypweb.net へのリクエストを Apache のリバースプロキシで転送しています。そのような環境でもうまくいくのかよく分かりませんが、とにかく設定してみます。
基本的には、前回と同様です。
# iptables -t mangle -F # iptables -t mangle -A INPUT -m mac --mac-source 【PPPoEv4 ルータの MAC アドレス】 -j MARK --set-mark 1 # iptables -t mangle -A INPUT -j CONNMARK --save-mark # iptables -t mangle -A OUTPUT -j CONNMARK --restore-mark
# ip route add default via 192.168.1.1 # ip route del default via 192.168.1.50
# ip route add default via 192.168.1.50 table 200 # ip rule add fwmark 1 table 200
# curl inet-ip.info
とりあえず、これで問題ないようですので恒久的な設定を行います。
Raspberry Pi の Raspbian Jessie では、固定 IP の設定は /etc/dhcpcd.conf に設定してあります。
# vim /etc/dhcpcd.conf
interface eth0 static ip_address=192.168.1.201 static routers=192.168.1.1 static domain_name_servers=192.168.1.92
テンプレート
テンプレート(Moblog)
#pagecss
Page Info | |
---|---|
Page Name : | nao-pon/blog |
Page aliases : | None |
Page owner : | nao-pon |
Can Read | |
Groups : | All visitors |
Users : | All visitors |
Can Edit | |
Groups : | No one |
Users : | ゲスト |