Node Red for GPIO control

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Affinite
Normal user
Posts: 57
Joined: 03 Apr 2018, 18:46

Node Red for GPIO control

#1 Post by Affinite » 28 Mar 2021, 15:50

Hi all
Firstly apologies for asking a Node-Red question in the ESPEASY forum but I think many people here are familiar with both

I'm trying send a command from Node-Red to turn an ESP8266 gpio pin on/off
I know how to do it in MQTT but I want to send the command using either UDP or http
If I type "http://192.168.1.150/control?cmd=gpio,4,1" into my browser it works.

What nodes do I need to configure to get this result from Node-Red and how should they be configured.
Many Thanks

Affinite
Normal user
Posts: 57
Joined: 03 Apr 2018, 18:46

Re: Node Red for GPIO control

#2 Post by Affinite » 28 Mar 2021, 18:33

OK figured it out myself

http request node set for PUT with URL http://192.168.1.150/control?cmd=gpio,4,1

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Node Red for GPIO control

#3 Post by Ath » 28 Mar 2021, 18:35

Affinite wrote: 28 Mar 2021, 18:33 http request node set for PUT with URL http://192.168.1.150/control?cmd=gpio,4,1
It should also work with a GET, as that is what a browser does.
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests