Page 4 of 184

Re: New Dashboard Design

Posted: Sunday 12 March 2017 15:25
by Racierox
robgeerts wrote:I think you've set the wrong IP or PORTnumber of Domoticz.
Or do you have a username/password?

If you have username/password, enter:

http://username:pass@ip:port
e.g.: http://admin:[email protected]:8080

or if you don't have a password:
http://ip:port
e.g.: http://192.168.1.23:8080

If it still doesn't work, open your console (F12) en see if it shows any errors in console-tab.
Thanks for you reply. I got it to work!

Is there a possibility to select which switches to show (because only regular switches work)?
Noob question: how do I switch between this and the 'normal dashboard'? I can't reach the normal dashboard anymore. :oops:
It may be an option to use them both on different devices.

Great job so far!

Re: New Dashboard Design

Posted: Sunday 12 March 2017 19:56
by robgeerts
Ierlandfan wrote:Did a git clone (just to make sure)...same result.
I checked out branch 8fb5c41f and that one worked immediately.
No errors in the console for as far as I can see. I can see that nzbget (which i don't use) is the only part that updates.
I see what I did there. I disabled some code for debugging purposes.
Replace, on row 16 of main.js

Code: Select all

//getDevices(); 
with:

Code: Select all

getDevices(); 

Racierox wrote: Is there a possibility to select which switches to show (because only regular switches work)?
It shows the switched you've marked as favorite.
There's no other way unfortunately at the moment...
Racierox wrote: Noob question: how do I switch between this and the 'normal dashboard'?
Oh, you copied my files to the main Domoticz-folder?
That's not the right way, you had to copy my files in a separate folder...

Re: New Dashboard Design

Posted: Sunday 12 March 2017 23:18
by Racierox
At first I copied the files to a subfolder, but I didn't know (and still don't :oops:) how to open the dasboard that way.
An update solved to problem, so it's back to normal again.
Thanks for all your effort so far, it looks great.Unfortunately it's not suited for me because I have a lot of utility sensors, a Sonos and other switches.

Re: New Dashboard Design

Posted: Sunday 12 March 2017 23:28
by robgeerts
Well, if you now open the dashboard via 192.168.1.20 (for example), and you downloaded it to a subfolder, you can open the dashboard by:
192.168.1.20/subfolder/

Re: New Dashboard Design

Posted: Monday 13 March 2017 9:16
by Clemen
robgeerts wrote:
Ierlandfan wrote:Did a git clone (just to make sure)...same result.
I checked out branch 8fb5c41f and that one worked immediately.
No errors in the console for as far as I can see. I can see that nzbget (which i don't use) is the only part that updates.
I see what I did there. I disabled some code for debugging purposes.
Replace, on row 16 of main.js

Code: Select all

//getDevices(); 
with:

Code: Select all

getDevices(); 

Racierox wrote: Is there a possibility to select which switches to show (because only regular switches work)?
It shows the switched you've marked as favorite.
There's no other way unfortunately at the moment...
Racierox wrote: Noob question: how do I switch between this and the 'normal dashboard'?
Oh, you copied my files to the main Domoticz-folder?
That's not the right way, you had to copy my files in a separate folder...


I changed the coding so i can add the room to the url

http://10.200.0.4:8080/dashboard/index.html?room=alrum

and then it will give me all devices with that room name "alrum" in domoticz device description field.

Then i can create different dashboards for all my rooms :)

Re: New Dashboard Design

Posted: Monday 13 March 2017 9:20
by robgeerts
Nice, can you share what you've changed?

Re: New Dashboard Design

Posted: Monday 13 March 2017 10:23
by stlaha2007
Really like this Dashboard.

Please share the changes for the roomplans.

As i have more then 1 tablet i want to implement this.

Re: New Dashboard Design

Posted: Tuesday 14 March 2017 15:30
by crashingdutchman
I have Domoticz installed on a Raspberry Pi and I am hosting the dashboard on a web server. For some of my devices I don't see a value showing up. When I checked this in Chrome Developer Tools I see some errors saying: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Is there something I can do about this?

Re: RE: Re: New Dashboard Design

Posted: Tuesday 14 March 2017 19:55
by stlaha2007
Clemen wrote: I changed the coding so i can add the room to the url

http://10.200.0.4:8080/dashboard/index.html?room=alrum

and then it will give me all devices with that room name "alrum" in domoticz device description field.

Then i can create different dashboards for all my rooms :)
Can you share the modification(s) you made... Or give some hints about it?
I also want to implement it on several tablets. And perhaps better to use the number of the roomplan instead of its name.

I have several roomplans to seperate devices or floors with a namingconfention. So calling that with the idx is shorter ;-)

Sent from my K00C using Tapatalk

Re: RE: Re: New Dashboard Design

Posted: Tuesday 14 March 2017 22:44
by stlaha2007
crashingdutchman wrote:I have Domoticz installed on a Raspberry Pi and I am hosting the dashboard on a web server. For some of my devices I don't see a value showing up. When I checked this in Chrome Developer Tools I see some errors saying: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Is there something I can do about this?
Not sure. Also having some devices without data. Solved it by editing dashboard-folder/js/main.js where there are some HardwareType calls specific for the Toon-hardware. I replaced some with 'Domoticz - Remote Server' as most sensors i would like to show where coming from a slave Domoticz.

I guess thats one option for you to check.

Re: RE: Re: New Dashboard Design

Posted: Tuesday 14 March 2017 23:21
by Clemen
stlaha2007 wrote:
Clemen wrote: I changed the coding so i can add the room to the url

http://10.200.0.4:8080/dashboard/index.html?room=alrum

and then it will give me all devices with that room name "alrum" in domoticz device description field.

Then i can create different dashboards for all my rooms :)
Can you share the modification(s) you made... Or give some hints about it?
I also want to implement it on several tablets. And perhaps better to use the number of the roomplan instead of its name.

I have several roomplans to seperate devices or floors with a namingconfention. So calling that with the idx is shorter ;-)

Sent from my K00C using Tapatalk

Off-cause, i will share the code tomorrow.

Re: New Dashboard Design

Posted: Wednesday 15 March 2017 3:49
by HansieNL
Hello,
I,m trying to get my P1 Smart meter data in the dashboard. I've changed Toon Thermostat to P1 Smart Meter in main.js, but no result.

if(data.result[r]['HardwareType']=='P1 Smart Meter'){
if(data.result[r]['Type']=='P1 Smart Meter' && data.result[r]['SubType']=='Energy'){
$('.energy').html(data.result[r]['Usage']);
$('.energytoday').html(data.result[r]['CounterToday']);
$('.energytoday').parents('.hideinit').show();
$('.energy').parents('.hideinit').show();
}
if(data.result[r]['Type']=='P1 Smart Meter' && data.result[r]['SubType']=='Gas'){
$('.gas').html(number_format(data.result[r]['CounterToday'],2,',','.')+' m3');
$('.gas').parents('.hideinit').show();
}
}

This is my P1 Smart Meter...
Idx Hardware ID Unit Name Type SubType
274 P1 Smart Meter 1 1 Elektra P1 Smart Meter Energy
275 P1 Smart Meter 1 2 Gas P1 Smart Meter Gas

Can you tell me what I do wrong.
Thanks in advance.

Re: RE: Re: New Dashboard Design

Posted: Wednesday 15 March 2017 7:56
by stlaha2007
HansieNL wrote:Hello,
I,m trying to get my P1 Smart meter data in the dashboard. I've changed Toon Thermostat to P1 Smart Meter in main.js, but no result.

if(data.result[r]['HardwareType']=='P1 Smart Meter'){
if(data.result[r]['Type']=='P1 Smart Meter' && data.result[r]['SubType']=='Energy'){
$('.energy').html(data.result[r]['Usage']);
$('.energytoday').html(data.result[r]['CounterToday']);
$('.energytoday').parents('.hideinit').show();
$('.energy').parents('.hideinit').show();
}
if(data.result[r]['Type']=='P1 Smart Meter' && data.result[r]['SubType']=='Gas'){
$('.gas').html(number_format(data.result[r]['CounterToday'],2,',','.')+' m3');
$('.gas').parents('.hideinit').show();
}
}

This is my P1 Smart Meter...
Idx Hardware ID Unit Name Type SubType
274 P1 Smart Meter 1 1 Elektra P1 Smart Meter Energy
275 P1 Smart Meter 1 2 Gas P1 Smart Meter Gas

Can you tell me what I do wrong.
Thanks in advance.
HansieNL

I asume yours is a USB version... You're missing the ' USB' in the hardwaretype like this:

Code: Select all

if(data.result[r]['HardwareType']=='P1 Smart Meter USB'){

Re: New Dashboard Design

Posted: Wednesday 15 March 2017 14:29
by HansieNL
Thx a lot. I forgot that I needed the hardware name with USB :oops: That one is solved :D
I got also a Toon thermostat, but It looks like the thermostat is seen as a switch.
Image
Is there something I can do to get the thermostat recognized right?

Re: New Dashboard Design

Posted: Wednesday 15 March 2017 15:39
by norrland
Looks good!

Is there support for showing graphs for temperatures, wind and such?

Re: New Dashboard Design

Posted: Thursday 16 March 2017 7:12
by stlaha2007
@norrland; as far as i've seen the code (tuning it for my own needs) not at the moment. I hope in near future.

@Hansienl; check the code... but i'm tuning it myself and having some devices also seen as switch.
looks to me like 'missing' css and proper handling (java-code) for other devicetypes.

I hope Robgeerts implements those other type (better) :-)

Re: New Dashboard Design

Posted: Thursday 16 March 2017 22:11
by robgeerts
Ok, if you want extra types of switches, please do the following:

Go to:
http://(DOMOTICZ-URL:PORT)/json.htm?type=devices

Where '(DOMOTICZ-URL:PORT)' is for example: 192.168.1.10:8080

You get an output like:
Image

So, for every device, there's a piece of code, search for the device on this page and send me that piece of code, starting with "addjMulti" and ending with "idx" : "87" (or another number).

I cannot promise anything but will implement this when I've got time for this, asap.
If anyone modifies the code (main.js) please share your changes! :)

Re: New Dashboard Design

Posted: Friday 17 March 2017 10:30
by EdwinK
Hope I can post this here.

Would like to see this added:

