@mschaeffler/node-red-bthome 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/bthome.html +22 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -130,6 +130,11 @@ Example:
|
|
|
130
130
|
}
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
+
If content storage is active, statistical data is also stored in a variable with the suffix `-stat`:
|
|
134
|
+
```
|
|
135
|
+
{ ok:0, err:0, old:0, dup:0 }
|
|
136
|
+
```
|
|
137
|
+
|
|
133
138
|
## Example Flow
|
|
134
139
|
|
|
135
140
|
[example flow](https://github.com/m-schaeffler/node-red-my-nodes/raw/main/node-red-bthome/examples/bthome.json)
|
package/bthome.html
CHANGED
|
@@ -181,17 +181,17 @@
|
|
|
181
181
|
|
|
182
182
|
<h4>Device-Configuration</h4>
|
|
183
183
|
<p>With this JSON string the installed <a href="https://bthome.io">BT-Home</a> devices are configured:</p>
|
|
184
|
-
<code>{
|
|
185
|
-
"<mac address of the device>": { "topic": "<name of the device>", "key": "<encryption key, if device is encrypted>" }
|
|
186
|
-
}</code>
|
|
184
|
+
<pre><code>{
|
|
185
|
+
"<mac address of the device>": { "topic": "<name of the device>", "key": "<encryption key, if device is encrypted>" }
|
|
186
|
+
}</code></pre>
|
|
187
187
|
|
|
188
188
|
<p>An example for such a config from the unit tests:</p>
|
|
189
|
-
<code>{
|
|
190
|
-
"11:22:33:44:55:66": { "topic": "dev_unencrypted_1" }
|
|
191
|
-
"00:01:02:03:04:05": { "topic": "dev_unencrypted_2" }
|
|
192
|
-
"00:10:20:30:40:50": { "topic": "dev_encrypted_1", "key": "00112233445566778899AABBCCDDEEFF" }
|
|
193
|
-
"00:00:00:00:00:00": { "topic": "dev_encrypted_2", "key": [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16] }
|
|
194
|
-
}</code>
|
|
189
|
+
<pre><code>{
|
|
190
|
+
"11:22:33:44:55:66": { "topic": "dev_unencrypted_1" },
|
|
191
|
+
"00:01:02:03:04:05": { "topic": "dev_unencrypted_2" },
|
|
192
|
+
"00:10:20:30:40:50": { "topic": "dev_encrypted_1", "key": "00112233445566778899AABBCCDDEEFF" },
|
|
193
|
+
"00:00:00:00:00:00": { "topic": "dev_encrypted_2", "key": [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16] }
|
|
194
|
+
}</code></pre>
|
|
195
195
|
|
|
196
196
|
<h4>Context storage</h4>
|
|
197
197
|
<p>All recorded data can be stored in a flow context variable for</p>
|
|
@@ -202,16 +202,19 @@
|
|
|
202
202
|
</ul>
|
|
203
203
|
|
|
204
204
|
<p>Example:</p>
|
|
205
|
-
<code>{<br>
|
|
206
|
-
"dev_unencrypted_1"
|
|
207
|
-
{
|
|
208
|
-
"pid": 164
|
|
209
|
-
"time": 1745395033113
|
|
210
|
-
"encrypted": false
|
|
211
|
-
"battery": 100
|
|
212
|
-
"gw": { "Shelly Gateway": { "time": 1745395033113, "rssi":-85 } }
|
|
213
|
-
"data": { "humidity":56, "temperature":-21.3 }
|
|
205
|
+
<pre><code>{<br>
|
|
206
|
+
"dev_unencrypted_1":
|
|
207
|
+
{
|
|
208
|
+
"pid": 164,
|
|
209
|
+
"time": 1745395033113,
|
|
210
|
+
"encrypted": false,
|
|
211
|
+
"battery": 100,
|
|
212
|
+
"gw": { "Shelly Gateway": { "time": 1745395033113, "rssi":-85 } },
|
|
213
|
+
"data": { "humidity":56, "temperature":-21.3 }
|
|
214
214
|
}
|
|
215
|
-
}
|
|
215
|
+
}</code></pre>
|
|
216
|
+
|
|
217
|
+
<p>If content storage is active, statistical data is also stored in a variable with the suffix <code>-stat</code>:</p>
|
|
218
|
+
<pre><code>{ ok:0, err:0, old:0, dup:0 }</code></pre>
|
|
216
219
|
|
|
217
220
|
</script>
|