This was a journey, but now I have a HA alarm clock

This was a journey, but now I have a HA alarm clock

https://preview.redd.it/rgnakm04hekh1.png?width=1920&format=png&auto=webp&s=3449239814e85680064dad1c6127ec2e898b3d1c

https://preview.redd.it/0jcbb4f8hekh1.png?width=1401&format=png&auto=webp&s=137993f95437b1c5f9e0e6fc414394695b75dcf6

Getting here was a journey. This is an IOTTime clock from Aliexpress, that needed to be disassembled to get to the solder points I needed to connect a TTL UART adapter to before I could even talk to it. Then building and flashing Tasmota thanks to this person's work. Setting up MQTT, helpers, automations, and dashboard cards in HA.

Now it:

  • Is fully controlled including presets from a HA bubble card popup card.
  • Has physical button controls for showing current alarm, enabling/disabling current alarm and a spare button I haven't found a use for yet.
  • Triggers a gradual room light automation 30 min before.
  • Handles DST and time sync itself, unlike my current cheap backup alarm clock that needs to be manually set and will drift and eventually overlap my smartwatch alarm.
  • Let's me send custom alarm sound sequences not actually tied to the wake up alarm, which I can tie into other automations. As an example, one courier here drops mail in the mailbox during the night, so I want a toggle I can turn on for expensive deliveries to wake up and grab it when the mailbox sensor triggers rather than leave it sitting out until morning.

In the future the plan is:

  • Extract alarm timer from my smartwatch, add 5 minutes, have that be the automatic backup alarm.
reddit.com
u/Canatee — 1 day ago
▲ 7 r/Xreal

Realized I could make every side view hack redundant by just forking the FOSS player I'm using and adding a very simple feature

I feel silly having both bought a Beam Pro and eagerly awaited OneUI 8.5 to put back auto-hide taskbar in DeX to be able to have a completely black background and get more control over side view.

I realized that since the app I'm always using, Findroid, is open source, I can just make a personal fork and add this myself. Also fixed some download manager issues the app's had pull requests for for years and made it talk to my Xteink X3 via BT LE as a media remote.

I even specifically made this affect the video canvas rather than the app window so playback controls, settings, and even subtitles stay full screen.

Sharing as an idea for others to replicate, not as an app for others to use. I'm not interested in maintaining a fork or even figuring out what my obligations are upstream if I did.

u/Canatee — 3 days ago
▲ 9 r/XTEINK

My custom audiobook app that treats Epub Media Overlay files as "books with lyrics" and uses my X3 as a remote

This is all vibe coded to hell (albeit with some very specific instructions that still took a lot of time to learn to give), and basically ignores the actual point of Epub Media Overlay files (from Storyteller, shoutout u/scrollin_thru) and instead treats them as "audiobooks with lyrics". The UI is a lot more inspired by synced lyrics in music players than a typical book-first ereader implementation. The Xteink X3 is running my custom fork of the Crosspoint BT Remote fork, using the BT BLE stack to talk to the app directly. The player then sends the active text snippet to the reader over BT and also a few pieces of metadata like a trigger for the custom UI (the same remote works for music and other media using another UI) and skip button labels.

I know how the community hate vibe code so don't worry, this is not a plug for anything. I just think this is a neat use case for both the X3 and media overlay files that can inspire others to make something "proper".

u/Canatee — 6 days ago

Got my X3 to work as a Bluetooth media remote, including support for broadcast epub media overlay snippets

u/Canatee — 10 days ago
▲ 3 r/eink

Turned my Xteink X3 into a Bluetooth remote

Needs a companion app to handle the bridge between media session events and BT LE connection, and some logic to transfer cover art in stages, but works well. Now I'm not eyeing those earbuds with charging cases anymore.

Next step is making it able to dynamically scale the title field to fit the Epub Media Overlay highlighted text snippets the Noctium dev is working on broadcasting as a media session event. Then it hopefully becomes a wireless eink read-along companion to audiobooks.

