tchoward / hubitat Goto Github PK
View Code? Open in Web Editor NEWHubitat Code and Projects
License: Apache License 2.0
Hubitat Code and Projects
License: Apache License 2.0
In Hubigraph Long Term Storage, my lore being flooded with the groovy exception MissingPropertyException, as well as a NullPointerException as follows:
app:2372021-12-06 08:00:01.086 pm errorFind file Enphase IQ Combiner IQ 3 (energy) :: Connection Exception: groovy.lang.MissingPropertyException: No such property: DAY for class: java.util.Calendar
app:2372021-12-06 08:00:01.081 pm errorFind file Enphase IQ Combiner IQ 3 (power) :: Connection Exception: groovy.lang.MissingPropertyException: No such property: DAY for class: java.util.Calendar
app:2372021-12-06 08:00:00.470 pm errorFind file Enphase IQ Combiner IQ 3 (efficiency) :: Connection Exception: java.lang.NullPointerException: Cannot get property 'date' on null object
The graphs render correctly, as best as I can tell, but I suspect the issue is that I only see one day's worth of graphing because of this error, as I suspect the file is not being created, or updated correctly, due to the above exception.
All over in the code are blocks like:
const splitStr = orderStr.split('_');
const id = splitStr[1];
const attribute = splitStr[2];
const events = graphData[id][attribute];
This breaks if your device has a parameter like production_energy_today
. Most likely creating an "order string" like this is just a bad idea. Instead of concatenating multiple values into a string, why not just pass multiple values around or even a JSON object?
But I think in many cases a brittle fix might be something like const attribute = splitStr.slice(2).join('_')
which will re-construct the original attribute name. This works so long as "attribute" was the last item in the order string (eg it'll work for attribute_38_consumption_energy_today
but won't work for things like attribute_consumption_energy_today_38
)
Trying to make a "Time Line" and it wont load. If I copy and paste the "Local Graph Url" into a new browser I get a white screen and these errors in the dev console. I have installed via package manger and I just did a repair also to be sure I was up to date. I can see the HubiGraph.js file in the files on my hub but it has that package ID prefixing it (which is correct per the manual install instructions).
Support cloud.hubitat.com urls (remoteendpointurl).
Similar to the following for getData in the time graph, and to get the main /graph api url for the iframe loader)
if (location.hostname === "cloud.hubitat.com") {
// Cloud
return jQuery.get("${state.remoteEndpointURL}getData/?access_token=${state.endpointSecret}", (data) => {
console.log("Got Graph Data");
console.log(data);
unparsedData = data;
});
} else {
// Local
return jQuery.get("${state.localEndpointURL}getData/?access_token=${state.endpointSecret}", (data) => {
console.log("Got Graph Data");
console.log(data);
unparsedData = data;
});
}
P.S. I'm new to hubitat code and not sure of all the url formatting and requirements to make the cloud work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.