Last active
January 18, 2023 05:08
-
-
Save vtjnash/bb288ffba2a5386f622c1f22d9bae2a3 to your computer and use it in GitHub Desktop.
Updating time on MHO-C303 manually (example)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Getting current time: | |
julia> string(bswap(round(UInt32, datetime2unix(Dates.now()))), base=16) * "00" | |
"5f3f1f60" | |
The "00" is the timezone offset (in hours). Here we just use localtime (with offset zero). | |
With Bluetility.app (from Github) or any other similar tool for bt gatt, look for: | |
Service: EBE0CCB0-7A0A-4B0C-8A1A-6FF2997DA3A6 | |
Characteristic: EBE0CCB7-7A0A-4B0C-8A1A-6FF2997DA3A6 | |
Read: Hex: 973F1F60_00 | |
Write: Hex: 5f3f1f6000<enter> | |
Confirming update: | |
julia> unix2datetime(bswap(0x973F1F60)) | |
2021-02-07T01:17:11 |
julia> using Dates; string(bswap(round(UInt32, 30+datetime2unix(Dates.now()))), base=16) * "00" |> clipboard
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found these also:
https://github.com/estshorter/MHO-C303-timesync
https://github.com/h4/lywsd02