An idea: Using the "power switch" for RuuviTag as a door opening detector

As the movement detector is not good enough for my needs, I was thinking of using probably the oldest “sensor” to detect door opening: switching the RuuviTag power on or off. This has the good side that I can use the Ruuvi Station app (and firmware) as such. There is already a trigger in Ruuvi Station for detecting the signal strenght (RSSI). When the power is off, RSSI should be the lowest value (-105?), right?

So supposedly not SW changes , but to switch the power off I need to do some soldering. The first idea is to solder a wire to the battery (!) directly and another wire to the metal slip that is on the top of battery. I can reinstall the plastic piece between the battery and the slip to prevent the contact that way. Then just install the wires to the door so that when the door is closed the wires are connected to each other, and when the door is opened the connection is broken and RuuviTag do not get the power any more.

What do you think? Do you spot any problems?

  • I am sure there is a better solder points to use :slight_smile:
  • Is there a risk of frying the MCU etc. by switching the power on and off this way?

When the power is off, there is no signal at all. You could probably detect the no data event if the tag isn’t heard of in 10-20 seconds, but I think most people go through doors faster than that.

The tag can be power cycled without issues, but the power-up is somewhat power intensive and it will shorten the battery life. lab.ruuvi.com/pinout has the test points, some of them are on battery terminals.

I’d be worried about the reliability of the contact over long term. Also if the power path becomes very long, the added inductance and resistance might become a problem. On the other hand I regularly power RuuviTag over 20 cm wires with no problems.

1 Like

Is the Ruuvi Station application detecting this?

Ruuvi Station doesn’t detect this yet. The iOS app will have a GATT connection to tags and alert on connection lost, but it is still in non-public testing, hopefully it will enter public beta in a month or two. Android is also worked on but it will take a bit more time.

In meanwhile something like RuuviCollector on Raspberry Pi can be used to detect if measurement sequence counter stops growing. If you want to have alert remotely you’d need to set up your own server with InfluxDB and Grafana and configure e.g. Telegram alerting.

As a switch I’d consider a door magnet and a reed switch rather than mechanical coupling.

1 Like

Although it might not be a concern, powering off of course looses all the other sensing features of the ruuvi which might become useful at a later time.

How does this match with https://f.ruuvi.com/t/wanted-implementing-a-hall-sensor-into-ruuvi-fw/3699/10 .

As I currently will use RuuviTag only for detecting the door opening, I think the easiest solution is to use Ruuvi Station in gateway mode, and setup a http server in my Windows PC. I also will purchase a reed switch and a magnet.

I am supposing Ruuvi Station Gateway can work in the background and is able to fetch RuuviTag data in 10 sec intervals. My HTTP server can just check that if it do not get a new HTTP request in 15 seconds after the previous request it sends the alert mail back to my Android phone.

The other solution would be changing the Android Ruuvi Station app to detect & alert about poweroff, but it might be more difficult (?).

Ps. I also have iPhone 5s if you need beta testers for Ruuvi Station iOS :slight_smile: