I monitor power, temperature and humidity in my home. All are relatively fast moving sensors. Google Gauges gives me a snapshot of the immediate dynamic status of these sensors. It uses Websockets and response is immediate thanks to the great HA websockets implementation.
Grab this and put in your www directory. Edit to suit your needs.
Add to your configuration.yaml
panel_iframe:
google_guages:
title: Google Guages
icon: mdi:hand-pointing-right
url: http://host:8123/local/google-guages.html
First I’d like to say thank you for sharing this piece. I have a quick question. I’m using an api password on HA; do you have an idea on how i can enable that on the script.
You can provide an auth token as an option to the createConnection call. I’ve never had to do so; perhaps because I always access the Google Guages page from the HA user interface.
I have a problem adding my admin password to a javascript file which can be easily viewed.
function render(entities) {
_.forEach(guages, function(guage, key) {
try {
var svalue = entities[key].state;
guage["data"].setValue(0, 1, svalue);
guage["chart"].draw(guage["data"], guage["options"]);
} catch(e) {
// Uncomment to see all state read failures in console
// console.log("Error reading state for key: " + key);
status.innerHTML = "Error reading state for key: " + key;
}
});
}
google-guages.html:1 Error in event handler for (unknown): TypeError: Cannot read property 'autoPlayNotificationRequired' of undefined
at s.a.browsertype.c.a.Chrome.i.a.getBkGlobals.e (chrome-extension://fheoggkfdfchfphceeifdbepaooicaho/mcafee_wa_iframeplg.js:23:48793)