{"id":18665336,"url":"https://github.com/robertklep/nefit-easy-http-server","last_synced_at":"2025-04-11T22:31:07.087Z","repository":{"id":3341282,"uuid":"49138380","full_name":"robertklep/nefit-easy-http-server","owner":"robertklep","description":"HTTP server to access Nefit/Bosch XMPP backend over HTTP","archived":false,"fork":false,"pushed_at":"2023-03-04T02:26:35.000Z","size":139,"stargazers_count":39,"open_issues_count":18,"forks_count":15,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-10T01:53:18.397Z","etag":null,"topics":["bosch","home-automation","nefit-easy","node"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/robertklep.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}},"created_at":"2016-01-06T13:58:48.000Z","updated_at":"2025-01-01T20:03:12.000Z","dependencies_parsed_at":"2023-01-13T12:26:51.731Z","dependency_job_id":null,"html_url":"https://github.com/robertklep/nefit-easy-http-server","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnefit-easy-http-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnefit-easy-http-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnefit-easy-http-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnefit-easy-http-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertklep","download_url":"https://codeload.github.com/robertklep/nefit-easy-http-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248489553,"owners_count":21112600,"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":["bosch","home-automation","nefit-easy","node"],"created_at":"2024-11-07T08:27:14.718Z","updated_at":"2025-04-11T22:31:06.776Z","avatar_url":"https://github.com/robertklep.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nefit Easy™ HTTP server\n\nHTTP server to access Nefit/Bosch XMPP backend over HTTP.\n\n## Installation\n\n_This library requires Node.js 6.0.0 or later!_\n\n```\n$ npm i nefit-easy-http-server -g\n```\n\nThis will install the `easy-server` CLI tool in a well-known \"bin/\" directory (`npm config get prefix` will show you where).\n\n## Docker\n\n@balk77 has created a Docker image to easily install and run the HTTP server. More information [here](https://hub.docker.com/r/balk77/nefit-easy-http-server/).\n\nIf you want to build your own Docker image, there's a `Dockerfile` included in this repository.\n\n## Problems on recent Linux distributions\n\nIf you're having problems getting any data from the HTTP server, and you're using a recent Linux distribution (for instance, Raspbian Buster), take a look at [this comment](https://github.com/robertklep/nefit-easy-http-server/issues/35#issuecomment-510818042).\n\nIn short: OpenSSL defaults have changed to require a minimum TLS version and cipher implementation. These defaults cause the Nefit client code to not be able to connect to the Nefit/Bosch backend.\n\nThe solution is mentioned [here](https://www.debian.org/releases/stable/amd64/release-notes/ch-information.en.html#openssl-defaults): edit the file `/etc/ssl/openssl.cnf` and change the following keys to these values:\n```\nMinProtocol = None\nCipherString = DEFAULT\n```\n\n## Usage\n\n### Starting\n\n```\n$ easy-server\n```\n\nBy default, the server will be accessible through `http://127.0.0.1:3000/`\n\n### Configuration\n\nConfiguration is done through command line options. See _Options_ below.\n\n### Endpoints\n\nThe server exposes two endpoint prefixes:\n\n* `/bridge/`, which serves as a raw HTTP-to-XMPP bridge (see _\"Examples\"_);\n* `/api/`, which implements higher-level commands (provided by [`nefit-easy-commands`](https://github.com/robertklep/nefit-easy-commands));\n\n### Examples\n\nThe server isn't meant to be opened in a browser. Its intended use is to be called using tools like `curl` or `httpie`, or from other programs/scripts, through HTTP calls. The following examples will use `curl`.\n\n#### HTTP-to-XMPP bridge\n\nThe HTTP-to-XMPP bridge provides two actions:\n\n* retrieving an [endpoint](https://github.com/robertklep/nefit-easy-core/wiki/List-of-endpoints);\n* writing data to an endpoint;\n\nTo retrieve an endpoint (for example, `/ecus/rrc/uiStatus`):\n```\n$ curl http://127.0.0.1:3000/bridge/ecus/rrc/uiStatus\n```\n\nTo write data to an endpoint:\n```\n$ curl -XPOST http://127.0.0.1:3000/bridge/heatingCircuits/hc1/temperatureRoomManual -d '{\"value\":20}' -H 'Content-Type: application/json'\n```\n\nFor `POST` requests, the data should be a [valid JSON string](http://jsonlint.com/). There is no input validation.\n\n#### Commands API\n\nFor now, the commands API only supports \"get\" commands:\n```\n$ curl http://127.0.0.1:3000/api/status\n$ curl http://127.0.0.1:3000/api/pressure\n$ curl http://127.0.0.1:3000/api/hotWaterSupply\n$ curl http://127.0.0.1:3000/api/location\n$ curl http://127.0.0.1:3000/api/program\n$ curl http://127.0.0.1:3000/api/userMode\n```\n\n## Options\n\n```\n$ easy-server -h\n\neasy-server – Nefit Easy™ HTTP-server\n\nUsage:\n  easy-server [options]\n\nOptions:\n  -h --help                Show this screen\n  -v --version             Show version\n  -V --verbose             Be more verbose\n  --serial=SERIAL          Nefit Easy™ serial number (without whitespace or hyphens)\n  --access-key=ACCESS_KEY  Nefit Easy™ access key (without whitespace or hyphens)\n  --password=PASSWORD      Nefit Easy™ password\n  --port=PORT              Port to listen on [default: 3000]\n  --host=HOST              Host to bind to [default: 127.0.0.1]\n  --timeout=TIMEOUT        Request timeout in seconds [default: 30]\n\nInstead of specifying serial number, access key or password through\noptions, you can also define them through environment variables:\n\n  NEFIT_SERIAL_NUMBER\n  NEFIT_ACCESS_KEY\n  NEFIT_PASSWORD\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertklep%2Fnefit-easy-http-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertklep%2Fnefit-easy-http-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertklep%2Fnefit-easy-http-server/lists"}