i used node-red long time in a virtual mashine, but at the moment i merge my servers a little bit. so i merged all smarthome vms in one vm with dockers.
Node-red is also a docker now and the most run pretty good. Only one thing dont work. The http request.
I have a Flow to trigger my IR Remote for my HIFI AMP.
If "play" and "Kennwood" both are true or false, do nothing. otherwise trigger my http request:
Ah ok...
bash-5.0# wget http://10.2.0.65/ir?code=501397830
Connecting to 10.2.0.65 (10.2.0.65:80)
wget: server returned error: HTTP/1.1 404 Not Found
How i solve it?
Docker Network information:
bash-5.0# traceroute 10.2.0.65
traceroute to 10.2.0.65 (10.2.0.65), 30 hops max, 46 byte packets
1 172.50.0.1 (172.50.0.1) 0.008 ms 0.010 ms 0.002 ms
2 ESP-0806BF.c-lab.one (10.2.0.65) 39.283 ms 4.827 ms 1.641 ms
Are you using a pre-built firmware on the ESP (e.g Tasmota or ESPhome)? Or is it custom code?
All of the main firmware for ESP includes MQTT as far as I'm aware. Adding it to your own code is also really simple as there are excellent libraries available.
dante@infra:~# wget http://10.2.0.65/ir?code=501397830
--2022-03-27 13:10:16-- http://10.2.0.65/ir?code=501397830
Verbindungsaufbau zu 10.2.0.65:80 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 458 [text/html]
Wird in »ir?code=501397830« gespeichert.
ir?code=501397830 100%[===================================================================================================>] 458 --.-KB/s in 0,002s
Perhaps port 80 is blocked by the container. Does the system have internet access? If so then (inside and outside the container) what does this do? wget google.com
bash-5.0# wget google.com
Connecting to google.com (142.250.185.238:80)
wget: server returned error: HTTP/1.1 404 Not Found
Root System:
wget google.com
--2022-03-27 13:27:35-- http://google.com/
Auflösen des Hostnamens google.com (google.com)… 142.250.185.238, 2a00:1450:4005:800::200e
Verbindungsaufbau zu google.com (google.com)|142.250.185.238|:80 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 301 Moved Permanently
Platz: http://www.google.com/ [folgend]
--2022-03-27 13:27:36-- http://www.google.com/
Auflösen des Hostnamens www.google.com (www.google.com)… 142.250.181.196, 2a00:1450:4005:802::2004
Verbindungsaufbau zu www.google.com (www.google.com)|142.250.181.196|:80 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: nicht spezifiziert [text/html]
Wird in »index.html« gespeichert.
I connect to the Docker via port 80 (Node-red Admin and Dashboard Site)
So Websocket is Port 80 Input.
May i open Port 80 for output? I think outside ports run anytime, like a normal PC client.