Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 1, 2022 10:36 pm GMT

I'm building a telegram bot to remind me changing my car oil

I hate to remember changing my car oil.
Too many minor things to remember in life already!

So I decided to build a simple Telegram bot that remembers changing the oil for me.

I want to share my thought process before actually coding it.

I want this to be as simple as possible and free as possible, practically costing $0 to maintain.

Oilly will be his name, with a headline that says:

"Oilly will help you preserve your car engine by reminding you to change the oil, so you have one less thing to remember".

Oilly will interact with the user ask them:

  1. Current mileage
  2. Roughly estimate the last time the oil has been changed.
  3. The mileage in the last time oil changed.
  4. What is the type of the last changed oil 5k, 10k, 15k?
  5. How frequent they change the oil 3 mo, 6 mo?
  6. Have they changed the oil filter in the last oil change?

Bot will respond with "Thanks, based on the information you gave me I'll notify you!".

How to calculate the oil change (research)

Upper limit 10,000 KM or 6 months whichever comes first.

  • every 6 months
  • every 3 months
  • every 5000 km or 3 months (recommended)

User input example (my real usage):

  • current mileage: 25,258
  • last time changed oil: 2 months ago
  • mileage last before change: 21,201
  • Oil type: 5k
  • Change oil frequency: every 3 months
  • have you changed the oil filter: No

Simple Process: First state the facts

  • Calculate how long the user will take to reach 5k mileage:
  • Ideal mileage usage 5k in 3 months.

  • Current mileage - mileage last before change => 25,258 - 21,201 = 4,056 in 2 months.

  • Avg mileage per day => 4056 /60 = 67.6 KM

  • Mileages left in distance unit => 5000 - 4,056 = 944 KM

  • Mileage left in time unit => 1 months

  • Change Oil filter last time: NO, so this time change it.

My approach:

  • Easiest way to approach this is by sending notification after 1 month.

  • Or Mileage left (944) / avg usage (67.6) = 14 days.

  • Maybe sending the user notification after 14 days that says if you reach (25,258 + 944 = 26,202 KM) it's time to change.

If the user says no, fall back to 1 month change.

I'm trying to get some hold over this process, I would appreciate your take on this whole thing.


Original Link: https://dev.to/nagi/im-building-a-telegram-bot-to-remind-me-changing-my-car-oil-2dan

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To