{"id":13600510,"url":"https://github.com/SMerrony/aghast","last_synced_at":"2025-04-11T00:31:24.670Z","repository":{"id":48065292,"uuid":"312192580","full_name":"SMerrony/aghast","owner":"SMerrony","description":"AGHAST is A Go Home Automation SysTem closely coupled with MQTT.","archived":true,"fork":false,"pushed_at":"2022-05-12T05:36:40.000Z","size":8565,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-16T13:11:15.236Z","etag":null,"topics":["automation","csv-export","daikin","go","golang","home-automation","influxdb","lidl","logging","mqtt","node-red","postgresql","scraper","zigbee","zigbee2mqtt"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SMerrony.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.txt","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-12T06:54:08.000Z","updated_at":"2024-01-12T14:46:24.000Z","dependencies_parsed_at":"2022-08-12T17:50:33.740Z","dependency_job_id":null,"html_url":"https://github.com/SMerrony/aghast","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMerrony%2Faghast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMerrony%2Faghast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMerrony%2Faghast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMerrony%2Faghast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SMerrony","download_url":"https://codeload.github.com/SMerrony/aghast/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322263,"owners_count":21084334,"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","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":["automation","csv-export","daikin","go","golang","home-automation","influxdb","lidl","logging","mqtt","node-red","postgresql","scraper","zigbee","zigbee2mqtt"],"created_at":"2024-08-01T18:00:40.708Z","updated_at":"2025-04-11T00:31:23.973Z","avatar_url":"https://github.com/SMerrony.png","language":"Go","readme":"# A Go Home Automation SysTem (AGHAST)\n\nAGHAST is primarily an MQTT-centric automation _server_ - it does not mandate a specific front-end.\n\nIt provides two main services: an automation engine, and a set of MQTT helpers to aid in the control and monitoring\nof a disparate collection of MQTT devices.\n\nAll data and controls that should be provided to end-users (i.e. not administrators) are exposed via MQTT.\nNode-Red is being used as a front-end during development and some example flows are provided, but other MQTT-connected dashboards could be used if prefered.\n\n![](examples/node-red/Screenshots/Network-0.0.0.png)\n\nWe believe that end-users of HA systems are generally not interested in the nuts and bolts, so configuration is performed entirely at the back-end by the in-house geek using TOML files ;-)\n\n## Requirements\n\n* An MQTT Broker - development is being undertaken using Mosquitto, any modern broker should work\n* An MQTT-Connected dashboard - [Node-Red](https://nodered.org) works well and example flows are included\n\n## Integrations\nIntegrations provide support for interacting with real-world or virtual resources, eg. Wifi lights, web scrapers, HVAC systems.  All interaction is via MQTT.\n\nCurrently available Integrations...\n| Integration | Description                  | Documentation |\n| ----------- | :--------------------------  |  ------------- |\n| Time        | Includes: Tickers                | [Time](docs/Time.md) |\n| Automation  | Event-based Automation           | [Automation](docs/Automation.md) |\n| DataLogger  | Log MQTT Data to CSV files       | [DataLogger](docs/DataLogger.md) |\n| ~~Daikin~~  | ~~HVAC Control and Monitoring~~  | *Use [daikin2mqtt](https://github.com/SMerrony/daikin2mqtt) instead* |\n| HostChecker | Monitor Device availability      | [HostChecker](docs/HostChecker.md) |\n| Influx      | Log MQTT Data to InfluxDB        | [Influx](docs/Influx.md) |\n| Mqtt2smtp   | MQTT-\u003eEmail Gateway              | [Mqtt2smtp](docs/Mqtt2smtp.md) |\n| MqttCache   | Retain transient MQTT messages   | [MqttCache](docs/MqttCache.md) |\n| MqttSender  | Send MQTT messages regularly     | [MqttSender](docs/MqttSender.md)\n| ~~PiMqttGpio~~ | ~~Capture pi-mqtt-gpio data~~ | *Not required with new inbuilt MQTT functionality* |\n| Postgres    | Log MQTT Data to PostgreSQL DB   | [Postgres](docs/Postgres.md) |\n| Scraper     | Web Scraping to MQTT             | [Scraper](docs/Scraper.md) |\n| Tuya        | Tuya WiFi lights, ZigBee Sockets | Deprecated [](docs/) |\n| ~~Zigbee2MQTT~~ | ~~Zigbee2MQTT sockets...~~   | *Not required with new inbuilt MQTT functionality* |\n\nThe Time Integration must be enabled for AGHAST to start, you will also probably need to\nenable Automation and at least one other Integration in order to do anything useful.\n\nThe Tuya Integration is a bit of a hack.  But... it can be used to integrate LIDL SmartHome ZigBee (and other ZigBee stuff) if they are first added to the TuyaSmart app. __However, it's much better__ to use [zigbee2mqtt](https://zigbee2mqtt.io) with a supported USB dongle or hub.\n\n## Configuration\n\nThe main configuration file `config.toml` is quite simple, containing only some general information about the system itself, and a list of enabled Integrations, eg.\n```\nSystemName = \"Our House\"      # Label for the system\nPostcode = \"!!SECRET(postcode)\"\n\nMqttBroker = \"!!CONSTANT(mqttBroker)\"  # Hostname or IP of MQTT Broker\nMqttPort = 1883               # MQTT Broker port\nMqttClientID = \"aghast\"       # MQTT Client ID\nMqttUsername = \"\"\nMqttPassword = \"\"\nMqttBaseTopic = \"aghast\"      # First element of topic for all messages we send\n\nControlPort = 46445           # HTTP port for back-end admin control\n\n# List of Integrations we want enabled\nIntegrations = [\n  \"time\",         # the Time integration MUST be enabled\n  \"automation\",\n#  \"datalogger\",  # Commented out, will not be enabled\n  \"hostchecker\",\n  \"influx\",\n  \"mqtt2smtp\",\n  \"mqttcache\",\n  \"mqttsender\",\n  \"pimqttgpio\",\n  \"postgres\",\n  \"scraper\",\n#  \"tuya\",\n]\n```\nAll fields are required, although you can omit (rather than comment out) some Integrations if you prefer.\n\nEvery enabled Integration **must** have an associated `\u003cIntegration\u003e.toml` configuration file or `\u003cIntegration\u003e` subdirectory in the same directory,\neg. `time.toml`, `datalogger.toml`, `automation`, etc.\n\nA configuration is required for any enabled Integration, an empty `\u003cIntegration\u003e.toml` configuration file or `\u003cIntegration\u003e` subdirectory must exist.\n\nWhen the server is started, it is passed only the configuration directory path.  The structure of this directory is well-defined...\n\n  * One master configuration file with high-level info and list of enabled Integrations\n  * One configuration file per Integration\n  * Optional directories, named after an Integration, containing further configuration\n  * A directory of files each containing a single Automation\n    * A subdirectory of the above containing any Action scripts\n\nEg. \n```\nConfigDir/                   # any name - passed to server at startup\n  config.toml                # integration configs\n  time.toml\n  hostchecker.toml\n  influx.toml\n  automations/               # automations\n  |  officeWarmup.toml\n  |  holidayLights.toml\n  ...\n```\n\n### Secrets and Constants\n\nYou may replace a **value** that you want to hide with the special string `\"!!SECRET(name)\"` (even if it is a number).\nAGHAST will then look for the matching name-value pair in the `secrets.toml` file and substitute the value found.\n\nSimilarly, you can replace a **value** with `\"!!CONSTANT(name)\"` and it will be fetched from the `constants.toml` file.\nThis could be especially useful in Automations, where values might be reused several times.\n\nCurrently, secrets and constants are supported for string, integer and floating-point values.\n\n## Running\n\nThe AGHAST server may be started from the command line like this...\n\n`./aghastServer -configdir \u003cpath/to/config/dir\u003e`\n\nThe `-configdir` argument is compulsory and must refer to a directory containing the configuration files described above.\n\nAGHAST is largely stateless (unless Integrations explicitly hold some state), \nit may be started and stopped without losing any data.  \nThere is no intrinsic requirement for a database for the AGHAST core system.\n\nA very simple systemd `.service` file is provided in the `examples` directory - you will at least need to alter the `ExecStart=` line to suit your circumstances.\n\n## MQTT Aide-Memoire\nFrom time-to-time you may wish to manually purge any retained MQTT messages...\n`mqtt-forget -t '+/#' -f`\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSMerrony%2Faghast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSMerrony%2Faghast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSMerrony%2Faghast/lists"}