Author Topic: Operating RRC1258 outputs via scripts  (Read 6896 times)

pe1hzg

  • Newbie
  • *
  • Posts: 11
    • View Profile
Operating RRC1258 outputs via scripts
« on: 2024-04-17, 21:22:05 »
With the current energy prices, it is desirable to switch-off a remote site when not in use. The Webswitch 1216 would be desirable but is not available. And solid-state relays, like the RP1A48D5 are readily available at Reichelt and can be used to switch 230Vac.

The RRC1258 are open collector so the relays should be connected between the OUT ports (pin 5, 6, and 3 of the I/O connector) and the 8V out (pin 7 of the I/O connector). The outputs are programmed as On/Off. I'm using the K3 clone function, and then OUT0 is hard-configured but OUT1 and OUT2 are available.

I don't want to expose the web interface of the RRC to the Internet. So much is happening via HTTP these days, and the RRC doesn't do encryption. Operating the web-interface via a tunnel is possible, but if all I need to do is set or reset an output, then a simple shellscript on a raspberry is just as well. How to operate the web-interface via a shellscript?

Some experimentation learns that to switch-on OUT2, you can use something like:

  wget -q  --post-data 'out2Mode=4&out2OnOff=OFF' --output-document /dev/null http://IP.AD.DR.ES/settings


Note that ON and OFF are reversed, so out2OnOff=OFF switches the port ON, and out2OnOff=ON switches the port OFF.

To switch port1 instead of port2, change 'out2' to 'out1' above.

If your RRC is password-protected, you need to add:

  wget -q  --user USERNAME --password PASSWORD --post-data 'out2Mode=4&out2OnOff=OFF' --output-document /dev/null http://IP.AD.DR.ES/settings

Again, the RRC web interface probably should not be directly connected to the Internet anno 2024; the web password is trivial to decode from the web traffic. If you can run this via SSH on a raspberry, then perhaps that is a better choice.

73, Geert Jan