dvdsk / HomeAutomation

System to automate lighting and audio interacting through a web interface and telegram bot
3 stars 1 forks source link

[bug][arduino] roomsensors often not responding #11

Closed dvdsk closed 8 years ago

dvdsk commented 8 years ago

Problem is not local sensor readout and does not seem to be remote readout, maybe wireless failure?

dvdsk commented 8 years ago

seems like remoteclient sometimes crashes (maybe loss of power to the radio?)

dvdsk commented 8 years ago

to check: maybe some temp packages have 255 as the first byte and are thus ignored? package drops in wireless, make more robust by sending some variable 'havent gotten temp yet' and only when that var is dropped temp array is reset on the remote node

dvdsk commented 8 years ago

To recreate add a delay to the function readRoomSensors as follows: Serial1.write(REQUESTCO2,9);// request the CO2 sensor to do a reading delay(2000); temp_c = thSen.readTemperatureC(readLocalPIRs,checkWirelessNodes,readLight, sensorData, PIRs, rqUpdate);

dvdsk commented 8 years ago

probable cause: answer from remote unit is not passed along from the wireless 'checkWirelessNodes' function

dvdsk commented 8 years ago

Solved, was caused by remote node redefining the buffer and thus losing the old values and resetting to default values on every loop.