NEW frontpage.html - request comments

Moderator: leecollings

Heisenberg
Posts: 135
Joined: Monday 27 January 2014 14:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

NEW frontpage.html - request comments

Post 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?
Raspberry Pi Type B
Raspberry Pi Type B2
RFXCOMtrx433e
User avatar
bizziebis
Posts: 182
Joined: Saturday 19 October 2013 14:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8805
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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.
pvm
Posts: 550
Joined: Tuesday 17 June 2014 22:14
Target OS: NAS (Synology & others)
Domoticz version: 4.10538
Location: NL
Contact:

Re: NEW frontpage.html - request comments

Post 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?
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
vanputten80
Posts: 11
Joined: Sunday 04 January 2015 16:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post 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?
User avatar
bizziebis
Posts: 182
Joined: Saturday 19 October 2013 14:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8805
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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.
User avatar
mvveelen
Posts: 687
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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.
Attachments
Schermafbeelding 2015-01-13 om 18.07.16.png
Schermafbeelding 2015-01-13 om 18.07.16.png (106.03 KiB) Viewed 6870 times
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
Heisenberg
Posts: 135
Joined: Monday 27 January 2014 14:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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.
Attachments
Domoticz Monitor.png
Domoticz Monitor.png (165.44 KiB) Viewed 6860 times
Raspberry Pi Type B
Raspberry Pi Type B2
RFXCOMtrx433e
User avatar
mvveelen
Posts: 687
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by mvveelen »

NaN - Not a Number.

Maybe some numbers are expected in the div's / script you use?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by ThinkPad »

Or you have picked the wrong type for the cell (Status instead of Temp for example).
I am not active on this forum anymore.
Heisenberg
Posts: 135
Joined: Monday 27 January 2014 14:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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'],
Raspberry Pi Type B
Raspberry Pi Type B2
RFXCOMtrx433e
Slayer007
Posts: 29
Joined: Wednesday 18 June 2014 23:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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?
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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.
I am not active on this forum anymore.
Heisenberg
Posts: 135
Joined: Monday 27 January 2014 14:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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
Raspberry Pi Type B
Raspberry Pi Type B2
RFXCOMtrx433e
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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)
I am not active on this forum anymore.
Heisenberg
Posts: 135
Joined: Monday 27 January 2014 14:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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!
Raspberry Pi Type B
Raspberry Pi Type B2
RFXCOMtrx433e
User avatar
mbliek
Posts: 194
Joined: Friday 12 July 2013 14:08
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: the Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by mbliek »

If you use roomplan=0 all devices can be used
User avatar
mvveelen
Posts: 687
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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 :)
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by ThinkPad »

mbliek wrote:If you use roomplan=0 all devices can be used
Nice!
I am not active on this forum anymore.
sheriff
Posts: 9
Joined: Thursday 11 September 2014 19:48
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Contact:

Re: NEW frontpage.html - request comments

Post 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.
Last edited by sheriff on Wednesday 14 January 2015 20:49, edited 1 time in total.
Pietertje
Posts: 12
Joined: Monday 15 September 2014 11:18
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: 8281
Contact:

Re: NEW frontpage.html - request comments

Post by Pietertje »

Great work using new frontpage now, but I'm struggling to get sunset and sunrise listed. Can you give me a hint.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest