mirror of
https://github.com/CyanoFresh/SmartHomePHP.git
synced 2026-03-03 16:44:01 +01:00
RGB type
This commit is contained in:
@@ -41,7 +41,7 @@ class WebSocketAPI
|
||||
*/
|
||||
protected function getWSSUrl()
|
||||
{
|
||||
return $this->localWSSUrl . '/?type=user&id=' . $this->user->id . '&auth_key=' . $this->user->auth_key;
|
||||
return $this->localWSSUrl . '/?type=user&id=' . $this->user->id . '&auth_token=' . $this->user->getAuthToken();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,6 +68,27 @@ class WebSocketAPI
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $itemID
|
||||
* @param int $red
|
||||
* @param int $green
|
||||
* @param int $blue
|
||||
* @param boolean $fade
|
||||
* @return bool
|
||||
* @internal param array $rgbData
|
||||
*/
|
||||
public function rgb($itemID, $red, $green, $blue, $fade)
|
||||
{
|
||||
return $this->send([
|
||||
'type' => 'rgb',
|
||||
'item_id' => $itemID,
|
||||
'red' => $red,
|
||||
'green' => $green,
|
||||
'blue' => $blue,
|
||||
'fade' => $fade,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @return bool
|
||||
|
||||
Reference in New Issue
Block a user