NEW frontpage.html - request comments

Trigun
Posts: 180
Joined: Wednesday 30 November 2016 12:58
Target OS: Raspberry Pi
Domoticz version: 3.5877
Contact:

Re: NEW frontpage.html - request comments

Post by Trigun » Monday 09 January 2017 19:17

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!

madrian
Posts: 191
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by madrian » Monday 09 January 2017 23:43

Anybody can help me with a code for LightWaveRF dimmer? It's a 32step dimmer.

Code: Select all

{}
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "Set Level: 28 %",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 3,
         "HardwareName" : "LED",
         "HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
         "HardwareTypeVal" : 15,
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0C0708",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2017-01-09 21:50:25",
         "Level" : 28,
         "LevelInt" : 9,
         "MaxDimLevel" : 32,
         "Name" : "BEDLED",
         "Notifications" : "false",
         "PlanID" : "4",
         "PlanIDs" : [ 4 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "Set Level: 28 %",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "LightwaveRF",
         "SwitchType" : "Dimmer",
         "SwitchTypeVal" : 7,
         "Timers" : "false",
         "Type" : "Lighting 5",
         "TypeImg" : "dimmer",
         "Unit" : 15,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "31"
      },
This formula works for minus button: var d = Math.round((level / 100.0) * 32);, but what about plus button?

User avatar
jannl
Posts: 868
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Geleen
Contact:

Re: RE: Re: NEW frontpage.html - request comments

Post by jannl » Tuesday 10 January 2017 8:17

jhenrikb wrote: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
My frontpage is called with: http://ip;port/frontpage.html

Trigun
Posts: 180
Joined: Wednesday 30 November 2016 12:58
Target OS: Raspberry Pi
Domoticz version: 3.5877
Contact:

Re: NEW frontpage.html - request comments

Post by Trigun » Tuesday 10 January 2017 13:13

Hi,

first of all, its great to see how the frontpage evolves. I've been following this topic for a while and you guys are doing an amazing job!
I am working with a frontpage as well but I am wondering if there is a chance anyone has figured out how to put a multi selector switch in frontpage?

I hope anyone can help.

thanks in advance!

lvsigo
Posts: 17
Joined: Thursday 24 November 2016 13:14
Target OS: Linux
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by lvsigo » Tuesday 10 January 2017 14:03

Hi, try this

https://github.com/vil1driver/monitor

selector is full working, and most over things

Trigun
Posts: 180
Joined: Wednesday 30 November 2016 12:58
Target OS: Raspberry Pi
Domoticz version: 3.5877
Contact:

Re: NEW frontpage.html - request comments

Post by Trigun » Tuesday 10 January 2017 14:18

lvsigo wrote:Hi, try this

https://github.com/vil1driver/monitor

selector is full working, and most over things
Hi,

thank you for the reply allthough my french it not as good :( I am not sure where to find the multi selector info.
can you please tell me where to find this?

thnx!

User avatar
G3rard
Posts: 825
Joined: Wednesday 04 March 2015 23:15
Target OS: Linux
Domoticz version: V3.8153
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by G3rard » Wednesday 11 January 2017 0:48

@Trigun
I have implemented the selector switch in the frontpage.
https://github.com/gerard33/frontpage/c ... d6ce9c4cd6

It's using the code which racquemis provided.
http://www.domoticz.com/forum/viewtopic ... 017#p89405
Ubuntu Server 14.04 | Domoticz v3.8153 | RFXtrx433E | Z-Wave Aeotec Z-Stick S2
Frontpage | Sonos PHP | Dark th3me | Sony Bravia Python plugin | Sonos Python plugin

Trigun
Posts: 180
Joined: Wednesday 30 November 2016 12:58
Target OS: Raspberry Pi
Domoticz version: 3.5877
Contact:

Re: NEW frontpage.html - request comments

Post by Trigun » Wednesday 11 January 2017 9:28

G3rard wrote:@Trigun
I have implemented the selector switch in the frontpage.
https://github.com/gerard33/frontpage/c ... d6ce9c4cd6

It's using the code which racquemis provided.
http://www.domoticz.com/forum/viewtopic ... 017#p89405

Hi G3rard,

Thank you your effort to reply.
I am going to implement it right away!
am I correct to assume that switching between options is via "+" and "-" ?

Thanks again G3rard, much appreciated!

Cheers.

ropske
Posts: 225
Joined: Tuesday 12 August 2014 5:37
Target OS: Raspberry Pi
Domoticz version: V3_8394
Location: Rumbeke,Belgium
Contact:

Re: NEW frontpage.html - request comments

Post by ropske » Thursday 12 January 2017 21:58

racquemis wrote:I've edited the post with the instructions to make it more foolproof, also i forget to add one line of code.
See if you can get it working now, if not use my frontpage.js i have attached to that post.

Thank you so much for this racquemis
I've done all what you have explained and this is working on my brower (Edge and Firefox) on my laptop.

If i open my browser (Safari) (i also installed Firefox and chroome to test) on my iPad, i can see the sliders, and they look beautifull.
But when i want to move the slider, it's impossible, the slider stays fixed at it's position.
Also when pressing the slider to a position (instead of moving the slider) it's not working.
You have any idea why this could come?

Thank you again!

User avatar
cyberclwn
Posts: 105
Joined: Thursday 20 August 2015 22:53
Target OS: Raspberry Pi
Domoticz version: beta
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by cyberclwn » Thursday 12 January 2017 23:02

Hi Guys,

I'm trying to make my own "frontpage" too.
Well actually to have a mini-version with mostly only temperatures on my PhotoFrame (pi with touch-screen) when i just woke up.
But i want 2 switches on it also.

The displaying works really great, but i can't get the switches to work. I have searched the posts and forum but i can't find the solution to get the switches to work :(

I have added the switchclick bit:

Code: Select all

switchclick='';
if (vdata == 'Off' ) {
	switchclick = 'onclick="SwitchToggle('+item.idx+', \'On\');"';
}
if (vdata == 'On' ) {
	switchclick = 'onclick="SwitchToggle('+item.idx+', \'Off\');"';
}
$('#'+vlabel).html(vdata);
Also added the function at the bottom of the file:

Code: Select all

function SwitchToggle(idx, switchcmd)
{
        console.log('function called');
        $.ajax({
        url: "json.htm?type=command&param=switchlight" + "&idx=" + idx + "&switchcmd=" + switchcmd + "&level=0",
        async: false,
        dataType: 'json',
        success: function(){
                console.log('SUCCES');
        },
        error: function(){
                console.log('ERROR');
        }
        });
        RefreshData();
}
The switches show up on the page, and they are displaying "On" or "Off" but they are not doing anything.
3xPi 2B (Domoticz "live", Domoticz "sandbox", PhotoFrame)
RFXCom433(E), KaKu, Oregon Scientific, Keyes 2-relay, Logitech Media Server, MiLight, Smartwares heating controller(2x), IR Send/Receive, Keyes PIR, XH-M131 DuskSensor, DHT22/11

User avatar
cyberclwn
Posts: 105
Joined: Thursday 20 August 2015 22:53
Target OS: Raspberry Pi
Domoticz version: beta
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by cyberclwn » Friday 13 January 2017 0:52

Ok, i partially solved it, i was missing the script at the top

Code: Select all

<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
But now i get 404-erros like

Code: Select all

http://<ip>:<port>/undefined/json.htm?type=devices&plan=undefined&jsoncallback=jQuery111003160575170475055_1484260269839&format=json&_=1484260269840
Don't get where the "undefined" is coming from, the $.domoticzurl is set correctly, also is the "$.roomplan".

And when i change the url-string to just 1, without variables

Code: Select all

var jurl= "http://<ip>:<port>/json.htm?type=devices&plan=12&jsoncallback=?";
I get the error that "$.PageArray " not exists ...
Hmm, i might have some layout issues, altho i checked that many times... i'll keep on struggling .. maybe i better start over :)
3xPi 2B (Domoticz "live", Domoticz "sandbox", PhotoFrame)
RFXCom433(E), KaKu, Oregon Scientific, Keyes 2-relay, Logitech Media Server, MiLight, Smartwares heating controller(2x), IR Send/Receive, Keyes PIR, XH-M131 DuskSensor, DHT22/11

Trigun
Posts: 180
Joined: Wednesday 30 November 2016 12:58
Target OS: Raspberry Pi
Domoticz version: 3.5877
Contact:

Re: NEW frontpage.html - request comments

Post by Trigun » Friday 13 January 2017 12:35

cyberclwn wrote:Ok, i partially solved it, i was missing the script at the top

Code: Select all

<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
But now i get 404-erros like

Code: Select all

http://<ip>:<port>/undefined/json.htm?type=devices&plan=undefined&jsoncallback=jQuery111003160575170475055_1484260269839&format=json&_=1484260269840
Don't get where the "undefined" is coming from, the $.domoticzurl is set correctly, also is the "$.roomplan".

And when i change the url-string to just 1, without variables

Code: Select all

var jurl= "http://<ip>:<port>/json.htm?type=devices&plan=12&jsoncallback=?";
I get the error that "$.PageArray " not exists ...
Hmm, i might have some layout issues, altho i checked that many times... i'll keep on struggling .. maybe i better start over :)

Hi Cyberclwn,

Perhaps it is an idea to use G3rards frontpage and edit it to you liking.
This way you don't have to worry about scripts not or partially being present.

Maybe it helps, it did for me :)

Grtz.

racquemis
Posts: 77
Joined: Monday 02 November 2015 19:12
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by racquemis » Friday 13 January 2017 12:44

ropske wrote:
racquemis wrote:I've edited the post with the instructions to make it more foolproof, also i forget to add one line of code.
See if you can get it working now, if not use my frontpage.js i have attached to that post.

Thank you so much for this racquemis
I've done all what you have explained and this is working on my brower (Edge and Firefox) on my laptop.

If i open my browser (Safari) (i also installed Firefox and chroome to test) on my iPad, i can see the sliders, and they look beautifull.
But when i want to move the slider, it's impossible, the slider stays fixed at it's position.
Also when pressing the slider to a position (instead of moving the slider) it's not working.
You have any idea why this could come?

Thank you again!
Does the frontpage generate any errors when using the sliders on your laptops browser?
If not you could try adding a z-index to the div containing the slider to make it appear on top.
Not sure it that would work.

I did found this:
http://stackoverflow.com/questions/2684 ... ick-on-ios
Try and see if it works

ropske
Posts: 225
Joined: Tuesday 12 August 2014 5:37
Target OS: Raspberry Pi
Domoticz version: V3_8394
Location: Rumbeke,Belgium
Contact:

Re: NEW frontpage.html - request comments

Post by ropske » Friday 13 January 2017 20:37

racquemis wrote:
ropske wrote:
racquemis wrote:I've edited the post with the instructions to make it more foolproof, also i forget to add one line of code.
See if you can get it working now, if not use my frontpage.js i have attached to that post.

Thank you so much for this racquemis
I've done all what you have explained and this is working on my brower (Edge and Firefox) on my laptop.

If i open my browser (Safari) (i also installed Firefox and chroome to test) on my iPad, i can see the sliders, and they look beautifull.
But when i want to move the slider, it's impossible, the slider stays fixed at it's position.
Also when pressing the slider to a position (instead of moving the slider) it's not working.
You have any idea why this could come?

Thank you again!
Does the frontpage generate any errors when using the sliders on your laptops browser?
If not you could try adding a z-index to the div containing the slider to make it appear on top.
Not sure it that would work.

I did found this:
http://stackoverflow.com/questions/2684 ... ick-on-ios
Try and see if it works

Thanks for the update,

but where exactly do i need to put this?

Code: Select all

var hlp = '<div style="position:relative;z-index=1000;top:-4px;font-size:initial;line-height:initial"><input onmousedown="startCountToWhite(this.value,' + item.idx + ')" onmouseup="stopCountToWhite()" style="position:relative;top:4px" type="range" min="0" max="' + item.MaxDimLevel +'" value="'+ vdimmercurrent +'" step="2" onChange="ChangeStatus100(this.value,'+item.idx+')" /></div>';
                     hlp = hlp + '<div style="position:relative;z-index=1000;top:-6px;font-size:initial;line-height:initial"><input style="position:relative;top:4px;-webkit-appearance: none;background: white;background: -webkit-linear-gradient(left, hsl(0,100%,50%),hsl(60,100%, 50%), hsl(120,100%, 50%), hsl(180, 100%, 50%), hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%));height:5px" type="range" min="0" max="360" value="' + hue_array[item.idx] +'" step="1" onChange="ChangeHue(this.value,' + vdimmercurrent + ','+item.idx+',24)" /></div>';
                     

User avatar
cyberclwn
Posts: 105
Joined: Thursday 20 August 2015 22:53
Target OS: Raspberry Pi
Domoticz version: beta
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by cyberclwn » Saturday 14 January 2017 17:27

Trigun wrote:
Perhaps it is an idea to use G3rards frontpage and edit it to you liking.
This way you don't have to worry about scripts not or partially being present.
Hey,

I'm a bit of stubborn guy that wants to understand what is going on and trying to understand what i am doing.
But in this case i don't get it :)

So i reverted it back to without the switches. That way i know what i have, and can change it myself.

If anyone have an idea why the switchtoggle isn't working, let me know.
For now i give up and remove that bit from my page.
3xPi 2B (Domoticz "live", Domoticz "sandbox", PhotoFrame)
RFXCom433(E), KaKu, Oregon Scientific, Keyes 2-relay, Logitech Media Server, MiLight, Smartwares heating controller(2x), IR Send/Receive, Keyes PIR, XH-M131 DuskSensor, DHT22/11

ubfssF
Posts: 43
Joined: Monday 02 November 2015 15:12
Target OS: Linux
Domoticz version: 2.2364
Location: Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by ubfssF » Saturday 14 January 2017 18:36

A question before I install this frontpage: will it be visible from the outside world?

I use Domoticz with a port forwarding in my router (with SSL) to port 443 to the Domoticz-PC and the built-in webserver is serving the Domoticz pages. I have the basic authentication "on", so that only with a password one is able to use Domoticz from outside my LAN.

I am wandering whether someone can access the frontpage by using the URL of the Domoticz-server and then the frontpage, without having to use the password. So, in my case something like:

Code: Select all

https://xxxxxx.asuscomm.com/frontpage.html
That would break the security of the basic authentication of Domoticz.....

Trigun
Posts: 180
Joined: Wednesday 30 November 2016 12:58
Target OS: Raspberry Pi
Domoticz version: 3.5877
Contact:

Re: NEW frontpage.html - request comments

Post by Trigun » Sunday 15 January 2017 22:45

Hi all, perhaps this has been asked before.
I am using g3rards front page and everything work perfect but it is not responsive for iPhone.
Does anyone know how I can change this?

Thnx all!


Sent from my iPad using Tapatalk

BarryT
Posts: 222
Joined: Tuesday 31 March 2015 22:06
Target OS: Raspberry Pi
Domoticz version: beta
Location: east netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by BarryT » Tuesday 17 January 2017 22:00

barbaar wrote:...
However, I would like to adjust the frontpage so it will be full screen on my tablet (1920x1200).
denisj wrote: I also want to change the screen res. in order to run on my tablet.
+1
6x Raspberry 3B
A lot of scripts, switches and sensors :)

