NEW frontpage.html - request comments
Moderator: leecollings
- mvveelen
- Posts: 678
- 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
Found it. Going to try to get the button the way I want it
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- Siewert308SW
- Posts: 288
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
Great...mvveelen wrote:Found it. Going to try to get the button the way I want it
Just started working on the popup.
This how i got it now.
Click the lock and the popup appears on screen.
Now let e see if i can include the secpanel as i want it to...
- Attachments
-
- Naamloos.png (95.5 KiB) Viewed 3119 times
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- mvveelen
- Posts: 678
- 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
Hmmm...problem with the 'Status' of the alarm-switch is that it isn't a real switch that changes the status to On or Set or Armed or anything else. It only gives me the status 'Normal'. Setting the alarm doesn't change anything.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- Siewert308SW
- Posts: 288
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
Okay, haven't tested it so couldn't/didn't know.mvveelen wrote:Hmmm...problem with the 'Status' of the alarm-switch is that it isn't a real switch that changes the status to On or Set or Armed or anything else. It only gives me the status 'Normal'. Setting the alarm doesn't change anything.
btw: how did you insert the keypad in the popup?
Seems my layout is screwed up after i try to include the entire page remotely or inserted manually.
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- mvveelen
- Posts: 678
- 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
See if you can use my code for it.
Temp. downloadlink here: LINK
In this package are also some unused icons, but also the code for the UP and DOWN buttons to be grey when not used. It's the frontpage I use at the moment. But.....work in progress
Temp. downloadlink here: LINK
In this package are also some unused icons, but also the code for the UP and DOWN buttons to be grey when not used. It's the frontpage I use at the moment. But.....work in progress
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- Siewert308SW
- Posts: 288
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
Thx...mvveelen wrote:See if you can use my code for it.
Temp. downloadlink here: LINK
In this package are also some unused icons, but also the code for the UP and DOWN buttons to be grey when not used. It's the frontpage I use at the moment. But.....work in progress
Implanted your stuff to see if it worked on my 7" tablet.
It does popup up and seems like it does work.
Could be my tablet but loading takes a few seconds.
- Attachments
-
- IMAG0882_resize_resize.jpg (222.06 KiB) Viewed 3112 times
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- mvveelen
- Posts: 678
- 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
I think that might be the bottleneck
From work, via OpenVPN on the Pi, it takes me < 1 second to load. But hey, it only has to load once, so no big deal is iet ?
If you find a solution for changing the status of the icon: let me know what variable I could use, then I will alter the code. And if you know a way of getting the text in the description field of the cell: let me know too?
From work, via OpenVPN on the Pi, it takes me < 1 second to load. But hey, it only has to load once, so no big deal is iet ?
If you find a solution for changing the status of the icon: let me know what variable I could use, then I will alter the code. And if you know a way of getting the text in the description field of the cell: let me know too?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- Siewert308SW
- Posts: 288
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
Working on it...mvveelen wrote:I think that might be the bottleneck
From work, via OpenVPN on the Pi, it takes me < 1 second to load. But hey, it only has to load once, so no big deal is iet ?
If you find a solution for changing the status of the icon: let me know what variable I could use, then I will alter the code. And if you know a way of getting the text in the description field of the cell: let me know too?
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- Siewert308SW
- Posts: 288
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
I had the idea to be a smartass.mvveelen wrote:I think that might be the bottleneck
From work, via OpenVPN on the Pi, it takes me < 1 second to load. But hey, it only has to load once, so no big deal is iet ?
If you find a solution for changing the status of the icon: let me know what variable I could use, then I will alter the code. And if you know a way of getting the text in the description field of the cell: let me know too?
I had the idea to create a new virtual switch and let it controled by the secpanel via blocky.
Code: Select all
If Security = Armed
Then set <virtual switch> = on
Then i had the idea to write a extra part in de frontpage.js
But seems the iframe is opened as it should be.
But it opens as a complete new window.
Code: Select all
// Replace ON and OFF for the virtual switch 'Alarm' by images
if(item.idx == '173' && vdata == 'Off'){
vdata=new String(vdata).replace( "Off","<a href class=iframe src=secpanel/index.html><img src=icons/alarm_off.png align=bottom></a>"); // Normal
}
if(item.idx == '173' && vdata == 'On'){
vdata=new String(vdata).replace( "On","<a href class=iframe src=secpanel/index.html><img src=icons/alarm_on.png align=bottom></a>"); // Armed
}
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- mvveelen
- Posts: 678
- 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
That has to do with the general code that is used when you click on a switch. That might be something to solve, but I first tried what you did....I've tried your setup with using a virtual switch, but it never turns ON. It only shows the OFF in the log file and not the ON status. Does it show the ON in your setup?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- Siewert308SW
- Posts: 288
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
it does..mvveelen wrote:That has to do with the general code that is used when you click on a switch. That might be something to solve, but I first tried what you did....I've tried your setup with using a virtual switch, but it never turns ON. It only shows the OFF in the log file and not the ON status. Does it show the ON in your setup?
Code: Select all
2015-02-13 17:09:47.782 Event: triggered: Inbraak Secpanel Sleep_1
2015-02-13 17:09:47.787 Event: triggered: Inbraak Secpanel Away_1
2015-02-13 17:09:47.795 Event: triggered: test_3
Fri Feb 13 17:09:47 2015 (System) Domoticz Security Status
2015-02-13 17:09:48.121 (Alarm Home_Sleep) Lighting 2 (Alarm Sleep)
2015-02-13 17:09:48.166 (Security Panel) Lighting 2 (Security Panel)
- Attachments
-
- almstatus 2.png (222.21 KiB) Viewed 3105 times
-
- almstatus 1.png (281.84 KiB) Viewed 3105 times
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
-
- Posts: 105
- Joined: Sunday 02 February 2014 23:57
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Portugal
- Contact:
Re: NEW frontpage.html - request comments
on mine heater i have put letter color change with temperature like that
Code: Select all
if(item.idx == '6' && vdata < 17){ // Temperatura muda cor conforme grau Cº (Interior)
alarmcss=';color:#0000FF;';
} else if (item.idx == '6' && vdata < 20) {
alarmcss=';color:#FF8000;';
} else if (item.idx == '6' && vdata < 50) {
alarmcss=';color:#FF0A0A;';
-
- Posts: 105
- Joined: Sunday 02 February 2014 23:57
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Portugal
- Contact:
Re: NEW frontpage.html - request comments
for control blind i have to add this code
because the status are "Closed" and "Open"
Code: Select all
if (vdata == 'Closed' ) {
switchclick = 'onclick="SwitchToggle('+item.idx+', \'On\');(\'switch\', '+switch_on_timeout+', '+txt_switch_on+')"';
alarmcss=';color:#E24E2A;';
vdata = txt_off;
}
if (vdata == 'Open' ) {
switchclick = 'onclick="SwitchToggle('+item.idx+', \'Off\');(\'switch\', '+switch_off_timeout+', '+txt_switch_off+')"';
alarmcss=';color:#1B9772;';
vdata = txt_on;
- mvveelen
- Posts: 678
- 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
I've managed to get a cell with a button for the security panel. When you click on it, a pop-up appears where you can enter the code to arm or disarm the alarm. The status of the alarm will be shown in the cell by changing the image (I will make another, nicer image when I find the time for it). When you click near the pop-up, the pop-up will disappear again
There is only one thing I can't find: the border of the cell is a bit brighter than all other borders. I want this to be the same color of course. If someone can find the solution for this ?
A temporary download link for this can be found here: LINK
There is only one thing I can't find: the border of the cell is a bit brighter than all other borders. I want this to be the same color of course. If someone can find the solution for this ?
A temporary download link for this can be found here: LINK
- Attachments
-
- Schermafbeelding 2015-02-15 om 15.25.29.png (16.47 KiB) Viewed 2981 times
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- Siewert308SW
- Posts: 288
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
Thx...mvveelen wrote:I've managed to get a cell with a button for the security panel. When you click on it, a pop-up appears where you can enter the code to arm or disarm the alarm. The status of the alarm will be shown in the cell by changing the image (I will make another, nicer image when I find the time for it). When you click near the pop-up, the pop-up will disappear again
There is only one thing I can't find: the border of the cell is a bit brighter than all other borders. I want this to be the same color of course. If someone can find the solution for this ?
A temporary download link for this can be found here: LINK
Didn't think of that, i mean href-ing the cell.
For this does the trick.
As for you cell border, maybe it's me or my display.
But i can't see any color change.
- Attachments
-
- Naamloos.png (220.12 KiB) Viewed 2945 times
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- mvveelen
- Posts: 678
- 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
Are you using exact the same .css files? Because, as you can see, I do have a slightly brighter 'Alarm-cell'
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- mvveelen
- Posts: 678
- 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
I've checked in another browser and it seems fine. So: in Safari it has a slightly brighter border, but in Firefox it is OK
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- Siewert308SW
- Posts: 288
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
That could be the issues.mvveelen wrote:I've checked in another browser and it seems fine. So: in Safari it has a slightly brighter border, but in Firefox it is OK
Not all browsers are inserting values the same.
I use firefox on laptop and tablet.
But just in case i will attach my frontpage here for you to look at.
For those who are interested.
Be aware the layout is adjusted to fir my 7" tablet.
I made some slight changes.
1. Added auto refresh of 4min in frontpage.html te reflect the buienradar screenshot to the current condition
2. Adjusted the weather icon layout to reflect your dusk sensor, it will now show the sun and moon according to the light condition
3. As per mvveelen his frontpage the Outside temperature text is colored blue when temp is below 0 degrees
4. Outside temperature text will color red when temp is 25 degrees or above
5. Changed Lock and unlock switch icon
6. Changed Alarm Status button which reflects the current alarm status
7. Changed Weather icons to HTC Sense 4 Weather Icons
Download: (temporally)
https://dl.dropboxusercontent.com/u/232 ... moticz.zip
- Attachments
-
- Naamloos.png (138.83 KiB) Viewed 2891 times
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- mvveelen
- Posts: 678
- 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
I see you actually use the same kind of code to use the day or night icons as I uploaded , but if you ask me, the way I use it with the Sunrise or Sunset is better because my dusk sensor will turn on the lights when there is a thunderstorm for example, and in your code it will then show the night-icons. That doesn't seem right does it ?
The alarm button is nearly the same as I had, but it doesn't really look smooth enough. I'm going to try to get a similar icon as the others.
Here I go again: wouldn't it be great if someone actually could get the Skycons to work with this frontpage..... ?
The alarm button is nearly the same as I had, but it doesn't really look smooth enough. I'm going to try to get a similar icon as the others.
Here I go again: wouldn't it be great if someone actually could get the Skycons to work with this frontpage..... ?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- Siewert308SW
- Posts: 288
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
I understand but my Sunrise/Sunset is triggered by a virtual switch and my dusksensor is set to very dark.mvveelen wrote:I see you actually use the same kind of code to use the day or night icons as I uploaded , but if you ask me, the way I use it with the Sunrise or Sunset is better because my dusk sensor will turn on the lights when there is a thunderstorm for example, and in your code it will then show the night-icons. That doesn't seem right does it ?
The alarm button is nearly the same as I had, but it doesn't really look smooth enough. I'm going to try to get a similar icon as the others.
Here I go again: wouldn't it be great if someone actually could get the Skycons to work with this frontpage..... ?
My setup doesn't trigger that fast.
I tried your code but then my frontpage didn't load anything and i would end up with a blank page.
Will make adjustment in the future to change it according realtime sunrise/sunset time.
The Alarm icon doesn't look smooth indeed.
Tomorrow i will play with those icons to make them smoother
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
Who is online
Users browsing this forum: No registered users and 1 guest