Closed robotastic-io closed 3 years ago
Thanks for the suggestion. It follows a different assumption though. The repo assumes that the bin is full after x minutes of cleaning. It does not give the exact timestamp of bin out. This should work fine as an approximation if you run the robot on a daily shedule.
If however you dont run it on a daily shedule the assumption does not work. The amount of dirt inside the bin correlates with the amount of dirt the robot can pick up from the space it cleans not the cleaning time. Or mathematically speaking:
averageAmountOfDirtGeneratedBySpacePerHour * timeSinceLastBinEmpty = amountOfDirtInBinAfterRun.
Installing a second mqtt client also seems like a little overkill.
Idea
Having the timestamp for bin out would allow advanced bin empty features. e.g:
Possible Solutions:
a) You could monitor the sysout of 'lsof | grep /mnt/data/rockrobo/sounds/bin_in.wav' or bin_out.wav and store the time of access into a variable which gets reported via mqtt and/or accessed via webui.
b) Alternatively in /mnt/data/rockrobo/RoboController.cfg a variable 'bin_in_time' is stored. The variable represents the clean time since the last bin empty in seconds.
With this value and cleaning history we can estimate the time the bin was last removed.
Pseudo Code: