{"id":13604902,"url":"https://github.com/hobbyquaker/homematic-rega","last_synced_at":"2025-04-14T18:22:56.311Z","repository":{"id":57266373,"uuid":"102968789","full_name":"hobbyquaker/homematic-rega","owner":"hobbyquaker","description":"Node.js Homematic CCU ReGaHSS Remote Script Interface","archived":false,"fork":false,"pushed_at":"2020-08-03T18:20:13.000Z","size":185,"stargazers_count":7,"open_issues_count":2,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-25T09:21:25.273Z","etag":null,"topics":["homematic","interface","node-module","regahss","remote","script","smarthome"],"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/hobbyquaker.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}},"created_at":"2017-09-09T16:26:15.000Z","updated_at":"2023-01-05T09:29:44.000Z","dependencies_parsed_at":"2022-08-25T03:41:01.249Z","dependency_job_id":null,"html_url":"https://github.com/hobbyquaker/homematic-rega","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Fhomematic-rega","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Fhomematic-rega/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Fhomematic-rega/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Fhomematic-rega/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hobbyquaker","download_url":"https://codeload.github.com/hobbyquaker/homematic-rega/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248933827,"owners_count":21185546,"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":["homematic","interface","node-module","regahss","remote","script","smarthome"],"created_at":"2024-08-01T19:00:52.555Z","updated_at":"2025-04-14T18:22:56.266Z","avatar_url":"https://github.com/hobbyquaker.png","language":"JavaScript","funding_links":[],"categories":["Software Modules"],"sub_categories":[],"readme":"# homematic-rega\n\n[![NPM version](https://badge.fury.io/js/homematic-rega.svg)](http://badge.fury.io/js/homematic-rega)\n[![dependencies Status](https://david-dm.org/hobbyquaker/homematic-rega/status.svg)](https://david-dm.org/hobbyquaker/homematic-rega)\n[![Build Status](https://travis-ci.org/hobbyquaker/homematic-rega.svg?branch=master)](https://travis-ci.org/hobbyquaker/homematic-rega)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n[![License][mit-badge]][mit-url]\n\n\u003e Node.js Homematic CCU ReGaHSS Remote Script Interface\n\nThis module encapsulates the communication with the \"ReGaHSS\" - the logic layer of the Homematic CCU. \n\n* execute arbitrary scripts\n* get names and ids of devices and channels\n* get variables including their value und meta data\n* set variable values\n* get programs\n* execute programs\n* activate/deactivate programs\n* get rooms and functions including assigned channels\n* rename objects\n\ni18n placeholders (e.g. `${roomKitchen}`) are translated by default.\n\nYou can find offical and inoffical documentation of the homematic scripting language at \n[wikimatic.de](http://www.wikimatic.de/wiki/Script_Dokumentation).\n\nPull Requests welcome! :)\n\n\n## Install\n\n`$ npm install homematic-rega`\n\n\n## Usage Example\n\n```javascript\nconst Rega = require('homematic-rega');\n\nconst rega = new Rega({host: '192.168.2.105'});\n\nrega.exec('string x = \"Hello\";\\nWriteLine(x # \" World!\");', (err, output, objects) =\u003e {\n    if (err) {\n        throw err;\n    } \n    console.log('Output:', output);\n    console.log('Objects:', objects);\n});\n\nrega.getVariables((err, res) =\u003e {\n    console.log(res);\n});\n```\n\n\n## API\n\n\u003ca name=\"Rega\"\u003e\u003c/a\u003e\n\n## Rega\n**Kind**: global class  \n\n* [Rega](#Rega)\n    * [new Rega(options)](#new_Rega_new)\n    * _instance_\n        * [.exec(script, [callback])](#Rega+exec)\n        * [.script(file, [callback])](#Rega+script)\n        * [.getChannels(callback)](#Rega+getChannels)\n        * [.getValues(callback)](#Rega+getValues)\n        * [.getPrograms(callback)](#Rega+getPrograms)\n        * [.getVariables(callback)](#Rega+getVariables)\n        * [.getRooms(callback)](#Rega+getRooms)\n        * [.getFunctions(callback)](#Rega+getFunctions)\n        * [.setVariable(id, val, [callback])](#Rega+setVariable)\n        * [.startProgram(id, [callback])](#Rega+startProgram)\n        * [.setProgram(id, active, [callback])](#Rega+setProgram)\n        * [.setName(id, name, [callback])](#Rega+setName)\n    * _inner_\n        * [~scriptCallback](#Rega..scriptCallback) : \u003ccode\u003efunction\u003c/code\u003e\n\n\u003ca name=\"new_Rega_new\"\u003e\u003c/a\u003e\n\n### new Rega(options)\n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| options | \u003ccode\u003eobject\u003c/code\u003e |  |  |\n| options.host | \u003ccode\u003estring\u003c/code\u003e |  | hostname or IP address of the Homematic CCU |\n| [options.language] | \u003ccode\u003estring\u003c/code\u003e | \u003ccode\u003e\u0026quot;de\u0026quot;\u003c/code\u003e | language used for translation of placeholders in variables/rooms/functions |\n| [options.disableTranslation] | \u003ccode\u003eboolean\u003c/code\u003e | \u003ccode\u003efalse\u003c/code\u003e | disable translation of placeholders |\n| [options.tls] | \u003ccode\u003eboolean\u003c/code\u003e | \u003ccode\u003efalse\u003c/code\u003e | Connect using TLS |\n| [options.inSecure] | \u003ccode\u003eboolean\u003c/code\u003e | \u003ccode\u003efalse\u003c/code\u003e | Ignore invalid TLS Certificates |\n| [options.auth] | \u003ccode\u003eboolean\u003c/code\u003e | \u003ccode\u003efalse\u003c/code\u003e | Use Basic Authentication |\n| [options.user] | \u003ccode\u003estring\u003c/code\u003e |  | Auth Username |\n| [options.pass] | \u003ccode\u003estring\u003c/code\u003e |  | Auth Password |\n| [options.port] | \u003ccode\u003enumber\u003c/code\u003e | \u003ccode\u003e8181\u003c/code\u003e | rega remote script port. Defaults to 48181 if options.tls is true |\n\n\u003ca name=\"Rega+exec\"\u003e\u003c/a\u003e\n\n### rega.exec(script, [callback])\nExecute a rega script\n\n**Kind**: instance method of [\u003ccode\u003eRega\u003c/code\u003e](#Rega)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| script | \u003ccode\u003estring\u003c/code\u003e | string containing a rega script |\n| [callback] | [\u003ccode\u003escriptCallback\u003c/code\u003e](#Rega..scriptCallback) |  |\n\n\u003ca name=\"Rega+script\"\u003e\u003c/a\u003e\n\n### rega.script(file, [callback])\nExecute a rega script from a file\n\n**Kind**: instance method of [\u003ccode\u003eRega\u003c/code\u003e](#Rega)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| file | \u003ccode\u003estring\u003c/code\u003e | path to script file |\n| [callback] | [\u003ccode\u003escriptCallback\u003c/code\u003e](#Rega..scriptCallback) |  |\n\n\u003ca name=\"Rega+getChannels\"\u003e\u003c/a\u003e\n\n### rega.getChannels(callback)\nGet all devices and channels\n\n**Kind**: instance method of [\u003ccode\u003eRega\u003c/code\u003e](#Rega)  \n\n| Param | Type |\n| --- | --- |\n| callback | \u003ccode\u003eRega~channelCallback\u003c/code\u003e | \n\n\u003ca name=\"Rega+getValues\"\u003e\u003c/a\u003e\n\n### rega.getValues(callback)\nGet all devices and channels values\n\n**Kind**: instance method of [\u003ccode\u003eRega\u003c/code\u003e](#Rega)  \n\n| Param | Type |\n| --- | --- |\n| callback | \u003ccode\u003eRega~valuesCallback\u003c/code\u003e | \n\n\u003ca name=\"Rega+getPrograms\"\u003e\u003c/a\u003e\n\n### rega.getPrograms(callback)\nGet all programs\n\n**Kind**: instance method of [\u003ccode\u003eRega\u003c/code\u003e](#Rega)  \n\n| Param | Type |\n| --- | --- |\n| callback | \u003ccode\u003eRega~programsCallback\u003c/code\u003e | \n\n\u003ca name=\"Rega+getVariables\"\u003e\u003c/a\u003e\n\n### rega.getVariables(callback)\nGet all variables\n\n**Kind**: instance method of [\u003ccode\u003eRega\u003c/code\u003e](#Rega)  \n\n| Param | Type |\n| --- | --- |\n| callback | \u003ccode\u003eRega~variablesCallback\u003c/code\u003e | \n\n\u003ca name=\"Rega+getRooms\"\u003e\u003c/a\u003e\n\n### rega.getRooms(callback)\nGet all rooms\n\n**Kind**: instance method of [\u003ccode\u003eRega\u003c/code\u003e](#Rega)  \n\n| Param | Type |\n| --- | --- |\n| callback | \u003ccode\u003eRega~roomsCallback\u003c/code\u003e | \n\n\u003ca name=\"Rega+getFunctions\"\u003e\u003c/a\u003e\n\n### rega.getFunctions(callback)\nGet all functions\n\n**Kind**: instance method of [\u003ccode\u003eRega\u003c/code\u003e](#Rega)  \n\n| Param | Type |\n| --- | --- |\n| callback | \u003ccode\u003eRega~functionsCallback\u003c/code\u003e | \n\n\u003ca name=\"Rega+setVariable\"\u003e\u003c/a\u003e\n\n### rega.setVariable(id, val, [callback])\nSet a variables value\n\n**Kind**: instance method of [\u003ccode\u003eRega\u003c/code\u003e](#Rega)  \n\n| Param | Type |\n| --- | --- |\n| id | \u003ccode\u003enumber\u003c/code\u003e | \n| val | \u003ccode\u003enumber\u003c/code\u003e \\| \u003ccode\u003eboolean\u003c/code\u003e \\| \u003ccode\u003estring\u003c/code\u003e | \n| [callback] | \u003ccode\u003efunction\u003c/code\u003e | \n\n\u003ca name=\"Rega+startProgram\"\u003e\u003c/a\u003e\n\n### rega.startProgram(id, [callback])\nExecute a program\n\n**Kind**: instance method of [\u003ccode\u003eRega\u003c/code\u003e](#Rega)  \n\n| Param | Type |\n| --- | --- |\n| id | \u003ccode\u003enumber\u003c/code\u003e | \n| [callback] | \u003ccode\u003efunction\u003c/code\u003e | \n\n\u003ca name=\"Rega+setProgram\"\u003e\u003c/a\u003e\n\n### rega.setProgram(id, active, [callback])\nActivate/Deactivate a program\n\n**Kind**: instance method of [\u003ccode\u003eRega\u003c/code\u003e](#Rega)  \n\n| Param | Type |\n| --- | --- |\n| id | \u003ccode\u003enumber\u003c/code\u003e | \n| active | \u003ccode\u003eboolean\u003c/code\u003e | \n| [callback] | \u003ccode\u003efunction\u003c/code\u003e | \n\n\u003ca name=\"Rega+setName\"\u003e\u003c/a\u003e\n\n### rega.setName(id, name, [callback])\nRename an object\n\n**Kind**: instance method of [\u003ccode\u003eRega\u003c/code\u003e](#Rega)  \n\n| Param | Type |\n| --- | --- |\n| id | \u003ccode\u003enumber\u003c/code\u003e | \n| name | \u003ccode\u003estring\u003c/code\u003e | \n| [callback] | \u003ccode\u003efunction\u003c/code\u003e | \n\n\u003ca name=\"Rega..scriptCallback\"\u003e\u003c/a\u003e\n\n### Rega~scriptCallback : \u003ccode\u003efunction\u003c/code\u003e\n**Kind**: inner typedef of [\u003ccode\u003eRega\u003c/code\u003e](#Rega)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| err | \u003ccode\u003eError\u003c/code\u003e |  |\n| output | \u003ccode\u003estring\u003c/code\u003e | the scripts output |\n| variables | \u003ccode\u003eObject.\u0026lt;string, string\u0026gt;\u003c/code\u003e | contains all variables that are set in the script (as strings) |\n\n\n## Related projects\n\n* [node-red-contrib-ccu](https://github.com/hobbyquaker/node-red-contrib-ccu) - Node-RED nodes for the Homematic CCU.\n* [homematic-manager](https://github.com/hobbyquaker/homematic-manager) - Cross-platform App to manage Homematic devices \nand links.\n* [hm2mqtt.js](https://github.com/hobbyquaker/hm2mqtt.js) - Interface between Homematic and MQTT.\n* [binrpc](https://github.com/hobbyquaker/binrpc) - Node.js client/server for the Homematic BINRPC protocol.\n* [homematic-xmlrpc](https://github.com/hobbyquaker/homematic-xmlrpc) - Node.js client/server for the Homematic XMLRPC \nprotocol.\n\n\n## License\n\nMIT (c) Sebastian Raff\n\n[mit-badge]: https://img.shields.io/badge/License-MIT-blue.svg?style=flat\n[mit-url]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhobbyquaker%2Fhomematic-rega","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhobbyquaker%2Fhomematic-rega","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhobbyquaker%2Fhomematic-rega/lists"}