Help - I've fallen and I can't get up!
Ron Czapala
Posts: 2,418
I recently found out that a neighbor died in her home and was not found for two weeks - she lived alone.
Since I also live alone (except for my dog), and sometimes go days without talking to relatives or friends,
I thought it might be nice to create a device that would monitor my movements in the house and notify someone
if no movement was detected for a certain period of time.
I know there are various devices/services like "Life Alert", etc but they require paying a monitoring company
a monthly fee.
I have a SECO-LARM Twin Photobeam Detector installed in my hallway for my burglar alarm system. It detects when
I move down the hallway but it doesn't pickup my small dog (like most PIR sensors). I figured I could also
use this sensor to monitor my movements even when the alarm system is not armed.
http://www.seco-larm.com/E960LRb.htm
I also have a PINK Netburner module that connects to my router with an ethernet cable. It is a web sever and
is capable of sending emails. I also have several ChronoDot DS3231 real-time clock modules that could
be used to as an accurate time source. While the DS3231 handles leap year, it doesn't adjust for daylight savings time.
Since the netburner is a web server, I thought it would really be helpful if the DS3231 RTC could be set using a web page hosted
on the netburner.
So I took a Propeller board, PINK Netburner and ChronoDot RTC and started developing a program and web page to accomplish my goal.
I have a modified version of Kwabena W. Agyeman's DS1307_RTCEngine object which allows the DS3231 to be set in 12 or 24 hour mode.
I prefer the DS3231 12 hour mode, so my web page provides for AP/PM times.
The web page uses a lot of javascript since it determines if the year is a leap year to handle Feb 29. The web page can not
determine what the day of the week should be but it does dynamically populate the Day dropdown (Select HTML tag) based on the
Month and leap year.
The web page strings the parameters together and uses XMLHttpRequest to post it to a PINK variable.
After the variable is saved, the propeller needs to be rebooted (without dropping power for the PINK module).
The Propeller gets that variable at power-up and uses my DS3231 routines to set the date and time.
I have not implemented the logic to monitor the beam sensor and check for elapsed time since the previous timestamp,
but that part should be fairly simple. Sending emails is easy but the content is limited to 64 bytes (size of PINK variables).
Web page:
Propeller, PINK, ChronoDot hardware:
Since I also live alone (except for my dog), and sometimes go days without talking to relatives or friends,
I thought it might be nice to create a device that would monitor my movements in the house and notify someone
if no movement was detected for a certain period of time.
I know there are various devices/services like "Life Alert", etc but they require paying a monitoring company
a monthly fee.
I have a SECO-LARM Twin Photobeam Detector installed in my hallway for my burglar alarm system. It detects when
I move down the hallway but it doesn't pickup my small dog (like most PIR sensors). I figured I could also
use this sensor to monitor my movements even when the alarm system is not armed.
http://www.seco-larm.com/E960LRb.htm
I also have a PINK Netburner module that connects to my router with an ethernet cable. It is a web sever and
is capable of sending emails. I also have several ChronoDot DS3231 real-time clock modules that could
be used to as an accurate time source. While the DS3231 handles leap year, it doesn't adjust for daylight savings time.
Since the netburner is a web server, I thought it would really be helpful if the DS3231 RTC could be set using a web page hosted
on the netburner.
So I took a Propeller board, PINK Netburner and ChronoDot RTC and started developing a program and web page to accomplish my goal.
I have a modified version of Kwabena W. Agyeman's DS1307_RTCEngine object which allows the DS3231 to be set in 12 or 24 hour mode.
I prefer the DS3231 12 hour mode, so my web page provides for AP/PM times.
The web page uses a lot of javascript since it determines if the year is a leap year to handle Feb 29. The web page can not
determine what the day of the week should be but it does dynamically populate the Day dropdown (Select HTML tag) based on the
Month and leap year.
The web page strings the parameters together and uses XMLHttpRequest to post it to a PINK variable.
After the variable is saved, the propeller needs to be rebooted (without dropping power for the PINK module).
The Propeller gets that variable at power-up and uses my DS3231 routines to set the date and time.
I have not implemented the logic to monitor the beam sensor and check for elapsed time since the previous timestamp,
but that part should be fairly simple. Sending emails is easy but the content is limited to 64 bytes (size of PINK variables).
Web page:
Propeller, PINK, ChronoDot hardware:
Comments
I bought a smartphone a few months ago and it is impressive but I seldom use it. I got it mainly for emergencies and sometimes I leave it powered down or in airplane mode to keep from charging it all the time.
And this sounds like a worthy cause. But which Prop board is that wearing a ChronoDot gizmo, and Mr. Pink?
----
Strange. Erco your robot was last seen traveling aboard a Google sponsored autodrive vehicle (which is making money by Uber), and on yet another trip. He's off to the airport.
That's the Propeller Demo Board, which is no longer available as a product.
Hello!
Oh okay. That's why. I didn't recognize it as such.
---
Okay Erco your robot got his flight, he's flying first class aboard a ANA flight.
My idea was not to be tied to the internet nor require a cell-phone because many of the elderly don't have/want those things. There would be sensors to indicate doors opening, appliances being used, etc. and some form of P2P wireless network between neighbours that agree to watch out for each other.
I also thought of using the Kinect sensor.
Even if my contraption doesn't save me, perhaps it will keep my dog from starving...
I uploaded my PINK web page for updating the RTC - of course it doesn't really do anything running on this host.
You can view the source if interested...
http://ronczap.home.insightbb.com/privclock.htm
The dropdown for Year has 1900 and 2000 for testing the leap year javascript function
It's strange world we have built for ourselves.
There's an actual psychological phenomena involved here, I think.
The same phenomena makes it far more likely that someone will stop to help you on a dark lightly traveled road than on a busy one.
I need to add 1 for the DS3231 but now my web page automatically shows the correct day of the week...
http://ronczap.home.insightbb.com/privclock.htm
I wonder if these cheapie smart watches could perform some function to relay a message via wifi to an ESP8266 wifi & propeller. These smart watches have all kinds of inbuilt sensors.
Just recently a fitbit is credited with saving a mans life because it noticed huge variations in his heartbeat causing him to seek medical help before he had a heart attack. Saved his life!
If you restrict years to 1901 to 2099 then leap years are all divisible by 4. 1900 & 2100 are not leap years because the centuries need to be also divisible by 100 which is why 2000 is/was a leap year.
End result: If someone is collapsing of a heart attack whilst you are rushing to work, then "Meh".
Contrast to a small village, where you get to chat to your neighbours over the garden fence. You see them in the local store and pub and church and school. Your family and friends are near by. You have an investment in them and they have an investment in you. They will look out for you as you look out for them.
I don't know. Except that I have this urge to move further north where there are even less people.
For any year not ending in 00, it is a leap year if divisible by 4 -
years that end in 00 are leap years only if they are divisible by 400.
This is the code:
Did you know 11 days were skipped in 1752 to make up for lack of leap year adjustments?
https://en.wikipedia.org/wiki/Calendar_(New_Style)_Act_1750