Turn on the relay by clicking the shortcut on the windows desktop

Hello. Tell me how to make sure that I can turn on the relay by clicking on the shortcut on the windows desktop? Is it possible not to install web-server? maybe there are any nods?

Node-RED already includes web servers. Adding a combination of an http-in and http-out node will give you an API endpoint.

So create an http-in node with a URL called relay (or whatever you want). Create a Windows shortcut that calls http://localhost:1880/relay.

The http-in node will create a msg on its output port when you access the URL. So next connect one or more nodes to control your relay. But make sure that somewhere, either connected direct to the http-in node in parallel (if you don't need any feedback to the calling shortcut) or at the end of your relay flow (if you do need feedback), that you add an http-out node as it is this that tells the calling client (Windows in this case) that the request completed successfully (or otherwise).

1 Like

Thank you very much!