Initializing TouchOSC buttons

I’m starting to build a control surface for TouchDesigner using TouchOSC, and I can’t figure out how to initialize the control surface when it first starts. Specifically, I have several toggle buttons which always default to off (dimmed) state. But it’s possible TouchDesigner has already been running for awhile and some of the buttons should be on already. I have TouchDesigner sending OSC messages on every cook, but I don’t know how to set the state of a toggle button in Lua script. I find the TouchOSC documentation very hard to follow. Anyone know how to do this?

Nevermind, I figured this out. I was making things way too complicated with Lua script. I just had to enable “receive” on each button and make sure the data types match.