u/Canatee — 10 days ago

Wired headphones are worse than wireless according to the Norwegian national news service

https://preview.redd.it/049kqf0xs0hh1.png?width=2652&format=png&auto=webp&s=3eb0e74c8d3473f32449db2d720075b6cacb554c

The article is about how people are using wired headphones again because it's "cool" and their "idols are using them" and the author (who from the picture might be born after the headphone jack disappear from phones) keep stating how much worse the sound is.

This is on the front page of the tax-funded Norwegian Broadcasting Corporation.

If you think the qualifier that they're specifically referring to bundled airpods is there: nope.

reddit.com
u/Canatee — 18 days ago

Step count woes from companion app and whether my DIY solution is the best option

For a week or so now I've tried to use HA as the master location for my step count. My watch's companion app, Zepp, writes to Health Connect, and the HA companion app grabs it from there. On the HA side I mirror it into a total increasing sensor template for the purpose of being able to swap the source if I swap phones etc, then dashboard cards show current dynamic step counter and bar graphs for last 30 days, per week, and per month.

The problem with it has been that the pipeline Watch -> Zepp -> HC -> HA is very prone to one pipe falling asleep. It usually is accurate-ish by the end of the day but missing a few dozen steps around midnight. Even if I set HA to update sensor data every minute or use an automation to request an update right before midnight, that doesn't help if Zepp is busy taking a nap and writing the last step count after midnight. HC will eventually be correct with backfilled data, HA will not since it moves on at midnight.

I've also had problems with backfilling data. Using "import statistics" from HACS I can import CSVs but it's quite finicky to write the right values since it recalculates totals and expect hourly readings. I did manage to manually backfill the start of july from a manual source eventually but it took more back and forth than I liked.

My solution was to set up a webhook sending JSON data to an AppDaemon script that manually enters values into an external statistic value on a per-day basis, targeting 23:00. The incoming data is merged into a daily step count instead of hourly values and it only writes values prior to today. Coupled with an Android app I made that requests Health Connect access and grabs daily totals, it functionally means that it will get X days of accurate, finished statistics + the current count for today, disregard the latter, and write the former if missing. That way it doesn't matter if Zepp wrote some backdated data. Not being connected to a live sensor means less mess with hourly deltas as well.

This works, is very controllable by me, and includes a JSON ledger that is the script's master source just in case. It's also easy to swap to any other source, and I even have an alternative input source by making the watchface itself keep track and a watch app setup sending that off to the same webhook. On paper it seems like the actually-me-in-control option I don't feel like the official pipeline offers.

But since I'm not finding any discussions about this exact issue in community discussions, want some smarter eyes on this to check to see if I missed something, possibly over-complicating the fix because I missed a setting or something.

u/Canatee — 20 days ago

Took me a couple of hours to migrate from Trakt, build a WeTrakr scraper in absence of an API, send data to Home Assistant and make a script to turn it into a dashboard card

https://preview.redd.it/smif1e4e9jgh1.png?width=915&format=png&auto=webp&s=88042782f7b3d8dd1514fab047f46b9bd0a37040

Episode title seems to be missing from the WeTrakr calendar DOM but I don't really need it and could look it up externally if needed.

Hope u/alberdev doesn't mind that I'm too impatient to wait for an API.

Actually a decent hourly "wage" compared to shelling out for Trakt VIP.

reddit.com
u/Canatee — 21 days ago
▲ 18 r/WeTrakr

Any update on API? Trakt just shut off theirs for free users

The last update I find is "soon" from two weeks ago. Trakt just shut off API access without VIP last night so there's probably going to be stream of new people like me coming in with broken integrations.

reddit.com
u/Canatee — 21 days ago
▲ 15 r/XTEINK

First foray into custom companion app, FW, and Home Assistant integration

So far the HA part is just the server used to store the image fetched on sleep, but going that route means I can write to the same image using other means as well, so we'll see where this goes.

u/Canatee — 21 days ago
▲ 20 r/XTEINK

Made the magnetic charger much, much bigger...and magsafe

The magnetic charger (or rather, the USB-C adapter version, but goes for either) for the X3 gives me a bit of PTSD to the Pebble and other shitty magnetic pogo pin chargers. As if the connection type isn't already unstable enough, Xteink decided to balance it on a thin protrusion (probably for cases) which makes it even wobblier.

Some Lego, super glue, a magsafe adapter ring, air-dry clay and spray paint later and I have this blob. It magnetically attaches to the primary magsafe part as well as the charging part, and justr adds stability. It's of course a trade off in size, but this is not a charger I need to carry around, and it can even be given a foot to turn it into a charging stand in the future if I so desire.

u/Canatee — 22 days ago

Any watch face pros want to comment on my journey of discovery?

It's only been two days since I got my Balance 2, but in that time I've gone through 60-70 iterations of a watchface and resurrected a tasks app from github for my own use, set up amazHA for Home Assistant and built a step statistics tracker in the latter. Feels like it's been a year. I now have the watchface I want, but I'd like someone who actually knows wtf they're doing to comment on my journey of discovery.

For context, I started with a downloaded watchface that was somewhat close to what I wanted. Part of the dial frame, two icons, and parts of the m/s/h hands are still around from that but it's not really in any way the same watchface anymore. I've been using VS Code connected to my ChatGPT account for Codex, on Sol 5.6 high. I know vibe coding is frowned upon but honestly, the current versions of both ChatGPT and Claude are kinda amazing.

My current watchface is on the latest api, packaged with zeus. This was the only way I got the face to query the light sensor. The auto brightness on this watch is useless so the watch face turns on auto brightness on wake (sensor doesn't work if set to manual), polls readings at 0, 0.5 and 1 seconds, and based on whether any value is above 400, uses the dark text on white background version and leaves auto brightness on. If no values hit 400, use the white on black and set brightness to 35% manual. This short polling window combined with the transition delay for changing brightness means that it's functionally invisible that auto brightness is on for a second, preventing the brightness jumping around. This code combined with the watch face itself being text based instead of stacks of bitmaps is probably not ideal for battery life but ChatGPT's opinion is that the wake event itself is the bigger drain than any delta over using bitmaps. I guess I'll see what my battery life ends up being. It's used 20% in two days being used as an absolute punching bag of a dev tool so I think I'll be fine.

I never got any part of the music api to work, even on the modernized build. Doesn't show metadata from either local watch music or phone control. Not sure what's going on there.

Also tried to read next alarm. My understanding is that there's an API gap here where the watchface code cannot call a normal function to read the value, only let the FW handle displaying it via provided bitmaps. ChatGPT's understanding is that this originally let the FW handle it without running the face's JS and it never got modernized, but IDK, and I didn't get the bitmaps to work either.

There's apparently a community trick to send data like blood glucose by having a mini app write a file on the watch that the face can read. I never tried to implement it since I got the light sensor to work, but that was my backup. I did have the idea to use music metadata to transfer the info instead but since I never got it to read that it was irrelevant. Might be something there as you could send a music session update and stuff info in a unique format into the artist/title fields.

That's as much as I have for now, and I'm sure a lot of it is wrong, but at least I have a watch face that compensates for the shit auto brightness. Kinda amazed at how that bad of a feature is not emergency patched, let alone left between generations. I wonder if they're testing with very bright watch faces and not realizing that what's readable as black on white isn't necessarily readable as white on black.

Any input on any of this is welcome

reddit.com
u/Canatee — 22 days ago
▲ 11 r/Calibre

PSA on a Koreader sync issue that's been bugging me and is finally solved

I'm leaving this here more as a search target than something that is probably immediately useful to anyone.

I recently started using Noctium on Android for books, and it has Koreader sync. No matter what I tried, I could not calculate a hash using the raw Calibre file to match anything Noctium was writing, and the hash isn't visible to users in there. Today I got an Xteink X3 and Crosspoint's Koreader Sync found the Noctium data just fine.

After some digging, this is the problem: Calibre rewrites files it serves over OPDS to include metadata, meaning that any device using the OPDS version of the file will calculate a different hash than the raw file on the server. This is apparently kinda documented somewhere if you know exactly where to look but apparently I didn't until I knew what the issue was. The filename based alternative match Koreader sync offers isn't always an option for apps and filenames can also be changed in the process ((swapping author and title order).

The best tool to quickly find the hash seems to be Readest. The URL to read a book in the web reader uses the exact hash as the unique part of the URL. Feed your OPDS files back in there to extract the hash if you're ever in need of putting the OPDS hash back into Calibre.

The problem is then that if you start syncing progress to calibre, the extra metadata in those columns will propagate out to new OPDS downloads and generate a new hash. So it's an evil circle doomed to never work properly.

Edit: I found a way to "fix" it. Disable all of Calibre's "metadata writer" plugins. God knows what else that will break but it does solve it. Note that there's also an option in the internal ebook viewer to store progress internal in the file, so disable that too. I had to restore an epub from the cloud to get back the actual raw epub just from accidentally double clicking a book.

Edit 2: Noctium's dev has now added the md5 hash visible in the UI when using koreader sync, which should add another way to make the actual hash more visible for people setting up sync.

u/Canatee — 23 days ago
▲ 8 r/XTEINK

Generic magsafe cardholder I have a stack of for DIY purposes instantly fixed my X3 magnet strength woes

Bought a stack of these things on Ali a while back as they're advertised as everything from DAC holders to normal card wallets. Figured they'd be great DIY magsafe bases to have. Turns out it's a perfect fit for my brand new X3 whose magnets leave a lot to be desired.

If anyone know any good made-to-fit cases with strong magsafe though I'd listening.

u/Canatee — 24 days ago

Some initial thoughts after rage-moving from Huawei GT6 to Amazfit Balance 2

I got a Balance 2 in the mail today, which is directly replacing my Huawei GT6 I've had for a month. I liked a lot about the GT6, but Huawei does not really seem to take "no" for an answer when it comes to letting you disable things, and the thing is very locked down.

Maybe that experience makes me more impressed than I should be here, but I'm very impressed by what Amazfit lets me take a weed whacker to. Uninstalling a bunch of pre-installed apps, hiding the rest, being able to disable a lot of settings and even finding some annoying ones off by default. Developer mode for sideloading, and app- and watch face store that use Google Play for payment.

Not all the bloat can be nuked, with my favorite piece of stupidity being the customizable overview page that still forces you to pick 3 things. I only want steps. I also almost puked at the ad spam of some third party watch face apps; I'm fine with monetization, but I had to triple check that those apps were even the real ones. I found no watch face that was exactly what I wanted so I ended up finding one that was close and figuring out how to edit that in VS Code and Watch Face Editor. I also didn't find a Tasks app that syncs with Tasks.org so I might have to find out how to make one.

App support is great, and the Home Assistant community seems to be unusually big on there. I set up AmazHA, with step sync to HA, and managed to get step data for the month so far out of Huawei Health and in to the history data of the step sensor in HA, and make cards for daily/weekly/monthly totals. Definitely a level of "do what you want" that Huawei doesn't have. Zepp is pissing me off by apparently not working properly with Tailscale for watch app traffic routing, but that's still better than nothing.

Overall very happy with the swap, and once I make a tasks app and get some parts to test an idea I have for a charging solution i'll be good for a while I hope.

reddit.com
u/Canatee — 24 days ago
▲ 1 r/Lofree

Lofree Flow 2 Bluetooth battery level inaccurate?

I have been messing around with getting battery life for my Flow 2 into Home Assistant and ended up using a kinda stupid workaround to read it off BT since nobody has reverse engineered the 2.4Ghz dongle HID communication. However, the battery life readings I keep getting off it seem odd. When I started taking readings it was at 86%, then no update for a day or two until it's down to 81%. That's three days of heavy 2.4Ghz use ago and it still reports 81%:

> android.bluetooth.device.extra.BATTERY_LEVEL: "81"

This is not my DIY solution's fault, the keyboard actually reports this to Android. Is the battery reporting just broken, segmented into 5% at a time and somehow off by 1, or what's going on here? Is anyone running it permanently on BT with some way to see battery meter and can comment on whether it actually goes down normally?

reddit.com
u/Canatee — 25 days ago

Is Amazfit a fit for me?

I'm currently using a Huawei GT6 and, barring a miracle, it's being ejected from my life. I like most things about it, except that it does not take no for an answer and keeps shoving Goal notifications down my throat that I cannot disable. After I took away the companion app's internet access it's also whining about satellites.

The Amazfit Balance looks good, but the question is if Amazfit is another ****** company that isn't taking no for an answer. Will it let me have a round watch with nice analog watch face, good battery, step count only, notification mirroring, an alarm clock, and then shut the **** up about anything else? Either natively or via gadgetbridge.

reddit.com
u/Canatee — 29 days ago

Any way to get rid of goal notifications/will Gadgetbridge let me do that?

I have a GT6 and like the design and battery life, and use notifications, alarm, and step count. Apparently that's not good enough for Huawei who keeps nagging me with goal notifications I do not want and cannot seem to turn off. I've looked through all settings and managed to disable most things but any goal completion crap still remains.

Is there a way to get rid of that? Some setting I've missed? Setting the goal to something I'll never achieve? Move to gadgetbridge?

At this point I'm nearing the point I'm getting rid of the watch on principle since I refuse to be bullied around by a product I paid for.

reddit.com
u/Canatee — 29 days ago

Just got what has to be the most overlooked magsafe accessory ever: HMD Amped Buds

I was searching for random shit a little while back and my brain farted long enough for me to look up magsafe headphones. Turns out that's a thing and it's made by the people who bought Nokia; HMD Amped Buds. I could find very little reputable information about them beyond them being available here and there, and some very small outlets/YouTube channels having done content on them. What's more, they were available as purchasable with a week's extra delivery time from a central warehouse from an online store shipping here to Norway. The price listed was about 1/4 of what appears to be the €180 ish MSRP so I said what the hell and ordered it. It sat around as processing for a week but eventually shipped and I got them today.

All I can say is how the hell did this fly under everyone's radar? They fold flat and click into a thin magsafe charging case 14mm thick, and fold out into something that's kinda airpods shaped with tiny rubber tips. As an IEM user I'm not entirely sure how the fit is supposed to be since I want to push them further in like IEMs, but they seem to sit more like how I'd imagine airpods sit. They sound good too, and I'm fairly picky on sound.

The feature set is insane, in more ways than one. They can charge wirelessly through magsafe, but also charge other devices via magsafe, which is kinda stupid given they have a 1600mAh battery and can't do that while USB is plugged in (missed opportunity to be a travel magsafe charger). They can connect to multiple devices, and support AptX, AptX Adaptive low latency, high quality, and even lossless (tested with FiiO Airlink). They apperared as a quick add thing on Android and even prompted to add to Find Hub.

I'm not sure there's €180 of value here but for someone liking this bud style, the AptX support and sound quality alone isn't off the mark for that. At 1/4 that price I'm not sure if I just picked up the leftovers of a failed product venture or what was going on. There's even a dedicated app for them, with a nonfunctional FW update that says "coming soon" and no update since April 1 last year.

There seems to be room for bigger tips if I can find something that fits, so I'll play around with that next. Either way, stupidly nice find for the price even if it wasn't just to satisfy my curiosity.

u/Canatee — 1 month ago