Vahti - home monitoring system for RuuviTag

Tl;dr;
https://github.com/ilpork/vahti

Longer story. We have a DIY shelf at work. It contains all kinds of hardware, which can be loaned for personal hobby projects. There are RuuviTags too, and I started to think if I could use RuuviTag to check if our robotic lawnmower has got stuck in tree roots in our garden. It happens sometimes.

Many newer mowers have native mobile apps, but I have an 8 years old Husqvarna, so I had to come up with other solution. Well, to be honest, it’d been easiest to just put border cable around those problematic objects…

I thought about putting the sensor on mower, but it would not solve problem, and I’d have to know the location of the mower too. Eventually I decided to put the RuuviTag on charging station, because it has a flap, which angle changes when mower is in charging station. Because I know how long it can be on move at time, I know when an alert should be sent to notify that it needs some attention. Putting the RuuviTag on charging station gives reliable information, is always within range, and it worked very well last summer.

Initially I had a pretty short Python script and simple Xamarin Forms app. Eventually it became Vahti, which is more generic MQTT based home monitoring system with .NET Core backend and still Xamarin.Forms mobile app. It currently does not support much more than RuuviTag, but it can be extended easily. I also published BleReader.Net as NuGet, which can be used to read RuuviTag data in .NET Core projects in general.

One service gathers information from sensors, publishes data in generic format for another service, which publishes it in Google Firebase database. Mobile app reads the data from database, and shows it. It shows also history data and supports push notifications. Android app has a widget too. Alternatively system can be used without mobile app, to send notifications just as email.

Connection to RuuviTag in my garage wasn’t as reliable as I had hoped, so that was one reason why I had to come up with more generic approach to gather all data that I need. Current MQTT based approach allows any system to publish measurement data as long as it declares the device and its type in certain way. So I have Raspberry Pi 1 with Python script and DHT22 running in garage now in addition to my RPI 4, which is located indoors used to poll RuuviTags and acting as data gateway in general.

So end result is that I get push notifications to my phone when my mower has not returned home as planned. I also get overview of all my sensors (including 3 RuuviTags) at one glance anywhere I am, including status of my mower.
image image

This system also allows me to configure more complicated rules and rule sets for alerts (in generic way) than just x > y. In case of mower use case, it checks how long is it since x > y last time. The system allows using RuuviTags in more complex ways in general, and adding new data types (like ‘LastCharged’ that I have) does not require much changes on backend or UI.

I hope that this project helps someone in getting more out of their RuuviTags. Mobile app UI supports also Finnish. The project (including documentation and tutorials) can be found in GitHub: https://github.com/ilpork/vahti

1 Like

Awesome project, thanks for sharing :slight_smile:

If you’re interested in helping the community out with more home automation integrations, please check WANTED: Research regading home automation systems & RuuviTag out.

Some updates. I’ve improved the iOS app earlier, but using it basically requires Apple developer account, which is not very convenient for most hobbyists.

Now I added a ReactJS web app, which allows viewing the data on any device, as long as data is published in Firebase like before.

The UI layout is currently targeted for mobile devices and the app with demo data can be checked in Netlify: https://vahti.netlify.app/