Re: New Dashboard Design
Posted: Wednesday 22 March 2017 17:36
You can zip the files and send them via PM?
Open source Home Automation System
https://forum.domoticz.com/
I will zip them and send through PM. Don't expect them before friday.robgeerts wrote:You can zip the files and send them via PM?
I knew is was Toon, so I changed Toon to P1 Smart Meter USBIf you look at the code, it only applies to Toon Thermostat values.
I have commented that line out and it shows my temperature now:
Code: Select all
// if(data.result[r]['HardwareType']=='Toon Thermostat'){ 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(); } if(data.result[r]['Type']=='Temp' && data.result[r]['idx']=='19'){ $('.tempinside').html(data.result[r]['Temp']+'°C'); $('.tempinside').parents('.hideinit').show(); } // }
Nice combo... Can you share the code how you solved this?hpapagaj wrote:This dashboard is so far the best.
I combined temp+humidity+barometer:
Code: Select all
else if(data.result[r]['Type']=='Temp + Humidity + Baro' && data.result[r]['SubType']=='THB1 - BTHR918, BTHGN129'){
$('.block'+data.result[r]['idx']).remove();
var switchHTML = '<div class="col-md-4 mb no-pr" data-light="'+data.result[r]['idx']+'">';
switchHTML+='<div class="transbg"> ';
switchHTML+='<div class="col-md-4 padding-2">';
switchHTML+='<em class="fa fa-thermometer-half fa-thermometer-half-switch"></em>';
switchHTML+='</div>';
switchHTML+='<div class="col-md-8 padding-2">';
switchHTML+='<strong class="title">'+data.result[r]['Name']+'</strong><br />';
switchHTML+='<span class="state">'+data.result[r]['Temp']+'°C</span>';
switchHTML+='</div>';
switchHTML+='<div class="col-md-4 padding-2">';
switchHTML+='<em class="wi wi-humidity"></em>';
switchHTML+='</div>';
switchHTML+='<div class="col-md-8 padding-2">';
switchHTML+='<br />';
switchHTML+='<span class="state">'+data.result[r]['Humidity']+'%</span>';
switchHTML+='</div>';
switchHTML+='<div class="col-md-4 padding-2">';
switchHTML+='<em class="wi wi-barometer"></em>';
switchHTML+='</div>';
switchHTML+='<div class="col-md-8 padding-2">';
switchHTML+='<br />';
switchHTML+='<span class="state">'+data.result[r]['Barometer']+'%</span>';
switchHTML+='</div>';
switchHTML+='</div>';
switchHTML+='</div>';
$('#switches').append(switchHTML);
}
Added this to my code at gitlab!hpapagaj wrote: after this you must add the following else if statement:
Changed this to hpapagaj's codeIerlandfan wrote:Just a small observation on that amazing code, Barometer output should read hPa
Code: Select all
.fa.fa-thermometer-half {margin-left:8px;}
Code: Select all
.fa.fa-thermometer-half.fa-thermometer-half-switch {margin-left:4px;}
Added!hpapagaj wrote:I forgot that I changed margin-left for the first icon (fa-thermometer-half-switch)
I know, not all icons are aligned ok when using the same margins so some icons need other values.hpapagaj wrote: There is a place for more cosmetic work
HansieNL wrote:I did add the weekday to the Date and Time block at the right upper corner.
In main.js add $('#weekday').html(moment().locale('nl').format('dddd'));
In index.html add "<h4 id="weekday"></h4>"
Changed it in Gitlab too!gjaa wrote:I changed Gasverbruik in Gasverbruik vandaag (index.html)
Schermafbeelding 2017-03-24 om 21.25.27.png
Earlier, I mentioned I changed this, and I did, but from now on, it still starts with the weather of tommorrow after 15:00hgjaa wrote:Hi Rob,
Is there a possibility to see the weather forecast of today?
Gerard