Page 1 of 1

Improving health with raspberry pi

Posted: Sun Jun 01, 2025 10:36 am
by LazyInnovator
Hi all!

I have a project to improve my health with a raspberry pi.

For some reason I can never be bothered to start sporting, yet when i am in the gym, i enjoy it.

I now have a home gym (which I don’t use), and want to implement the following system:
- an alarm goes off in the home gym, and when I go and turn it off, the door locks for 30 minutes.

I see two options:
1) The alarm can only be turned off by putting the key in a box.
2) Turning off the alarm turns the key on the door automatically (on the outside).

What type of solution would you see fit best, and how would you build this? (High level steps). I haven’t used a raspberry pi before, and only know some low level python, html, etc. But I am very tech savvy and can learn a lot myself. So I would be very thankful for suggestions!

Re: Improving health with raspberry pi

Posted: Sun Jun 01, 2025 3:19 pm
by neilgl
You might also want to handle the (emergency) case where there is a fire in the house?

Re: Improving health with raspberry pi

Posted: Sun Jun 01, 2025 7:55 pm
by thagrol
neilgl wrote:
Sun Jun 01, 2025 3:19 pm
You might also want to handle the (emergency) case where there is a fire in the house?

Not just fire. What if OP has a heart attack while in there? Or some other emergency?

What if power fails? Or the Pi crashes?

@OP: doing this without planning for emergencies and soft/hardware failure is a staggeringly dumb idea.

Re: Improving health with raspberry pi

Posted: Sun Jun 01, 2025 8:30 pm
by Memotech Bill
A more interesting question is can you use a Raspberry Pi to make the exercise more enjoyable?

One idea I have had, but never done anything about, is to interface an exercise bike to Google street-view so that one can take virtual bike rides.

Re: Improving health with raspberry pi

Posted: Sun Jun 01, 2025 9:11 pm
by ame
LazyInnovator wrote:
Sun Jun 01, 2025 10:36 am
Hi all!

I have a project to improve my health with a raspberry pi.

For some reason I can never be bothered to start sporting, yet when i am in the gym, i enjoy it.

I now have a home gym (which I don’t use), and want to implement the following system:
- an alarm goes off in the home gym, and when I go and turn it off, the door locks for 30 minutes.

I see two options:
1) The alarm can only be turned off by putting the key in a box.
2) Turning off the alarm turns the key on the door automatically (on the outside).

What type of solution would you see fit best, and how would you build this? (High level steps). I haven’t used a raspberry pi before, and only know some low level python, html, etc. But I am very tech savvy and can learn a lot myself. So I would be very thankful for suggestions!
Username checks out. Sort of.

Re: Improving health with raspberry pi

Posted: Mon Jun 02, 2025 3:36 pm
by hippy
It seems motivation is the problem. Putting an alarm in the gym, forcing you to go and turn it off, is a good idea, - similar to not putting an alarm clock close to your bed.

And all you would need is an alarm clock in your gym to provide that.

Locking yourself in the gym is not such a bright idea.

But how long is that going to work for ? How long until you have attacked the alarm with a sledge hammer or simply learned to ignore it, have taken the door off its hinges, disabled the locking ?

If you want guaranteed motivation; perhaps sign-up for some exercise monitoring service, have a chat with a local hoodlum, give them access to the monitoring, while permitting them to deal with any failure to exercise as they see fit :P

Getting started is always the highest hurdle. Just forcing yourself to do it for a couple of weeks will probably deliver some benefits which keeps you doing it.

Perhaps sign-up for a short term gym membership so money is at stake, and hopefully getting back in the habit will carry forward beyond that.

Re: Improving health with raspberry pi

Posted: Mon Jun 02, 2025 3:50 pm
by bensimmo
Forget the key, use an electronic lock. (Used in IoT Home automation).
Find one you can reprogram, say ESP32 based .
On then do it all electronically.
You can then measure your exercise somehow and have it auto open.

You can build in failsafes, unlock on no power, fire detected (yes you can get IoT household fire alarms).


Of course it a lot of work and you'd need to get out the sofa first.

Re: Improving health with raspberry pi

Posted: Mon Jun 02, 2025 4:31 pm
by ame
Ironically, it does indeed look like another low-effort drive-by.

Re: Improving health with raspberry pi

Posted: Mon Jun 02, 2025 6:51 pm
by thagrol
ame wrote:
Mon Jun 02, 2025 4:31 pm
Ironically, it does indeed look like another low-effort drive-by.

Given how bloody stupid the idea was that's probably a good thing.

Re: Improving health with raspberry pi

Posted: Mon Jun 02, 2025 7:10 pm
by neilgl
It gave me a laugh anyway!
Maybe the acronym LEDB should be used for the famous Low Effort Drive By, to save typing?

Re: Improving health with raspberry pi

Posted: Mon Jun 02, 2025 9:08 pm
by ame
neilgl wrote:
Mon Jun 02, 2025 7:10 pm
It gave me a laugh anyway!
Maybe the acronym LEDB should be used for the famous Low Effort Drive By, to save typing?
That would be very meta.

Re: Improving health with raspberry pi

Posted: Tue Jun 03, 2025 4:35 am
by LazyInnovator
Hahaha I get the scepticism I really do.

But I actually build a lot of these kind of systems and find joy in building them. After a while I have built a new habit and don’t really need them anymore.

This is truly a project I want to complete.

So all ethics, mental aspects and craziness aside, I am interested in the the theoretic possibilities.

I do want to take in account edge cases like fire or disease. I was thinking to build a system where it would cost me 50€ to exit the gym room prematurely.

The most complex edge cases would be days where I am not home at a certain time due to social events. But that is for phase 2.

Re: Improving health with raspberry pi

Posted: Tue Jun 03, 2025 4:52 am
by ame
LazyInnovator wrote:
Tue Jun 03, 2025 4:35 am
Hahaha I get the scepticism I really do.

But I actually build a lot of these kind of systems and find joy in building them. After a while I have built a new habit and don’t really need them anymore.

This is truly a project I want to complete.
So, if you build a lot of these kind of systems, find joy in building them, and truly want to complete it, then I see no barrier to getting on with it. You're very tech savvy, so go for it!

Re: Improving health with raspberry pi

Posted: Tue Jun 03, 2025 10:28 am
by thagrol
LazyInnovator wrote:
Tue Jun 03, 2025 4:35 am
But I actually build a lot of these kind of systems and find joy in building them. After a while I have built a new habit and don’t really need them anymore.

This is truly a project I want to complete.

So all ethics, mental aspects and craziness aside, I am interested in the the theoretic possibilities.

I do want to take in account edge cases like fire or disease. I was thinking to build a system where it would cost me 50€ to exit the gym room prematurely.

So more complexity. And currency recognition. And more points of failure.
The most complex edge cases would be days where I am not home at a certain time due to social events. But that is for phase 2.

Complex, perhaps. But put most effort into the safety critical ones. And don't forget to allow for others in your household entering the gym who don't have the same goal as you do.

Setting aside safety concerns, just locking the door for a fixed period isn't going to make you use the gym equipment. Your new habit could be to sit in the gym room with a book for half an hour. Tie the unlock into equipment use instead.

Re: Improving health with raspberry pi

Posted: Tue Jun 03, 2025 12:17 pm
by scotty101
Rather than locking up yourself, lock up your mobile phone, TV remote or game console controller instead.

Re: Improving health with raspberry pi

Posted: Tue Jun 03, 2025 12:20 pm
by hippy
LazyInnovator wrote:
Tue Jun 03, 2025 4:35 am
I was thinking to build a system where it would cost me 50€ to exit the gym room prematurely.
Should be easy enough. Give the Pi your bank account details and set it up to transfer 50 euro to a charity or someone if the gym door is opened before exercise time is up after the alarm has gone off.

ame wrote:
Mon Jun 02, 2025 4:31 pm
Ironically, it does indeed look like another low-effort drive-by.
I'm not sure how you came to that conclusion and it seems you were wrong. Again. I still don't understand your need to tell everyone what you think a post is.

Re: Improving health with raspberry pi

Posted: Wed Jun 11, 2025 12:35 am
by ame
hippy wrote:
Tue Jun 03, 2025 12:20 pm
LazyInnovator wrote:
Tue Jun 03, 2025 4:35 am
I was thinking to build a system where it would cost me 50€ to exit the gym room prematurely.
Should be easy enough. Give the Pi your bank account details and set it up to transfer 50 euro to a charity or someone if the gym door is opened before exercise time is up after the alarm has gone off.

ame wrote:
Mon Jun 02, 2025 4:31 pm
Ironically, it does indeed look like another low-effort drive-by.
I'm not sure how you came to that conclusion and it seems you were wrong. Again. I still don't understand your need to tell everyone what you think a post is.
Well, here we are a week later. Lots going on. I can barely keep up.

Re: Improving health with raspberry pi

Posted: Wed Jun 11, 2025 5:39 am
by LazyInnovator
Lmao this guy.

I can give an update: I listened and gave it a try to just make it a habit on wanting to sport, so far so good: I’m sporting everyday in my home gym now.

If I somehow do fail in my goal, Maybe I can make a software that realigns my goals and actions, rather than locking myself up. I think I’ll make this anyway when I have the time.

But so far, so good.

Re: Improving health with raspberry pi

Posted: Wed Jun 11, 2025 2:29 pm
by hippy
LazyInnovator wrote:
Wed Jun 11, 2025 5:39 am
so far so good: I’m sporting everyday in my home gym now.
Excellent news and hope you can keep it up.

One tip I do have is, if you really can't face it, don't, but don't let that drag out for more than a day. And don't fret if you sometimes bottle-out early.

Most diets fail because people are only human, the craving for that cream cake or gateau grows and grows until they succumb, think they've blown it, so throw in the towel on the whole diet.

Enjoying it is key to success so grab the occasional treat, just not too often, and don't worry about not hitting all your goals all the time. Being halfway there is better than being nowhere there.

AltStyle によって変換されたページ (->オリジナル) /