Giter Club home page Giter Club logo

hubitat's People

Contributors

tchoward avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hubitat's Issues

Snaked case parameters don't work

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)

Time Line graph not working

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).

image

image

Hubigraph cloud urls

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.

no such property: DAY for class java.util.Calendar

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.

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.