Giter Site home page Giter Site logo

hubitat-solaredge's People

Contributors

funzie19 avatar moshjeier avatar sburke781 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

hubitat-solaredge's Issues

Limit Exceeded Exception Not Being Handled

SolarEdge can throw a Limit Exceeded Exception (com.hubitat.app.exception.LimitExceededException) which does not have a getStatusCode() method. Thus it throws a MissingMethodException:

groovy.lang.MissingMethodException: No signature of method: com.hubitat.app.exception.LimitExceededException.getStatusCode() is applicable for argument types: () values: [] on line 461 (method queryOverviewEndpoint)
groovy.lang.MissingMethodException: No signature of method: com.hubitat.app.exception.LimitExceededException.getStatusCode() is applicable for argument types: () values: [] on line 406 (method queryEnergyEndpoint)

The Limit Exceeded Exception should be handled with a specific catch and code to possibly change the update frequency (or turn off updates?).

Site Power Flow Fails When Unsupported

Some SolarEdge installations do not support Site Power Flow, so the API call for currentPowerFlow returns empty/null object for siteCurrentPowerFlow (documented top of page 25 API manual). The code doesn't expect this scenario, throws a null pointer exception in querySitePowerFlowEndpoint() when it attempts to access the power flow data (like currentPower). Generic exception handler expects HttpResponseException and thus throws another exception when it tries to process the null exception. Recommend code add check for site power flow data:
if (r.data.siteCurrentPowerFlow) {
And log a warning that the site doesn't support that data.
Also recommend changing generic exception handler to specific HttpResponseException:
} catch (groovyx.net.http.HttpResponseException e) {

Hubitat error

Thanks for putting this together! Got everything working in Hubitat except current site power. Getting these errors in the logs. Any ideas?

dev:4902024-01-08 12:00:02.008 PMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method querySitePowerFlowEndpoint)
dev:4902024-01-08 12:00:01.994 PMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 11:50:00.965 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method querySitePowerFlowEndpoint)
dev:4902024-01-08 11:50:00.903 AMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 11:40:01.117 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method querySitePowerFlowEndpoint)
dev:4902024-01-08 11:40:00.946 AMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 11:30:01.167 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method querySitePowerFlowEndpoint)
dev:4902024-01-08 11:30:01.155 AMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 11:20:00.849 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method querySitePowerFlowEndpoint)
dev:4902024-01-08 11:20:00.825 AMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 11:10:00.904 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method querySitePowerFlowEndpoint)
dev:4902024-01-08 11:10:00.887 AMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 11:00:01.022 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method querySitePowerFlowEndpoint)
dev:4902024-01-08 11:00:01.010 AMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 10:50:00.938 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method querySitePowerFlowEndpoint)
dev:4902024-01-08 10:50:00.926 AMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 10:40:01.151 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method querySitePowerFlowEndpoint)
dev:4902024-01-08 10:40:00.990 AMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 10:30:01.147 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method querySitePowerFlowEndpoint)
dev:4902024-01-08 10:30:01.134 AMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 10:20:00.990 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method querySitePowerFlowEndpoint)
dev:4902024-01-08 10:20:00.965 AMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 10:11:06.426 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method getSitePowerFlow)
dev:4902024-01-08 10:11:06.407 AMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 10:10:00.854 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method querySitePowerFlowEndpoint)
dev:4902024-01-08 10:10:00.838 AMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 10:00:01.130 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method querySitePowerFlowEndpoint)
dev:4902024-01-08 10:00:01.117 AMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 09:50:00.934 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method querySitePowerFlowEndpoint)
dev:4902024-01-08 09:50:00.921 AMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 09:40:00.938 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method querySitePowerFlowEndpoint)
dev:4902024-01-08 09:40:00.925 AMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 09:32:29.626 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method getSitePowerFlow)
dev:4902024-01-08 09:32:29.607 AMerrorExceptionjava.lang.NullPointerException: Cannot get property 'currentPower' on null object
dev:4902024-01-08 09:31:53.888 AMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.NullPointerException.getStatusCode() is applicable for argument types: () values: [] on line 533 (method getSitePowerFlow)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.