CyBear-Jinni / cbj_integrations_controller

GNU Affero General Public License v3.0
2 stars 1 forks source link

Add Wiz support #55

Open guyluz11 opened 1 year ago

guyluz11 commented 1 year ago

Wiz is a smart home company.

Home assistance support Wiz devices locally and currently have 2.5% users using it.

WiZ_logo_RGB_WEB

guyluz11 commented 1 year ago

The API is called Wiz pro

Here is a code example to control it that chatGPT created for me

import 'package:http/http.dart' as http;

void main() async {
    // Replace these values with the appropriate information for your bulb
    String bulbIP = "192.168.1.100";
    String bulbToken = "your_token";

    // Set the bulb's color to red
    var response = await http.put(
        "http://$bulbIP/api/v1/$bulbToken/lights/1/state",

And for getting the authentication token

Open the WiZ app and create an account, if you don't have one already.

Add the light bulb to your account by following the instructions in the app.

Once the bulb is added to your account, you will be able to see the bulb's access token in the app's settings or in the developer portal.

You can use this token in your dart code to authenticate with the bulb and send commands to it.
guyluz11 commented 1 year ago

This is the python package that home assistant uses to control Wize light bulbs https://pypi.org/project/pywizlight

Also it looks like some of Wize devices support Matter https://www.wizconnected.com/en-us/explore-wiz/works-with#Do_all_WiZ_products_support_Matter

guyluz11 commented 9 months ago

Api documentation https://docs.pro.wizconnected.com/#introduction