Geeetech Voice Recognition, using multiple command groups

I’m working on Home Automation Project using voice recognition module. The module I got is Geeetech voice recognition module. It supports 15 commands, 5 in a group, hence 3 groups. At a time, only one group can be active, so the given command can be compared with any 5 commands from a group at a time. Now I need more than 5 commands so I’m trying to switch groups. Like the first group has commands Light, Fan, TV, AC, Geyser. The second group has commands ON, OFF, Speed, Temp, Nothing. The voice recognition recognized the first command, Example Light, Arduino code switches it to second successfully, but on second command, like ON, the response from VR is incorrect. It replies the HEX of OFF commands on saying ON. HEX is returned randomly, it will match the commands incorrectly. So I’m confused what to do here, does the stream need to be flushed, or? Any suggestions? To add, when I just switch to 2nd Group solely from a test sketch and work with it, it works fine. So I guess there is issue with switching.

2Groups.ino (2.52 KB)