Page 3 of 66

NEW frontpage.html - request comments

Posted: Monday 12 January 2015 22:54
by Heisenberg
Thnx for sharing bizziebiz! I am now using 'your' frontpage.html but can't get the camera stream. In Domoticz I can see all my cameras. I then copied the url into the frontpage.html but only get a screenshot of the ip cam for 1 second and then it stopped. What am I doing wrong?

Re: NEW frontpage.html - request comments

Posted: Tuesday 13 January 2015 6:39
by bizziebis
It's a little embedde javascript inside the image tag which needs to be right. You need to put in "your camera url"&t= or ?t=

That last part is important because it will write a random time tag like t=752554822 behind the url forcing the image to be reloaded.

Re: NEW frontpage.html - request comments

Posted: Tuesday 13 January 2015 12:40
by pvm
mvveelen wrote: ...
Today I managed to get the background color to change when the sun sets and when the sun rises. It uses the virtual switch 'IsDark' that I use. And when the outdoor temperature gets below 0, the cell color of the outside temperature gets blue :)
Do you have a code snippet? Do you switch css?

Re: NEW frontpage.html - request comments

Posted: Tuesday 13 January 2015 12:45
by vanputten80
Heisenberg wrote:Thnx for sharing bizziebiz! I am now using 'your' frontpage.html but can't get the camera stream. In Domoticz I can see all my cameras. I then copied the url into the frontpage.html but only get a screenshot of the ip cam for 1 second and then it stopped. What am I doing wrong?
Had the same. My camera needs a password to show a screenshot of my cam. What I did was loging on to my camera via IE and safe password. Now domoticz is loading everytime the camera. Works fine. Maybe its possible to add your credentials in the URL in the code?

Another question, is it possible to get train information in the latest dashboard? From NS?

Re: NEW frontpage.html - request comments

Posted: Tuesday 13 January 2015 17:47
by bizziebis
Remember your frontpage.html is not secured when using the login page option in Domoticz. So using a url with credentials is not recommended when Domoticz is connected to the outside world. The best way would be to add the camera to Domoticz with the credentials in the url. That way you can use the safe internal Domoticz url for viewing your camera, like you see in my html.

Re: NEW frontpage.html - request comments

Posted: Tuesday 13 January 2015 18:12
by mvveelen
pvm wrote:
mvveelen wrote: ...
Today I managed to get the background color to change when the sun sets and when the sun rises. It uses the virtual switch 'IsDark' that I use. And when the outdoor temperature gets below 0, the cell color of the outside temperature gets blue :)
Do you have a code snippet? Do you switch css?
Yes, sure :

frontpage.html -> http://pastebin.com/rxYpDqtt
frontpage.css -> http://pastebin.com/gCjTt8af

And this is what I have at the moment. It would be great if someone could get a slider (or a + / -) in one of the div's where we can set the level of a dimmer.

Re: NEW frontpage.html - request comments

Posted: Tuesday 13 January 2015 20:02
by Heisenberg
bizziebis wrote:It's a little embedde javascript inside the image tag which needs to be right. You need to put in "your camera url"&t= or ?t=

That last part is important because it will write a random time tag like t=752554822 behind the url forcing the image to be reloaded.

I got the camera working now! Thanx for the tip!
But now some switches don't show. What does NaN means? See attached picture.

Re: NEW frontpage.html - request comments

Posted: Tuesday 13 January 2015 20:56
by mvveelen
NaN - Not a Number.

Maybe some numbers are expected in the div's / script you use?

Re: NEW frontpage.html - request comments

Posted: Tuesday 13 January 2015 20:58
by ThinkPad
Or you have picked the wrong type for the cell (Status instead of Temp for example).

Re: NEW frontpage.html - request comments

Posted: Wednesday 14 January 2015 11:11
by Heisenberg
ThinkPad wrote:Or you have picked the wrong type for the cell (Status instead of Temp for example).
NaN - Not a Number.

Maybe some numbers are expected in the div's / script you use?
That's strange because only the 'Radio Badkamer' doesn't work and the rest do show up in frontpage.html
These are my settings:

['35', 'Status', 'cell1', 'Lampen Tuin',],
['43', 'Temp', 'cell2', 'Woonkamer (°C)'],
['15', 'Status', 'cell3', 'Mechanische Ventilatie',],

['29', 'Status', 'cell4', 'Led Verwarming',],
['34', 'Status', 'cell5', 'Led Keuken',],
['19', 'Status', 'cell6', 'Radio Keuken',],
['50', 'Status', 'cell7', 'Radio Zolder'],

['49', 'Status', 'cell9', 'Radio Badkamer'],
['47', 'Status', 'cell10', 'Woonkamer Verlichting',],
['55', 'Status', 'cell11', 'Lamp Slaapkamer Master',],
['32', 'Status', 'cell12', 'Lamp Slaapkamer 2',],
['36', 'Status', 'cell13', 'Lamp Werkkamer'],

['25', 'Status', 'cell14', 'Lamp Bureau'],
['44', 'Status', 'cell15', 'Ledstrip Woonkamer',],
['16', 'Status', 'cell16', 'Lamp Hal',],
['37', 'Status', 'cell17', 'Lamp Cabinet',],
['40', 'Data', 'cell18', 'CPU Usage'],

Re: NEW frontpage.html - request comments

Posted: Wednesday 14 January 2015 11:47
by Slayer007
That's strange because only the 'Radio Badkamer' doesn't work and the rest do show up in frontpage.html
Did you add it to your floorplan?

Re: NEW frontpage.html - request comments

Posted: Wednesday 14 January 2015 11:51
by ThinkPad
Slayer007 wrote:
That's strange because only the 'Radio Badkamer' doesn't work and the rest do show up in frontpage.html
Did you add it to your floorplan?
I think that is the issue indeed. Every device you want to show on the frontpage.html has to be included in the floorplan that you use for this page.

Re: NEW frontpage.html - request comments

Posted: Wednesday 14 January 2015 12:36
by Heisenberg
I guess you mean adding devices to the Roomplan instead of Floorplan? Yes, I follow the instructions as described in the first post.
Strange thing is that all the other devices are visible but only 'Radio Badkamer' seems not to work. I also try to put in in another cell but it didn't help

Re: NEW frontpage.html - request comments

Posted: Wednesday 14 January 2015 13:16
by ThinkPad
What kind of device is it in Domoticz? Some kind of switch i guess? Maybe remove and add to Domoticz again? (if not too difficult)

Re: NEW frontpage.html - request comments

Posted: Wednesday 14 January 2015 13:19
by Heisenberg
ThinkPad wrote:What kind of device is it in Domoticz? Some kind of switch i guess? Maybe remove and add to Domoticz again? (if not too difficult)
It's a dummy switch. I have two internetradio's. The 'Radio Kitchen' works correctly but 'Radio Badkamer' not..

Edit: I removed the device and add it again in Domoticz. It works! Thanx for the suggestion ThinkPad!

Re: NEW frontpage.html - request comments

Posted: Wednesday 14 January 2015 13:35
by mbliek
If you use roomplan=0 all devices can be used

Re: NEW frontpage.html - request comments

Posted: Wednesday 14 January 2015 13:53
by mvveelen
mbliek wrote:If you use roomplan=0 all devices can be used
Good to know! Thanks. Now I can even delete my 'dummy'-roomplan I set up for this frontpage.html :)

Re: NEW frontpage.html - request comments

Posted: Wednesday 14 January 2015 15:02
by ThinkPad
mbliek wrote:If you use roomplan=0 all devices can be used
Nice!

Re: NEW frontpage.html - request comments

Posted: Wednesday 14 January 2015 18:18
by sheriff
mvveelen wrote:NaN - Not a Number.

Maybe some numbers are expected in the div's / script you use?
No i had the same problem but somewhere in the code of frontpage.html is some "dirty" code which does some extra formatting for the output of certain idx numbers which are only needed for the creator of the frontpage.html.
Search the frontpage.html for the idx number which gives the NaN error and int the code change the number to a very high number (5 to 555555) then idx 5 will work fine and extra formatting is disabled.

Re: NEW frontpage.html - request comments

Posted: Wednesday 14 January 2015 18:41
by Pietertje
Great work using new frontpage now, but I'm struggling to get sunset and sunrise listed. Can you give me a hint.