Open comments for this post
I added a printer section on my website and a modal to enter in the message! I also added filtering to block any inappropriate content using obscenity, rate limiting with Redis to limit each IP address to 1 successful request per 24 hours, and implemented VPN/Proxy checks with proxycheck.io.
Generally I’m strictly against VPN blocking, but unfortunately in my case I think it’s the only effective way to prevent abuse (I want to be able to sleep at night
).
Besides those changes, I also installed and ran prettier in the repo, and added basic Vercel analytics to see how many page visits I’m getting!
Open comments for this post
Finished implementing a printer module in the client to facilitate message printing! It uses Redis to store the messages as well, and the client polls every 30 seconds to pop the values and print them out.
I also made some major Redis command optimizations by using Lua execution for the printer module and a Hash structure for the status. I was able to drastically minimize the amount of commands necessary to sync the status and fetch new printer messages, which is definitely a huge plus considering there’s a monthly command limit on the free plan.
Time to build a messages input box on the website!
Open comments for this post
I’ve finally finished with the Settings page! I also made a few more bug fixes, removed the custom fonts (they look worse), made some security improvements for the Electron app (removed sandbox and nodeIntegration), and refactored the onboarding/settings validation and flow. Added a noice fade-in animation on the loading screen too!
I decided against a Devices page since it’s honestly unnecessary. If I really need to see the list of devices, I can just read the Redis status key.
My next idea was adding some cool label printer functionality! I have a shipping label printer and hundreds of unused sticky labels, so I thought it would be cool if I added a message box on my website that would print out these messages right on my desk!
Open comments for this post
I finished updating the website to properly parse the status data, and now it displays properly, yay!
The website backend fetches the status key from the Redis database, goes through each record, and sets the status of the device with the lowest priority number (a lower number means higher priority).
Open comments for this post
I’ve finished adding the Mappings page! I can now add a new application by its name and customize the status displayed when the app window is in focus.
Next step will be implementing the new status JSON structure into the website itself… so we can actually start using it!
Open comments for this post
I’ve made huge changes to the overall project folder structure so the codebase stays organized!
I also added windowless functionality (to keep running in the background), open at login (incl. for Linux), and renamed some functions as well for better clarity :D
Open comments for this post
The Status page is finally complete! I finished building the UI and added the main process logic as well to handle manual overrides, invisible mode, and serve live updates to the renderer process every 30 seconds!
I also added the get-windows library to find the currently active window and check if there’s a corresponding mapping (which I’ll be adding next in the Mappings page!).
Installed and ran eslint + prettier as well :)
Open comments for this post
Currently working on the Status page of the UI, which will feature an overview of the live status, as well as the option to enter a manual override or appear invisible.
I’ll still need to work on the logic in the main process that checks for open applications to update my status properly.
Open comments for this post
Finally finished adding an onboarding flow where I configure my settings like device ID, priority, and Redis API credentials!
When starting up the client now, it checks if the settings are valid, and if they aren’t, the onboarding flow is opened. Before saving the new configuration, the main process attempts to establish a connection with the Redis API first to ensure the credentials are valid.
Next step will be building the actual dashboard.
Open comments for this post
Forgot to devlog! So far I’ve built the core of the Electron app, and added a super simple interface just for testing to make sure Redis is working (it is!).
Next steps will be creating an onboarding flow where I can input the Redis credentials and customize my settings upon installation!
Open comments for this post
First devlog! I decided that I’ll build a lightweight client to report my status instead of relying on Hackatime and Slack presence to guess (which is what my website has been doing before :/).
So far I’ve migrated the /api/status endpoint to read a Redis database, which will be updated by the client to transmit my status!
I’ll be writing the client in Electron next! Had to create a new repository for it, which you can find here: https://github.com/brianwalczak/cabin-client
Open comments for this post
First devlog! Spent a LONG time exploring the Oral-B app codebase to learn about how devices are discovered, and what bytes are interpreted from the manufacturer data.
So far I’ve built a discover() method which hooks onto the @abandonware/noble library and searches for brushes nearby.
I managed to reverse engineer the manufacturer data payload which let’s me identify the model line of the brush and filter out non Oral-B devices! :D