FlatZ Frontpage

Moderator: leecollings

Post Reply
User avatar
galadril
Posts: 828
Joined: Monday 07 September 2015 10:32
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: FlatZ Frontpage

Post by galadril »

I did found a problem in the lights.html:
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"></script>

should be:
<script type="text/javascript" src="js/jquery-2.1.4.js"></script>
Solar panels of Ginlong, Omnik-Solar, Transenergy or Solarman?? Try my Android app:
https://play.google.com/store/apps/deta ... ongmonitor
User avatar
galadril
Posts: 828
Joined: Monday 07 September 2015 10:32
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: FlatZ Frontpage

Post by galadril »

Please check the latest verions:
https://github.com/galadril/FlatZ-Frontpage

- I've added a News page (rss)
- Lot's of fixes bij Patrick (for ipad/device, Rounded css added, fix for Kaku dimmers, etc)
Attachments
news.png
news.png (61.76 KiB) Viewed 4073 times
Solar panels of Ginlong, Omnik-Solar, Transenergy or Solarman?? Try my Android app:
https://play.google.com/store/apps/deta ... ongmonitor
SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

Re: FlatZ Frontpage

Post by SwordFish »

Verry nice.
Are you also working to at scenes to frontpage?
That will be awesome.
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: FlatZ Frontpage

Post by mvveelen »

galadril wrote:
mvveelen wrote:I haven't looked at the code yet, because I'm facing some other challenges, but maybe I can try to find out where it goes wrong. What parts do I have to look at exactly?
Krommenie yes ;) (Assendelft)..

But please check the methods.js, it happens in this function:
function setLightDimmer(idx, bright)

If you compare the json calls with the json calls of Domoticz itself, maybe you can find the problem..
Uploaded the last version, and the dim level just doesn't seem to go well.

If I take a look at the other frontpage, the code for the dim level is like this (there seems to be a little trick to get the right dim levels):

Code: Select all

function ChangeStatus(OpenDicht,level,idx,currentlevel)
	{
	//When switched off return to previous level, no matter if plus or min pressed
	if (level == txt_off) {
	if (currentlevel == 1) {
	currentlevel++;
	}
	//console.log("In uit",currentlevel);
	$.ajax({
	url: $.domoticzurl+"/json.htm?type=command&param=switchlight&idx=" + idx + "&switchcmd=Set Level&level=" + currentlevel,
	async: false,
	dataType: 'json',
	success: function(){
	console.log('SUCCES');
	},
	error: function(){
	console.log('ERROR');
	}
	});
	}
	else
	{
	level = level * 1;
	//console.log(OpenDicht,level);
	if (OpenDicht == "plus")
	{
	var d = ((level + 10)/100 * 16) +  0.5;
	if(d > 16) {
	d = 16;
	}
	$.ajax({
	url: $.domoticzurl+"/json.htm?type=command&param=switchlight&idx=" + idx + "&switchcmd=Set Level&level=" + d,
	async: false,
	dataType: 'json',
	success: function(){
	console.log('SUCCES');
	},
	error: function(){
	console.log('ERROR');
	}
	});
	}
	else
	{
	var d = ((level-0.1 )/100*16)  ;
	//console.log("in min",d,level);
	if( d < 0 ){
	d = 0;
	}
	$.ajax({
	url: $.domoticzurl+"/json.htm?type=command&param=switchlight&idx=" + idx + "&switchcmd=Set Level&level=" + d,
	async: false,
	dataType: 'json',
	success: function(){
	console.log('SUCCES');
	},
	error: function(){
	console.log('ERROR');
	}
	});
	}
	}
	RefreshData();
	}
So the value is divided by 16 and there is a .5 added for rounding the values to the right values?! So, the level is not in %, but in steps. Is there a way you can add / change this in a next version?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
bickel
Posts: 12
Joined: Wednesday 14 January 2015 22:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sirjansland, Netherlands
Contact:

Re: FlatZ Frontpage

Post by bickel »

Great project!

Is it already possible to add setpoint devices? I have several danfoss radiator thermostats i would like to see.
Several people already asked for webcam support...i'd like to support that feature also.

Another small nice to have would be the ability to centralized disable some menu items, like logs and news.

Gr,
ROnald
Patrick
Posts: 27
Joined: Friday 01 August 2014 23:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

Re: FlatZ Frontpage

Post by Patrick »

mvveelen wrote:Uploaded the last version, and the dim level just doesn't seem to go well.

If I take a look at the other frontpage, the code for the dim level is like this (there seems to be a little trick to get the right dim levels):

Code: Select all

function ChangeStatus(OpenDicht,level,idx,currentlevel)
	{
	//When switched off return to previous level, no matter if plus or min pressed
	if (level == txt_off) {
	if (currentlevel == 1) {
	currentlevel++;
	}
	//console.log("In uit",currentlevel);
	$.ajax({
	url: $.domoticzurl+"/json.htm?type=command&param=switchlight&idx=" + idx + "&switchcmd=Set Level&level=" + currentlevel,
	async: false,
	dataType: 'json',
	success: function(){
	console.log('SUCCES');
	},
	error: function(){
	console.log('ERROR');
	}
	});
	}
	else
	{
	level = level * 1;
	//console.log(OpenDicht,level);
	if (OpenDicht == "plus")
	{
	var d = ((level + 10)/100 * 16) +  0.5;
	if(d > 16) {
	d = 16;
	}
	$.ajax({
	url: $.domoticzurl+"/json.htm?type=command&param=switchlight&idx=" + idx + "&switchcmd=Set Level&level=" + d,
	async: false,
	dataType: 'json',
	success: function(){
	console.log('SUCCES');
	},
	error: function(){
	console.log('ERROR');
	}
	});
	}
	else
	{
	var d = ((level-0.1 )/100*16)  ;
	//console.log("in min",d,level);
	if( d < 0 ){
	d = 0;
	}
	$.ajax({
	url: $.domoticzurl+"/json.htm?type=command&param=switchlight&idx=" + idx + "&switchcmd=Set Level&level=" + d,
	async: false,
	dataType: 'json',
	success: function(){
	console.log('SUCCES');
	},
	error: function(){
	console.log('ERROR');
	}
	});
	}
	}
	RefreshData();
	}
So the value is divided by 16 and there is a .5 added for rounding the values to the right values?! So, the level is not in %, but in steps. Is there a way you can add / change this in a next version?
What isn't going well?
I'm testing with a KaKu dimmer module and I can't detect any problems.
In settings.js you need to set the maxDimLevel (16 when KaKu), the formula transforms the 0-100 slider value to 0-maxDimLevel value.
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: FlatZ Frontpage

Post by mvveelen »

So I have to add the , '16' to get it to work? Will do tomorrow and test it. Thanks !
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
Patrick
Posts: 27
Joined: Friday 01 August 2014 23:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

Re: FlatZ Frontpage

Post by Patrick »

mvveelen wrote:So I have to add the , '16' to get it to work? Will do tomorrow and test it. Thanks !
Yep, in settings.js there's a extra variable added to define the maxDimLevel.
If the code reads no maxDimLevel it will set maxDimLevel to 100.
User avatar
galadril
Posts: 828
Joined: Monday 07 September 2015 10:32
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: FlatZ Frontpage

Post by galadril »

Another small nice to have would be the ability to centralized disable some menu items, like logs and news.
In latest version: https://github.com/galadril/FlatZ-Frontpage

In settings.js:
//Menu settings
$.Graph = true;
$.News = true;
$.Log = true;
$.Lights = true;
$.Weather = true;

We're looking into your other requests!
Solar panels of Ginlong, Omnik-Solar, Transenergy or Solarman?? Try my Android app:
https://play.google.com/store/apps/deta ... ongmonitor
User avatar
galadril
Posts: 828
Joined: Monday 07 September 2015 10:32
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: FlatZ Frontpage

Post by galadril »

Several people already asked for webcam support...i'd like to support that feature also.
Working on it, It's now working with camera image url...
Image
Solar panels of Ginlong, Omnik-Solar, Transenergy or Solarman?? Try my Android app:
https://play.google.com/store/apps/deta ... ongmonitor
SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

Re: FlatZ Frontpage

Post by SwordFish »

Looks great.
I asked before do you have plans to ad scenes to the frontpage (maybe you over see it)?
User avatar
galadril
Posts: 828
Joined: Monday 07 September 2015 10:32
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: FlatZ Frontpage

Post by galadril »

SwordFish wrote:add scenes to the frontpage (maybe you over see it)?
I'll look into it ;)
Solar panels of Ginlong, Omnik-Solar, Transenergy or Solarman?? Try my Android app:
https://play.google.com/store/apps/deta ... ongmonitor
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: FlatZ Frontpage

Post by mvveelen »

Great, got the dim levels working. My bad.... :oops:

Question though: is it possible to update the % of the dim level too? When I have it at 53% and I set it to, let's say 100%, it keeps displaying the 53%
Would be nice to see the right % at the same time I change it.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

Re: FlatZ Frontpage

Post by SwordFish »

galadril wrote:
SwordFish wrote:add scenes to the frontpage (maybe you over see it)?
I'll look into it ;)
That would be great.
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

Re: FlatZ Frontpage

Post by Minglarn »

galadril wrote:
Several people already asked for webcam support...i'd like to support that feature also.
Working on it, It's now working with camera image url...
OMG! =)

Cant wait...
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
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: FlatZ Frontpage

Post by mvveelen »

Aside from the % status for the dim level, I have some questions:

- I have Kodi on my RPi and I'm trying to add the Kodi status to the frontpage. All it shows is....nothing. Only an image. Is it possible or am I trying something that hasn't been added (yet)?
- When I look at my power consumption, it shows me:

606 Watt

Today:
6.674 kWh
Total:
890697;793095;0;0;606;0

What about the "Total:" ? A lot of numbers, but it doesn't make sense to me. Am I forgetting something?

- is it possible to make the "switch toggled" pop-up-thingy optional? It's slowing the switching down, so I'd rather have it off or deleted....
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
CodeItAway
Posts: 27
Joined: Tuesday 11 February 2014 21:44
Target OS: Linux
Domoticz version:
Contact:

Re: FlatZ Frontpage

Post by CodeItAway »

First of all, compliments for your hard work.
I think something went wrong with one of the latest commits. Some files have text like these in them:
<<<<<<< HEAD
jjnj

Re: FlatZ Frontpage

Post by jjnj »

Wow you are really making great progress
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: FlatZ Frontpage

Post by mvveelen »

Just wanted 1 thing to add to my list of heavy demands :D :

The left column shows the lights. ON or OFF. When it's OFF, everything is fine.
When it's ON, the lights with a dimmer, show the level.....and that is kind of....ugly. The level (text) runs through the text of the light under it, if you know what I mean. Could the level in the left column be set to 'not show' ?
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: FlatZ Frontpage

Post by Heisenberg »

galadril wrote:
Several people already asked for webcam support...i'd like to support that feature also.
Working on it, It's now working with camera image url...
Image
Hi galadril, where do I modify the url streams for the IP cameras?
Also in the camera.html I don't see the navigation on the left (Switches) anymore
Raspberry Pi Type B
Raspberry Pi Type B2
RFXCOMtrx433e
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests