bsp9493 wrote:do you mind sharing? If you can pm me the plugin, I can maybe try to modify for the ambient ws.
It's not in a state that I would want to share at the moment - past experience tells me it is better to get it near correct before releasing.
I will make the basic changes to support the Ambient ws and then let you have that as the plugin is in a state of flux at the moment.
What would be useful is if you could run the following python script in a terminal:
- Code: Select all
import socket # Import socket module
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
port = <PORT NUMBER> # port specified in your Ambient Ws weather station settings e.g. 9125
ip_address = <IP-ADDRESS> # ip addresss specified in your Ambient weather station Server IP/Hostname (customised setting) e.g. 192.168.1.8
s.bind((ip_address, port)) # Bind to the port
s.listen(5) # Now wait for client connection.
while True:
c, addr = s.accept() # Establish connection with client.
print 'Got connection from', addr
print c.recv(1024)
c.close() # Close the connection
You need to modify the above code to set the correct ip-address and port number. IP address will be that of your Indigo server.
To do run this script start a terminal session. Then type python to start the Python interpreter and then paste the code into the terminal and then press enter twice to kick it off.
If it works, you should get a rapidly filling page with content like:
- Code: Select all
GET /weatherstation/updateweatherstation.php?ID=weather&PASSWORD=password&tempf=63.1&humidity=56&dewptf=47.3&windchillf=63.1&winddir=78&windspeedmph=4.47&windgustmph=7.61&rainin=0.00&dailyrainin=0.00&weeklyrainin=0.00&monthlyrainin=0.51&yearlyrainin=21.47&solarradiation=95.35&UV=1&indoortempf=72.7&indoorhumidity=49&baromin=29.17&lowbatt=0&dateutc=2019-04-23%2016:57:12&softwaretype=WH2600GEN_V2.2.7&action=updateraw&realtime=1&rtfreq=5 HTTP/1.0
Accept: */*
Host: 192.168.1.8
Connection: Close
GET /weatherstation/up
Got connection from ('192.168.1.199', 30894)
GET /weatherstation/updateweatherstation.php?ID=weather&PASSWORD=password&tempf=63.1&humidity=56&dewptf=47.3&windchillf=63.1&winddir=73&windspeedmph=4.92&windgustmph=4.92&rainin=0.00&dailyrainin=0.00&weeklyrainin=0.00&monthlyrainin=0.51&yearlyrainin=21.47&solarradiation=95.16&UV=1&indoortempf=72.7&indoorhumidity=49&baromin=29.17&lowbatt=0&dateutc=2019-04-23%2016:57:13&softwaretype=WH2600GEN_V2.2.7&action=updateraw&realtime=1&rtfreq=5 HTTP/1.0
Accept: */*
Host: 192.168.1.8
Connection: Close
Just press CTRL-C to stop the session and then copy one of the returned sections starting with
GET /weatherstation/up and ending with
Connection: Close.
Note: that you will need to stop any other process that is accessing the Ambient while you run the script otherwise you will get an address in use error.That will tell me how much is involved in getting it working and what changes I might need to make.