I made a lot of changes to suit the display size of my tablet. Also some of the tricks to display the "C", "kWh", "W" and "L" will not work for everybody. Changes need to be made acording to the hardware you use. That's not a big problem. Everything you need is supplied by JSON
I would advise to only "borrow" the code you like, but not use this frontpage directly. It can give you some nasty side effects.
(Dimmer support is completely broken as far as I know , I don't use it)
If you need more information about how I did something, feel free to ask. I'll try to explain or adjust it to your needs.
thnx for the zip. I tried to edit the frontpage.html to my needs but the scene buttons don't show. Where do you put all the files? in the /www folder right?
Raspberry Pi Type B
Raspberry Pi Type B2
RFXCOMtrx433e
Denman009 wrote:I like the frontpage a lot.
and to make a combination to.
But at 1 and the other web browser the cam wouldn't work.
Funny i use the same link. On the ipad with the webbrowser Mercury everything works fine.
Safari doesn't and Chrome to.
On the PC it's the same
Hows that possible.
And don't look to the empty cells. I'didnt fill it in yett.
What code do you use to add e.g. "mm" in a small font size for the rainmeter?
I am able to add "mm", but don't now how to change the font size (also not after a lot of trial and error...).
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..... ?
@mvveelen: How do you get the sun up / sun down value? Do you trigger it with a virtual switch? And how does that work?
I have tried the following, but that isn't working:
['0','SunRise', 'cell21', '','0','0'],
I'm working an my frontpage, will share the results and code once it's (nearly) finished.
The above changes bacground to orange when the alarmtimer (trigger) is started. I use lua and dummy switch for this.
The background turns red when alarm is activated and creates a beep for pulling attention.
You can notice the beep() i borrowed the code from the sec panel for this and copy paste into FrontPage.js
As i am not a coder at all and only working by trial and error the code is far from optimal i think. *google is my friend*
Rpi & Win x64. Using : cam's,RFXCom, LaCrosse, RFY, HuE, google, standard Lua, Tasker, Waze traveltime, NLAlert&grip2+,curtains, vacuum, audioreceiver, smart-heating&cooling + many more (= automate all repetitive simple tasks)
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..... ?
@mvveelen: How do you get the sun up / sun down value? Do you trigger it with a virtual switch? And how does that work?
I have tried the following, but that isn't working:
['0','SunRise', 'cell21', '','0','0'],
I'm working an my frontpage, will share the results and code once it's (nearly) finished.
Yes, I'm using a virtual switch for it. This switch is triggered by an event that determines if it is Sunset or Sunrise.
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..... ?
@mvveelen: How do you get the sun up / sun down value? Do you trigger it with a virtual switch? And how does that work?
I have tried the following, but that isn't working:
['0','SunRise', 'cell21', '','0','0'],
I'm working an my frontpage, will share the results and code once it's (nearly) finished.
Yes, I'm using a virtual switch for it. This switch is triggered by an event that determines if it is Sunset or Sunrise.
The timer you mention will only switch at that configured moment. But if that moment is missed because the Pi had a power failure for example, your lights will never turn on after the Pi has booted again, because Domoticz won't check if the switch has turned on after the switching moment configured with the timer.
The event is different, because it will ALWAYS check the conditions and thus works always. If you boot your Pi in the middle of the night (after it has been off for the whole day) and the virtual switch is still in the 'day' setting, the event will turn it to the correct setting (=IsDark is on).
So yes you can use a simple timer, but the event is much more failsafe
Downside of the event is that you lose the 'XX minutes before/after sunset' possibility.
ThinkPad wrote:The timer you mention will only switch at that configured moment. But if that moment is missed because the Pi had a power failure for example, your lights will never turn on after the Pi has booted again, because Domoticz won't check if the switch has turned on after the switching moment configured with the timer.
The event is different, because it will ALWAYS check the conditions and thus works always. If you boot your Pi in the middle of the night (after it has been off for the whole day) and the virtual switch is still in the 'day' setting, the event will turn it to the correct setting (=IsDark is on).
So yes you can use a simple timer, but the event is much more failsafe
Downside of the event is that you lose the 'XX minutes before/after sunset' possibility.
G3rard wrote:
[..]
One question about the blocky, should the 'or' in the 'else if' not be an 'and'?
Nope, it is totally correct in the screenshot.
The OR is needed because Domoticz validates times till 23:59. At 0:00 a new day starts.
And therefore the last condition will never become true if you use 'AND'. Just try the event, and look for yourself in the log of the virtual switch, the on/off times will be correct
G3rard wrote:
[..]
One question about the blocky, should the 'or' in the 'else if' not be an 'and'?
Nope, it is totally correct in the screenshot.
The OR is needed because Domoticz validates times till 23:59. At 0:00 a new day starts.
And therefore the last condition will never become true if you use 'AND'. Just try the event, and look for yourself in the log of the virtual switch, the on/off times will be correct
Denman009 wrote:I like the frontpage a lot.
and to make a combination to.
But at 1 and the other web browser the cam wouldn't work.
Funny i use the same link. On the ipad with the webbrowser Mercury everything works fine.
Safari doesn't and Chrome to.
On the PC it's the same
Hows that possible.
And don't look to the empty cells. I'didnt fill it in yett.
What code do you use to add e.g. "mm" in a small font size for the rainmeter?
I am able to add "mm", but don't now how to change the font size (also not after a lot of trial and error...).
if(vtype == 'Rain' && vdata > -100){
vdata=new String(vdata).replace( vdata, vdata + " mm"); // Adds mm after rain
}
hello G3rard,
This is what i did,
}
// Display mm symbol in same cell as Rain (Regenmeter)
if(item.idx == '175' && vdata > -100){
vdata=" "+vdata+"<sup style=\'font-size:30%;vertical-align:top;position:relative;bottom:-0.7em;\'>mm</sup>";
}
and between this line's you can change a lot "<sup style=\'font-size:30%;vertical-align:top;position:relative;bottom:-0.7em;\'>mm</sup>";
if you like to change the color u can us this '0',';color:#2980B9;',
Denman009 wrote:I like the frontpage a lot.
and to make a combination to.
But at 1 and the other web browser the cam wouldn't work.
Funny i use the same link. On the ipad with the webbrowser Mercury everything works fine.
Safari doesn't and Chrome to.
On the PC it's the same
Hows that possible.
And don't look to the empty cells. I'didnt fill it in yett.
What code do you use to add e.g. "mm" in a small font size for the rainmeter?
I am able to add "mm", but don't now how to change the font size (also not after a lot of trial and error...).
if(vtype == 'Rain' && vdata > -100){
vdata=new String(vdata).replace( vdata, vdata + " mm"); // Adds mm after rain
}
hello G3rard,
This is what i did,
}
// Display mm symbol in same cell as Rain (Regenmeter)
if(item.idx == '175' && vdata > -100){
vdata=" "+vdata+"<sup style=\'font-size:30%;vertical-align:top;position:relative;bottom:-0.7em;\'>mm</sup>";
}
and between this line's you can change a lot "<sup style=\'font-size:30%;vertical-align:top;position:relative;bottom:-0.7em;\'>mm</sup>";
if you like to change the color u can us this '0',';color:#2980B9;',
As I use solar panels I regulary have a negative electricity consumption. When this happens Frontpage displays 0 as a value instead of the expected say -1070W. Is there an option to have is nicely displayed either with the '-' sign in Frontpage or say in green when negative (exporting electricity) and red when positive (importing electricty)?
This how it is my settings file
['89','Usage', 'cell17', 'Netto - Now (W)','0','0']
where the current value = - 1070 W and the value is derived from my smart (P1) meter, device 89
Anyone an idea how to?
Attachments
Electricity.png (43.12 KiB) Viewed 3910 times
Last edited by pimvolkert on Saturday 13 June 2015 13:53, edited 1 time in total.
Yes, but to implement it in my frontpage it's a bit of a big deal I think. Well' I'm going to try. I also have to edit the .css files I see. Hmmmm, work in progress....
This is a great topic and makes live easier to switch and check status on a tablet on the wall.
I ran into some question marks on how to get some thing arranged and I have already been scouting the forum to find the answer in which I was unsuccesfull till now.
I now turn to you guys for help.
See the screencapture of the what I have up till now and I'm looking to have a live camera feed in the left over cell which is cell3 and all the somfy's and the one Blind (rolluik) provide a clear status but I cannot get them to action when I push the button.
Can some one help me with the instruction to implement the life feed which ultimate I would like to have taking a picture when someone pushes the doorbell button and save this picture on my Raspberry Pi. Also which code do I need to implement or change to get the buttons to action the blinds to open or closed.
Gerwin1967 wrote:This is a great topic and makes live easier to switch and check status on a tablet on the wall.
I ran into some question marks on how to get some thing arranged and I have already been scouting the forum to find the answer in which I was unsuccesfull till now.
I now turn to you guys for help.
See the screencapture of the what I have up till now and I'm looking to have a live camera feed in the left over cell which is cell3 and all the somfy's and the one Blind (rolluik) provide a clear status but I cannot get them to action when I push the button.
Can some one help me with the instruction to implement the life feed which ultimate I would like to have taking a picture when someone pushes the doorbell button and save this picture on my Raspberry Pi. Also which code do I need to implement or change to get the buttons to action the blinds to open or closed.
FullSizeRender.jpg
I am using the following in frontpage.html for my camera. It also depends on your camera brand.