NEW frontpage.html - request comments

Moderator: leecollings

SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

Re: NEW frontpage.html - request comments

Post by SwordFish »

Send you a PM.
When I got time I'll will post that FrontPage.
The only thing is that the swipe doesn't work right now.
User avatar
bierlaagh
Posts: 42
Joined: Friday 14 March 2014 16:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9984
Contact:

NEW frontpage.html - request comments

Post by bierlaagh »

Add this in your header:

Code: Select all

<script type="text/javascript" src="js/swipe.js"></script>

Next
This in your body

Code: Select all

<div id='slider' class='swipe'>
<div class='swipe-wrap'>
<div class="page">
<div id="cnt"  class="v-wrap">
<div class="v-box">

<!-- show arrow to scroll on desktop
<div id="right-arrow"
    style="font-size: 20px; width: 10px; position: relative; left: 740px; top: 565px; z-index: 1000;"    
    onclick="javascript:window.mySwipe.next();">
    <a href="#">></a>
</div>

Worked for me.
Should me somewhere earlier in this thread.


Send using Tapatalk
1x Raspberry PI 3 With Domoticz V.3.7318
1X RFXtrx433 USB 433.92MHz
1X Synology DS213j Nas
Toon by Eneco including Toon Zon
several KAKU switches and dimmers
Mysensors WIFI Gateway including meters, switches en humidity sensors
Wifi Dimmers (home made)
SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

Re: NEW frontpage.html - request comments

Post by SwordFish »

That's the problem, I used no iframes. All are separated divs.
woody4165
Posts: 476
Joined: Monday 14 March 2016 13:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: NEW frontpage.html - request comments

Post by woody4165 »

Hi all

very nice job for this frontpage.
I was already capable (I'm very poor in coding) to fit some items, from cameras to switch to values.

I was thinking to use some ESP8266+Relays to manage blinds and awning and use it with Domoticz.

I took a look at the code and I'm missing where is defined the item.SwitchType or where it come from to check it's a "Blinds" typo.

Do you think also that I can adapt the code to use with ESP8266 and relays?

Thanks
Woody
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
RobertH
Posts: 12
Joined: Sunday 15 November 2015 19:10
Target OS: Windows
Domoticz version:
Location: Norway, Kongsberg
Contact:

Re: NEW frontpage.html - request comments

Post by RobertH »

Hi,

Im starting to get the status page like I want it:
status.png
status.png (217.09 KiB) Viewed 3058 times
But I would like to integrate "+ VOL -" into one cell, so when you press + it adjust volume up and the opposit for -. And pressing the VOL would toggle mute. Is this in any way possible? Below I have the curl commands. I could not figure out a good way to do this via Domoticz virtual switches.

Code: Select all

Volume UP 1db
curl --data "<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Volume><Lvl><Val>Up 1 dB</Val><Exp></Exp><Unit></Unit></Lvl></Volume></Main_Zone></YAMAHA_AV>" http://192.168.1.50/YamahaRemoteControl/ctrl

Volume DOWN 1db
curl --data "<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Volume><Lvl><Val>Down 1 dB</Val><Exp></Exp><Unit></Unit></Lvl></Volume></Main_Zone></YAMAHA_AV>" http://192.168.1.50/YamahaRemoteControl/ctrl

Mute Toggle
curl --data "<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Volume><Mute>On/Off</Mute></Volume></Main_Zone></YAMAHA_AV>" http://192.168.1.50/YamahaRemoteControl/ctrl
Robert
Domoticz running on Windows Server 2008 in VMware (ESXi), UZB1 stick, 3x FIBARO FGD212 Dimmer, 1x FIBARO RGBW Controller FGRGBWM-441, 2x FIBARO FGMS001 Motion Sensor and 2x Popp 009006 Plug-in Switch
SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

Re: NEW frontpage.html - request comments

Post by SwordFish »

I like to share my frontpage for those that want to used it. Keep in mind that I have no coding skills. At the moment it is only one page because I can't get the swipe to work. So if someone wants to try to get swiping to work ;) . Thanks to G3rard, its his frontpage I modified.
Frontpage.zip
(180.59 KiB) Downloaded 406 times
Attachments
Knipsel.PNG
Knipsel.PNG (77.06 KiB) Viewed 3026 times
M4RcO
Posts: 11
Joined: Saturday 12 March 2016 18:45
Target OS: Windows
Domoticz version: 3.4834
Location: Germany
Contact:

Re: NEW frontpage.html - request comments

Post by M4RcO »

I have a Problem, my Frontpage isn´t working.
I paste my ip in frontpage_setting.js and paste it to domoticz/www but in all browserers Domoticz Offline(http://localhost:8080/frontpage.htm),
the normal dashboard is working.

Pls help.

Thx :)
Hardware: Shuttle XS35V5Pro
OS: Windows 7 Pro x64
Domoticz branch: beta
Domoticz Version: V3.5010
toreandre
Posts: 91
Joined: Tuesday 19 January 2016 12:51
Target OS: -
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by toreandre »

M4RcO wrote:I have a Problem, my Frontpage isn´t working.
I paste my ip in frontpage_setting.js and paste it to domoticz/www but in all browserers Domoticz Offline(http://localhost:8080/frontpage.htm),
the normal dashboard is working.

Pls help.

Thx :)
I think you should use .html not .htm
M4RcO
Posts: 11
Joined: Saturday 12 March 2016 18:45
Target OS: Windows
Domoticz version: 3.4834
Location: Germany
Contact:

Re: NEW frontpage.html - request comments

Post by M4RcO »

Thx :D now it works.

But i have another Problem.

How can i use Sunset and Sunrise Time in my Frontpage ?

Pls help :)
Hardware: Shuttle XS35V5Pro
OS: Windows 7 Pro x64
Domoticz branch: beta
Domoticz Version: V3.5010
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: NEW frontpage.html - request comments

