Govee Integration V2

I don't think that was intended. I never ment for then to be different. I will review and see what needs to be changed to make them the same.

If that is the case did you get any errors. We may need to open the app detaila and review the GoveeAPI stae vale data. Yhat is where govee would have provided the Snapshot details.

One. Last question are you setup for Lan API or cloud API on this device?

Yes, that is how I enter the effect number in my rule, as a string:

24-12-30-1709

I hadn't noticed that - interesting...good catch. :slight_smile:

I vote to configure the Set Effect field in the driver as a string, so I don't have to change my rule! :wink: :smiley:

1 Like

If we're voting for breaking changes, I'd like to vote for a big one :grin: Align the method and variable names: setEffectNum to match effectNum.

um. I know I can override it, but that is set by the LightEffects capability. I would probably leave that alone. The Activate DIY command is all custom and I suspect initially I was trying to do something with the name instead of the string number. May need to write some code to handle it either way. Also when you consider the discussions recently about Hubitat adding a ability for drivers to be more dynamic with their commands I am tempted to leave this the way it is until that is implemented anyway. Whatever change comes with that will likely be breaking as well.

Can you clarify what you mean by this?

There was also a big discovery on one of the GitHub sites related to Govee recently. Simply put I need to write some code to implement a new method of Scene extraction that will make the whole process a ton easier, more complete and more streamlined. The new method doesn't do anything for DIY's, but built in scenes will be more accurate.

1 Like

Any chance the discovery(ies) help w/the problems caused by below?

It is a completely different method of obtaining the scene command so not sure yet. I can generate a scene file with this new method and we can see. What exactly is the device model number you want to test with?

1 Like

The two that I have that seem to have the issue w/the new "ptURL" are the Net Lights and Christmas Lights 2. Both support Matter if that matters. :slight_smile:

Net lights: H6811141
24-12-31-1716

Chistmas lights 2: ‎H70C5141
24-12-31-1715

I wonder if this would discover the missing "Fire" scenes for the Floor Lamp 2 and Table Lamp 2. I'm happy to help with testing, etc.

Complete edit here! I didn't even realize that LightEffects was a capability and setEffect is part of that capability.

Can you download this file and add it to your hub through the file manager.

Once that is done do a repair on your Govee Integration.

The file is using the script that was created to do the extraction with this new method. It isn't my method, so i had to tweak the formatting a little bit to match our scene files. I also had to update one of the library files to properly tag your net Lights with the proper device type. Once that is done your net lights should pull from the file above. We can see if that helps with the scenes. Let me know if any or all of them work.

It actually will. Users will likely see allot more scenes and they will actually be specific to their device and not be based on device type and a list i pulled who knows when. Once i figure out how to use this new method i can create a command list file for each device as needed specific to the users environment. I haven't had a chance to even start on it yet. but have run the test script a few times from the person that found this method. So far the script has worked pretty well. Need to test that the output actually works and then create the method in HE to generate the command list formatted as we currently use it.

I have Table Lamp 1 and just remembered that I have 2 "Fire" scenes for my particular model (H6052). They are 110 and 5, if you want to give those a shot. Although I configured with "Local LAN Scene Control" back before the cloud scene rewrite and never switched back, so they may not work.

Very cool, thank you very much for the update. I will be home in a while and hopefully have a little time to try this. Might be tomorrow as the wife has her own ideas about how I'm spending my day today. :astonished::grin:

2 Likes

Have a few minutes of quiet... :slight_smile:

Done!

Done.

I thought I'd need to do an All Scene Reload from the Govee v2 Device Manager to update the Net Lights, and/or a Scene Load on the Net Lights device page, but it looks like all the scenes in the json file you gave me are already listed in the driver page.

{"12521":"Bubble","12522":"Rainbow","12523":"Star","12524":"Meteor","12525":"Universe","12526":"Beach","12527":"Cherry blossoms","12528":"Aurora","12529":"Christmas Tree","12530":"Christmas Bell","12531":"Graveyard","12532":"Jack-o'-lantern","12533":"Easter Egg","12534":"Countdown","12535":"Valentine's Day","12536":"Saint Patrick's Day","12537":"Birthday Cake","12538":"Ring Toss","12539":"Bouncing Ball","12540":"Lottery Machine","12541":"Maze","12542":"Racing","12543":"Dodging","12544":"Stack","12545":"Bumper Cars","12546":"Anglerfish","12547":"White Swan","12548":"Camel","12549":"White Light","12550":"Govee Logo","12551":"Train","12552":"Camping","14390":"Planet","14391":"Moonlit Night","14392":"Snowy Mountain","14393":"Seaside","14394":"Coral Sea","14395":"Sea Island","14396":"Pond","14397":"Christmas Decor","14398":"Christmas Gift","14399":"Christmas Eve","14400":"Snow House","14401":"Candy Cane","14402":"Gift House","14403":"Halloween","14404":"Halloween Night","14405":"Bouncing Pumpkin","14406":"Pumpkin","14407":"Children's Day","14408":"Game Controller","14409":"Graffiti","14410":"Alternate","14411":"Greedy Snake","14412":"Spaceship","14413":"Crocodile","14414":"Flock of Ducks","14415":"Proposal","14416":"Heartbeat","14417":"Campfire","14418":"Beer","14419":"Sailboat","14420":"Roadster","14421":"Train Window","15360":"Let It Snow","15361":"Winter Twilight","15366":"Thanksgiving"}

Those numbers don't match what i put in for the scene number values in that file. They should start at 100 and go up to about 167

The appear to be the same scenes, but yes, different scene numbers. THey were likely in the driver page from the previous process. Sounds like I need to do the load all scenes.

Also, should I make any changes to the Preferences? Leave both LAN settings as-is?

Also, to confirm, I don't need to try another extract from the Govee 2 app, correct?
image

Did an All Scenes Load / Refresh from Govee V2 Device manager, Load Scenes / REfresh from the Net Lights driver page and still seeing the same scenes on the driver page w/the five digit scene numbers.

Will check or errors.
As far as the API,, I set up cloud first. I added LAN after but when I realized I'd need to create the scene definitions manually in a text file, I turned it back off as it didn't seem worth the trouble. So right now it's just cloud. I disabled LAN API in your app and in the Govee app.

Can you check your logs and let me know if any error occured. I am working on the parser for for this new method.

Flip the switch on "Enable Local Lan Scene Control" and then refresh your scenes. When that is off you are using the cloud to access scenes.

Yes - well, the scenes are in the cloud - so isn't that what I want?
Anyway - I just discovered the All Scenes Reload button on the parent device and that pulled in the Snapshots. Scene Load on the child device didn't bring them in but this did.

1 Like

Flipped the LAN setting switch and did the load/refresh an am getting errors...

File you gave me is uploaded to my hub: