Page 47 of 66

Re: NEW frontpage.html - request comments

Posted: Wednesday 16 March 2016 18:34
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.

NEW frontpage.html - request comments

Posted: Wednesday 16 March 2016 20:36
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

Re: NEW frontpage.html - request comments

Posted: Wednesday 16 March 2016 20:40
by SwordFish
That's the problem, I used no iframes. All are separated divs.

Re: NEW frontpage.html - request comments

Posted: Thursday 17 March 2016 14:04
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

Re: NEW frontpage.html - request comments

Posted: Friday 18 March 2016 8:36
by RobertH
Hi,

Im starting to get the status page like I want it:
status.png
status.png (217.09 KiB) Viewed 3046 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

Re: NEW frontpage.html - request comments

Posted: Friday 18 March 2016 15:56
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

Re: NEW frontpage.html - request comments

Posted: Thursday 24 March 2016 22:37
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 :)

Re: NEW frontpage.html - request comments

Posted: Friday 25 March 2016 12:45
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

Re: NEW frontpage.html - request comments

Posted: Friday 25 March 2016 12:51
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 :)

Re: NEW frontpage.html - request comments

Posted: Friday 25 March 2016 14:06
by jannl
I think you can get them directly from the Domoticz variable. I will check when I am at home this evening

Re: NEW frontpage.html - request comments

Posted: Sunday 27 March 2016 18:11
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?

Re: NEW frontpage.html - request comments

Posted: Sunday 27 March 2016 20:27
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

Re: NEW frontpage.html - request comments

Posted: Monday 28 March 2016 8:40
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 2665 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 2665 times

Re: NEW frontpage.html - request comments

Posted: Monday 28 March 2016 9:08
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.

Re: NEW frontpage.html - request comments

Posted: Monday 28 March 2016 9:12
by clubeddie
Thank you for your reply, because i didn't used the roomplan that was my first configuration. And sadly, same issue.

Re: NEW frontpage.html - request comments

Posted: Monday 28 March 2016 10:48
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.

Re: NEW frontpage.html - request comments

Posted: Monday 28 March 2016 13:07
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!

Re: NEW frontpage.html - request comments

Posted: Monday 28 March 2016 13:30
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

Re: NEW frontpage.html - request comments

Posted: Monday 28 March 2016 14:11
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'

Re: NEW frontpage.html - request comments

Posted: Monday 28 March 2016 14:39
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.