Looks good. I’ve implemented it and the 1404-ip seems to work for my 1002-wifi as well, at least for what I’ve tried. (They’re the same base units, just different interfaces).
Thank you!
I’m not sure if there’s something that can be done to better handle celsius vs fahrenheit – I did add a transform JS file, but perhaps OpenHAB has some built-in selectors?
The binding supports UOM (units of measure) functionality. If you define your items as Number:Temperature and have your locale configured in the openHAB system config, it should show the right units.
Great. If you notice any values that are missing, we can do a thing type for the 1002.
I have a ambient weather station and I can’t get it to communicate with OH. I downloaded eclipse so I could modify the key but now I can’t find anywhere to modify the .jar file.
Battery Data: “All Batteries OK” on the web UI and mobile app. I haven’t poked at the API. The 2902A and the 2000 use the same “Osprey” array. Just different consoles. I’m pretty sure they report the same way, and I’ve noticed my software version matches that of the 2902. They’re cut from the same cloth. I noticed another 2902 user reported same with battery. I’ll poll the API results and get back to ya… if I remember.
Oooh, I was hoping the mainline binding was updated to support these restricted APIs from “I Buy Mainframes” Yay! I think you might be my favorite developer this week.
The weather station needs to upload data to ambientweather.net in order to be able to use this binding.
OTOH, I see this station uploads to Weather Underground. That being the case, you can use my WeatherCompany binding to get access to your PWS data, as well as a 5 day forecast.
I got this working with my 2902A in just a few minutes! Thanks for the info! If you happen to have a sitemap file which has the icons per item that’d be great! The one I found here:
didn’t have the fun icons you have going. If not, I’ll go through the icon set and apply them.
Also, the Application key auto-approved for me. I didn’t have to contact support.
I’ll poke around to see if the temperature icon can be dynamic like some of the others. For now I’m using the “heating” icon as the needle moves as the temp changes
Thought I’d post, not sure if I’m the only one seeing this sometimes in my logs and something that looks like a Java error about it too: 2019-09-23 10:14:55.008 [WARN ] [pse.smarthome.core.items.GenericItem] - failed notifying listener 'org.eclipse.smarthome.model.rule.runtime.internal.engine.RuleEngineImpl@15ef8f' about state update of item WS2902A_RainHourlyRate: Can not compare incompatible units java.lang.IllegalArgumentException: Can not compare incompatible units. at org.eclipse.smarthome.core.library.types.QuantityType.compareTo(QuantityType.java:175) ~[133:org.openhab.core:2.5.0.M3] at org.eclipse.smarthome.core.library.types.QuantityType.equals(QuantityType.java:157) ~[133:org.openhab.core:2.5.0.M3] at org.eclipse.smarthome.core.items.GenericItem$1.run(GenericItem.java:261) [133:org.openhab.core:2.5.0.M3] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?] at java.lang.Thread.run(Thread.java:748) [?:?] 2019-09-23 10:15:57.102 [ERROR] [me.core.internal.events.EventHandler] - Creation of ESH-Event failed, because one of the registered event factories has thrown an exception: Error invoking #valueOf(String) on class 'org.eclipse.smarthome.core.library.types.QuantityType' with value '0.0 1/(h·h)'.
Here are my item file entries, with the mm/h commented out:
// Use this if your units are SI //Number:Speed WS2902A_RainHourlyRate "Rain Hourly Rate [%.1f mm/h]" { channel="ambientweather:ws2902a:7df2e2c2:weatherDataWs2902a#rainHourlyRate" } // Use this if your units are Imperial Number:Speed WS2902A_RainHourlyRate "Rain Hourly Rate [%.2f in/h]" { channel="ambientweather:ws2902a:7df2e2c2:weatherDataWs2902a#rainHourlyRate" }
Any thoughts? I’ll poke around on it a bit more too.
Thanks for reporting. It looks like this exception is being thrown from a rule. Can you post the body of the rule that is attempting to reference the WS2902A_RainHourlyRate item?
Hi Mark,
I actually don’t even have it in a rule, just my sitemap. My Openhab system is set to Imperial too. I have it set to mm/h right now but I receive this error sometimes:
2019-09-25 08:50:58.565 [WARN ] [pse.smarthome.core.items.GenericItem] - failed notifying listener 'org.eclipse.smarthome.model.rule.runtime.internal.engine.RuleEngineImpl@15ef8f' about state update of item WS2902A_RainHourlyRate: Unable to convert to system unit during compare. java.lang.IllegalArgumentException: Unable to convert to system unit during compare. at org.eclipse.smarthome.core.library.types.QuantityType.compareTo(QuantityType.java:172) ~[133:org.openhab.core:2.5.0.M3] at org.eclipse.smarthome.core.library.types.QuantityType.equals(QuantityType.java:157) ~[133:org.openhab.core:2.5.0.M3] at org.eclipse.smarthome.core.items.GenericItem$1.run(GenericItem.java:261) [133:org.openhab.core:2.5.0.M3] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?] at java.lang.Thread.run(Thread.java:748) [?:?] 2019-09-25 08:50:58.565 [WARN ] [pse.smarthome.core.items.GenericItem] - failed notifying listener 'org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl@14077d3' about state update of item WS2902A_RainHourlyRate: Unable to convert to system unit during compare. java.lang.IllegalArgumentException: Unable to convert to system unit during compare. at org.eclipse.smarthome.core.library.types.QuantityType.compareTo(QuantityType.java:172) ~[133:org.openhab.core:2.5.0.M3] at org.eclipse.smarthome.core.library.types.QuantityType.equals(QuantityType.java:157) ~[133:org.openhab.core:2.5.0.M3] at org.eclipse.smarthome.core.items.GenericItem$1.run(GenericItem.java:261) [133:org.openhab.core:2.5.0.M3] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?] at java.lang.Thread.run(Thread.java:748) [?:?]