Odd Behavior When Saving files

I’m unsure when it started happening, but I noticed recently that whenever I edit an item, sitemap, or rule file that some (maybe all) of my Hue lights will change color, or perhaps turn on after I Save a file. Strangely, saving a things item did not affect the lights.

I’m using VS Code as my editor, but don’t think that is the issue. But is very strange that after I save a file, the lights are affected.

I know at least the 6 RGB Hue bulbs in my family room do this when ever I hit Save. 2 of these 6 bulbs will actually will actually turn Off and then back On each time I save a sitemap. And the 4 others (in a ceiling fan) will stay on, but will change color to whatever was last showing in the Hue app.

I would need to walk around the home and see if other bulbs are doing the same.

Has anyone else seem thins type of strange behavior? All I see in the logs is that the SiteMap was updated, but the events log does not show the lights turn Off and Back On either.

Do you have any System started rules?

Are you using persistence with the restoreOnStartup strategy on these lights?

I’ve double checked all my rules, and InfluxDB and RRD4J being used for some persistence, but nothing that I can see that should be causing the lights to act the way they are. And it does this simply when I save a file.

I could just add a //comment to an Items or SiteMap file; save it and the lights are affected. All very strange.

When you save a file all of your items get reset to NULL. With restoreOnStartup the items are then immediately undated to the last state saved in that database.

It sounds like this standard OH behavior is causing the binding to issue commands to your bulbs, or when your Things and Items reinitialize the hub takes over and guess back to the last known state it knows about or something like that.