Closed noxhirsch closed 3 years ago
I was coding the exact same thing you proposed in the first two points, so I completely agree with you on those. I also really like the idea of having a devicename. Thank you for the suggestions and I really appreciate your work
I added some functions for my sensors - feel free to take what you like and discard what you dislike
update_raw_measurements
the sending of raw measurements can be disabled to save traffic and system resources. I'd suggest only enabling it for debugging - especially with multiple sensors this a lot of data which needs to get processed.threshold_percentage
is a new variable to quickly change the threshold. I had a little better experience with 40 - especially with two people relatively close together.devicename
and new MQTT topics. This makes it easier to maintain multiple sensors easier (in my case, I'll soon have 7). With this variable you can change the middle part of the MQTT topics and set a ArduinoOTA hostname. The topics now all start with "people_counter" - then comes the devicename and then a more descriptive last part.