[DEPRECATED] ST_Anything - Arduino/ESP8266/ESP32

Trying this out for the first time for a slight odd project (of course).

I have a Wemos D1 arduinio board which is working fine and i’m using it to sequence 10 leds with high side switching via some custom electronics. I want to control this as a single device in Smartthings - I don’t want individual LED control on the ST side - in fact all I want to do is tell it on/off (it will then deal with sequencing the lights).

Is this the right library to use for this? ATM I’ve rigged it up with a ‘fake’ A0 switch and just trapped the event in the callback where i then switch the digital outputs as I see fit. From a few mins of messing round it looks like i’m going against the grain in that the idea of ST_A seems to be to expose all the digital outs as individual devices. I’ve used A0 to avoid switching anything else but it’s a total hack but enough to show control is possible this way. It’s working but whether it’s on/off is reported wrongly (but hey i’m hacking an analog A0) in the app. It works well enough for me to control them but the state is a bit pants.

Is there a better way to do this? I’m impressed I could hang things together enough to make this work at all and all credit to you for your hard work but I feel I’m abusing it :disappointed:

I’m using an executor:

static st::EX_Switch executor1(F(“switch1”), FAKE_SWITCH, HIGH, false);

where FAKE_SWITCH is A0 obviously.

If I exposed all 10 digital outs to ST_A would this be better and how would I override the actual state switching for the pins so that I’m intercepting and controlling it myself? I felt it easier to ask rather than trawl through the code and inserting more hacks and I may be on the wrong track completely.