-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfixes get current state split code to models, service and use client factory
- Loading branch information
Showing
6 changed files
with
52 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,45 @@ | ||
# Balboa spa / Jacuzzi API wrapper | ||
|
||
This is a reverse engineered PHP API of the balboa spa module. | ||
This is a PHP Library for the Balboa SPA API. Its reverse engineered en converted to PHP library. | ||
It is not an official API and no support on this library ! | ||
|
||
Project is still under development.. | ||
Example code | ||
|
||
```php | ||
$username = 'XXXX'; | ||
$password = 'XXXX'; | ||
|
||
$clientFactory = new \Jpvdw\Balboa\ClientFactory(); | ||
$client = $clientFactory->create($username,$password); | ||
|
||
// Check capabilities | ||
// Check Model/Device.php for all options | ||
echo $device = $client->getDevice(); | ||
echo $device->hasPump0() ? 'Yes' : 'No'.PHP_EOL; | ||
echo $device->hasPump1() ? 'Yes' : 'No'.PHP_EOL; | ||
echo $device->hasLight1() ? 'Yes' : 'No'.PHP_EOL; | ||
echo $device->hasBlower() ? 'Yes' : 'No'.PHP_EOL; | ||
|
||
|
||
// Get current state data | ||
// Check Model/Panel.php for all options | ||
$panelData = $client->getPanel(); | ||
echo $panel->getTemperature().PHP_EOL; | ||
echo $panel->getTargetTemperature().PHP_EOL; | ||
|
||
// Control buttons | ||
// Check Service/Buttons.php for al options | ||
$buttons = $client->getButtonActions(); | ||
echo $buttons->toggleLights() ? 'done': 'error'.PHP_EOL; | ||
echo $buttons->togglePump1() ? 'done': 'error'.PHP_EOL; | ||
echo $buttons->toggleBlowers() ? 'done': 'error'.PHP_EOL; | ||
echo $buttons->togglePump2() ? 'done': 'error'.PHP_EOL; | ||
|
||
|
||
// Control Temperature | ||
// Check Service/Temperature.php for al options | ||
$temperature = $client->getTemperatureActions(); | ||
echo $temperature->setCelsius(35) ? 'done': 'error'.PHP_EOL; | ||
echo $temperature->setFahrenheit(60) ? 'done': 'error'.PHP_EOL; | ||
|
||
`` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters