The sketch keeps a table of “SYNC” data in EEPROM, with a number of entries (configurable). Each entry means a remote SwitchMote needs to be notified to virtually “press a button” when a physical button is pressed on this SwitchMote. If that button happens to be associated with the relay (SSR) then the light or AC load (up to 5A) is also turned ON/OFF, depending on the modes the 2 SwitchMotes are in. Otherwise it will just reflect the new state on the front panel LEDs for that button. Note that it’s possible that a button can be in ON state and trigger an OFF state somewhere else. Think of turning a light ON here and OFF somewhere else from a single button press.
Using SYNC mode (synchronize buttons on two SwitchMotes):
- press and hold the button you want to be controlled (the slave) for at least 3 seconds, LEDs for that button will start flashing rapidly.
- walk to the SwitchMote from which you want to control and press and hold the button you want to be the controller (the master) for at least 3 seconds. At this point the master will broadcast a SYNC? token and the slave will respond with a SYNCx:y token where x=button placed in SYNC, y=mode of button placed in SYNC
- for instance to turn a light ON on SwitchMote#1 (SM1) from SwitchMote#2 (SM2), you must:
- press SM2 main button (the one associated with the SSR) to place it in ON mode (click until green LED and light are turned on)
- put that button in SYNC mode (3 second press and hold)
- walk to SM1 and press the button you want to control from in ON mode (click until green LED is on for that button)
- put that SM1 button in SYNC mode (3 second press and hold)
- note that if the SM1 button is also the main button (Relay controlling button), then pressing SM1 main button will now turn both lights ON
- to turn lights OFF repeat the procedure but place the buttons in OFF state before SYNCing
The SYNC mode is demonstrated in this video starting at 3:53: