Hello
I can't bid on your project But maybe this can help a little
1-When there is no one sitting on any of the chairs , your sensors should read 0 or readings discarded
-This must be adjusted ofc according to the room and distances , but it's mandatory .
2-I'm not sure about the 30 cm , the way I see it is like that :
If some guy is sitting on a chair , the distance that the sensor reads should be very small , 10 or 15 cm max .
3-State Machine :
I don't know the exact setup you want , but there should be a State that is ON once a sensor is detecting a person
on any chair , So .. If State 1 (First chair for example) Is ON , then all other readings from other chairs are ignored .
Once Chair 1 is OFF again , Any Chair can put It's State ON when it senses a person , and the other readings from
other chairs are Ignored
4-Your setup as far as I understand it can be done easily with MQTT on RPI and pubSub on ESP
Regards