{"id":18188056,"url":"https://github.com/hypfer/glance-clock","last_synced_at":"2025-10-10T07:41:16.987Z","repository":{"id":70162506,"uuid":"211727916","full_name":"Hypfer/glance-clock","owner":"Hypfer","description":"Glance Clock BLE protocol reverse-engineered","archived":false,"fork":false,"pushed_at":"2020-08-01T07:34:19.000Z","size":55,"stargazers_count":38,"open_issues_count":1,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-07T13:47:39.795Z","etag":null,"topics":["glanceclock","reverse-engineering"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hypfer.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"hypfer","ko_fi":"hypfer"}},"created_at":"2019-09-29T21:22:20.000Z","updated_at":"2025-02-11T22:16:32.000Z","dependencies_parsed_at":"2023-06-26T00:14:33.716Z","dependency_job_id":null,"html_url":"https://github.com/Hypfer/glance-clock","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.25,"last_synced_commit":"3f0bfc00f290cc6755a25050cf585c69c33181fd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Hypfer/glance-clock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypfer%2Fglance-clock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypfer%2Fglance-clock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypfer%2Fglance-clock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypfer%2Fglance-clock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hypfer","download_url":"https://codeload.github.com/Hypfer/glance-clock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypfer%2Fglance-clock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003186,"owners_count":26083533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["glanceclock","reverse-engineering"],"created_at":"2024-11-03T02:04:29.279Z","updated_at":"2025-10-10T07:41:16.971Z","avatar_url":"https://github.com/Hypfer.png","language":null,"funding_links":["https://github.com/sponsors/hypfer","https://ko-fi.com/hypfer"],"categories":[],"sub_categories":[],"readme":"# GlanceClock BLE Protocol\n![The Clock](https://i.imgur.com/fAZ4hvm.png)\n\n## Overview\nGlanceClock is a 22.8cm diameter wall clock with BLE connectivity.\nIt features a 32x8 LED Matrix Display as well as four 48-LED RGB Rings for text and other visualisations.\n\nIts purpose is to act as an output device for notifications, weather information, appointments etc.\n\nThe device requires both a cloud account as well as an internet-connected smartphone to relay commands to the clock.\n\nThis repository aims to gather all information needed to build a cloudless bridge device which enables use of all Clock features using MQTT/REST/etc.\n\n## General\nCommunication is straightforward. The only requirement is to successfully pair (using PIN) with the Clock.\n\nThen, all communication is done by reading and writing to characteristic `5075fb2e-1e0e-11e7-93ae-92361f002671` (`0x2901`) of service `5075f606-1e0e-11e7-93ae-92361f002671`.\n\nThere are other characteristics and services which are used for e.g. firmware updates. These haven't been documented yet.\n\nData serialization is done using protocol buffers. (See Glance.proto)\n\nReading `0x2901` returns a Settings message with the current settings.\nWriting `0x2901` with a command + serialized payload executes said command.\n\n### Example\n`gatttool --sec-level=high -b CLOCK_MAC -t random --char-write-req -a 0x001f -n 023000002203120141` sends a `Notify` command with a serialized `Notice` message.\nIt will display the letter `A`, play the default notice sound `General_alert_1` as well as the default animation `Pulse` in the default color `Lime`\n\nPlease note that `gatttool` is deprecated and should therefore not be used anymore.\n\n### Pairing with a Linux host\nUsing BlueZ \u003e= 5.50 (e.g. Debian Buster) pairing is straightforward.\n\nUtilizing the interactive console of `bluetoothctl` it is done by executing the following commands:\n```\npower off\npower on\nagent on\ndefault-agent\n\nmenu scan\ntransport le\nback\n\nscan on\n```\n\nNow, the Glance clock should appear. Press the Pairing button on the clock and enter `pair CLOCK_MAC`.\nIf everything is working properly, you should get a PIN prompt. Enter the one displayed on the clock and press enter.\n\nThe clock should play an animation and pairing is done.\n\nIf not, remove the device using `remove CLOCK_MAC` and try again from the start.\nNote that you _must_ get a PIN prompt. Otherwise interacting with the clock will not work.\n\n### Time Synchronization\nFor Time Synchronization, the clock polls a `Current Time Service` GATT Service on the central device on connect.\n\nCheck the specification for more information on that:\n[https://www.bluetooth.com/specifications/gatt/services/](https://www.bluetooth.com/specifications/gatt/services/)\n\n### Known commands\n_These are all in decimal_\n\n| Command                   | Sequence   | PayloadMessage    | Description                                                                                     |\n|---------------------------|------------|-------------------|-------------------------------------------------------------------------------------------------|\n| CustomScene               | 0,0,i,j    | CustomScene       | i = Display mode 0 exclusive; 8 watchface; 24 ring \u0026 text j = scene slot                                                                                   |\n| Notify                    | 2,i,0,j    | Notice            | i = scene_priority Known j values  0 =\u003e default? ifttt 6 =\u003e Weather                             |\n| Timer                     | 3,0,0,0    | Timer             |                                                                                                 |\n| Alarm                     | 4,47,0,0   | ??                |                                                                                                 |\n| Settings                  | 5,0,0,0    | Settings          |                                                                                                 |\n| CallScene                 | 6,83,0,103 | Notice            | With modificator 129?? On call end, ScenesDelete with SceneId 103 gets executed                 |\n| SaveForecastScene         | 7,i,j,k    | ForecastScene     | i:? prio maybe? j: 8 =\u003e only ring, 16 =\u003e only text, 24 =\u003e ring \u0026 text k: scene slot             |\n| SaveAppointmentsScene     | 8,0,i,7    | AppointmentsScene | i can be either 0 or 8. 0 is only alerts, 8 is alerts + watchface. 7 seems to be the scene slot |\n|                           |            |                   |                                                                                                 |\n| TimerStop                 | 10         | -                 |                                                                                                 |\n|                           |            |                   |                                                                                                 |\n| AlarmStop                 | 20         | -                 |                                                                                                 |\n| AlarmClear                | 21         | -                 |                                                                                                 |\n|                           |            |                   |                                                                                                 |\n| ScenesStop                | 30         | -                 | Go to previous scene slot. Screen turns black for a moment                                      |\n| ScenesStart               | 31         | -                 | Go to next scene slot                                                                           |\n| ScenesClear               | 32         | -                 | Clear all scenes. Also hides Digital Clockface until new scenes arrive or settings are updated  |\n| ScenesDelete              | 33,0,0,i   | -                 | i = scene slot                                                                                  |\n| ScenesDeleteMany          | 34,0,i,j   | -                 | i = To Slot, j = From Slot                                                                      |\n| UpdateAndRefresh          | 35         | -                 | Displays cloud update animation and refreshes the screen                                        |\n|                           |            |                   |                                                                                                 |\n| EnableAutomaticNightMode  | 40         | -                 |                                                                                                 |\n| DisableAutomaticNightMode | 41         | -                 |                                                                                                 |\n|                           |            |                   |                                                                                                 |\n| ???                       | 41         | -                 | Seems to hide the watchface                                                                     |\n| BondsClear                | 42         | -                 | Remove all paired devices                                                                       |\n| StartCalibration          | 43         | -                 | Starts the calibration                                                                          |\n| ConfirmCalibration        | 44         | -                 | Confirm the calibration                                                                         |\n| ???                       | 45         | -                 | Some kind of alarm with notes on screen                                                         |\n|                           |            |                   |                                                                                                 |\n| ClearUserInfo             | 50,0,0,0,0 | -                 | Removes all paired devices and shuts off the clock.                                             |\n| BrightnessSceneStop       | 60         | -                 |                                                                                                 |\n| BrightnessSceneStart      | 61         | -                 |                                                                                                 |\n| DSP_STATE_SHOW            | 70         | -                 | Displays a long number. Maybe serial?                                                           |\n\nIt is possible to omit trailing zeroes.\n\n### Constants\n\n#### Types\n\n| Name                        | ID |\n|-----------------------------|----|\n| CUSTOM_SCENE_TYPE           | 0  |\n| CALENDAR_TYPE               | 1  |\n| NOTIFY_TYPE                 | 2  |\n| TIMER_TYPE                  | 3  |\n| ALARM_TYPE                  | 4  |\n| SETTINGS_TYPE               | 5  |\n| CALLS_TYPE                  | 6  |\n| TIMERS_CLEAR_TYPE           | 10 |\n| ALARMS_STOP_TYPE            | 20 |\n| ALARMS_CLEAR_TYPE           | 21 |\n| SCENES_STOP_TYPE            | 30 |\n| SCENES_START_TYPE           | 31 |\n| SCENES_CLEAR_TYPE           | 32 |\n| SCENES_DELETE_TYPE          | 33 |\n| ANCS_START_TYPE             | 40 |\n| ANCS_STOP_TYPE              | 41 |\n| BONDS_CLEAR_TYPE            | 42 |\n| HOMING_START_TYPE           | 43 |\n| HOMING_CONFIRM_TYPE         | 44 |\n| USER_INFO_CLEAR             | 50 |\n| BRIGHTNESS_SCENE_STOP_TYPE  | 60 |\n| BRIGHTNESS_SCENE_START_TYPE | 61 |\n| DSP_STATE_SHOW_TYPE         | 70 |\n\n#### Task Priorities\n\n| Name                    | ID  |\n|-------------------------|-----|\n| TASK_PRIORITY_TIMER     | 46  |\n| TASK_PRIORITY_ALARM     | 47  |\n| TASK_PRIORITY_TIMER_END | 80  |\n| TASK_PRIORITY_PWR_STATE | 81  |\n| TASK_PRIORITY_CALL      | 83  |\n| TASK_PRIORITY_PIN_CODE  | 90  |\n| TASK_PRIORITY_GREATINGS | 255 |\n\n#### Scene Priorities\n\n| Name                         | ID |\n|------------------------------|----|\n| SCENE_PRIORITY_BAND_LOW      | 1  |\n| SCENE_PRIORITY_SYSTEM_IDLE   | 1  |\n| SCENE_PRIORITY_EMUN_MAX      | 15 |\n| SCENE_PRIORITY_BAND_MEDIUM   | 16 |\n| SCENE_PRIORITY_BAND_SYSTEM   | 32 |\n| SCENE_PRIORITY_SYSTEM_MSG    | 33 |\n| SCENE_PRIORITY_BAND_HIGH     | 48 |\n| SCENE_PRIORITY_BAND_HIGHEST  | 64 |\n| SCENE_PRIORITY_BAND_CRITICAL | 80 |\n\n### Icons\nThere are icon characters available which you can use in any TextData you like\n\n| Charcode \t| Icon                                \t|\n|----------\t|-------------------------------------\t|\n| 128      \t| House                               \t|\n| 129      \t| Phone                               \t|\n| 130      \t| Clock                               \t|\n| 131      \t| Plug                                \t|\n| 132      \t| Smartphone                          \t|\n| 133      \t| Star/Sun/Bright                     \t|\n| 134      \t| Smiley                              \t|\n| 135      \t| A huge nearly-all pixel white block \t|\n| 136      \t| Nothing                             \t|\n| 137      \t| 0/3 Battery                         \t|\n| 138      \t| 1/3 Battery                         \t|\n| 139      \t| 2/3 Battery                         \t|\n| 140      \t| 3/3 Battery                         \t|\n| 141      \t| Bell with diagonal line             \t|\n| 142      \t| Speaker off                         \t|\n| 143      \t| Thermometer                         \t|\n| 144      \t| Droplet                             \t|\n| 145      \t| Heart                               \t|\n| 146      \t| Barometer (?)                       \t|\n| 147      \t| Pipe with arrow left                \t|\n| 148      \t| Arrow right with pipe               \t|\n| 149      \t| Umbrella                            \t|\n| 150      \t| Bell                                \t|\n| 151      \t| Speaker                             \t|\n| 152      \t| Wind speed                          \t|\n| 153      \t| Cloud                               \t|\n| 154      \t| Missing Character                   \t|\n| 176      \t| °                                   \t|\n\n## Factory reset\nIf something goes horribly wrong, push and hold the reset button + Power button.\nLet go of the reset button and keep holding the Power button until the LED blinking pattern changes.\nThen release it as well.\n\nPlease note that this will also reset the firmware back to the factory version.\n\n## Misc\nYou can find firmware images, the official website documentation and more [here.](https://github.com/Hypfer/glance-clock-assets)\n\nIt is possible and recommended to flash Firmware ZIP files using the `nRF Toolbox App`.\n\n### Night Mode\nTaken from the offical Website + App Version 2.0.1:\n```\nNight mode activates a digital clock that you can see at night when the hands are not visible.\nIn Night mode all integrations that set up As a clock Face (ACF) are disappeared, the sound is muted, but notifications will still be displayed.\n\nWhen it's dark to see the clock hands, the digital time will be shown on the clock face automatically. Uses internal ambient light sensor built into the clock \n```\n\n### Other random pieces of information\n`When you perform calibration hands don't reach 12:00 when there is a green segment, but stop at 11:59. Please take off the minute hand and place it back to make hands straight at 12:00. Probably the hands were mechanically misaligned a bit. `\n\nConcerning what is most likely command `35`:\n`Yes, we have added this icon to show that Clock is doing something and responding to changes. Otherwise, if you change an As Clock Face you may not see anything for 10-15 seconds before the face is changed.`\n\n## Credits\nThe structure of this readme was plagiarized from [https://github.com/aprosvetova/xiaomi-kettle](https://github.com/aprosvetova/xiaomi-kettle)\n\nSome messages were analyzed using [https://github.com/jmendeth/protobuf-inspector/](https://github.com/jmendeth/protobuf-inspector/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypfer%2Fglance-clock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhypfer%2Fglance-clock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypfer%2Fglance-clock/lists"}