Lokonli wrote: ↑Monday 05 October 2020 19:00
I see the HardwareType is 'PVOutput (Input)'
A specific blocktype is defined for this kind of hardware, but I see in the code that the assumption is that it's an energy device, not a temperature.
Do you also use other PVOutput devices?
As a quick hack, can you try with the following in custom.js (the function getExtendedBlockType is changed):
(other PVOutput devices will not work anymore!)
Code: Select all
//add custom javascript in here
/*
function afterGetDevices(){
if (Domoticz.getAllDevices()[s2].Data == 'Off') {
$('.block_S2 .title').addClass('warningblue');
$('.block_S2 .state').addClass('warningblue');
}
else {
$('.block_s2 .title').removeClass('warningblue');
$('.block_s2 .state').removeClass('warningblue');
}
}
*/
function getExtendedBlockTypes(blocktypes){
//blocktypes.Type['Lighting 2'] = { icon: 'fa fa-lightbulb-o', title: '<Name>', value: 'ds' }
blocktypes.HardwareType['PVOutput (Input)'] = {
icon: 'fas fa-thermometer-half',
title: '<Name>',
value: '<Temp>' + _TEMP_SYMBOL,
format: true,
decimals: 1,
};
return blocktypes;
}
If this solves the issue with the temperature device, I'll think of a real fix.
Hi,
I changed custom.js with the code you wrote. The result is that the block 352 is displayed correctly.
However, as you remarked, is the rest of the blocks coming from PVOutput(input) disappeared and after block 352 is the rest of the page/column empty.
Here the other PVPOutput(input) data:
Code: Select all
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CounterToday" : "6.000 kWh",
"CustomImage" : 0,
"Data" : "25289.600 kWh",
"Description" : "",
"EnergyMeterMode" : "0",
"Favorite" : 1,
"HardwareID" : 17,
"HardwareName" : "PVOUtput",
"HardwareType" : "PVOutput (Input)",
"HardwareTypeVal" : 30,
"HaveTimeout" : false,
"ID" : "00000001",
"LastUpdate" : "2020-10-05 22:45:23",
"Name" : "SolarMain",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" :
[
0
],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "kWh",
"SwitchTypeVal" : 4,
"Timers" : "false",
"Type" : "General",
"TypeImg" : "current",
"Unit" : 1,
"Usage" : "0 Watt",
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "353"
},
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CounterToday" : "37.480 kWh",
"CustomImage" : 0,
"Data" : "63236.488 kWh",
"Description" : "",
"EnergyMeterMode" : "",
"Favorite" : 1,
"HardwareID" : 17,
"HardwareName" : "PVOUtput",
"HardwareType" : "PVOutput (Input)",
"HardwareTypeVal" : 30,
"HaveTimeout" : false,
"ID" : "00000002",
"LastUpdate" : "2020-10-05 22:45:23",
"Name" : "SolarConsumed",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" :
[
0
],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "kWh",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "General",
"TypeImg" : "current",
"Unit" : 1,
"Usage" : "1337 Watt",
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "354"
},
For 'SolarMain' (IDX 353) and 'SolarConsumed' (IDX 354) a total of 6 blocks are generated. For me at the moment not totally clear, what the values displayed are saying.
So the solution you suggested is not a total fix for the problem.