Code: Select all

     "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "8.7 C",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 21,
         "HardwareName" : "Buienradar",
         "HardwareType" : "Buienradar.nl (Weather lookup)",
         "HardwareTypeVal" : 94,
         "HaveTimeout" : false,
         "ID" : "00150001",
         "LastUpdate" : "2017-03-17 10:17:59",
         "Name" : "Buienradar - Temperature",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "LaCrosse TX3",
         "Temp" : 8.6999999999999993,
         "Timers" : "false",
         "Type" : "Temp",
         "TypeImg" : "temperature",
         "Unit" : 1,
         "Used" : 1,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "95"
      },
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "Humidity 70 %",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 21,
         "HardwareName" : "Buienradar",
         "HardwareType" : "Buienradar.nl (Weather lookup)",
         "HardwareTypeVal" : 94,
         "HaveTimeout" : false,
         "Humidity" : 70,
         "HumidityStatus" : "Wet",
         "ID" : "00150002",
         "LastUpdate" : "2017-03-17 10:17:59",
         "Name" : "Buienradar - Humidity",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "LaCrosse TX3",
         "Timers" : "false",
         "Type" : "Humidity",
         "TypeImg" : "temperature",
         "Unit" : 2,
         "Used" : 1,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "96"
      },
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "Barometer" : 1017.5,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "1017.5 hPa",
         "Description" : "",
         "Favorite" : 1,
         "Forecast" : 0,
         "ForecastStr" : "Stable",
         "HardwareID" : 21,
         "HardwareName" : "Buienradar",
         "HardwareType" : "Buienradar.nl (Weather lookup)",
         "HardwareTypeVal" : 94,
         "HaveTimeout" : false,
         "ID" : "00150004",
         "LastUpdate" : "2017-03-17 10:17:59",
         "Name" : "Buienradar - Barometer",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "Barometer",
         "Timers" : "false",
         "Type" : "General",
         "TypeImg" : "gauge",
         "Unit" : 4,
         "Used" : 1,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "97"
      },
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "Chill" : 5.5,
         "CustomImage" : 0,
         "Data" : "288.0;WNW;63;98;8.7;5.5",
         "Description" : "",
         "Direction" : 288.0,
         "DirectionStr" : "WNW",
         "Favorite" : 1,
         "Gust" : "5",
         "HardwareID" : 21,
         "HardwareName" : "Buienradar",
         "HardwareType" : "Buienradar.nl (Weather lookup)",
         "HardwareTypeVal" : 94,
         "HaveTimeout" : false,
         "ID" : "00150006",
         "LastUpdate" : "2017-03-17 10:17:59",
         "Name" : "Buienradar - Wind",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Speed" : "4",
         "SubType" : "TFA",
         "Temp" : 8.6999999999999993,
         "Timers" : "false",
         "Type" : "Wind",
         "TypeImg" : "wind",
         "Unit" : 6,
         "Used" : 1,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "98"
      }

Re: New Dashboard Design

Posted: Saturday 18 March 2017 16:53
by Ierlandfan
question: I have a selector switch and I want to show the name of the value. (Like it does with the bulbs)

Second question: Can we add a block with for example buienradar and camera pictures like in new_frontpage?
For example under the downloads section?

Re: RE: Re: New Dashboard Design

Posted: Saturday 18 March 2017 19:02
by clubeddie
stlaha2007 wrote:
HansieNL wrote:Hello,
I,m trying to get my P1 Smart meter data in the dashboard. I've changed Toon Thermostat to P1 Smart Meter in main.js, but no result.

if(data.result[r]['HardwareType']=='P1 Smart Meter'){
if(data.result[r]['Type']=='P1 Smart Meter' && data.result[r]['SubType']=='Energy'){
$('.energy').html(data.result[r]['Usage']);
$('.energytoday').html(data.result[r]['CounterToday']);
$('.energytoday').parents('.hideinit').show();
$('.energy').parents('.hideinit').show();
}
if(data.result[r]['Type']=='P1 Smart Meter' && data.result[r]['SubType']=='Gas'){
$('.gas').html(number_format(data.result[r]['CounterToday'],2,',','.')+' m3');
$('.gas').parents('.hideinit').show();
}
}

This is my P1 Smart Meter...
Idx Hardware ID Unit Name Type SubType
274 P1 Smart Meter 1 1 Elektra P1 Smart Meter Energy
275 P1 Smart Meter 1 2 Gas P1 Smart Meter Gas

Can you tell me what I do wrong.
Thanks in advance.
HansieNL

I asume yours is a USB version... You're missing the ' USB' in the hardwaretype like this:

Code: Select all

if(data.result[r]['HardwareType']=='P1 Smart Meter USB'){
Thank you, this is the one i was looking for. i don't have TOON but i do have solar panels. I read this out trough a Youless meter.
So i think i add this code:

Code: Select all

if(data.result[r]['Type']=='YouLess Meter with LAN interface' && data.result[r]['SubType']=='YouLess counter'){
							$('.solar').html(data.result[r]['CounterToday']);
							$('.solar').parents('.hideinit').show();
							
							}
I know want to change 'Woonkamer' on the frontpage to show the actual energy produced. But i cannot seems to find where i can change this field.
hope someone can help.

Great Dashboard by the way!