> For the complete documentation index, see [llms.txt](https://docs.sonoransoftware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonoransoftware.com/studio/sonoran-studio/desktop-companion/smart-lighting.md).

# Smart lighting

The desktop companion can control Philips Hue, Wyze Color, Govee Wi-Fi, and supported Govee Bluetooth bulbs from live Sonoran states.

{% stepper %}
{% step %}

### Import an existing CAD setup, if needed

Close the Sonoran CAD desktop application, then use the one-time importer. Studio reads the existing `twitchConfig1` lighting scenes and supported local pairing details.
{% endstep %}

{% step %}

### Connect devices

Choose **Philips Hue**, **Govee Wi-Fi**, **Wyze Color**, or **Govee Bluetooth**.

* For Hue, enter the bridge IP if needed and leave the username blank to start bridge linking.
* For Govee Wi-Fi, enter the Govee API key.
* Wyze and Govee Bluetooth devices are imported from CAD so existing local pairing details remain intact.

Select **Connect & find devices** where available.
{% endstep %}

{% step %}

### Configure scenes

Assign bulbs and a color/brightness sequence to each state. Test the scene before relying on it in game.
{% endstep %}

{% step %}

### Connect FiveM

FiveM sends JSON such as `{"state":"panic"}` to the local endpoint shown in the companion, normally `http://127.0.0.1:9990/lighting`.
{% endstep %}
{% endstepper %}

## Supported states

Restore, Emergency Lights, Panic, Unavailable, Available, Busy, En Route, On Scene, Left Signal, Right Signal, and Hazard.

## LAN access

The endpoint binds to the current computer by default. Enable LAN access only when another trusted device must send lighting states. Remote LAN calls require the generated private token.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sonoransoftware.com/studio/sonoran-studio/desktop-companion/smart-lighting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
