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?

closed as off-topic by goldilocks Aug 2 '15 at 13:48

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be specific to the Raspberry Pi within the scope defined in the help center." – goldilocks
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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 2 '15 at 13:45
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 2 '15 at 7: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 2 '15 at 13:48
  • Here is a good basis for mapping it to a shortcut: unix.stackexchange.com/questions/89622/… As far as the actual GET command, read the manual for (what I'm assuming is) your control by web device. – Chris Cummings Aug 2 '15 at 17:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.