Hey anyone exprience in mit wifi control home automation app desing using mit ap

hello everyone right now i am working on wifi control home automation project, using firebase server.
i just wanted to in my project when i click all on button my all relays ON, when i click another off button my all relays goes OFF.
currently in my project i am using 4 on/off buttons and it’s working fine according to my arduino coding

Actually I am working on a home automation app using Google Firebase service

I just wanted to when I click on button my all relays onn or when I click off button my all relays goes offf , problem is my blocks not working properly

So anyone can help
In my first attachment my app layout
Second attachment my on condition blocks
Third attachment about off condition blocks



I've merged your cross-posts @jamsyogendra.

Cross-posting is against the rules of the forum. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend 15 minutes (or more) writing a detailed answer on this topic, without knowing that someone else already did the same in the other topic.

Repeated cross-posting will result in a suspension from the forum.

In the future, please take some time to pick the forum board that best suits the topic of your question and then only post once to that forum board. This is basic forum etiquette, as explained in the sticky "How to use this forum - please read." post you will find at the top of every forum board. It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.