Post by jannl »

I think you can get them directly from the Domoticz variable. I will check when I am at home this evening
clubeddie
Posts: 80
Joined: Saturday 19 March 2016 21:12
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by clubeddie »

First of all i want to send my compliments for all the work the developers here have done! Very great.

I want to use one of the frontpages. First i have read all 47 pages to catch up. I tried several frontpages, but i cannot get the frontpage of aiolos working?!
https://github.com/aiolos/frontpage

I changed the settings of frontpage_settings.js to my domoticz server. And some IDX components. When i open the page, only the time, sun up/sun down is showed. For some reason it reads nothing else.

If i use the same configuration on another frontpage it reads data?
I use domoticz on my synology, for now i upload the frontpage in the WWW folder of domoticz, if it is working and i am satisfied i change it to synology web.

Has anyone a clue?
aiolos
Posts: 127
Joined: Sunday 13 September 2015 18:58
Target OS: Raspberry Pi / ODroid
Domoticz version: stable
Location: Nieuwegein, NL
Contact:

Re: NEW frontpage.html - request comments

Post by aiolos »

Strange, my version is based on g3rards version, it should not behave really different. Maybe because I use floor plan 1 or 2 instead of 0. If you don't have a floor plan with that number, the FrontPage won't get any data.

Edit: try changing the $.roomplan variable
Contributor to Dashticz
More on my Github profile
clubeddie
Posts: 80
Joined: Saturday 19 March 2016 21:12
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by clubeddie »

