1

If I have a relay board controlled from a web interface thru the ethernet port, how can I create a keyboard shortcut to activate the relay without the browser being open?

Simon
  • 11
  • 1
  • Welcome -- but the brand of hardware here is really irrelevant; this is a network programming related question and belongs on our larger sibling site, Stack Overflow. If you already have a web interface, Chris Cumming's answer about using a tool such as wget should be sufficient (curl might be better for this). If not, then obviously you will have to create the web interface first. – goldilocks Aug 02 '15 at 13:45

1 Answers1

2

I assume you are talking about the Web Relay device made by control by web. If so, these have capabilities to be controlled by simple GET requests, so you could potentially map a wget command to a shortcut. Alternatively, you should look into the UniPi relay board. They cost about the same as one control by web device, but have 8 relays, one wire temperature sensors, and a slew of other features.

I am currently using these devices to automate a generator/solar system, and they are working great. Of course, of this isn't what you're talking about, then this is all rather worthless, isn't it!

  • Sounds like you know what you're about Chris - can you provide an example of how to map a wget command to a shortcut? – goobering Aug 02 '15 at 07:53
  • @goobering He more or less already did. Web servers and clients use HTTP to communicate; GET is normally used to fetch pages. If "Do whatever" is a normal hyperlink, the browser sends a GET request when you click on it. That's what the server responds to. – goldilocks Aug 02 '15 at 13:48
  • Here is a good basis for mapping it to a shortcut: http://unix.stackexchange.com/questions/89622/how-to-execute-a-script-in-shell-when-a-shortcut-key-is-pressed As far as the actual GET command, read the manual for (what I'm assuming is) your control by web device. – Chris Cummings Aug 02 '15 at 17:27