Permalink
Browse files

more examples on taking reading

  • Loading branch information...
simonrupf committed Sep 21, 2017
1 parent 333a325 commit 6a0eb183fababfe9e482dde50c2bd74d550b9369
Showing with 11 additions and 4 deletions.
  1. +2 −2 wired/DigiSpark/README.md
  2. +9 −2 wireless/ESP8266/README.md
@@ -76,7 +76,7 @@ To make the measurements accessible via telnet (as may be used by Zabbix) you
could use netcat for a one-shot or xinetd or socat for a permanent solution.
```bash
exec 3<>/dev/ttyACM0; echo C >&3; head -n1 <&3 | nc -l 4000; exec 3<&-
$ exec 3<>/dev/ttyACM0; echo C >&3; head -n1 <&3 | netcat -l 4000; exec 3<&-
```
For xinetd create a file with the following content in the /etc/xinetd.d folder
@@ -99,7 +99,7 @@ service testservice
And the socat variant:
```bash
socat tcp-l:4000,reuseaddr,fork system:"exec 3<>/dev/ttyACM0; echo C >&3; head -n1 <&3; exec 3<&-"
$ socat tcp-l:4000,reuseaddr,fork system:"exec 3<>/dev/ttyACM0; echo C >&3; head -n1 <&3; exec 3<&-"
```
Instead of using the root user, another user that is in the `dialout` group may
View
@@ -56,10 +56,17 @@ you can compile and upload the sketchbook to the NodeMCU and its server will
start immediatly after the upload is finished.
To test the measurements you can telnet into the port 30303 (or the one you
configured) of the devices IP:
configured) of the devices IP and then type in the command:
```bash
$ telnet 1.2.3.4 30303
$ telnet [FQDN or IP] 30303
```
You can also use netcat or ncat to take a reading, here with the "C" command:
```bash
$ echo C | netcat -q -1 [FQDN or IP] 30303
$ echo C | ncat -C -d 1 [FQDN or IP] 30303 2> /dev/null
```
WiFi settings

0 comments on commit 6a0eb18

Please sign in to comment.