User avatar
G3rard
Posts: 825
Joined: Wednesday 04 March 2015 23:15
Target OS: Linux
Domoticz version: V3.8153
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by G3rard » Wednesday 18 January 2017 23:38

Trigun wrote:Hi all, perhaps this has been asked before.
I am using g3rards front page and everything work perfect but it is not responsive for iPhone.
Does anyone know how I can change this?
Thnx all!
Then you have to change the HTML/CSS code, see for example https://dzone.com/articles/using-csshtm ... responsive.
But I think the frontpage is not easy to handle on a phone. You can have a look at Reacticz, that's working great on a phone.
Ubuntu Server 14.04 | Domoticz v3.8153 | RFXtrx433E | Z-Wave Aeotec Z-Stick S2
Frontpage | Sonos PHP | Dark th3me | Sony Bravia Python plugin | Sonos Python plugin

User avatar
G3rard
Posts: 825
Joined: Wednesday 04 March 2015 23:15
Target OS: Linux
Domoticz version: V3.8153
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by G3rard » Wednesday 18 January 2017 23:41

ubfssF wrote:A question before I install this frontpage: will it be visible from the outside world?

I use Domoticz with a port forwarding in my router (with SSL) to port 443 to the Domoticz-PC and the built-in webserver is serving the Domoticz pages. I have the basic authentication "on", so that only with a password one is able to use Domoticz from outside my LAN.

I am wandering whether someone can access the frontpage by using the URL of the Domoticz-server and then the frontpage, without having to use the password. So, in my case something like:

Code: Select all

https://xxxxxx.asuscomm.com/frontpage.html
That would break the security of the basic authentication of Domoticz.....
If you install the frontpage in another folder then the Domoticz folder you won't have this problem.
Ubuntu Server 14.04 | Domoticz v3.8153 | RFXtrx433E | Z-Wave Aeotec Z-Stick S2
Frontpage | Sonos PHP | Dark th3me | Sony Bravia Python plugin | Sonos Python plugin

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest