{"id":21297498,"url":"https://github.com/fvdm/nodejs-toonapp","last_synced_at":"2025-07-11T18:32:29.149Z","repository":{"id":26230377,"uuid":"29677112","full_name":"fvdm/nodejs-toonapp","owner":"fvdm","description":"Eneco Toon module for node.js","archived":false,"fork":false,"pushed_at":"2021-07-19T10:18:50.000Z","size":70,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-07-05T14:59:20.561Z","etag":null,"topics":["eneco-toon","nodejs","thermostat","unlicense"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/toonapp","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fvdm.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}},"created_at":"2015-01-22T12:10:36.000Z","updated_at":"2022-06-19T20:39:49.000Z","dependencies_parsed_at":"2022-08-01T08:49:04.130Z","dependency_job_id":null,"html_url":"https://github.com/fvdm/nodejs-toonapp","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/fvdm/nodejs-toonapp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-toonapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-toonapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-toonapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-toonapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fvdm","download_url":"https://codeload.github.com/fvdm/nodejs-toonapp/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-toonapp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264870589,"owners_count":23676272,"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":["eneco-toon","nodejs","thermostat","unlicense"],"created_at":"2024-11-21T14:37:45.741Z","updated_at":"2025-07-11T18:32:28.858Z","avatar_url":"https://github.com/fvdm.png","language":"JavaScript","funding_links":["https://ko-fi.com/franklin"],"categories":[],"sub_categories":[],"readme":"toonapp\n=======\n\nUnofficial node.js module to interact with Eneco Toon thermostat.\n\n[![npm](https://img.shields.io/npm/v/toonapp.svg?maxAge=2592000)](https://github.com/fvdm/nodejs-toonapp/blob/master/CHANGELOG.md)\n[![Build Status](https://travis-ci.org/fvdm/nodejs-toonapp.svg?branch=master)](https://travis-ci.org/fvdm/nodejs-toonapp/branches)\n[![Coverage](https://coveralls.io/repos/github/fvdm/nodejs-toonapp/badge.svg?branch=master)](https://coveralls.io/github/fvdm/nodejs-toonapp?branch=master)\n[![Dependencies](https://www.bithound.io/github/fvdm/nodejs-toonapp/badges/master/dependencies.svg)](https://www.bithound.io/github/fvdm/nodejs-toonapp/master/dependencies/npm)\n[![Code Quality](https://www.bithound.io/github/fvdm/nodejs-toonapp/badges/master/code.svg)](https://www.bithound.io/github/fvdm/nodejs-toonapp/master/files)\n[![Greenkeeper](https://badges.greenkeeper.io/fvdm/nodejs-toonapp.svg)](https://greenkeeper.io/)\n\n_Notice: this is not using the new official API, but instead the same endpoints as the iPhone app._\n\n\nExample\n-------\n\n```js\n// Set your Eneco account details\nvar toon = require ('toonapp') ({\n  username: 'your@email.tld',\n  password: 'account password'\n});\n\n// Set preset to Home\ntoon.setPreset (1, function (err, data) {\n  if (err) {\n    console.log (err);\n    return;\n  }\n\n  // OK, now get full status\n  toon.getState (console.log);\n});\n```\n\n\nInstallation\n------------\n\n`npm install toonapp`\n\n\nMethods\n-------\n\nEach method requires a `callback` function to process the response data.\nThis function receives two arguments: `err` and `data`.\nWhen something goes wrong `err` is an _Error_ and `data` is not available.\nWhen all is good `err` is _null_ and `data` is the parsed response.\n\n\n```js\nfunction callback (err, data) {\n  if (err) {\n    console.log (err);\n  } else {\n    // process data\n  }\n}\n```\n\n\n#### Errors\n\nmessage          | description                 | additional\n:----------------|:----------------------------|:--------------------------------\napi error        | The API returned an error   | `err.reason` and `err.errorCode`\ninvalid response | The API response was bad    | `err.reason`\nrequest failed   | The request can not be made | `err.reason`\n\n\nversion\n-------\n**( callback )**\n\nGet base version info.\n\nparam    | type     | required | description\n:--------|:---------|:---------|:----------------------\ncallback | function | yes      | Your callback function\n\n```js\ntoon.version (console.log);\n```\n\n```js\n{ hostUrl: 'https://toonopafstand.eneco.nl',\n  appVersion: '1.5',\n  minDisplayVersion: 'qb2/ene/2.2.0' }\n```\n\n\nsetPreset\n---------\n**( preset, callback )**\n\nSet Toon temperature to a preset.\n\nparam    | type     | required | description\n:--------|:---------|:---------|:----------------------\npreset   | number   | yes      | Preset ID\ncallback | function | yes      | Your callback function\n\n\n```js\ntoon.setPreset (2, callback);\n```\n\n\n#### Presets\n\nID | label    | additional\n:--|:---------|:-----------------\n0  | Comfort  | See `getState() .thermostatStates`\n1  | Thuis    | \" \"\n2  | Slapen   | \" \"\n3  | Weg      | \" \"\n4  | Vacation | Disables schedule\n5  | -        | unknown\n\n\nsetTemperature\n--------------\n**( value, callback )**\n\nSet manual temperature, overriding scheduled preset until next program starts.\n\nparam    | type     | required | description\n:--------|:---------|:---------|:------------------------------------------\nvalue    | number   | yes      | Celcius * 100, i.e. set `1845` for 18.45 C\ncallback | function | yes      | Your callback function\n\n\n```js\n// 19.48 C, displayed as 19.5 on Toon\ntoon.setTemperature (1948, callback);\n```\n\n\ngetState\n--------\n**( callback )**\n\nGet current status information, statistics, readings, etc.\n\nparam    | type     | required | description\n:--------|:---------|:---------|:----------------------\ncallback | function | yes      | Your callback function\n\n\n```js\ntoon.getState (function (err, data) {\n  if (err) { return console.log (err); }\n  // Current Watt/h from smart meter\n  if (data.powerUsage) {\n    console.log (data.powerUsage.value);\n  }\n});\n```\n\n#### Short example\n\nSometimes you get only a short response like below, the output can vary a lot.\nMost times the list is huge and for example `thermostatInfo` can be missing.\n\n\n```js\n{ success: true,\n  thermostatInfo: \n   { currentTemp: 2010,\n     currentSetpoint: 2050,\n     currentDisplayTemp: 2050,\n     programState: 2,\n     activeState: 0,\n     nextProgram: 1,\n     nextState: 3,\n     nextTime: 1421940600,\n     nextSetpoint: 1600,\n     randomConfigId: 1804289383,\n     errorFound: 255,\n     zwaveOthermConnected: 0,\n     burnerInfo: '1',\n     otCommError: '0',\n     currentModulationLevel: 7,\n     haveOTBoiler: 1 },\n  thermostatStates: \n   { state: \n      [ { id: 0, tempValue: 2050, dhw: 1 },\n        { id: 1, tempValue: 1950, dhw: 1 },\n        { id: 2, tempValue: 1700, dhw: 1 },\n        { id: 3, tempValue: 1600, dhw: 1 },\n        { id: 4, tempValue: 600, dhw: 0 },\n        { id: 5, tempValue: 600, dhw: 1 } ] } }\n```\n\n\nUnlicense\n---------\n\nThis is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to \u003chttp://unlicense.org\u003e\n\n\nAuthor\n------\n\n[Franklin van de Meent](https://frankl.in)\n\n[![Buy me a coffee](https://frankl.in/u/kofi/kofi-readme.png)](https://ko-fi.com/franklin)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvdm%2Fnodejs-toonapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffvdm%2Fnodejs-toonapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvdm%2Fnodejs-toonapp/lists"}