{"id":32543142,"url":"https://github.com/hammingweight/gnomon","last_synced_at":"2026-07-04T02:31:16.972Z","repository":{"id":274495442,"uuid":"922855336","full_name":"hammingweight/gnomon","owner":"hammingweight","description":"A tool for automated management of a SunSynk inverter","archived":false,"fork":false,"pushed_at":"2026-04-09T14:37:13.000Z","size":181,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-09T16:26:28.290Z","etag":null,"topics":["go","iot","solar-energy","sunsynk"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hammingweight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-27T07:50:02.000Z","updated_at":"2026-04-09T14:36:28.000Z","dependencies_parsed_at":"2025-03-20T16:33:56.411Z","dependency_job_id":"1774daa8-d7c7-4383-902d-069e98e4ec37","html_url":"https://github.com/hammingweight/gnomon","commit_stats":null,"previous_names":["hammingweight/gnomon"],"tags_count":66,"template":false,"template_full_name":null,"purl":"pkg:github/hammingweight/gnomon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hammingweight%2Fgnomon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hammingweight%2Fgnomon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hammingweight%2Fgnomon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hammingweight%2Fgnomon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hammingweight","download_url":"https://codeload.github.com/hammingweight/gnomon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hammingweight%2Fgnomon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35108298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"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":["go","iot","solar-energy","sunsynk"],"created_at":"2025-10-28T16:58:45.775Z","updated_at":"2026-07-04T02:31:16.966Z","avatar_url":"https://github.com/hammingweight.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gnomon\n\u003cimg src=\"/images/gnomon.jpg\" align=\"right\" width=\"200px\"\u003e\n\n**gnomon** is a tool that monitors a SunSynk\u003csup\u003e:registered:\u003c/sup\u003e hybrid inverter and updates the inverter's settings based on the battery state of charge and input power. **gnomon** is\nintended for small installations where:\n * The inverter's input (e.g. solar panels) and battery may not be sufficient to provide uninterrupted power without the grid, and\n * Loads are split into essential and non-essential loads\n\n**gnomon** should run once a day, from sunrise to sunset. At the end of the running time, **gnomon** sets the maximum depth of discharge for the battery. Typically, a greater discharge depth will be configured in summer than in winter. The tool's goal is to maximize the amount of solar energy that is generated while ensuring that the battery has sufficient charge to handle power outages.\n\nThe software can also choose whether to power non-essential loads from the inverter (the inputs and battery) or from the grid.  **gnomon**'s heuristics use\nthe battery's state of charge and how much power is being supplied by the inputs. In practice, **gnomon** will primarily \nuse the grid to power non-essential loads in winter or overcast days. On long, clear summer days, **gnomon** will try to use less grid power while maintaining a reasonable\nbattery state of charge.\n\n## Installing and configuring *gnomon*\nYou can download **gnomon** for Windows, Mac or Linux from [releases](https://github.com/hammingweight/gnomon/releases).\n\n**gnomon** uses a configuration file with credentials for authentication with the SunSynk API. The default location for the config file is\n`$HOME/.synk/config`. The configuration file is a YAML file with a username, user password and an inverter serial number, like\n\n```\n$ cat $HOME/.synk/config\nuser: carl@example.com\npassword: \"VerySecret\"\ndefault_inverter_sn: 2401010123\n```\n\nYou can create the configuration file using an editor. Alternatively, you can create the file using [synkctl](https://github.com/hammingweight/synkctl) and running\n\n```\n$ synkctl configuration generate -u carl@example.com -p \"VerySecret\" -i 2401010123\n```\n\n\n## Running *gnomon*\nRunning **gnomon** with a `--help` flag shows the options\n\n```\n$ gnomon --help\ngnomon is a tool for automatically managing a SunSynk inverter's settings.\nIt adjusts the depth of discharge of the battery and, optionally, can decide when to\nallow the inverter to power non-essential loads.\n\nUsage:\n  gnomon [flags]\n\nFlags:\n  -c, --config string    synkctl config file path (default \"/home/cmeijer/.synk/config\")\n  -C, --ct-coil          manage power to the non-essential load\n  -d, --delta-soc SoC    maximum change to the battery state of charge (default 5)\n  -e, --end HH:MM        end time in 24 hour HH:MM format, e.g. 19:30\n  -h, --help             help for gnomon\n  -l, --logfile string   log file path\n  -m, --min-soc SoC      minimum battery state of charge\n  -s, --start HH:MM      start time in 24 hour HH:MM format, e.g. 06:00\n  -v, --version          version for gnomon\n```\n\nFor example, to run the script so that it starts managing the inverter at 5:00AM, stops managing at 7:30PM, overrides the default configuration file (\"myconfig\"), logs to a file \"gnomon.log\", won't allow the battery state of charge to drop below 40%, will not change the allowed depth of discharge by more than 3%, and manages\nthe CT coil to control whether the grid or inverter should power the non-essential loads, run **gnomon** with the following flags\n\n```\ngnomon -s 05:00 -e 19:30 -c myconfig -l gnomon.log -m 40 -d 3 -C\n```\n\nAll flags are optional and simply running\n\n```\n$ gnomon\n```\nwill:\n* start managing the inverter immediately (i.e. a start time of 'now')\n* end management of the inverter in 12 hours\n* use the default configuration file\n* write logs to stdout\n* set the minimum battery SoC to the low battery SoC plus 20%\n* will not adjust the allowed battery depth of discharge by more than 5%\n* not manage power to the non-essential loads\n\nThe following is a snippet of the first few lines logged by **gnomon** when managing power to the non-essential load (via the CT coil)\n\n```\n$ gnomon -C\n2025/05/23 16:42:59 Starting management of the inverter\n2025/05/23 16:42:59 Authenticating\n2025/05/23 16:42:59 Starting management of the battery SOC\n2025/05/23 16:42:59 Starting power management to the CT\n2025/05/23 16:43:00 Input power = 60W, Battery SOC = 92%, Load = 1119W.\n2025/05/23 16:43:01 Minimum allowed battery SOC threshold = 40%\n2025/05/23 16:43:01 Maximum change to battery SOC threshold = 5%\n```\n\n### Running *gnomon* as a cron job\nWhile you can run **gnomon** manually, it's a better idea to run it daily using `cron` or as a Kubernetes `CronJob`. For example, \nwith this as a `crontab` entry to run **gnomon** starting at 6:00AM (and ending at 8:00PM/20:00)\n\n```\n00 06 * * * gnomon -C -e 20:00 -l /home/carl/gnomon.logs\n```\n\n## Important Note: Permissions\nIf the logs show that updating the inverter settings failed with messages like\n\n```\n2025/01/31 21:00:00 Setting battery depth of discharge to 80%\n2025/01/31 21:00:01 updating battery capacity failed:  No Permissions\n```\n\nyou need to upgrade your SunSynk\u003csup\u003e:registered:\u003c/sup\u003e account from end-user to installer by completing an [online form submission](https://www.sunsynk.org/remote-monitoring).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhammingweight%2Fgnomon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhammingweight%2Fgnomon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhammingweight%2Fgnomon/lists"}