Python Plugin : HTTP Listener example question
Posted: Wednesday 20 December 2017 23:30
I am looking for a way to add a Python Plugin thats acts like a webserver, that can be called by a webclient on antoher computer.
Running Domotizc Version: 3.8755 on RPi-1-Jessie.
I did not find much information on the HTTP Listener Python Plugin example, but I THINK it:
- adds a webserver waiting for connections from webclients
- starts a webclient on every "heartbeat" and connects to the plugin-webserver
Running the plugin the Log shows that the heartbeat-client connects to the server and responds to the client. Works!
BUT if I try to connect a client on an different machine to the plugin-server I get no response from the server, and no info in the Domoticz Log.
My Domoticz is on 192.168.0.28, and is UP:
The HTTP Listener Plugin listens on the default port 127.0.0.1:8008. When I try to connect, no response:
I would expect the client to be connected to the plugin-webserver, but that does not happen.
Stupid mistake on my part, or am I missing something?
Running Domotizc Version: 3.8755 on RPi-1-Jessie.
I did not find much information on the HTTP Listener Python Plugin example, but I THINK it:
- adds a webserver waiting for connections from webclients
- starts a webclient on every "heartbeat" and connects to the plugin-webserver
Running the plugin the Log shows that the heartbeat-client connects to the server and responds to the client. Works!
BUT if I try to connect a client on an different machine to the plugin-server I get no response from the server, and no info in the Domoticz Log.
My Domoticz is on 192.168.0.28, and is UP:
Code: Select all
pi@raspberrypiZolder:~/domoticz/plugins/HTTPListener $ curl 192.168.0.28:8080/log
<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>
Code: Select all
pi@raspberrypiZolder:~/domoticz/plugins/HTTPListener $ curl 192.168.0.28:8008
Stupid mistake on my part, or am I missing something?