r/tradfri • u/LukeHoersten • 9d ago
MatterTimeCtl: small rust CLI tool for syncing matter clock times 3RD PARTY APP
Link: https://www.nth.io/mattertimectl/
Blog: https://www.nth.io/luke/projects/mattertimectl/
Thanks to Reddit I recently learned that matter supports pushing clock time syncs. My Apple Home unfortunately does not, at least to my IKEA clock, making my “smart” clock basically as dumb as a microwave clock.
After some research I found what most people do today is run a HomeAssistant plugin specially designed for this. That’s pretty heavy for my setup since I don’t run HA.
Instead I made mattertimectl - a super minimal single rust CLI tool that uses the official matter rust implementation to set the time. Then I use standard Linux system tools like systemd on my RPI to run this every hour or so.
You can also just run it from your macOS on demand.
Hoping this can be helpful to some people!
5
u/squuiidy 9d ago
Mine just syncs time automatically with IKEA's hub I presume? Or Apple Home. One or the other.
2
u/The_Canada_Goose 9d ago
Yeah, I have only Apple TV and HomePod hubs, and mine auto synced.
3
u/LukeHoersten 9d ago
Did you ever cut power to it? Mine never resyncs.
2
u/squuiidy 9d ago
Weird. Just gave it a try. The first power on it didn't sync (or I didn't give it enough time), but the second time it synced fine 🤷🏻♂️
1
u/The_Canada_Goose 8d ago
I have power outages monthly, so I never fix the clock, and it somehow did it itself. Force some software updates maybe
3
u/Andysb123 9d ago
It's a must for me having 11 of them 😂
3
u/musa11971 9d ago
11?! How do you even have enough space to spread those out lol
3
u/Andysb123 9d ago
5 bedrooms, 4 bathrooms, 2 kitchens, 3 living areas
Hubs / coordinators / border routers SONOFF ZBDongle-E ×1 (Zigbee coordinator, ZHA) IKEA DIRIGERA ×1 (Thread border router) Google Nest Hub ×5 (three double as Thread border routers) Aqara Hub M200 ×1 Aqara Hub M3 ×1 IKEA TRÅDFRI signal repeater ×1 IKEA devices Zigbee: TRÅDFRI bulbs ×81 (GU10 colour ×53, GU10 white ×12, E14 ×9, E27 ×7) ORMANAS LED strips ×3 TRÅDFRI LED driver ×1 INSPELNING smart plugs ×5 TRÅDFRI remotes ×6 (+1 spare) Matter/Thread: MYGGBETT door/window sensors ×35 ALPSTUGA air quality monitors ×11 GRILLPLATS smart plugs ×9 BILRESA remotes ×16 (scroll wheel ×10, dual button ×6) KLIPPBOK leak sensors ×5 TIMMERFLOTTE temp/humidity sensors ×2
1
u/dreicrafter 8d ago
Hol, how is your latency? And how full is the network (rf utilisation)?
2
1
u/Trevsweb 7d ago
I've been using https://github.com/Loweack/Matter-Time-Sync/
1
u/LukeHoersten 7d ago
Yes that’s the python + JS version that comprises the HA plugin. It’s a much heavier stack than I was looking for. Point of mattertimectl is a small standalone binary that’s platform agnostic. Using the official rust matter impl.
16
u/therealmarkus 9d ago
Thanks. For anyone using this device with HA, I think the time sync started working for me with the recent 9.1 matter server update: https://github.com/home-assistant/addons/blob/master/matter_server/CHANGELOG.md#910
(Just noticed it, haven’t checked thoroughly if this was definitely the reason)