Skip to content

Scene, Music, DIY Modes

Ben edited this page Apr 30, 2023 · 28 revisions

v9 Beta Version

⚠️ The upcoming v9 of the plugin changes how scene codes are found and configured. This is to:

  • make finding scene codes straightforward and reliable
  • allow scene codes to be sent via LAN mode
  • bring some consistency to how the plugin handles scenes
  • the method allows for finding bluetooth codes too which could eventually be implemented into the plugin

Note The steps in the Govee app are to create a 'Tap to Run' command for the scene you wish to integrate. Once you have found the scene code within the Homebridge log, you can delete the 'Tap to Run' command in the Govee app

Note You must have your Govee username and password in the plugin configuration for this to work

  • Make sure you have the latest version of the Govee app installed on your mobile

  • Open the Govee app and navigate to the home icon in the bottom menu and then the 'Home' tab at the very top (next to 'Device' and 'Automation')

  • In the 'Default' section, click on the + to add a new 'Tap to Run' command:

  • Give this action a name (for example here I have named it 'Sunrise Scene', then click on the + to add an action:

  • On the next screen, select the device that you wish to find a scene code for

  • Then select the function you wish to find the scene code for (in this case I will select Mode):

  • For the purposes of finding a scene code for a specific mode, select just one mode from the list that you require and click 'Confirm':

  • When redirected back to the previous screen, now click the yellow tick/check icon in the top right-hand corner

  • Again you'll be redirected back to the previous screen, now click the yellow tick/check icon in the top right-hand corner:

  • This 'Tap to Run' action is now saved and you can exit the Govee app

  • Restart the homebridge-govee plugin and watch the logs as it restarts - you should see an entry with the accessory name and the 'Tap to Run' name from the earlier step:

    [Govee] [Desk Lamp] [Sunrise Scene] owABCwcJAGQAAAAIDIsA/0hJSvg=,owFLTE1OT1BRUlMMABKJbG1ub34=,owJwcXJzdHV2dwz/GfRgYWJjZNs=,owNlZmdoaWprDN400lRVVldYWfE=,owRaW1xdXl8Y/wAAAAECAwQFBkY=,owUHCAkKCwwNDg8QERITFBUWF6E=,owYY/38AGBkaGxwdHh8gISIjJBk=,owclJicoKSorLC0uLxj//wAwMZk=,owgyMzQ1Njc4OTo7PD0+P0BBQuk=,owlDREVGRwwAAP94eXp7fH1+fxo=,o/+AgYKDAAAAAAAAAAAAAAAAAFw=,MwUELAEAAAAAAAAAAAAAAAAAAB8=
    
  • Copy the scene code - in the example above it is everything from the first o to the last =

  • Paste this code into one of the configuration boxes as per the guide below starting at Step 2: Configure The Code and continue in this section

  • Once the scene is working via the Eve app, you can delete the 'Tap to Run' you made in the Govee app

  • You can repeat this process for different scenes you wish to set up

v8 Current Version

If your Govee light supports AWS or BLE control, it is possible to set up HomeKit scenes to use different scenes and modes that you have set up in the Govee app. This includes scenes, music mode and DIY modes that you have created.

⚠️ This does not currently work for all models.

Requirements

  • A model that supports AWS or BLE control (for BLE control you will need to enable this in the plugin configuration)
  • The Eve app on your iPhone to create the scenes that will then appear in the Home app

Step 1: Finding The Code

You will need to find a specific code that you can enter into the configuration for each scene that you want to create. The code is the same for AWS and BLE control, however, finding the code is much easier if the model supports AWS (wifi).

All codes are 40 characters in length and start with 33, for example:

3305042000000000000000000000000000000012

Codes that you may see in the logs beginning with aa are not valid.

Finding an AWS code

  • Ensure your phone's Bluetooth is disabled - to ensure the Govee device is connected to wifi
  • If the device is already in the scene/mode you wish to use, then turn the light into a different scene/mode
  • Switch to the mode/scene you wish to use
  • Look in the Homebridge/HOOBS log, you should see an entry appear like this:
    [Govee] [Device Name] current scene [3305042000000000000000000000000000000012].
    
  • This code may not appear straight away - try force closing the Govee app, then reopening and going to the device page again
  • Copy/save the code somewhere handy

Finding a BLE code

Finding a BLE code is more challenging as the plugin cannot find this for you.

I am unable to help find scenes or modes that aren't on this list. You can experiment with these codes or find an exact code yourself with some reverse engineering/sniffing.

⚠️ Note that scene codes for a specific mode may vary between different models.

Step 2: Configure The Code

You can use the plugin settings within Homebridge/HOOBS UI to enter the code found above. Within the 'Light Devices' section you should set up an entry for your device and then configure your code as shown:

Example settings screen

The plugin offers the option for ten different codes with a naming scheme for two music modes, four scenes four DIY modes and four segmented light modes. This is just a naming scheme for ease - any code can go in any section.

Save your config and restart the plugin.

Step 3: The Eve App

When the plugin restarts, it will add buttons for each of the codes that you have entered in the configuration. These buttons are only visible in the Eve app and can be seen when clicking on the corresponding accessory.

The plugin will also add an extra button called 'Colour Mode' that can be used to revert the device back to colour mode.

Eve App

These buttons are stateless which means they do not reflect the current state of the device. Turning one of the buttons ON will simply send a command to the device to switch to this mode. After three seconds, the button will revert back to OFF (although this only seems apparent when refreshing the accessory page).

Step 4: Creating HomeKit scenes

You can create scenes within the Eve app so you can access these Govee modes from within the Home app itself. From the Eve app:

  • Click the 'Automation' tab at the bottom of the app and make sure you are then on the 'Scenes' tab at the top
  • Click on 'Add Scene'
  • Click on 'Add Actions', choose the accessory, and click on the button for the scene and make sure the value is 'ON'
  • Click on 'Add' at the top of the screen
  • Click on 'Next' at the top of the screen
  • Enter a name for the scene (and an icon!) and click on 'Done' at the top of the screen
  • The scene should now be created and if you open the Home app the scene should be visible in the room where the device is located