N-Button Automation: Control Relay with HTTP Request

N-Button Pro software Automation feature allows you to control relay board with HTTP request. By sending HTTP request, you can control relay on/off.

Here will show you how to set up Automation rule to turn on and turn off relay by sending HTTP request with N-Button Pro software.

TaskSend HTTP request to turn on/off relay channels

Step 1. Download and install N-Button Pro software on your computer.

Step 2. Connect relay board with the computer. (Here I have 2-channel relay board connected)

Step 3. Run N-Button Pro software. Click Devices Manager –> New to add relay board to Devices Manager.

N-Button_Device Manager
N-Button_Device Manager

Step 4. Add a Relay Button widget to toggle all relay channel.

N-Button_Add Relay Button_Toggle All Relays
N-Button_Add Relay Button_Toggle All Relays

Step 5. Add two Relay Status widgets to show both relay channels’ status.

N-Button_Add Relay Status Widget
N-Button_Add Relay Status Widget

Step 6. After above settings, Relay Button and Relay Status widgets will be shown on your desktop. Click the Relay Button to turn on/off relays. You will see the Relay Status widgets changing also. It indicates the relay board works well with N-Button. Otherwise, you need check the conneciton.

Relay Button and Relay Status Widgets OFF
Relay Button and Relay Status Widgets OFF
Relay Button and Relay Status Widgets ON
Relay Button and Relay Status Widgets ON

Step 7. Right-click on one of widgets to show pop-up menu, and click N-Button Pro Manager to open the manager panel again.

Step 8. Click Advanced Setting to check Allow Control Remotely from Web Browser and set up Port Number.

N-Button_Web Interface_Allow to Control Remotely from Web Browser
N-Button_Web Interface_Allow to Control Remotely from Web Browser

Step 9. Click Automation to open Automation Manager, and click New to show Rule Type panel. Click HTTP Request Rule to open setting panel.

N-Button_Automation_HTTP Request Rule
N-Button_Automation_HTTP Request Rule

Step 10. Input HTTP Request, and click Setting button to set up action for HTTP Request. Here shows the action to turn on relay 1.

N-Button_Automation_HTTP Request Rule Setting
N-Button_Automation_HTTP Request Rule Setting

Step 11. Repeat Step 9 and 10, add other HTTP Request rules to turn off relay 1 and turn on and off relay 2.

Step 12. After finishing all above Automation settings, open any web browser, input the HTTP request, you can control, turn on/off, relays with http://IP:port/request now. Here shows the local web browser.

Test Http request relay1on
Test Http request relay1on

You can turn on/off relays with HTTP request on any other computers, which is connected to the same internet as the one with N-Button running.

Test Http request relay2on
Test Http request relay2on

See Also:

N-Button Automation Application – Send Text Message
N-Button Automation Control Relay by A/D Input
N-Button Automation Control Device with Key Fob
Light Control with N-Button Automation Time Point Rule
Light Control with N-Button Automation Schedule Rule
N-Button Automation Control Device with Conditional Rule
N-Button Automation: Send Data with Push Notification Board
N-Button Automation: Toggle Relay by Push Notification Board
N-Button Automation: Trigger Relay with Push Notification Board
N-Button Automation: Interval Turn On Relay by Push Notification Board