Forwarding state status of external indicator

A general use case is where the objective is to observe the state of something and report or notify on a change of state.

This is a variation to the how-to-add-a-magnetic-sensor posted earlier.

I recently purchased a dehumidifier. It has a bucket full indicator. Unfortunately it is located in the basement. If I don’t go check it every few hours there will be hours when it is not running because the bucket is full.

  1. Additional hardware needed to the ruuvi tag: photo sensor mounted on the back of the board in a clear enclosure. This would allow the firmware to use the LED to display the state of the indicator. Simply use clear double sided tape to attach the ruuvi to the dehumidifier.

  2. Revision in firmware to observe the state of the photo sensor, reflect it to the LED and include it’s status in the packet using the least significant bit of a field. For example in format 03, byte[3] holds hundredths of a degree centigrade with a maximum of 99. If you don’t care about that degree of resolution, jam a 1 (by ORing a 0x01) into that field to indicate presence (which 50% of the time will increase the temperature reported by .01°C) and clear the lowest bit by ANDing with 0xFE (which 50% of the time will decrease the temperature reported by .01°C.
    Another more incompatible idea is to use the range over 99 (in the case of the humidity). For example if the sensor is present add 100. The result is that values over 99 are indicate presence, values 99 or less indicate not-present. This has the disadvantage of confusing existing receiver applications like RuuviStation and RuuviCollector, but may be easier to display with Grafana by simply dividing by 100.

  3. Receiver ( iPhone / android / datacollector ) needs to interpret and either report it when the application is queried or send an alert (email / SMS) when the state changes.

Anyone have additional thoughts?

Hello Dgerman,

Well, don’t have more ideas, just… you know… :wink:

Or I have one - maybe instead of photo sensor you can use a contact connected with a floating ball? It is a mechanical solution but should be reliable and perhaps you could save some battery power in this way

Photo sensor would be “non invasive” and “watch” the bucket full indicator light
Thanks fir the idea :slight_smile:

A light sensor would be useful for many other applications too, for example to detect presence of light in an area (“did I forget to turn off the lights in the garage?”) as well as monitoring any other devices that use leds as indicators for something, you could probably even look at the led flashes on your electricity meter to get a realtime electricity consumption graph of your household.

Hello Dgerman,
May I ask you if you managed to implement this feature?
Such functionality would be so much useful for me but I have trouble to find anybody, who can help me.
Don’t feel a pressure of course, it’s just a question.

I have implemented monitoring the garage door by observing the orientation of the Ruuvi Tag accelerationZ (no magnets or soldering required!) See Garage door monitor . There are other use cases where monitoring orientation or movement counter (which actually counts some vibrations) is easy.

I am in the process of setting up a “system” ( one ruuvi and one Raspberry Pi Zero W) for my daughter’s family. Standard firmware ruuvi advertises to raspberry pi (ruuviberry) logs data to influxdb. Cron job takes last(accelerationZ) and formats a web page. I could serve the webpage from the raspberry pi and they could view it within their LAN. In order to see the status from elsewhere ( I don’t want to poke a hole in their firewall) pi ftps it up to an external domain.

Let me know you level of linux expertise and I’ll help you with more details if you want.

Many thanks for your answer. I appreciate a lot your willingnes to help but this is not what I’m looking for. The problem is that with horizontal door I need an X axis. Of course I can invent a mechanical device to change the tag position but this has for me some disadvantages:

  • RSSI drops more when tilted, which gives me more missed readings
  • Actually I’m using Z angle to monitor if the tag falls down and wanna have this functionality
  • Could give me some false alarms if the door are opened just a little bit (vibrations also changes the angle)
  • “invasive” instalation (I rent an apartment) in comparison to sticky tape
  • takes more time to install (I’m planning around 12 sensors) and is not so easy in all locations I want
  • doesn’t look preety
  • a reed switch or at least two signals are always more reliable

At the moment I’m using combination of RSSI/Angle Z and Movement Counter. It works but could be better…