Re: NEW frontpage.html - request comments
Posted: Sunday 22 March 2015 14:22
Ah ok. No unfortunately i cannot help you any further then
Open source Home Automation System
https://forum.domoticz.com/
Code: Select all
#!/usr/bin/python
import socket
# set host and port
HOST = 'IP amplifier'
PORT = 23
# connect to Denon
s = socket.socket( socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
# Send Command - Denon - Power On
s.sendall("PWON\r")
# disconnect from Denon
s.close()
# Delay Timer 10 Sec
time.sleep(10)
return
Code: Select all
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
function WebSocketTest()
{
var HOST = "echo.websocket.org";
var PORT = 80;
var connection = new WebSocket("ws://" + HOST + ":" + PORT);
connection.onopen = function () {
connection.send('PWON\r');
};
connection.onerror = function (error) {
writeToScreen('Error Logged: ' + error);
};
connection.onmessage = function (e) {
writeToScreen('Received From Server: ' + e.data);
};
}
function writeToScreen(message) {
var pre = document.createElement("p");
var log = document.getElementById("log");
pre.innerHTML = message;
log.appendChild(pre);
}
</script>
</head>
<body>
<div id="sse">
<a href="javascript:WebSocketTest()">Run WebSocket</a>
</div>
<div id="log" style="background-color:#ff0;">
<p>Server output:</p>
</div>
</body>
</html>
Hi G3rard, very nice frontpage-design.G3rard wrote:Here is the link were youy can download my frontpage.
http://www.filedropper.com/frontpagegz
The frontpage has a.o. the following changes compared to earlier versions posted in this topic.
- text with cell description changes according to the state (eg alarm on/off, sunrise/set)
- removed bounce effect (no vertical scrolling) on iPad
- use extra div's in the cells above (see also the post from zicht) to show 2 values in one cell
- various layout changes
Let me know if you have any questions regarding the configuration.
I just tried to download the file via the link and it's still working.dbfan wrote:Hi G3rard, very nice frontpage-design.G3rard wrote:Here is the link were youy can download my frontpage.
http://www.filedropper.com/frontpagegz
The frontpage has a.o. the following changes compared to earlier versions posted in this topic.
- text with cell description changes according to the state (eg alarm on/off, sunrise/set)
- removed bounce effect (no vertical scrolling) on iPad
- use extra div's in the cells above (see also the post from zicht) to show 2 values in one cell
- various layout changes
Let me know if you have any questions regarding the configuration.
I like to download it, but link is broken. Can you fix this please ? Or sent me via pm ? thanks ! DBfan
Hi G3rard / all,G3rard wrote:Here is the link were youy can download my frontpage.
http://www.filedropper.com/frontpagegz
The frontpage has a.o. the following changes compared to earlier versions posted in this topic.
- text with cell description changes according to the state (eg alarm on/off, sunrise/set)
- removed bounce effect (no vertical scrolling) on iPad
- use extra div's in the cells above (see also the post from zicht) to show 2 values in one cell
- various layout changes
Let me know if you have any questions regarding the configuration.
You have to place the files in the www folder on your Rasberry Pi otherwise the switches won't work.Jochie78 wrote: Hi G3rard / all,
I am a newbee to Domoticz.
I really like the customized frontpage that G3rard uploaded.
I installed it to a webserver (not on the Pi, but on my NAS) and it is accessible and i can see the status of my lights.
($.domoticzurl is filled in right in the frontpage_settings.js)
My problem is that I can not turn ON or OFF a light from the frontpage.
When I push on the status of a light that is turned OFF, I get a popup with 'inschakelen' (turn on) but the light is nog turning ON.
The same happens with a light that is turned ON, that I can't turn OFF.
Is there a setting that I forgot or have to do?
Can anyone point me in the right direction?
Thanks
Hi G3rard,G3rard wrote: You have to place the files in the www folder on your Rasberry Pi otherwise the switches won't work.
Found it!Jochie78 wrote:Hi G3rard,G3rard wrote: You have to place the files in the www folder on your Rasberry Pi otherwise the switches won't work.
Thanks for your quick reply.
I put the files in the www folder of my raspberry, but still no difference.
The light shows the staus, but when I click on it, the light won't turn ON or OFF.
Any other advise?
There are 2 options for the alarm.dbfan wrote:Hi G3rard,
I have it running. Very nice frontpage
One question: how do I get the alarm-icon ( house-icon ) running ?
I can enable the alarm via the security-panel. I made a blocky where I set a virtual switch to ON when one of my kaku doorcontacts opens.
But, I when I use the IDX of that virtual switch in cell23, it just shows OPEN or CLOSED. Not your icon...
What do I do wrong ?
thnx, DBfan
Code: Select all
// set alarm icons
if(item.idx == idx_Alarm && vdata == 'Arm Away'){
vdata=new String(vdata).replace( "Arm Away","<a class=iframe href=secpanel/index.html><img src=icons/alarm_away.png vspace=6></a>");
vdesc=desc_alarm_away;
}
if(item.idx == idx_Alarm && vdata == 'Arm Home'){
vdata=new String(vdata).replace( "Arm Home","<a class=iframe href=secpanel/index.html><img src=icons/alarm_home.png vspace=6></a>");
vdesc=desc_alarm_home;
}
if(item.idx == idx_Alarm && vdata == 'Normal'){
vdata=new String(vdata).replace( "Normal","<a class=iframe href=secpanel/index.html><img src=icons/alarm_off.png vspace=6></a>"); // day
vdesc=desc_alarm_off;
}
Code: Select all
//if(item.idx == idx_Alarm && vdata == 'Off'){
//vdata=new String(vdata).replace( "Off","<a class=iframe href=secpanel/index.html><img src=icons/alarm_off.png vspace=6></a>");
//vdesc=desc_alarm_off; // Replace text from bottom with text from settings file
//}
//if(item.idx == idx_Alarm && vdata == 'On'){
//vdata=new String(vdata).replace( "On","<a class=iframe href=secpanel/index.html><img src=icons/alarm_on.png vspace=6></a>");
//vdesc=desc_alarm_on; // Replace text at bottom with text from settings file
//}