Skip to content

Hubigraph cloud urls #3

@wizkidorg

Description

@wizkidorg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions