Openweather Moon-phase math not working anymore


#1

Has Openweather changed its API lately?

1) Give a description of the problem
This is on Hubitat. I have a piston that retrieves info from Openweather every 30 minutes. One of the parts determines the current moon phase. For some reason, I now get this error.

2) What is the expected behaviour?
The piston pulls daily.moon_phase info, and determines the label of the moon phase based on the percentage

3) What is happening/not happening?
I now get this error

+81ms ║Error retrieving JSON data part moon_phase[0] org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object ‘0.5’ with class ‘java.math.BigDecimal’ to class ‘java.util.Map’
+206ms ║Error retrieving JSON data part pop[7] org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object ‘0.01’ with class ‘java.math.BigDecimal’ to class ‘java.util.Map’

**4) Post a Green Snapshot of the piston


#3

assuming HE, what is the URL you are using so I can try this?


#4

Sorry, it’s Hubitat.


#5

https://openweathermap.org/history


#6

so what specific URL are you using? PM it if you don’t want it public.


#7

http://api.openweathermap.org/data/2.5/onecall?lat=xxx&lon=xxx&units=imperial&APPID=xxx


#8

So I found a couple variable references incorrect, below is the fixes

08%20PM

31%20PM


#9

Thank you. I guess OW made some changes.