There is MQTT, a publish/subscribe messaging system. Under Linux it seems to be supported by the mosquitto package.
apt-cache search mosquitto libmosquitto-dev - MQTT version 3.1 client library, development files libmosquitto1 - MQTT version 3.1 client library libmosquittopp-dev - MQTT version 3.1 client C++ library, development files libmosquittopp1 - MQTT version 3.1 client C++ library mosquitto - MQTT version 3.1/3.1.1 compatible message broker mosquitto-clients - Mosquitto command line MQTT clients mosquitto-dbg - debugging symbols for mosquitto binaries python-mosquitto - MQTT version 3.1 Python client library python3-mosquitto - MQTT version 3.1 Python 3 client library libmosquitto0 - MQTT version 3.1 client library libmosquitto0-dev - MQTT version 3.1 client library, development files libmosquittopp0 - MQTT version 3.1 client C++ library libmosquittopp0-dev - MQTT version 3.1 client C++ library, development files
That would allow you to publish the event (take photo) on one machine and have your Pi's subscribed to that event.
This would be a programming solution. I'm not sure if there is a bash interface to the publish/subscribe methods.
I HAVE NOT used it. I'm aware of it simply because I see it often recommended for this sort of task.
You give no indication of any timing constraints, e.g. how closely the photos must be synchronised in time.
EDITED TO ADD
I have had a quick play with mosquitto
sudo apt-get install python-mosquitto # on server and clients sudo apt-get install mosquitto # only needed on server
I wrote a couple of scripts.
The server tells the clients when to take the photos (now or some time in the future).
The clients wait for the specified time and then take the photo (actually it prints diagnostics).
A webm video here
Server Python script
#!/usr/bin/env python import mosquitto import time mq = mosquitto.Mosquitto() # Connect to mercury mq.connect("mercury") # Take a photo now t = time.time() print("take photo at {}".format(t)) mq.publish("photo/trigger", "{}".format(t)) time.sleep(1) # Take a photo in 10 seconds t = time.time() + 10 print("take photo at {}".format(t)) mq.publish("photo/trigger", "{}".format(t)) time.sleep(11) # Take a photo in 5 seconds t = time.time() + 5 print("take photo at {}".format(t)) mq.publish("photo/trigger", "{}".format(t)) time.sleep(6) # Take a photo now t = time.time() print("take photo at {}".format(t)) mq.publish("photo/trigger", "{}".format(t))
Client Python script
#!/usr/bin/env python import mosquitto import time def on_connect(mosq, obj, msg): print "Connected" def on_message(mosq, obj, msg): msg_time = time.time() snap_time = float(msg.payload) while time.time() < snap_time: pass now_time = time.time() print ("msg={}, snap={}, now={}".format(msg_time, snap_time, now_time)) mq = mosquitto.Mosquitto() #define callbacks mq.on_message = on_message mq.on_connect = on_connect #connect mq.connect("mercury") #subscribe to topic mq.subscribe("photo/trigger") #keep connected to broker while mq.loop() == 0: pass