{"id":13583406,"url":"https://github.com/plasticrake/tplink-smarthome-simulator","last_synced_at":"2025-08-21T00:31:49.169Z","repository":{"id":37359575,"uuid":"103792502","full_name":"plasticrake/tplink-smarthome-simulator","owner":"plasticrake","description":"TP-Link Smarthome Device Simulator","archived":false,"fork":false,"pushed_at":"2023-11-09T04:16:30.000Z","size":1076,"stargazers_count":68,"open_issues_count":0,"forks_count":18,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-07T23:35:22.070Z","etag":null,"topics":["hs100","hs105","hs110","hs200","lb100","lb120","lb130","mock","smarthome","testing","tplink"],"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/plasticrake.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"plasticrake"}},"created_at":"2017-09-17T00:27:12.000Z","updated_at":"2025-02-01T11:26:39.000Z","dependencies_parsed_at":"2024-04-08T18:58:03.813Z","dependency_job_id":"80efaa6e-4db5-42a0-a9a8-d9337c049f9a","html_url":"https://github.com/plasticrake/tplink-smarthome-simulator","commit_stats":{"total_commits":151,"total_committers":2,"mean_commits":75.5,"dds":"0.0066225165562914245","last_synced_commit":"628f341ecaeced809756e581892a6d47174697d6"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/plasticrake/tplink-smarthome-simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasticrake%2Ftplink-smarthome-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasticrake%2Ftplink-smarthome-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasticrake%2Ftplink-smarthome-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasticrake%2Ftplink-smarthome-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plasticrake","download_url":"https://codeload.github.com/plasticrake/tplink-smarthome-simulator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasticrake%2Ftplink-smarthome-simulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271409408,"owners_count":24754708,"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","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["hs100","hs105","hs110","hs200","lb100","lb120","lb130","mock","smarthome","testing","tplink"],"created_at":"2024-08-01T15:03:27.598Z","updated_at":"2025-08-21T00:31:48.842Z","avatar_url":"https://github.com/plasticrake.png","language":"JavaScript","funding_links":["https://github.com/sponsors/plasticrake"],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD033 --\u003e\n\n# tplink-smarthome-simulator\n\n[![NPM Version](https://img.shields.io/npm/v/tplink-smarthome-simulator.svg)](https://www.npmjs.com/package/tplink-smarthome-simulator)\n[![Build Status](https://github.com/plasticrake/tplink-smarthome-simulator/workflows/CI/badge.svg?branch=main)](https://github.com/plasticrake/tplink-smarthome-simulator/actions?query=workflow%3ACI+branch%3Amain)\n[![Coverage Status](https://coveralls.io/repos/github/plasticrake/tplink-smarthome-simulator/badge.svg?branch=main)](https://coveralls.io/github/plasticrake/tplink-smarthome-simulator?branch=main)\n[![GitHub Sponsors](https://img.shields.io/github/sponsors/plasticrake)](https://github.com/sponsors/plasticrake)\n\n\u003cimg src=\"https://user-images.githubusercontent.com/1383980/30628984-4eb5bf5e-9d8e-11e7-9caa-97720ae1eadc.png\" align=\"right\" alt=\"Kasa Screenshot\" width=250\u003e\n\nTP-Link Smart Home Device Simulator\n\nI created this so I could automate my tests for [tplink-smarthome-api](https://github.com/plasticrake/tplink-smarthome-api/).\n\nSee more [examples](https://github.com/plasticrake/tplink-smarthome-simulator/tree/main/examples). [@simlu](https://github.com/simlu) has used this in creating [kasa-smart-hub](https://github.com/blackflux/kasa-smart-hub).\n\n[`debug`](https://github.com/visionmedia/debug) is used for output. To see all messages set the DEBUG environment variable.\nTo see everything:\n\n```console\nDEBUG=tplink-simulator:* node examples/multi-device.js\n```\n\nTo see most:\n\n```console\nDEBUG=tplink-simulator:*,-device:udp,*:error node examples/multi-device.js\n```\n\n```javascript\nconst Device = require('..').Device;\nconst UdpServer = require('..').UdpServer;\n\nlet devices = [];\n\n// If you setup virtual interfaces or aliases you can have unique ips to work with Kasa app.\n// On a mac you can run `sudo ifconfig en0 alias 10.0.0.200`\ndevices.push(\n  new Device({\n    port: 9999,\n    address: '10.0.0.200',\n    model: 'hs100',\n    data: { alias: 'Mock HS100', mac: '50:c7:bf:8f:58:18', deviceId: 'A100' },\n  }),\n);\ndevices.push(\n  new Device({\n    port: 9999,\n    address: '10.0.0.201',\n    model: 'hs105',\n    data: { alias: 'Mock HS105', mac: '50:c7:bf:d8:bf:d4', deviceId: 'A105' },\n  }),\n);\ndevices.push(\n  new Device({\n    port: 9999,\n    address: '10.0.0.202',\n    model: 'hs110',\n    data: { alias: 'Mock HS110', mac: '50:c7:bf:0d:91:8c', deviceId: 'A110' },\n  }),\n);\ndevices.push(\n  new Device({\n    port: 9999,\n    address: '10.0.0.203',\n    model: 'hs200',\n    data: { alias: 'Mock HS200', mac: '50:c7:bf:46:b4:24', deviceId: 'A200' },\n  }),\n);\ndevices.push(\n  new Device({\n    port: 9999,\n    address: '10.0.0.204',\n    model: 'lb100',\n    data: { alias: 'Mock LB100', mac: '50:c7:bf:49:ca:42', deviceId: 'BB100' },\n  }),\n);\ndevices.push(\n  new Device({\n    port: 9999,\n    address: '10.0.0.205',\n    model: 'lb120',\n    data: { alias: 'Mock LB120', mac: '50:c7:bf:90:9b:da', deviceId: 'BB120' },\n  }),\n);\ndevices.push(\n  new Device({\n    port: 9999,\n    address: '10.0.0.206',\n    model: 'lb130',\n    data: { alias: 'Mock LB130', mac: '50:c7:bf:b1:04:d3', deviceId: 'BB130' },\n  }),\n);\n\ndevices.forEach((d) =\u003e {\n  d.start();\n});\n\nUdpServer.start();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplasticrake%2Ftplink-smarthome-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplasticrake%2Ftplink-smarthome-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplasticrake%2Ftplink-smarthome-simulator/lists"}