The names of variables and events are defined in config file. Instead of using 'gpio17off', 'gpio17on', it makes sense to use meaningful names as 'led_red_off' und 'led_red_on'.
It is also possible to add an 'all_off' broadcast/ event, which is added for all adapters in configuration.
<input name='low'> <broadcast name='all_off' /> <broadcast name='led_red_off' /> <broadcast name='gpio17off' /> </input> <input name='high'> <broadcast name='all_on' /> <broadcast name='led_red_on' /> <broadcast name='gpio17on' /> </input>
Sample config snipped for multiple events on adapter inputs.
Task: Add the events given in the sample into the scratchClient configuration.
The current config is /home/pi/scratchClient/config/config_piandmore_event.xml
Use leafpad as an editor.
An alread modified config file is : config/config_piandmore_event2.xml.
In order to get the new config active, reastart scratchClient.
In case scratchClient is still running, then stop with ctrl-c.
Adjust the next command, when you have given the file a different name.
cd ~/scratchClient sudo python src/scratchClient.py -c config/config_piandmore_event2.xml
In scratch, start 'remote sensor connections'.
The new commands can be used in scratch now.