Fine Offset Weather Station Binding: Discussion

@maniez Here is a simple example of how to setup a proxy in java:

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class Proxy {


	public static void main(String[] args) throws IOException {
		ServerSocket serverSocket = new ServerSocket(45000);
		Socket s2 = new Socket("192.168.4.9", 45000);
		while (true) {
			try {
				Socket s1 = serverSocket.accept();
				new Client(s1, s2, "Req ").start();
				new Client(s2, s1, "Resp").start();
			} catch (IOException e) {
				System.out.println("Client connection error: " + e.getMessage());
			}
		}
	}

	static class Client extends Thread {
		Socket s1;
		Socket s2;
		private final String name;

		Client(Socket s1, Socket s2, String name) throws IOException {
			this.s1 = s1;
			this.s2 = s2;
			this.name = name;
		}

		public void run() {
			try {
				InputStream is = s1.getInputStream();
				OutputStream os = s2.getOutputStream();
				byte[] buf = new byte[1024];
				int len;
				while ((len = is.read(buf)) != -1) {

					String data = toHexString(buf, len);
					System.out.println(name + " " + len + "\t" + data);
					os.write(buf, 0, len);
				}
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}

	public static String toHexString(byte[] hex, int length) {
		String[] hexadecimal = new String[length];
		for (int i = 0; i < length; i++) {
			hexadecimal[i] = String.format("%02X", hex[i]);
		}
		return String.join("", hexadecimal);
	}

}

You need to

  1. adjust the IP address in the code to match the one from your gateway
  2. and let the WS-View APP connect to this Proxy by using the Direct Connection form the upper left Menu

Ok I will check if I get this to work an provide you the output.
Thanks very much for the support!

Hi Andy,
did you find the data you have requested in my java file:

?

Hi Jörg,

Yes, I have seen this class and already prototyped it, however I would be interested in 3 other calls:

  1. the query of all sensors (0x3c)
  2. the query of the firemware version (0x50)
  3. the query of the system information (0x30)

In addition, I would be happy to have some example responses (including checksum) for the query of the measurement data, so that I can use it for Unit-Tests.

See also: [fineoffsetweatherstation] Add support for ELV WS980WiFi · Issue #12763 · openhab/openhab-addons · GitHub

1 Like

Hi Manuel,

have you found and implemented a way to connect to your WH3000 in the meantime? I’ve the same need to interface a WH3000 (actually its a Ventus W830, but it appears similar than the Froggit WH3000) and would be very interested in any solution you’ve identified…

Many thanks for a feedback and potential assistance.

All the best and have a nice day,
Albert

Hi Albert,

within the Fine offset Weather Station Binding it is unfortunately not possible for WH3000. I talked and analysed with Andy that the WH3000 has no possibility to readout the livedata. All the data is send to one website eg. wunderground, and from there you can read out the Data. Therefore you can use IpObserver Binding or a method described here Wetterstation ws980wifi in openhab einbinden - forwardme.de - SmartHome / Hausautomatisierung / Programmierung und mehr

OK Manuel, many thanks for the information. Really a pitty that the livedata cannot be readout, so I will give the other methods a try …

Thx, works like a charm (WH2650)

1 Like

Thanks for this binding, works great with my WH2650, with one exception: The “Solar Radiation” weather_irradiation_uv value does not match to the value show by the App. The App says, at this sunny day, around 730 W/m² and openhab reports weather_irradiation_uv values around 28 W/m². Do I miss something? Anything to configure?

The “Solar Radiation” of the WSView-App corresponds to illumination (Light Intensity) measured in lux. This unit (lux) is what I get from the gateway. The WSView-App does show this value with the unit W/m² by default, but you can switch the unit in the settings of the WSView-App to get the exact value used by this plugin.

The irradiation-uv (UV Irradiation) is not shown in the WSView-App, but it is used to calculate the uv-index (UV Index).

Thanks Andreas, I mixed it up.

Hi Andreas,
thank you very much for your binding.
I have the ELV WS980WIFI and it works fine with the solution by Florian, Wetterstation ws980wifi in openhab einbinden - forwardme.de - SmartHome / Hausautomatisierung / Programmierung und mehr
but with the Fineoffsetweatherstation Binging I add the Bridge Thing and it got “read time out”.
Any ideas or advice?

Hi Ralf,

have you tried with the latest snapshot build of openhab (3.4-SNAPSHOT)? The PR for supporting ELV WS980WiFi was merged just before a week.
You can try the latest jar of this binding also with an openhab installation >= 3.3.

1 Like

Hi Andreas,
nope, I tried with an older snapshot OH 3.4 and OH 3.3, now it works with snapshot OH 3.4.0 #3028.
Thank you very much.
But still some Read Time Outs, the Thing alternate from Online to Offline (Communication Error), but the Items still updated.
And I have to restart the binding, I think still beta phase.
I am using a Raspberry PI4B 8GB with Debian Bullseye 64-bit

2022-08-01 10:57:48.810 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Wetterstation_UVStrahlung’ changed from 0.0381 W/m² to 0.0359 W/m²
2022-08-01 10:58:09.750 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘fineoffsetweatherstation:gateway:3899189126’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Read timed out
2022-08-01 10:58:25.757 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘fineoffsetweatherstation:gateway:3899189126’ changed from OFFLINE (COMMUNICATION_ERROR): Read timed out to ONLINE
2022-08-01 10:58:25.809 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Wetterstation_Innentemperatur’ changed from 24.4 °C to 24.5 °C

Is there another binding / service querying the gateway?

@doko has tested this binding and got similar issues.
Please try to remove any additional binding / service, which is querying the gateway.

1 Like

right, I used at the same time the windows application WeatherSmartIP, after I closed it, the connection are stable and the “read time out” disappear

Hi @Andy2003,
will the GW2001 aka EcoWitt WS90 also be supported in a future version?
Thanks Joerg

Hi Jörg,

is the weather station working with the WS-View app? If so, the binding should work as well.

Have you tried the latest binding (3.4-SNAPSHOT build of OpenHAB), to see, if it is working with your weather station.
You can also supply the trace log of the binding to let me analyse how your gateway responds to the current requests.

Hi @Andy2003,
I don’t have the weather station yet.
From what I read, it supports the WS-View Plus App.
Joerg

Hi @Andy2003,
I have an EcoWitt Wittboy which I believe is the WH90. I also have a WH57 Lightning detector. Thank you for the easy setup everything worked as expected. I am using just the UI in OH3.3 for all configuration.
The one issue I have, No Rain reading showing up in the channels. The WH90 has a piezo rain gauge so not sure if this is reporting differently.

Thanks Bill