Skip to content

Commit

Permalink
JS recipe added
Browse files Browse the repository at this point in the history
  • Loading branch information
OlafHeudecker committed Nov 1, 2020
1 parent 5039c92 commit f80e230
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ It just needs a basic php7.3++ Environment.

## Toggle a plug (relay) by alias (name)
```php
$myTPLink->togglePlugByName('Heizungslicht');
$myTPLink->togglePlugByName(<PlugAliasName>);
```

## Set a plug state
Expand All @@ -65,6 +65,11 @@ It just needs a basic php7.3++ Environment.
```php
$myTPLink->getPlugStateBool($deviceId, $appServerUrl);
```
# How I use it
I put a basic constructor and toggle command in a file on my webserver and toggle it via a JS bookmark:
```javascript
javascript:(function () { window.open('http://localhost/tplink/myTPLink.php','_blank');})();
```

# More Features?
The package is self-explanatory using phpDoc and lots of comments. Therefore, it can be extended easily.
Expand Down

0 comments on commit f80e230

Please sign in to comment.