Categories
Engineering Software

Sale Monitor

I got tired of manually checking prices on things I was watching. There are price tracking services out there, but they only work with specific retailers, don’t let you define your own alert rules and you have no control over your data. As per usual, I decided to build my own.

What started as a simple script to scrape a few prices and send me an email turned into a full blown application, with a web dashboard, multi-currency support, product grouping and purchase tracking.

Dashboard page

The way it works is pretty simple. A background process checks each product page on a schedule, pulls out the price and stores it in a SQLite database. Prices are found using either a CSS selector that you provide, or auto-detection, which has built-in selectors for 60+ of the major retailer platforms (Amazon, Best Buy, Shopify, WooCommerce, etc.). Everything gets converted to a base currency, so products from stores in different countries can be compared directly.

Each product can have any combination of alert rules; a target price, a percentage drop, any price drop at all, or price falling below the 30-day average. When a rule triggers, a notification is sent via email, Discord, or Slack. Each product also has its own notification cooldown, so I don’t get spammed when prices bounce around.

The dashboard is where most of the interaction happens. Products are shown in a table or card view with live pricing and trend indicators, and each product has its own page with an interactive price history chart and stats. If the same item is sold by multiple retailers, the products are automatically grouped using identifiers pulled from the page (MPN, SKU, GTIN), so pricing can be compared across vendors. I also added purchase tracking, so I can see how much I’ve actually saved by waiting for a deal.

Product detail page

The app is written in Python (Flask), with the frontend in Jinja2 templates, Tailwind and Chart.js. The whole thing runs in a Docker container, self-hosted on my home server.

The most interesting challenge was the price auto-detection. Every retailer structures their pricing differently and even sites on the same platform have variations, so I settled on a priority chain; try the custom selector first, then the platform specific selectors, then generic fallbacks. Product grouping also needed more thought than I expected. Matching products across retailers by name is unreliable, but the standardized identifiers sitting in the page’s structured data work well.

So far it’s doing exactly what I wanted. Set it, forget it and wait for the deal notifications to roll in!

Categories
Engineering Software

Computer Vision Based Object Detection

This project was a machine vision proof of concept that I delivered to a large multinational commodity distribution company in Western Canada. The company had recently implemented an automated railcar unloading system and wanted to see whether machine learning could improve how the system identifies capstan sockets on incoming train cars, including their location and orientation.

The existing vision system struggled with the variability between railcars; different geometry, capstan designs, lighting conditions, debris and other environmental factors. Acquisition times were over 1 second and the success rate was below 80%. The goal of the POC was to show that a well trained model could outperform the legacy methods, while providing a clean, structured data stream that could be integrated into the existing control system in real-time.

I captured still images and video of multiple capstan types, labelled them and used them to train a custom model. The model successfully detected capstans on 100% of the validation set, with confidence levels consistently above 85%, and was able to infer both location and rotation. When run on live video, it achieved acquisition times under 25 ms, with zero false positives on the surrounding train structures.

Categories
Engineering Software

Garmin Wearable Cold Plunge App

I frequent a local cold plunge therapy venue with my girlfriend and wanted a way to effectively time each phase of the process. The solutions on the market didn’t fit my requirements, nor did using a basing timer, or no timer, so I decided to make my own.

I thought it’d be a nice weekend project, but I was quick to learn that it was going to involve learning a new platform, language and a very finicky UI design to be effective across multiple devices/resolutions, etc. Garmin uses their own language “Monkey C”, which is an object-oriented language, most similar to JavaScript. It ended up taking a couple months to get together, including testing.

The initial design consists of 3 timers, one for each phase – hot, cold and rest. Each is customisable for your desired duration and level of suffering. The app also tracks the users heart rate, temperature and saves the activity for later review in Garmin Connect.

There are additoinal features to be added to the app over time, given user feedback and from my own experience using the app. So far, it is exactly what I would’ve wanted in a cold plunge app, but let’s see what the community says.

Link to Garmin IQ Store – Cold Plunge App