Is the WS-View App working for your gateway?
The socket timeout is hard coded to 5 Seconds, this should be sufficient to query the gateway.
Do you have any other network issues?
Is the WS-View App working for your gateway?
The socket timeout is hard coded to 5 Seconds, this should be sufficient to query the gateway.
Do you have any other network issues?
WS-View app is working fine. No there are no network issues, at least none that I know of
Till now I get the values by parsing a .txt file delivered by the Weatherstation. As described in these guideline
Can you provide the whole trace log for this plugin? (Logger: org.openhab.binding.fineoffsetweatherstation.internal
)
What do you mean by this, do you manually configure the IP address?
If so, is it the right one of your gateway?
Oh sorry the autodiscovery also not works, this was the âadd manuellyâ button. But somehow the WS-View App is working. And Yes itâs the right IP.
Here the Trace log, including the auto discover:
2022-03-24 13:30:16.216 [DEBUG] [ry.FineOffsetGatewayDiscoveryService] - Discovery using socket on port 43444
==> /var/log/openhab/events.log <==
2022-03-24 13:30:49.056 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'fineoffsetweatherstation:gateway:57ab235858' changed from UNINITIALIZED to INITIALIZING
2022-03-24 13:30:49.067 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'fineoffsetweatherstation:gateway:57ab235858' changed from INITIALIZING to UNKNOWN
2022-03-24 13:30:49.070 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'fineoffsetweatherstation:gateway:57ab235858' changed from UNKNOWN to ONLINE
==> /var/log/openhab/openhab.log <==
2022-03-24 13:30:54.092 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'fineoffsetweatherstation:gateway:57ab235858' takes more than 5000ms.
2022-03-24 13:30:54.091 [WARN ] [ervice.FineOffsetGatewayQueryService] - executeCommand(CMD_READ_SENSOR_ID_NEW): failed to invoke command
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method) ~[?:?]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:115) ~[?:?]
at java.net.SocketInputStream.read(SocketInputStream.java:168) ~[?:?]
at java.net.SocketInputStream.read(SocketInputStream.java:140) ~[?:?]
at java.net.SocketInputStream.read(SocketInputStream.java:126) ~[?:?]
at org.openhab.binding.fineoffsetweatherstation.internal.service.FineOffsetGatewayQueryService.executeCommand(FineOffsetGatewayQueryService.java:112) ~[bundleFile:?]
at org.openhab.binding.fineoffsetweatherstation.internal.service.FineOffsetGatewayQueryService.getRegisteredSensors(FineOffsetGatewayQueryService.java:68) ~[bundleFile:?]
at org.openhab.binding.fineoffsetweatherstation.internal.handler.FineOffsetGatewayHandler.query(FineOffsetGatewayHandler.java:272) [bundleFile:?]
at org.openhab.binding.fineoffsetweatherstation.internal.handler.FineOffsetGatewayHandler.fetchAndUpdateSensors(FineOffsetGatewayHandler.java:126) [bundleFile:?]
at org.openhab.binding.fineoffsetweatherstation.internal.handler.FineOffsetGatewayHandler.initialize(FineOffsetGatewayHandler.java:116) [bundleFile:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
==> /var/log/openhab/events.log <==
2022-03-24 13:30:54.126 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'fineoffsetweatherstation:gateway:57ab235858' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Read timed out
2022-03-24 13:30:54.129 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'fineoffsetweatherstation:gateway:57ab235858' changed from OFFLINE (COMMUNICATION_ERROR): Read timed out to ONLINE
==> /var/log/openhab/openhab.log <==
2022-03-24 13:30:54.130 [DEBUG] [ervice.FineOffsetGatewayQueryService] - executeCommand(CMD_READ_FIRMWARE_VERSION), invalid response: FFFF501511456173795765617468657256312E362E32
2022-03-24 13:30:59.137 [WARN ] [ervice.FineOffsetGatewayQueryService] - executeCommand(CMD_READ_SSSS): failed to invoke command
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method) ~[?:?]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:115) ~[?:?]
at java.net.SocketInputStream.read(SocketInputStream.java:168) ~[?:?]
at java.net.SocketInputStream.read(SocketInputStream.java:140) ~[?:?]
at java.net.SocketInputStream.read(SocketInputStream.java:126) ~[?:?]
at org.openhab.binding.fineoffsetweatherstation.internal.service.FineOffsetGatewayQueryService.executeCommand(FineOffsetGatewayQueryService.java:112) ~[bundleFile:?]
at org.openhab.binding.fineoffsetweatherstation.internal.service.FineOffsetGatewayQueryService.fetchSystemInfo(FineOffsetGatewayQueryService.java:84) ~[bundleFile:?]
at org.openhab.binding.fineoffsetweatherstation.internal.handler.FineOffsetGatewayHandler.query(FineOffsetGatewayHandler.java:272) [bundleFile:?]
at org.openhab.binding.fineoffsetweatherstation.internal.handler.FineOffsetGatewayHandler.updateBridgeInfo(FineOffsetGatewayHandler.java:222) [bundleFile:?]
at org.openhab.binding.fineoffsetweatherstation.internal.handler.FineOffsetGatewayHandler.initialize(FineOffsetGatewayHandler.java:118) [bundleFile:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
==> /var/log/openhab/events.log <==
2022-03-24 13:30:59.144 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'fineoffsetweatherstation:gateway:57ab235858' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Read timed out
==> /var/log/openhab/openhab.log <==
2022-03-24 13:30:59.143 [INFO ] [ervice.FineOffsetGatewayQueryService] - Unexpected response to System Info!
==> /var/log/openhab/events.log <==
2022-03-24 13:30:59.168 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'fineoffsetweatherstation:gateway:57ab235858' changed from OFFLINE (COMMUNICATION_ERROR): Read timed out to ONLINE
It looks like there is a response to CMD_READ_FIRMWARE_VERSION
Your gateway seems to use a different protocol (version?).
E.G. the CMD_READ_FIRMWARE_VERSION
response does not contain any checksum
I guess that the protocol defined in this GitHub project may match the data.
There is also a document describing some requests and responses: https://github.com/RrPt/WS980/blob/master/Dokumentation/WS980_protokoll.docx?raw=true
When I implemented the binding I stumbled across this project, however the data format did not fit 100% to my gateway.
If you have some IT background, you can setup a proxy service, where you can sniff the data exchanged between the WS-App and your gateway. Iâve done it for my setup as well.
When you have some requests / responses captured I can take a look on it to see, if we can somehow integrate this protocol as well.
@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
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:
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.
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)
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.
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.