Yet another frontpage

Moderator: leecollings

Zeus
Posts: 2
Joined: Friday 14 August 2015 14:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Yet another frontpage

Post 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.
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Yet another frontpage

Post by ThinkPad »

Looking very good! I will have a try at it this weekend :mrgreen:
I am not active on this forum anymore.
User avatar
remb0
Posts: 499
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Yet another frontpage

Post 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....
Zeus
Posts: 2
Joined: Friday 14 August 2015 14:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Yet another frontpage

Post 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.
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Yet another frontpage

Post 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.
rtenklooster
Posts: 36
Joined: Tuesday 23 December 2014 16:20
Target OS: Linux
Domoticz version:
Contact:

Re: Yet another frontpage

Post 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 19429 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. :)
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Yet another frontpage

Post 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 !!!
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
rtenklooster
Posts: 36
Joined: Tuesday 23 December 2014 16:20
Target OS: Linux
Domoticz version:
Contact:

Re: Yet another frontpage

Post by rtenklooster »

Nice :) :)
Unknown-3.jpg
Unknown-3.jpg (146.71 KiB) Viewed 19326 times
Unknown.jpg
Unknown.jpg (109 KiB) Viewed 19326 times
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Yet another frontpage

Post by Derik »

pffff
like to have that.....

Very nice...
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
HoLeeShiet
Posts: 26
Joined: Tuesday 18 March 2014 21:19
Target OS: -
Domoticz version:
Contact:

Re: Yet another frontpage

Post by HoLeeShiet »

Nice! How did you attached the tablet without power cord?
Using Tapatalk
locogek
Posts: 28
Joined: Thursday 15 October 2015 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Yet another frontpage

Post 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
HoLeeShiet
Posts: 26
Joined: Tuesday 18 March 2014 21:19
Target OS: -
Domoticz version:
Contact:

Yet another frontpage

Post by HoLeeShiet »

I can't get Chromecast working. I'm looking for step by step instructions. Any help appreciated.
Using Tapatalk
HansLe
Posts: 25
Joined: Wednesday 13 January 2016 21:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V2.3530
Location: Netherlands
Contact:

Re: Yet another frontpage

Post 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.
Last edited by HansLe on Tuesday 16 February 2016 19:44, edited 1 time in total.
Raspberry Pi B+ | Domoticz v3.4834 | RFXtrx433E | Action sockets and remote control (a cheap solution to start with)
Sonos device: control via Action remote control and EasySonos (via Domoticz scripts)
2 x Chresta TX320, Kaku sensoren, D-link camera
HansLe
Posts: 25
Joined: Wednesday 13 January 2016 21:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V2.3530
Location: Netherlands
Contact:

Re: Yet another frontpage

Post 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
Last edited by HansLe on Tuesday 16 February 2016 19:45, edited 1 time in total.
Raspberry Pi B+ | Domoticz v3.4834 | RFXtrx433E | Action sockets and remote control (a cheap solution to start with)
Sonos device: control via Action remote control and EasySonos (via Domoticz scripts)
2 x Chresta TX320, Kaku sensoren, D-link camera
arnoldg
Posts: 15
Joined: Tuesday 29 September 2015 20:35
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Almelo, netherlands
Contact:

Re: Yet another frontpage

Post by arnoldg »

Can i somehow implement electrical power consumption in a box and waybee the stats from past week or day.
HansLe
Posts: 25
Joined: Wednesday 13 January 2016 21:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V2.3530
Location: Netherlands
Contact:

Re: Yet another frontpage

Post 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 -->
Last edited by HansLe on Tuesday 23 February 2016 23:23, edited 1 time in total.
Raspberry Pi B+ | Domoticz v3.4834 | RFXtrx433E | Action sockets and remote control (a cheap solution to start with)
Sonos device: control via Action remote control and EasySonos (via Domoticz scripts)
2 x Chresta TX320, Kaku sensoren, D-link camera
arnoldg
Posts: 15
Joined: Tuesday 29 September 2015 20:35
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Almelo, netherlands
Contact:

Re: Yet another frontpage

Post 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"
}
HansLe
Posts: 25
Joined: Wednesday 13 January 2016 21:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V2.3530
Location: Netherlands
Contact:

Re: Yet another frontpage

Post 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.
Raspberry Pi B+ | Domoticz v3.4834 | RFXtrx433E | Action sockets and remote control (a cheap solution to start with)
Sonos device: control via Action remote control and EasySonos (via Domoticz scripts)
2 x Chresta TX320, Kaku sensoren, D-link camera
HansLe
Posts: 25
Joined: Wednesday 13 January 2016 21:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V2.3530
Location: Netherlands
Contact:

Re: Yet another frontpage

Post 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 17316 times
Raspberry Pi B+ | Domoticz v3.4834 | RFXtrx433E | Action sockets and remote control (a cheap solution to start with)
Sonos device: control via Action remote control and EasySonos (via Domoticz scripts)
2 x Chresta TX320, Kaku sensoren, D-link camera
HansLe
Posts: 25
Joined: Wednesday 13 January 2016 21:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V2.3530
Location: Netherlands
Contact:

Re: Yet another frontpage

Post 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 17314 times
Raspberry Pi B+ | Domoticz v3.4834 | RFXtrx433E | Action sockets and remote control (a cheap solution to start with)
Sonos device: control via Action remote control and EasySonos (via Domoticz scripts)
2 x Chresta TX320, Kaku sensoren, D-link camera
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests