@koffienl Nice!
Especially the pool
-
One example at making your own user interface
-
@rikki78 said in One example at making your own user interface:
@koffienl Nice!
Especially the poolThx
The background is a stockphoto of a pool. Normally I have a picture of my wife and kids in the pool but didn’t want to post my wifi in bikini on the internetLike my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
Very nice ui! I really like the look and the ideas!
The background is a stockphoto of a pool. Normally I have a picture of my wife and kids in the pool but didn’t want to post my wifi in bikini on the internet
Little offtopic or just fun, but as I read this, I instandly couldnt get this out of my head! :D
-
I have been working on optimizing and cleaning my code. Not finished yet, but it’s a lot more modulair and out of the box now.:
- Any switch in pimatic will automaticly be represented on the GUI as long as you create a button in the HTML
- Any presence//contact in pimatic will automaticly be represented on the GUI as long as you create a device in the HTML
- Tabular pages are defined in a config, any page can have separate seasonal pages. New page/tab? Simply add to the config and create a DIV in the HTML and you are done. You can set in the config what tab is the default. You can simply disable a tab without removing from the config
- Background image or color is defined in the config per tab/season
- Load additional CSS for a specific tab in the config, when viewing a other tab the CSS is automaticly unloaded
- Extra config for the Nest tab. Simply put your thermostat, roomtemp and heating devices and all is working
Still a lot to do, but when this is finished you can easily deploy a GUI where you only have to create the HTML and some config to get you up and running.
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
I just published the files on github : https://github.com/koffienl/PimaticGUI/tree/master/PimaticGUI (you ONLY need the ‘pimaticgui’ directory, not the older ones (Basic & Template).
There is a wiki, but far from finished yet : https://github.com/koffienl/PimaticGUI/wikiPlease let me now when somethin isn’t working or when a bug is found
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
@koffienl tried your code but it keeps telling “Parsing devices…” on mobile. gonna check tomorrow why on my flapflop.
Non the less, your code will be very usefull for any future theme development. To be honest, it was waiting for someone to do the dirty work of which you two did. Thanks!!
Let 'dem theme’s roll
-
did you put in the correct info for connecting to pimatic in config.js ?
Try in Chrome , press F12, tab console and post the error hereLike my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
@koffienl yah i did. Currently on mobile so ill check it later.
-
@koffienl here;
MYIP/:16 GET http://MYIP/css/nest.css net::ERR_ABORTED pimatic-socket.js?v=1507395628393:65 Connecting to Pimatic API ... pimatic-socket.js?v=1507395628393:76 Connection to Pimatic API Established ... pimatic-socket.js?v=1507395628393:141 Parsing devices ... pimatic-socket.js?v=1507395628393:146 Uncaught TypeError: Cannot read property 'value' of undefined at Object.<anonymous> (pimatic-socket.js?v=1507395628393:146) at Function.each (jquery-1.10.2.js:671) at Socket.<anonymous> (pimatic-socket.js?v=1507395628393:144) at Socket.Emitter.emit (socket.io.js:1335) at Socket.onevent (socket.io.js:879) at Socket.onpacket (socket.io.js:837) at Manager.<anonymous> (socket.io.js:1197) at Manager.Emitter.emit (socket.io.js:1335) at Manager.ondecoded (socket.io.js:395) at Decoder.<anonymous> (socket.io.js:1197)
code line:
// Loop through all the devices to set correct display values and states $.each( devices, function( key, value ) { logging += devices[key].id + ': ' + devices[key].attributes[0].value+'; '; var AlreadyParsed = 0;
Modified the line, now i get;
Connection to Pimatic API Established ... pimatic-socket.js?v=1507396181613:141 Parsing devices ... pimatic-socket.js?v=1507396181613:302 Parsing devices done, show default page (Parent) include.js?v=1507396181538:50 Uncaught TypeError: Cannot read property '0' of undefined at Object.<anonymous> (include.js?v=1507396181538:50) at Function.each (jquery-1.10.2.js:671) at ToggleContent (include.js?v=1507396181538:15) at Object.<anonymous> (pimatic-socket.js?v=1507396181613:304) at Function.each (jquery-1.10.2.js:671) at Socket.<anonymous> (pimatic-socket.js?v=1507396181613:272) at Socket.Emitter.emit (socket.io.js:1335) at Socket.onevent (socket.io.js:879) at Socket.onpacket (socket.io.js:837) at Manager.<anonymous> (socket.io.js:1197)
-
First error : Looks like you have some weird device that doesn’t have a value. Do you have some out of the ordinary devices by any chance ?
Second error : I found your issue, let me explain : In the default config the first page called
Parent
has 2 child pages (Child1
andChild2
). This only works when you enter a valid device (on/off switch) in the config (parameterdevice
underSubPagesConfig
). You have a few options to solve this :- Configure a valid device for switching between the child pages
- Remove the section about subpages
- Set a other page (
Metro
for instance as"default": true
and theParent
page as"default": false,
I will update a config on github that doesn’t use the Parent with Child’s as default later.
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
@Gleno0h said in One example at making your own user interface:
@koffienl here;
MYIP/:16 GET http://MYIP/css/nest.css net::ERR_ABORTED pimatic-socket.js?v=1507395628393:65 Connecting to Pimatic API ... pimatic-socket.js?v=1507395628393:76 Connection to Pimatic API Established ... pimatic-socket.js?v=1507395628393:141 Parsing devices ... pimatic-socket.js?v=1507395628393:146 Uncaught TypeError: Cannot read property 'value' of undefined at Object.<anonymous> (pimatic-socket.js?v=1507395628393:146) at Function.each (jquery-1.10.2.js:671) at Socket.<anonymous> (pimatic-socket.js?v=1507395628393:144) at Socket.Emitter.emit (socket.io.js:1335) at Socket.onevent (socket.io.js:879) at Socket.onpacket (socket.io.js:837) at Manager.<anonymous> (socket.io.js:1197) at Manager.Emitter.emit (socket.io.js:1335) at Manager.ondecoded (socket.io.js:395) at Decoder.<anonymous> (socket.io.js:1197)
code line:
// Loop through all the devices to set correct display values and states $.each( devices, function( key, value ) { logging += devices[key].id + ': ' + devices[key].attributes[0].value+'; '; var AlreadyParsed = 0;
Could you add the following line above the line
logging += devices[key].id + ': ' + devices[key].attributes[0].value+'; ';
?
Add :console.log(devices[key])
Save the file and do a refresh with F12 console. The last device before the error should give some information.
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
@koffienl Yeah that helped out. I removed 2 plugins but kept the devices, idk why i kept them, but they gave the error.
Now, i get this one(have added console.log to it);
Parsing devices done, show default page (Parent) include.js?v=1507408557601:49 {name: "Parent", default: true, disabled: false, hasSubPages: true, SubPagesConfig: Array(1), …} include.js?v=1507408557601:50 Uncaught TypeError: Cannot read property '0' of undefined at Object.<anonymous> (include.js?v=1507408557601:50) at Function.each (jquery-1.10.2.js:671) at ToggleContent (include.js?v=1507408557601:15) at Object.<anonymous> (pimatic-socket.js?v=1507408557687:305) at Function.each (jquery-1.10.2.js:671) at Socket.<anonymous> (pimatic-socket.js?v=1507408557687:273) at Socket.Emitter.emit (socket.io.js:1335) at Socket.onevent (socket.io.js:879) at Socket.onpacket (socket.io.js:837) at Manager.<anonymous> (socket.io.js:1197)
Net perse a problem because it functions normal, and the console log keeps updating the value’s so no problem, but a fix would be nice
-
That error (include.js on line 50) is cause by not defining a device/switch for the
Parent
page. See my earlier response about that@koffienl said in One example at making your own user interface:
Second error : I found your issue, let me explain : In the default config the first page called
Parent
has 2 child pages (Child1
andChild2
). This only works when you enter a valid device (on/off switch) in the config (parameterdevice
underSubPagesConfig
). You have a few options to solve this :- Configure a valid device for switching between the child pages
- Remove the section about subpages
- Set a other page (
Metro
for instance as"default": true
and theParent
page as"default": false,
I will update a config on github that doesn’t use the Parent with Child’s as default later.
https://github.com/koffienl/PimaticGUI/blob/master/PimaticGUI/js/config.js
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
@koffienl my bad, missed that post. Ill look into it later.
I tought i had posted the following but somehow it wasnt. Your nest css isnt loading, you should remove the / infront of the path;
<link rel=“stylesheet” type=“text/css” href="/css/nest.css"> -
@Gleno0h said in One example at making your own user interface:
@koffienl my bad, missed that post. Ill look into it later.
I tought i had posted the following but somehow it wasnt. Your nest css isnt loading, you should remove the / infront of the path;
<link rel=“stylesheet” type=“text/css” href="/css/nest.css">thanks, done
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
@Gleno0h said in One example at making your own user interface:
@koffienl my bad, missed that post. Ill look into it later.
Did you find some time to test it ?
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
@koffienl no not yet. Busy at work. Maybe tomorrow, otherwise friday
-
@koffienl Setting the default tab fixed the problem.
-
How can i get historical data via socket.io? Maybe the last 5 temperature values?
Thanks.