Page 1 of 5

Yet another frontpage

Posted: Thursday 27 August 2015 15:26
by Zeus
I've been working with domoticz for a few months now, and I was looking for a good way to control my devices from a tablet. As I didn't really like the looks of the existing frontpage.html solution, I decided to build some scripts within the AdminLTE template. I also included some basic support to control my chromecast and sonos systems, although that functionality doesn't have to do with domoticz.

The result looks like this
Image

The responsive version can be used on smartphones:
Image

Maybe someone else also likes the design, idea or code. You can find the code on github. Comments are appreciated as well, so I could improve the page.

Re: Yet another frontpage

Posted: Thursday 27 August 2015 16:33
by ThinkPad
Looking very good! I will have a try at it this weekend :mrgreen:

Re: Yet another frontpage

Posted: Thursday 27 August 2015 16:38
by remb0
Very nice! last year I also looked @ adminlte. a very nice interface!! like the options/ menus and configuration
gonna try it soon.

a little sidenote:
I understand everyone makes his own frontpage. but No frontpage has ever had all devices and options from domoticzs working.
most of the frontpages dies slowly.
So I hope you and other creative webdevelopers wants to help gizmocuz to make the own domoticz core/frontpage more modular.
Like he explains here: http://domoticz.com/forum/viewtopic.php ... 5&start=40

when the core is easier to modify and extend webdevs can build great stuf as modules new options.
I also hope it would be more like a blocky of module system. so users can build there own layout whitout knowledge of html javascript css etc..

but I think we have a log way to go....

Re: Yet another frontpage

Posted: Monday 31 August 2015 15:22
by Zeus
You're right. This frontpage also doesn't have all devices working. Actually, currently it only works for certain types of devices that I have at home.

I also agree that it would be better to have a modular core and the flexibility to create such a frontpage as some kind of skin. Unfortunately my C++ skills are limited, so I'm not really sure whether I could help in making the core more modular.

Re: Yet another frontpage

Posted: Monday 31 August 2015 18:08
by Egregius
I think the core is very modular. With the API interface you can do (almost) whatever you want.
A great part of the default user interface uses also that same json API.
So, no mather what program language you like you can handle it by json.
I prefer PHP, others prefer javascript or others.
The most difficult part is to get all variables in a consistent way. I have a PHP script that handles all devices I have and put all the needed data in a bunch of variables.
Because of the wide diversity of devices and their replys it's quit difficult to handle them all.
It would be great that some hobby programmers for each language put their head together so a uniform script can be created.
That script could then be the base for everyone that wants to develop a userinterface. He only has to choose wich language he wants to work with.

Re: Yet another frontpage

Posted: Sunday 29 November 2015 20:01
by rtenklooster
Hi!
Nice work! I don't get why this post isn't more populair. It really looks great.
On of the nicest theme's i've seen so far. The only thing is, ordinary switches won't get updated.
They keep on rotating, witch is weird. Dimmers and my opentherm gateway are working fine though!
Schermafbeelding 2015-11-29 om 19.58.52.png
Schermafbeelding 2015-11-29 om 19.58.52.png (173.72 KiB) Viewed 19762 times
P.s. Although they keep in the "refreshing" state, clicking on them will actually work. So the IDX is treated properly.
Keep on the good work :) I Like it!

One suggestion might be, to build some kind of refresh delay for the central heating setpoint.
It takes some time before domoticz is updated, so lets say it's set at 20 degrees, i adjust it to 18, a few seconds later it jumps back to 20, until the actual temperature is updated by the opentherm gateway.
So it might be nice to update the setpoint for x seconds after the last change.

Besides that, It would be nice to have the possibility to hide, or unhide the top and side panels from the config file.
I don't use anything else besides domoticz ( at the moment)

Also: implement half degrees in the temperature slider, add a language file, for phrases like "Set level 85 percent" -> Dim naar 85% or something like that :)

Thanks again :)

Update: I think i've found the problem :) Roomplan did not contain those devices. :)

Re: Yet another frontpage

