Davis weather via IP

Well I’m back to square one.
The values on my sitemap didn’t update since yesterday so I tried to restart openhab2. This resulted in the same failure as before. No ‘ProperlyConfigured’ message…

Kinda stuck on what to do tbh.

I redownloaded your provided jar and placed it in /usr/share/openhab2/addons.
Moved the old jar to somewhere else.
Suddenly it works again and is now ProperlyConfigured… I can provide Logs if you want me to, I don’t really understand whats happening.

Can you tell me what you changed in this version?

Here’s the diff.

@@ -159,8 +159,13 @@ public class DavisBinding extends AbstractActiveBinding<DavisBindingProvider> im
     }

     public void updated(Dictionary<String, ?> config) throws ConfigurationException {
-        logger.trace("update() method is called!");
-        if (config != null) {
+        if (config == null) {
+            logger.warn("updated() method was called, but no configuration was provided. Nothing to do!");
+            return;
+        }
+
+        logger.trace("updated() method was called. Processing configuration...");
+
         // to override the default refresh interval one has to add a
         // parameter to openhab.cfg like <bindingName>:refresh=<intervalInMs>
         String refreshIntervalString = (String) config.get("refresh");
@@ -172,24 +177,27 @@ public class DavisBinding extends AbstractActiveBinding<DavisBindingProvider> im
         String newHostName = (String) config.get("hostName"); //$NON-NLS-1$

         if (StringUtils.isBlank(newPort) && StringUtils.isBlank(newHostName)) {-                logger.error("neither port neither hostname configured, no communication possible");
+            logger.warn("Neither port nor hostname were configured. No communication possible.");
             setProperlyConfigured(false);
-            } else {
+            return;
+        }
+
         if (StringUtils.isNotBlank(newPort) && StringUtils.isNotBlank(newHostName)) {
-                    logger.warn(
-                            "both properties port and hostname configured, only one should be set according communication type serial (port) or IP (hostname)");
+            logger.warn("Both port and hostname were configured, but only one should"
+                +" be set depending on communication type (port for serial"
+                +" communication or hostname for IP communication.");
+            setProperlyConfigured(false);
+            return;
         }

         if (StringUtils.isNotBlank(newPort)) {
             typeIsSerial = true;
             port = newPort;
             readResponseWaitTime = defaultSerialReadResponseWaitTime;
-                } else if (StringUtils.isNotBlank(newHostName)) {
+        } else { // newHostName is not blank
             typeIsSerial = false;
             hostName = newHostName;
             readResponseWaitTime = defaultIpReadResponseWaitTime;
-                } else {
-                    // not possible, already treated above
         }

         String readResponseWaitTimeString = (String) config.get("readResponseWaitTime");
@@ -197,24 +205,21 @@ public class DavisBinding extends AbstractActiveBinding<DavisBindingProvider> im
             try {
                 readResponseWaitTime = Long.parseLong(readResponseWaitTimeString);
             } catch (NumberFormatException e) {
-                        logger.warn("ignoring property 'readResponseWaitTime', not numeric");
+                logger.warn("Ignoring value for property 'readResponseWaitTime': not numeric");
             }
         }

         if (typeIsSerial) {
-                    logger.info("ProperlyConfigured on port {} with readResponseWaitTime on ", port,
-                            readResponseWaitTime);
+            logger.info("ProperlyConfigured on port {} and readResponseWaitTime of {}",
+                port, readResponseWaitTime);
         } else {
-                    logger.info("ProperlyConfigured with hostName {} with readResponseWaitTime on ", hostName,
-                            readResponseWaitTime);
+            logger.info("ProperlyConfigured with hostName {} and readResponseWaitTime of {}",
+                hostName, readResponseWaitTime);
         }

         setProperlyConfigured(true);
     }

-        }
-    }
-
     public void openPort() throws InitializationException {
         if (typeIsSerial) {
             CommPortIdentifier portIdentifier;

The binding installation is so weird tbh.
When I install the version from the pull request, the binding starts but the RefreshService is not.
As soon as I replace the PR version one with yours the binding and the RefreshService are correctly starting and everything works as expected.

These changes in the code aren’t probably what’s changing the behaviour tho.

I am new to this thread and have been reading up on it. I am looking to purchase a Davis Vantage Vue or Vantage Pro 2 weather station and want to use it with OpenHAB 2.4 (the fully released version, not the snapshot) and have a couple questions:

  1. Are both devices compatible with 2.4?
  2. What adaptor do i need to buy to connect them with OpenHAB

Thanks in advance!

I think it should work with both of those, but I can’t say for sure.

To Quote the Documentation of the Binding:

The openHAB Davis binding supports reading data from Davis weather stations. Most Davis weather stations should be supported.

Unfortunately the binding doesnt work with the WeatherLinkIP adaptor…or at least I cant get it to work with it and others have said the same. I am uploading my data to Weather Underground and using that binding to pull it back down to OpenHAB.

Can you try what I described over here? Davis weather via IP

I got the binding to work by replacing the version available on github with the updated jar provided by namraccr. But first the github one had to be in addons/

Got it working. Forgot to chown the binding file in the addons folder. all fixed now.

Hello all,

I followed this guide and I also made sure to chown: -hR openhab:openhab /usr/share/openhab2/addons/org.openhab.binding.davis-1.12.0-SNAPSHOT.jar

Not sure what else I have to do, but I cannot get the binding to work. Here is what my log is showing:

2019-10-26 14:11:44.526 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.davis-1.12.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.davis [225]
Unresolved requirement: Import-Package: org.openhab.core.binding

Thank you.

I am running 2.5.0.SNAPSHOT on Ubuntu Server 18

Hey I just upgraded to OH 3.1 and the Davis binding isn’t working. i use the Weatherlink IP BTW

Binding version:

1.15.0.202002261230

Any chance we can get this updated? I love having my PWS info integrated into openHAB.
@namraccr

1 Like

Not by me. I haven’t had a functioning build system for OH since somewhere near the beginning of OH3.

I appreciate the reply. Do you know anyone else on the forum who would be capable of doing it?

The real problem is finding someone who has the time. You’ll probably get the best result by making a feature request in the repo and then either attaching a bounty to it or making a “Help Wanted” post here in the forum (or both!).

I don’t have much experience with this kind of stuff but wouldn’t mind trying to do it myself. Are there any resources that could point me in the right direction?

i use kta 282 (ocean control) to tranform data of davis in modbus data… only chances…