I use OH 2.5.7 on an openhabian system on a RPi4, with data being stored in influxdb (?ver), displayed in grafana 7.1.3. As it may be relevant, the pi is headless, and I also have a ubuntu headless server, and I use a windows laptop for my daily computing.
I’ve recently installed magnetic reed switches in a pedestrian gate, and have found that wind generates a lot of false positive notifications of the gate opening. I have a decent bungee cord acting as a spring holding the gate closed, and feel that anything stronger would be a frustration/challenge for my kids.
I’ve graphed what I believe to be the relevant details in grafana, and was hoping to do some actual analysis on the data so that I can filter out notifications during likely false positive periods, and yet still push notifications otherwise. (I use telegram for notifications, and am generally quite happy with it - I’ve had to mute the channel during windy periods, though. Other more important factors like the driveway button being pressed need to be recognized, though, and currently the false positives are a significant barrier to the wife acceptance factor to get the app installed on her phone.
I was hoping to find a way to do some analysis in grafana (doesn’t exist, as it’s focussed on displaying, not analyzing, it seems), and looking into options in influxdb was a huge can of worms. It’s hard to figure out where to start, and what route is the best use of my time for the learning curve. As I amass more data, I imagine questions of analysis will come up more often, so I’d kind of like to know the best way to do simple analysis of my data.
In this case, I want to find out what percentage of events (gate opening) are captured by searching for wind direction between 110 and 120, with speeds greater than 32 km/h (for example). I’d then want to be able to graph the outlying data/inverse only, as it’s less likely to be false positives. Validating that would be fairly simple, as it would match my kids school bus schedule and my wife’s run times for the most part.
In the below images, yellow/orange is the detected gate opening, displaying the frequency. Actual use of the gate is likely 4/day, so most of what is seen are false positives. m The blue is wind direction (right axis), and green is wind speed. Superficially I believe I get false positives when the direction is between 100 and 120 degrees, and speed is above 32, and especially when above 40 (pretty sure the unit is km/h)
Past 7 days:
Past 30 days:
I have some superficial experneice with excel for data analysis, and 15+ years ago I used SPSS in university/grad school, so I have likely inappropriate aspirations… This goal should be fairly straight forward, though.
Thanks for any guidance / suggestions on best routes for learning curve (time expenditure) vs benefit for simple analysis like I described above.