tempd: Attempt retry if 1wire sensor returns "85" Result 85 is typical for DS18B20 sensors when some error happens with them. If so, attempt retry up to three times in order to recover from the error. If still error, return error instead of "85" as temperature value. Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
bmed: Avoid failing to bind() due to "Address already in use" If the previous invocation of the process happened just a while ago (eg. the daemon was restarted), the listening socket might still be in TIME_WAIT state, which prevents registering a new listening socket to the port. This can be avoided by using the SO_REUSEADDR option which instructs bind() call to bind to the port anyway. Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
Add simple tempd daemon This simple one takes temperature readings from both bmed server port and a 1wire sensor path found behind owfs. Only one temperature reading is give back, the one with lower temperature. The rest of the data is taken from bme280 sensor. The data is fetched via tcp port 6000 off the daemon. Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>