{"id":20004278,"url":"https://github.com/wandmalfarbe/edimax-smart-plug-java","last_synced_at":"2025-03-02T00:33:37.695Z","repository":{"id":55912211,"uuid":"85336103","full_name":"Wandmalfarbe/Edimax-Smart-Plug-Java","owner":"Wandmalfarbe","description":"A Java library for controlling the Edimax Smart Plug SP-1101W and SP-2101W.","archived":false,"fork":false,"pushed_at":"2021-06-04T01:00:13.000Z","size":53,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T02:15:31.098Z","etag":null,"topics":["command-line","command-line-tool","edimax","edimax-smartplug","library","plug","smart-plug"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Wandmalfarbe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-17T17:07:50.000Z","updated_at":"2022-05-26T13:59:56.000Z","dependencies_parsed_at":"2022-08-15T09:20:11.880Z","dependency_job_id":null,"html_url":"https://github.com/Wandmalfarbe/Edimax-Smart-Plug-Java","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/Wandmalfarbe%2FEdimax-Smart-Plug-Java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wandmalfarbe%2FEdimax-Smart-Plug-Java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wandmalfarbe%2FEdimax-Smart-Plug-Java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wandmalfarbe%2FEdimax-Smart-Plug-Java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wandmalfarbe","download_url":"https://codeload.github.com/Wandmalfarbe/Edimax-Smart-Plug-Java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241444054,"owners_count":19963749,"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":["command-line","command-line-tool","edimax","edimax-smartplug","library","plug","smart-plug"],"created_at":"2024-11-13T05:29:14.613Z","updated_at":"2025-03-02T00:33:37.662Z","avatar_url":"https://github.com/Wandmalfarbe.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"icon.png\" align=\"right\" height=\"110\"/\u003e\n\n# EdimaxSmartPlugJava\n\nA Java library for controlling the Edimax Smart Plug SP-1101W and SP-2101W.\n\n## Usage\n\nCreate a SmartPlug object to control your plug.\n\n```java\nPlugCredentials credentials = new PlugCredentials(\"admin\",\"1234\");\nPlugConnection connection = new LocalHTTPConnection(credentials,\"192.168.178.34\");\nSmartPlug smartPlug = new SmartPlug(connection);\n```\n\nUse the various methods of the `smartPlug` object to get information or toggle the plug state.\n\n```java\nScheduleDay[] schedule = smartPlug.getSchedule();\nPowerInformation powInfo = smartPlug.getPowerInformation();\n\n// Toggle your plug on or off depending on the current status.\nsmartPlug.toggle();\n\n// Switch your plug on.\nsmartPlug.switchOn();\n\n// get the history\nfloat[] history = smartPlug.getHistory(SmartPlug.TimeUnit.HOUR, LocalDateTime.now().minusHours(3), LocalDateTime.now().plusHours(1));\n```\n\n## Implemented Functionality\n\n### Switching On and Off\n\n- [x] switch on and off\n    \n    ```java\n\tsmartPlug.switchOn();\n\tsmartPlug.switchOff();\n    ```\n- [x] get current state (on and off)\n    \n    ```java\n\tState state = smartPlug.getState()\n    ```\n- [x] toggle the current state (sends two requests)\n\n    ```java\n\tsmartPlug.toggle()\n    ```\n\n### History\n\n- [ ] get the history (partially)\n\n    ```java\n    float[] history = smartPlug.getHistory(SmartPlug.TimeUnit.HOUR, LocalDateTime.now().minusHours(3), LocalDateTime.now().plusHours(1));\n    ```\n\n### Schedule\n\n- [x] get the schedule\n\n    ```java\n    ScheduleDay[] schedule = smartPlug.getSchedule();\n    ```\n- [ ] change the schedule\n\n### System and Power Information\n\n- [x] get the power information\n    \n    ```java\n    PowerInformation powInfo = smartPlug.getPowerInformation();\n    ```\n- [x] get the system information (including the name)\n\n    ```java\n    SystemInformation sysInfo = getSystemInformation();\n    ```\n- [x] change the plug name\n    \n    ```java\n    smartPlug.setName(\"My Smart Plug\");\n    ```\n\n### Budget Control\n\n- [ ] get budget control information\n- [ ] change budget control information\n\n### Email Notifications\n\n- [ ] get email notification information\n- [ ] change email notification information\n\n### Time\n\n- [ ] get the plug time settings\n- [ ] change the plug time settings\n\n### Communication\n\n- [ ] local communication\n    - [x] send messages\n    - [x] receive messages\n    - [ ] plug discovery\n- [ ] cloud communication\n    - [ ] send messages\n    - [ ] receive messages\n    - [ ] plug discovery (is this possible with cloud communication?)\n\n### Known Bugs\n\n1. [History] The history values are accumulated values per hour (only when requesting the history for a day).\n2. [Command Line] Not all methods from `SmartPlug` can be accessed via the command line.\n3. [Command Line] There is no command line help text.\n\n## License\n\nThis project is open source licensed under the BSD 3-Clause License. Please see the [LICENSE file](LICENSE.md) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwandmalfarbe%2Fedimax-smart-plug-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwandmalfarbe%2Fedimax-smart-plug-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwandmalfarbe%2Fedimax-smart-plug-java/lists"}