Posted: Sunday 29 November 2015 21:12
by Derik
A very nice template.

Perhaps it is so quiet because not everyone knows how to install it [when I look at myself ...]

Is this template ready? Or is there a piece each time?
How can I keep it simple up to date? [Or should I always copy the folder?

Work all the options available at:https://almsaeedstudio.com/AdminLTE with Domoticz?

My biggest problem appears to me how I get it all working ..


But still very nice !!!

Re: Yet another frontpage

Posted: Monday 30 November 2015 22:09
by rtenklooster
Nice :) :)
Unknown-3.jpg
Unknown-3.jpg (146.71 KiB) Viewed 19659 times
Unknown.jpg
Unknown.jpg (109 KiB) Viewed 19659 times

Re: Yet another frontpage

Posted: Monday 30 November 2015 22:13
by Derik
pffff
like to have that.....

Very nice...

Re: Yet another frontpage

Posted: Thursday 14 January 2016 17:58
by HoLeeShiet
Nice! How did you attached the tablet without power cord?

Re: Yet another frontpage

Posted: Thursday 14 January 2016 18:03
by locogek
Maybe it is something for geofencing to choose if you want to set a switch on or of or both. Example I have made a virtual switch that will set on/off different things. But they need to go off if I am not at home anymore. If I come back I don't want always that they go on.

Verstuurd vanaf mijn ONE A2003 met Tapatalk

Yet another frontpage

Posted: Saturday 16 January 2016 22:31
by HoLeeShiet
I can't get Chromecast working. I'm looking for step by step instructions. Any help appreciated.

Re: Yet another frontpage

Posted: Saturday 30 January 2016 14:19
by HansLe
I have some probems to get nice frontpage operational. The wheater information works very well. I have problems to get my switches working. The status is never updated and only the ON command seems to work. What am I doing wrong?

edit
problem solved:
I have edited domotics.js and added this line of code

Code: Select all

Domotica.ui.toggleSwitch(element, result.Status == "On" || result.Status.indexOf( "Set Level" ) == 1 );
after this line (107)

Code: Select all

Domotica.ui.toggleSwitch(element, result.Status == "Off" || result.Status.indexOf( "Set Level" ) == 0 );
Next challenge: get my Sonos device operational while using Easy Sonos

edit
Solved, I've changed the sonos.js and I'm using the EasySonos softwre. I also changed the code to define more than one sonos system.

Re: Yet another frontpage

Posted: Monday 01 February 2016 23:27
by HansLe
I want to make some boxes for displaying information. F.e temperature and humidity. Or windspeed en winddirection. I don't know how to get and display these values (see for example the frontpage of G3rard). Can someone advice me please.

edit
solved

Re: Yet another frontpage

Posted: Sunday 14 February 2016 20:15
by arnoldg
Can i somehow implement electrical power consumption in a box and waybee the stats from past week or day.

Re: Yet another frontpage

Posted: Tuesday 16 February 2016 19:41
by HansLe
@arnoldg, you can show every data you want as long as it is available in a Domoticz device.

You have to changethe domoticz.js at some places. I've introduced in my code a datavalue "class"

Code: Select all

				if(element.hasClass("dimmer-switch")) {
					that.updateWidget.dimmerSwitch(element, result);
				} else if(element.hasClass("switch")) {
					that.updateWidget.normalSwitch(element, result);
				} else if(element.hasClass("heater")) {
					that.updateWidget.heater(element, result);
				} else if(element.hasClass("temperature")) {
					that.updateWidget.temperature(element, result);
				} else if(element.hasClass("humidity")) {
					that.updateWidget.humidity(element, result);
				} else if(element.hasClass("datavalue")) {
					that.updateWidget.datavalue(element, result);					
				} else {
					that.updateWidget.generic(element, result); 
					
In the update widget (still domoticz.js):

Code: Select all

	
		},

		datavalue: function(element, result) {                // 1-2 toegevoegd
			var datavalue = result.Data ;
	
			// Update the datavalue itself
			element.find(".datavalue" ).html(datavalue);
			
			// Also do generic updating
			this.generic(element, result);
		},
In the HTML code you have to define a box, for example:

Code: Select all

            <div class="col col-md-2 col-sm-2 col-xs-2">
			<div class="box datavalue" data-domoticz-id="84" data-status="true"">
			  <div class="box-header box-solid box-info with-border  bg-red ">
   				 <h3 class="box-title">Windrichting</h3>
				</div><!-- /.box-header> --> 
                 <h4><div class="box-body datavalue ">...</div></h4>
                 <!-- /.box-body -->
			</div><!-- /.box -->	 
            </div><!-- /.col -->

Re: Yet another frontpage

Posted: Wednesday 17 February 2016 19:25
by arnoldg
i can't get it to work, below is the output of the json string.
i wan't to use ID:60 and the usage output.
that is not the problem, in domoticz.js a read this

Code: Select all

      	datavalue: function(element, result) {                // 1-2 toegevoegd
         	var datavalue = result.Usage;
   
         // Update the datavalue itself
         eleme....
but it doesn't display the value to the screen, is there a way to see what is going wrong.
HTML code on the site

Code: Select all

           		<div class="col col-md-2 col-sm-2 col-xs-2">
					<div class="box" data-domoticz-id="60" data-status="true"">
        				<div class="box-header box-solid box-info with-border bg-red ">
            				<h3 class="box-title">Elektra</h3>
			            </div><!-- /.box-header> -->
            		     <h4><div class="box-body datavalue">...</div></h4>
                 		<!-- /.box-body -->
		        	</div><!-- /.box -->   
            	</div><!-- /.col -->
the rest is just as you descript.

please tell me what i do wrong.

Code: Select all

{
   "ActTime" : 1455731410,
   "ServerTime" : "2016-02-17 18:50:10",
   "Sunrise" : "07:47",
   "Sunset" : "17:47",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "On, Level: 100 %",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 12,
         "HardwareName" : "Mysensor serial",
         "HardwareType" : "MySensors Gateway USB",
         "HardwareTypeVal" : 41,
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0000064",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2016-02-17 17:35:03",
         "Level" : 100,
         "LevelInt" : 15,
         "MaxDimLevel" : 15,
         "Name" : "Bank",
         "Notifications" : "false",
         "PlanID" : "2",
         "PlanIDs" : [ 2 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "On/Off",
         "SwitchTypeVal" : 0,
         "Timers" : "false",
         "Type" : "Lighting 2",
         "TypeImg" : "lightbulb",
         "Unit" : 3,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "339",
         "YOffset" : "255",
         "idx" : "103"
      },
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "On, Level: 100 %",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 12,
         "HardwareName" : "Mysensor serial",
         "HardwareType" : "MySensors Gateway USB",
         "HardwareTypeVal" : 41,
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0000064",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2016-02-17 17:35:03",
         "Level" : 100,
         "LevelInt" : 15,
         "MaxDimLevel" : 15,
         "Name" : "Computer",
         "Notifications" : "false",
         "PlanID" : "2",
         "PlanIDs" : [ 2 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "On/Off",
         "SwitchTypeVal" : 0,
         "Timers" : "false",
         "Type" : "Lighting 2",
         "TypeImg" : "lightbulb",
         "Unit" : 2,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "103",
         "YOffset" : "316",
         "idx" : "102"
      },
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "On, Level: 100 %",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 12,
         "HardwareName" : "Mysensor serial",
         "HardwareType" : "MySensors Gateway USB",
         "HardwareTypeVal" : 41,
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0000064",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2016-02-17 17:35:05",
         "Level" : 100,
         "LevelInt" : 15,
         "MaxDimLevel" : 15,
         "Name" : "TV",
         "Notifications" : "false",
         "PlanID" : "2",
         "PlanIDs" : [ 2 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "On/Off",
         "SwitchTypeVal" : 0,
         "Timers" : "false",
         "Type" : "Lighting 2",
         "TypeImg" : "lightbulb",
         "Unit" : 5,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "145",
         "YOffset" : "171",
         "idx" : "105"
      },
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "On, Level: 100 %",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 12,
         "HardwareName" : "Mysensor serial",
         "HardwareType" : "MySensors Gateway USB",
         "HardwareTypeVal" : 41,
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0000064",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2016-02-17 18:25:33",
         "Level" : 100,
         "LevelInt" : 15,
         "MaxDimLevel" : 15,
         "Name" : "Vensterbank",
         "Notifications" : "false",
         "PlanID" : "2",
         "PlanIDs" : [ 2 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "On/Off",
         "SwitchTypeVal" : 0,
         "Timers" : "false",
         "Type" : "Lighting 2",
         "TypeImg" : "lightbulb",
         "Unit" : 4,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "310",
         "YOffset" : "55",
         "idx" : "104"
      },
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "21.0",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 13,
         "HardwareName" : "Opentherm",
         "HardwareType" : "OpenTherm Gateway USB",
         "HardwareTypeVal" : 18,
         "HaveTimeout" : false,
         "ID" : "0000005",
         "LastUpdate" : "2016-02-17 18:49:44",
         "Name" : "Room Setpoint",
         "Notifications" : "false",
         "PlanID" : "2",
         "PlanIDs" : [ 2 ],
         "Protected" : false,
         "SetPoint" : "21.0",
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "SetPoint",
         "Timers" : "false",
         "Type" : "Thermostat",
         "TypeImg" : "override_mini",
         "Unit" : 0,
         "Used" : 1,
         "XOffset" : "248",
         "YOffset" : "140",
         "idx" : "142"
      },
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "21.0 C",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 13,
         "HardwareName" : "Opentherm",
         "HardwareType" : "OpenTherm Gateway USB",
         "HardwareTypeVal" : 18,
         "HaveTimeout" : false,
         "ID" : "0008",
         "LastUpdate" : "2016-02-17 18:49:44",
         "Name" : "Room Temperature",
         "Notifications" : "false",
         "PlanID" : "2",
         "PlanIDs" : [ 2 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "TFA 30.3133",
         "Temp" : 21.0,
         "Timers" : "false",
         "Type" : "Temp",
         "TypeImg" : "temperature",
         "Unit" : 8,
         "Used" : 1,
         "XOffset" : "95",
         "YOffset" : "419",
         "idx" : "143"
      },
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "Counter" : "1267.663",
         "CounterDeliv" : "0.000",
         "CounterDelivToday" : "0.000 kWh",
         "CounterToday" : "6.692 kWh",
         "CustomImage" : 0,
         "Data" : "538022;729641;0;0;528;0",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 10,
         "HardwareName" : "Smart meter",
         "HardwareType" : "P1 Smart Meter USB",
         "HardwareTypeVal" : 4,
         "HaveTimeout" : false,
         "ID" : "1",
         "LastUpdate" : "2016-02-17 18:50:02",
         "Name" : "Elektra",
         "Notifications" : "false",
         "PlanID" : "2",
         "PlanIDs" : [ 2 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "Energy",
         "SwitchTypeVal" : 0,
         "Timers" : "false",
         "Type" : "P1 Smart Meter",
         "TypeImg" : "counter",
         "Unit" : 1,
         "Usage" : "528 Watt",
         "UsageDeliv" : "0 Watt",
         "Used" : 1,
         "XOffset" : "91",
         "YOffset" : "26",
         "idx" : "60"
      },
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 10,
         "Data" : "Off",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 13,
         "HardwareName" : "Opentherm",
         "HardwareType" : "OpenTherm Gateway USB",
         "HardwareTypeVal" : 18,
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0000071",
         "Image" : "Fireplace",
         "IsSubDevice" : false,
         "LastUpdate" : "2016-02-17 18:45:14",
         "Level" : 0,
         "LevelInt" : 0,
         "MaxDimLevel" : 15,
         "Name" : "FlameOn",
         "Notifications" : "false",
         "PlanID" : "2",
         "PlanIDs" : [ 2 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "Off",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "On/Off",
         "SwitchTypeVal" : 0,
         "Timers" : "false",
         "Type" : "Lighting 2",
         "TypeImg" : "lightbulb",
         "Unit" : 1,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "31",
         "YOffset" : "584",
         "idx" : "137"
      },
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 11,
         "Data" : "On, Level: 100 %",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 13,
         "HardwareName" : "Opentherm",
         "HardwareType" : "OpenTherm Gateway USB",
         "HardwareTypeVal" : 18,
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0000066",
         "Image" : "Water",
         "IsSubDevice" : false,
         "LastUpdate" : "2016-02-13 12:11:52",
         "Level" : 100,
         "LevelInt" : 15,
         "LevelNames" : "Off",
         "MaxDimLevel" : 15,
         "Name" : "DHW_enabled",
         "Notifications" : "false",
         "PlanID" : "2",
         "PlanIDs" : [ 2 ],
         "Protected" : false,
         "SelectorStyle" : 0,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "Selector",
         "SwitchTypeVal" : 18,
         "Timers" : "false",
         "Type" : "Lighting 2",
         "TypeImg" : "lightbulb",
         "Unit" : 1,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "31",
         "YOffset" : "533",
         "idx" : "130"
      },
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 15,
         "Data" : "On, Level: 100 %",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 13,
         "HardwareName" : "Opentherm",
         "HardwareType" : "OpenTherm Gateway USB",
         "HardwareTypeVal" : 18,
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0000065",
         "Image" : "Heating",
         "IsSubDevice" : false,
         "LastUpdate" : "2016-02-17 15:48:11",
         "Level" : 100,
         "LevelInt" : 15,
         "LevelNames" : "Off",
         "MaxDimLevel" : 15,
         "Name" : "CH_enabled",
         "Notifications" : "false",
         "PlanID" : "2",
         "PlanIDs" : [ 2 ],
         "Protected" : false,
         "SelectorStyle" : 0,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "Selector",
         "SwitchTypeVal" : 18,
         "Timers" : "false",
         "Type" : "Lighting 2",
         "TypeImg" : "lightbulb",
         "Unit" : 1,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "33",
         "YOffset" : "484",
         "idx" : "129"
      },
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "On, Level: 100 %",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 12,
         "HardwareName" : "Mysensor serial",
         "HardwareType" : "MySensors Gateway USB",
         "HardwareTypeVal" : 41,
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0000064",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2016-02-17 17:30:49",
         "Level" : 100,
         "LevelInt" : 15,
         "MaxDimLevel" : 15,
         "Name" : "Keuken",
         "Notifications" : "false",
         "PlanID" : "2",
         "PlanIDs" : [ 2 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "On/Off",
         "SwitchTypeVal" : 0,
         "Timers" : "false",
         "Type" : "Lighting 2",
         "TypeImg" : "lightbulb",
         "Unit" : 1,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "101"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}

Re: Yet another frontpage

Posted: Wednesday 17 February 2016 23:54
by HansLe
@arnoldg:

you have added this code to?

Code: Select all

				} else if(element.hasClass("datavalue")) {
					that.updateWidget.datavalue(element, result);	
Can you add the console log line:

Code: Select all

		datavalue: function(element, result) {                // 1-2 toegevoegd
			var datavalue = result.Data ;

			console.log ( "Datavalue: " + result.idx + " " + result.Usage); 


I use chrome to inspect what happens:
After changing the code
refresh the page with the box
right click your mouse
select inspect
select tab console
you see there the printed line? If not use some more console.log statements to investigate where it's going wrong.

Re: Yet another frontpage

Posted: Thursday 18 February 2016 23:31
by HansLe
I've a TV that supports Jointspace (http://jointspace.sourceforge.net) and after a few evenings I have a new TV dashboard :D
tv dashboard.JPG
tv dashboard.JPG (47.48 KiB) Viewed 17649 times

Re: Yet another frontpage

Posted: Thursday 18 February 2016 23:37
by HansLe
And I've changed the Sonos script. I'm now able to define more devices.
music dashboard.JPG
music dashboard.JPG (31.38 KiB) Viewed 17647 times