{"id":21940528,"url":"https://github.com/csutorasa/icon-metrics","last_synced_at":"2025-04-22T15:43:33.458Z","repository":{"id":40346794,"uuid":"352743141","full_name":"csutorasa/icon-metrics","owner":"csutorasa","description":"NGBS iCON smart home control system metrics reader","archived":false,"fork":false,"pushed_at":"2025-03-04T19:23:13.000Z","size":209,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T16:34:24.320Z","etag":null,"topics":[],"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/csutorasa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2021-03-29T18:20:55.000Z","updated_at":"2025-01-04T22:24:51.000Z","dependencies_parsed_at":"2023-12-08T15:31:18.460Z","dependency_job_id":"736f4acc-7444-4637-9526-acdcaaa3eab4","html_url":"https://github.com/csutorasa/icon-metrics","commit_stats":{"total_commits":109,"total_committers":3,"mean_commits":"36.333333333333336","dds":"0.24770642201834858","last_synced_commit":"6680cf1b69c2158a6256f43fec78fa6788299469"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csutorasa%2Ficon-metrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csutorasa%2Ficon-metrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csutorasa%2Ficon-metrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csutorasa%2Ficon-metrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csutorasa","download_url":"https://codeload.github.com/csutorasa/icon-metrics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250270241,"owners_count":21403012,"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":[],"created_at":"2024-11-29T02:33:30.094Z","updated_at":"2025-04-22T15:43:33.449Z","avatar_url":"https://github.com/csutorasa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iCON-metrics\n\nThis is an command line application which reads data from [NGBS iCON smart home control systems](https://www.ngbsh.hu/en/icon.html).\nThe data is processed and is exposed to be scraped from [prometheus](https://prometheus.io/).\nData from prometheus can be display in different ways, but [grafana](https://grafana.com/) is recommended.\n\n## Read data\n\nData is read from the control system(s).\nTo define the control systems to be scraped, [config file](config.yml) needs to be updated.\n\n```yaml\nport: 8080 # port to run on (defaults to 80)\ndevices:\n  - url: http://192.168.1.10 # device address\n    sysid: '123123123123' # device ID (printed on the controller)\n    password: '123123123123' # password (defaults to sysid if empty)\n    delay: 60 # delay in seconds between reads (defaults to 15)\n  - url: http://192.168.1.11 # device address\n    sysid: '321321321321' # device ID (printed on the controller)\n```\n\nConfig.yml validation can be done via the [schema](config.schema.json).\nFor further configuration options use the [schema](config.schema.json) to explore and validate your config file.\n\n## Build on linux\n\n- Install latest version of [go](https://go.dev/).\n- Clone this repository `git clone https://github.com/csutorasa/icon-metrics.git`.\n- Build the applciation `go build`.\n- Depending on the operating system:\n  - Debian or debian based - Run the [deb package builder](packaging/pkg-debian) and install it, `packaging/pkg-deb \u0026\u0026 dkpg -i packaging/icon-metrics-*.deb`.\n  - Linux - Run the [installer](packaging/pkg-install) `sudo packaging/pkg-install`.\n  - Windows or MacOS - Run or schedule start the application.\n\n## Docker image\n\nCreate your config.yml and run the command below\n\n```bash\ndocker run -d -v /path/to/your/config.yml:/app/config.yml -p8080:8080 csutorasa/icon-metrics:latest\n```\n\nIf you do not want use 8080 port then use `-p${YOUR_PORT}:8080`.\n\n## Metrics\n\n```mermaid\ngraph TD\n    A1[iCON thermostat controller 1] --\u003e|Reads values| B[iCON-metrics]\n    A2[iCON thermostat controller 2] --\u003e|Reads values| B[iCON-metrics]\n    A3[iCON thermostat controller 3] --\u003e|Reads values| B[iCON-metrics]\n    B --\u003e|Reports metrics| C[(Prometheus)]\n    C --\u003e|Provides data| D[Grafana]\n    D --\u003e E[Browser]\n```\n\n```mermaid\nsequenceDiagram\n    participant it as iCON thermostat controller\n    participant im as iCON-metrics\n    participant p as prometheus\n    loop forever\n        im-\u003e\u003e+it : login\n        it-\u003e\u003e-im : login success\n        loop until logged out\n            im-\u003e\u003e+it : read values\n            it-\u003e\u003e-im : thermostat values\n            p-\u003e\u003e+im : read metrics\n            im-\u003e\u003e-p : thermostat values\n        end\n    end\n```\n\n### Prometheus scraper\n\nMetrics are hosted in [prometheus](https://prometheus.io/) format.\nThe http server port can be configured in the [config file](config.yml).\n\n```yaml\nport: 8080\n```\n\nYou need to extend the prometheus config (prometheus.yml) to scrape this application.\n\n```yaml\nscrape_configs:\n  # Other scrape configs can be here\n\n  - job_name: 'icon-metrics'\n    static_configs:\n    - targets: ['localhost:8080']\n```\n\n### Metrics reporting\n\nMost metrics can be disabled from the configuaration separately for each device in the [config file](config.yml).\n\nAvailable metrics:\n\n| Metric                    | Scope          | Type    | Description                                               | Enable configuration flag |\n| ------------------------- | -------------- | ------- | --------------------------------------------------------- | ------------------------- |\n| uptime                    | global         | gauge   | uptime in milliseconds                                    | N/A                       |\n| icon_controller_connected | per controller | gauge   | 1 if the controller is ready to be read, 0 otherwise      | controllerConnected       |\n| icon_http_client_seconds  | per controller | summary | icon HTTP request durations in seconds                    | httpClient                |\n| icon_external_temperature | per controller | gauge   | external temperature                                      | externalTemperature       |\n| icon_water_temperature    | per controller | gauge   | cooling or heating water temperature                      | waterTemperature          |\n| icon_heating              | per controller | gauge   | 1 if the controller is set to heating mode, 0 otherwise   | heating                   |\n| icon_eco                  | per controller | gauge   | 1 if the controller is in economy mode, 0 otherwise       | eco                       |\n| icon_room_connected       | per room       | gauge   | 1 if the room is connected to the controller, 0 otherwise | roomConnected             |\n| icon_temperature          | per room       | gauge   | room temperature                                          | temperature               |\n| icon_relay_on             | per room       | gauge   | 1 if the relay is open, 0 otherwise                       | relay                     |\n| icon_humidity             | per room       | gauge   | room humidity                                             | humidity                  |\n| icon_target_temperature   | per room       | gauge   | room target temperature                                   | targetTemperature         |\n| icon_dew_temperature      | per room       | gauge   | room dew temperature                                      | dewTemperature            |\n\n## Grafana dashboard\n\nThis data is designed to be displayed in a [grafana dashboard](https://grafana.com/docs/grafana/latest/dashboards/).\nExample dashboards for the [system](grafana-iCON-system.json), [controllers](grafana-iCON-controllers.json) and the [rooms](grafana-iCON-rooms.json) are available to be [imported](https://grafana.com/docs/grafana/latest/dashboards/export-import/).\n\n![grafana_image](https://user-images.githubusercontent.com/6968192/164945271-5c75cd29-55b0-4057-a737-3945aad95413.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsutorasa%2Ficon-metrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsutorasa%2Ficon-metrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsutorasa%2Ficon-metrics/lists"}