Thank you for quick reply. I played already a little with that. But still no result.
I created a roomplan (ID 2) and put al my devices in it.
$(document).ready(function() {
$.roomplan = 2;
$.domoticzurl = "http://192.168.2.213:8084";
This is my Domoticz temporaly setup
Knipsel.PNG
Knipsel.PNG (52.12 KiB) Viewed 2677 times
Then i edited some of the pagearray's that i use, but still no data? The only data is time and sunset/sunrise.
['31', 'Status', 'cell6', 'Printer', '1', '1'],
['41', 'Status', 'cell7', 'Printserver', '1', '1'],
['447', 'Temp', 'cell8', 'Woonkamer', '1', '0'],
['30', 'Status', 'cell9', 'Kodi-1','1','1'],
['44', 'Status', 'cell10', 'Kodi-2','1','1'],
I have basic authentication set, but also configured the local network.
When i change the IP address or portnumber i get the default nightscreen, so i know it has no connection.

I see there is a frontpage.html and index.html, and also a a frontpage_settings.js and a settings.js. So i both configured them.

The question is, why am i so stupid to get it working ;)

Edit: My frontpage shows this:
Knipsel2.gif
Knipsel2.gif (301.88 KiB) Viewed 2677 times
woody4165
Posts: 476
Joined: Monday 14 March 2016 13:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: NEW frontpage.html - request comments

Post by woody4165 »

Maybe you can try leaving roomplan as default (0). I have several roomplan created, but in my frontpage_settings.js the value is 0.
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
clubeddie
Posts: 80
Joined: Saturday 19 March 2016 21:12
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by clubeddie »

Thank you for your reply, because i didn't used the roomplan that was my first configuration. And sadly, same issue.
woody4165
Posts: 476
Joined: Monday 14 March 2016 13:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: NEW frontpage.html - request comments

Post by woody4165 »

Have you tried calling on the browser http://192.168.1.yy:zzzz/json.htm?type=devices&rid=xx for each idx (xx) and check how is named the value that you want to show, if it's correct?

Otherwise I don't know what can be.
I'm using same frontpage and modified for my devices and it's working nice.
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
clubeddie
Posts: 80
Joined: Saturday 19 March 2016 21:12
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by clubeddie »

Woody, thank you for your reply.
already done that trough, http://192.168.2.x:xxxx/json.htm?type=devices&jsoncallback=?
so i know for sure that what i asked is good?

I don't get it either, it cannot be that hard to put the right information in it.
I download the package again, changed my ip address and port number, enter the room ID. Changed a couple of IDX. Upload it to my synology and... bummer, nothing works? I don't see what i am missing.

At the end it is offcourse something stupid, but so far no solution!
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: NEW frontpage.html - request comments

Post by jannl »

On a windows PC in for instance windows 10 (in Chrome), you can enable 'inspect' or 'Debug' or so and may be see what the error is
clubeddie
Posts: 80
Joined: Saturday 19 March 2016 21:12
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by clubeddie »

On index.html i get
Uncaught ReferenceError: vdate is not defined frontpage.js 93
which is this line

Code: Select all

    if (thisday == vdate) {
On frontpage.html i get
frontpage.js:522 Uncaught ReferenceError: switchclick is not defined(anonymous function) @ frontpage.js:522
x.extend.each @ jquery.min.js:4
(anonymous function) @ frontpage.js:
55c@ jquery.min.js:
4p.fireWith @ jquery.min.js:
4k @ jquery.min.js:
6r @ jquery.min.js:6

http://192.168.1.1/videostream.cgi?user ... d=password Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
Which is this line

Code: Select all

  $('#' + vlabel).html( '<div ' + switchclick + ' style="' + vattr + ';' + alarmcss + '">' + vdata + vdataSuffix + '</div>');
BTW i extracted all the files, and upload them in de WWW folder inside the folder 'Frontpage'
aiolos
Posts: 127
Joined: Sunday 13 September 2015 18:58
Target OS: Raspberry Pi / ODroid
Domoticz version: stable
Location: Nieuwegein, NL
Contact:

Re: NEW frontpage.html - request comments

Post by aiolos »

I think you have used some switch types I don't use and have not really tested in the refactoring of the whole js file.

I just committed some fixes (quite ugly by just adding the variables so they exist). Please pull/download the new version of frontpage.js.
Contributor to Dashticz
More on my Github profile
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest