NEW frontpage.html - request comments

Moderator: leecollings

denisj
Posts: 58
Joined: Saturday 17 December 2016 13:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by denisj »

barbaar wrote:...
However, I would like to adjust the frontpage so it will be full screen on my tablet (1920x1200). I cannot get this to work.
I also want to change the screen res. in order to run on my tablet.
I think that in some place of code it take the max resolution of the screen and then it reduce it. ) (???)
Thanks
Denis
peterjoosen
Posts: 3
Joined: Wednesday 04 January 2017 14:24
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Arendonk
Contact:

Re: NEW frontpage.html - request comments

Post by peterjoosen »

[/quote]
Hansbit wrote:I've updated the default frontpage.html page

Most important changes:
- The html is cleaned and structured. User settings are now only at end of script.
- All cells are numbered. If cell is not defined in user settings, the cell number appears on screen
- User can now easily set the label of the cell in the user settings (like 'Temperature Livingroom')
- User can now set optional alarm value. Of value of sensor above this value, the text will turn to RED.
- User can easily adjust the color of the text.
- If defined cell is a switch, the cell is clickable to switch that device.

Schermafbeelding 2014-12-29 om 14.11.16.png


How to install?
- copy attached frontpage.html to the Domoticz ditrectory (domoticz/www)
- Create a roomplan in Domoticz and add devices to that roomplan
- Adjust user settings in frontpage.html: the URL of your domoticz, the number of your roomplan and the devices to display
- If log-in for Domoticz is required, it best to add the IP of the device displaying the frontpage to the settings in Domiticz, so no login is required.
- Open in browser [your Domoticz IP]:8080/frontpage.html

Please send me your comments!
Hans

frontpage.html.tar.gz
Hello Hans,

I followed your instructions to get the frontpage online, but all cells stays empty (--) and also no names are filled in the cells.
-Created a roomplan in Domoticz
-Filled in the roomplan N° (user values)
-Filled in url (user values)
-Filled in a couple off switches (idx,....name of the switch etc...)

Any idea what causes this problem???

Thanks already ;-)

Peter
albertvandam
Posts: 2
Joined: Friday 06 January 2017 20:06
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by albertvandam »

Dear all,

With all the examples and code in this forum, I have managed to create a pretty good frontpage which runs on a wall mounted tablet. Thanks to Hansbit, G3rard and all others.
However I can't get to control my Dru Fireplace (Mertik G6R-HT4B) on the frontpage like it should. Directly from Domoticz it works fine.
Does someone have the right json commands to control the Mertik controller?
When I send json commands directly from the Chrome Address Bar, it doesn't work as aspected also.
For example:
http://192.168.4.250:8080/json.htm?type ... itchcmd=up
switches the fire place off!

Thanks in advance for any response.

Image
jompie
Posts: 14
Joined: Sunday 09 November 2014 18:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by jompie »

Hi,

you need to use Capitial letter "U", thus: Up and not up, as a command.
KAKU switches/receivers/Motion sensor/Doorbell
Oregon Temp sensors, TFA Temp sensor
Mertik controller
Raspberry Pi, RFXCom
albertvandam
Posts: 2
Joined: Friday 06 January 2017 20:06
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by albertvandam »

Hi Jompie,

You were absolutely right! :lol:
Thanks a lot.
madrian
Posts: 231
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by madrian »

Guys, one question:

I can't get to work one Dummy switch. I have few of them, but this one is not working. It's just showing "Nan" and doesn't reagate to click.

Code: Select all

 "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 15,
         "Data" : "On",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "Dummy",
         "HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
         "HardwareTypeVal" : 15,
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "00014060",
         "Image" : "Heating",
         "IsSubDevice" : false,
         "LastUpdate" : "2017-01-06 15:00:01",
         "Level" : 100,
         "LevelInt" : 100,
         "MaxDimLevel" : 100,
         "Name" : "Heating",
         "Notifications" : "false",
         "PlanID" : "4",
         "PlanIDs" : [ 4 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "Switch",
         "SwitchType" : "On/Off",
         "SwitchTypeVal" : 0,
         "Timers" : "true",
         "Type" : "Light/Switch",
         "TypeImg" : "lightbulb",
         "Unit" : 1,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "17"
Screen Shot 2017-01-07 at 02.45.29.png
Screen Shot 2017-01-07 at 02.45.29.png (35.64 KiB) Viewed 2853 times
Screen Shot 2017-01-07 at 03.58.04.png
Screen Shot 2017-01-07 at 03.58.04.png (337.49 KiB) Viewed 2847 times
.js:

Code: Select all

['17',	'Status',		'cell6',	'Heating','0','0'],
If I turn on "lastseen is wanted" -> I can see the correct date.

What's wrong with this?
denisj
Posts: 58
Joined: Saturday 17 December 2016 13:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by denisj »

albertvandam wrote:Dear all,

With all the examples and code in this forum, I have managed to create a pretty good frontpage which runs on a wall mounted tablet.

Image
Albert,
can you please upload your frontpage packet some wear in order to download it and take some sample please ?

Thanks in advance
Denis
ChrisPi
Posts: 4
Joined: Saturday 07 January 2017 9:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by ChrisPi »

Hello,

Is ther anyone that can tel how to change mij inlogscreen? I just want to change the Domoticz into my name.
Inlog screen
Inlog screen
Domoticz.JPG (19.42 KiB) Viewed 2825 times
ropske
Posts: 483
Joined: Tuesday 12 August 2014 5:37
Target OS: Raspberry Pi / ODroid
Domoticz version: V3_8394
Location: Rumbeke,Belgium
Contact:

Re: NEW frontpage.html - request comments

Post by ropske »

hi ChrisPi,

i don't think you can change this, unless you change it in the sourcecode and rebuild it
madrian
Posts: 231
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by madrian »

I created similar dummy switch and replaced the not working switch with this. Now it works. Anyone knows what happened here?
ChrisPi
Posts: 4
Joined: Saturday 07 January 2017 9:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by ChrisPi »

ropske wrote:hi ChrisPi,

i don't think you can change this, unless you change it in the sourcecode and rebuild it

Oké. Do you know where to find the sourcecode?
ropske
Posts: 483
Joined: Tuesday 12 August 2014 5:37
Target OS: Raspberry Pi / ODroid
Domoticz version: V3_8394
Location: Rumbeke,Belgium
Contact:

Re: NEW frontpage.html - request comments

Post by ropske »

ChrisPi
Posts: 4
Joined: Saturday 07 January 2017 9:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by ChrisPi »


Thanks for your comment. I just looked here but can you be more specific?
ropske
Posts: 483
Joined: Tuesday 12 August 2014 5:37
Target OS: Raspberry Pi / ODroid
Domoticz version: V3_8394
Location: Rumbeke,Belgium
Contact:

Re: NEW frontpage.html - request comments

Post by ropske »

I also don't know in what part this is, sorry
markk
Posts: 267
Joined: Tuesday 14 January 2014 14:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by markk »

Has anyone incorporated their front page into a smart mirror? https://www.youtube.com/watch?v=oLpwJAphU7Y
Running Domoticz on Pi3 with RFXtrx433e. LWRF power sockets and dimmer switches. Integrated my existing wirefree alarm PIRs and door contacts with domoticz. Geofencing with Pilot. Harmony Hub. Tado for Heating. Now playing with mysensors.
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: NEW frontpage.html - request comments

Post by JuanUil »

sorry wanted to delete this post
Attachments
Heating48_On.png
Heating48_On.png (1.72 KiB) Viewed 2714 times
Heating48_On.png
Heating48_On.png (1.72 KiB) Viewed 2714 times
Last edited by JuanUil on Sunday 08 January 2017 16:51, edited 2 times in total.
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: NEW frontpage.html - request comments

Post by JuanUil »

Do you know the problem?
Do we need to put the garbage, the green garbage or the paper container outside?
I have made a selectorswitch and a program to display what container needs to get out.

the LUA code:

Code: Select all

week 	= tonumber (os.date( "%V"))
dag		= tostring(os.date("%a"));
status	= tonumber(otherdevices_svalues['Afval'])


commandArray = {}
--print ('Dag=  '..dag)
if (dag=='Fri' or dag=='Sat'  ) then
	weekend = false; weekdag = true
end 
if (dag=='Mon' or dag=='Tue' or dag=='Wed' or dag=='Thu'or dag=='Sun') then
	weekend = true ; weekdag = false 
end

--Bepalen alleen grijs		
if(week==2 or week==6 or week==10 or week==14 or week==18 or week==22 or week==26 or week==30 or week==34 or week==38) then
		afval = true ; papier = false ; groen = false
end

--Bepalen grijs en papier
if (week==42 or week==46 or week==50) then
		afval = true ; papier = true ; groen = false
end

--Bepalen alleen groen
if (week==1 or week==5 or week==9 or week==13 or week==17 or week==19 or 
	week==21 or week==23 or week==25 or week==27 or week==29 or week==31 or week==35 or week==39 
	or week==41 or week==43 or week==45 or week==47 or week==49 or week==51) then 
		afval = false ; papier = false ; groen = true
end

--Bepalen groen en papier
if (week==3 or week==7 or week==11 or week==15 or week==33 or week==37 ) then 
		afval = false ; papier = true ; groen = true
end

--Bepalen alleen papier
if (week==20 or week==24 or week==28) then
		afval = false ; papier = true ; groen = false
end 

-- Bepalen niets
if (week==4 or week==8 or week==12 or week==16 or week==32 or week==36 or week==40 or week==44 or week==48 or week==52) then
		afval = false ; papier = false ; groen = false
end 

if (not(afval) and not(papier) and not(groen) and status~=10) then
		status=10
		commandArray ['UpdateDevice']= '383|0|' .. status		
end

if (afval and weekdag and status~=20)then		
		status=20
		commandArray ['UpdateDevice']= '383|0|' .. status  
end

if (afval and weekend and status~=10) then
		status=10
		commandArray ['UpdateDevice']= '383|0|' .. status  
end	

if (groen and weekdag and status~=30) then
		status=30
		commandArray ['UpdateDevice']= '383|0|' .. status  
end	

if (groen and weekend and status~=10) then
		status=10
		commandArray ['UpdateDevice']= '383|0|' .. status  
end	

if (papier and weekend and status~=40) then
		status=40
		commandArray ['UpdateDevice']= '383|0|' .. status  
end	

if (papier and weekdag and status~=10) then
		status=10
		commandArray ['UpdateDevice']= '383|0|' .. status  
end	

return commandArray
		
And the adjustment in frontpage.js

Code: Select all

	// replace Afval met icoon
		if (item.idx == idx_Afval){// && vdata == "grijs" ){
			vdata = item['Level']; //get current level
			if (vdata == '10'){}
				vdata=new String(vdata).replace( "10", "<img src=icons/niets.png  height=155px vspace=35> ");
			if (vdata == '20'){}
				vdata=new String(vdata).replace( "20", "<img src=icons/grijs.png  height=155px vspace=20> ");
			if (vdata == '30'){}
				vdata=new String(vdata).replace( "30", "<img src=icons/groen.png  height=155px vspace=20> ");
			if (vdata == '40'){}
				vdata=new String(vdata).replace( "40", "<img src=icons/papier.png  height=155px vspace=35> ");
	}
And of course some screenshots


Image

Image

Image

Image

enjoy

Jan
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
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 »

markk wrote:Has anyone incorporated their front page into a smart mirror? https://www.youtube.com/watch?v=oLpwJAphU7Y
Somewhat different but possibly interesting :
I performed some tests with https://magicmirror.builders
Nice mirror software with a lot of plugins. It shouldn't be too hard to incorporate domoticz information.
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
jhenrikb
Posts: 26
Joined: Sunday 08 January 2017 19:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by jhenrikb »

Hi:)
How are you guys installing any frontpage to your Raspi Domoticz interface?

I have tried to Download this (among other frontpages) packages.
Unzip on computer
Edit config and or other file to correct IP adress, Port, User&Password etc.
Load all the files into www folder with a subfolder with filezilla
enter: http://ip:port/folder (with no success)
also tried "..folder/" and "..folder/index.htm" and "..index.htm/". Also with no success.

Do i need to do this differently?

Sincerely
John
Trigun
Posts: 390
Joined: Wednesday 30 November 2016 11:58
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Contact:

Re: NEW frontpage.html - request comments

Post by Trigun »

albertvandam wrote:Dear all,

With all the examples and code in this forum, I have managed to create a pretty good frontpage which runs on a wall mounted tablet. Thanks to Hansbit, G3rard and all others.
However I can't get to control my Dru Fireplace (Mertik G6R-HT4B) on the frontpage like it should. Directly from Domoticz it works fine.
Does someone have the right json commands to control the Mertik controller?
When I send json commands directly from the Chrome Address Bar, it doesn't work as aspected also.
For example:
http://192.168.4.250:8080/json.htm?type ... itchcmd=up
switches the fire place off!

Thanks in advance for any response.

Image
Hi Albertvandam,

first of all, you did a great job!

is there a chance you can post your frontpage files?
I would love to check it out and see how I can make it fit for my home.

thnx in advance!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest