I get this
{
"result" :
[
{
"LastUpdate" : "2020-01-03 14:29:05",
"Name" : "UV_DomoticzIP",
"Type" : "2",
"Value" : "192.168.2.159:8084",
"idx" : "1"
}
],
"status" : "OK",
"title" : "GetUserVariables"
}
but my ip is 192.168.1.159:8084
Moderators: leecollings, htilburgs, robgeerts
That looks ok, no errors.smaus wrote: ↑Friday 19 February 2021 17:08
I get this
{
"result" :
[
{
"LastUpdate" : "2020-01-03 14:29:05",
"Name" : "UV_DomoticzIP",
"Type" : "2",
"Value" : "192.168.2.159:8084",
"idx" : "1"
}
],
"status" : "OK",
"title" : "GetUserVariables"
}
but my ip is 192.168.1.159:8084
Value" : "192.168.2.159:8084 but my ip is 192.168.1.159:8084?Lokonli wrote: ↑Friday 19 February 2021 18:11That looks ok, no errors.
What is your Domoticz version?
In DevTools do you see any other error on the console tab?
And which user messages do you get on the console tab?
Probably the variable was created by a Domoticz script or device. It's not used by Dashticz.
solved the problem, i intall v2 and that one was worken partially but i get a error that set me on the right path, i was forgoten mij passworth and my username
Code: Select all
// Luchtkwaliteit
function getStatus_13344(block){
var Data = block.device.Data;
if(parseFloat(Data)>300){
block.addClass='luchtbovendriehonderd';
block.icon = 'fas fa-skull-crossbones';
}
else if(parseFloat(Data) >201){
block.addClass='luchtboventweehonderd';
block.icon = 'far fa-sad-tear';
}
else if(parseFloat(Data) >151){
block.addClass='luchtbovenhonderdvijftig';
block.icon = 'far fa-frown';
}
else if(parseFloat(Data) >101){
block.addClass='luchtbovenhonderd';
block.icon = 'far fa-meh';
}
else if(parseFloat(Data) >51){
block.addClass='luchtbovenvijtig';
block.icon = 'far fa-smile';
}
else if(parseFloat(Data) >0){
block.addClass='luchtbovennul';
block.icon = 'fas fa-battery-full';
}
else {
block.addClass= 'none';
block.icon = 'far fa-smile-beam';
}
}
Code: Select all
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "10 ppm",
"Description" : "",
"Favorite" : 0,
"HardwareID" : 7,
"HardwareName" : "DUMMY",
"HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
"HardwareTypeVal" : 15,
"HaveTimeout" : false,
"ID" : "17470",
"LastUpdate" : "2021-03-05 15:20:01",
"Name" : "Lucht",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" :
[
0
],
"Protected" : false,
"Quality" : "Excellent",
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "Voltcraft CO-20",
"Timers" : "false",
"Type" : "Air Quality",
"TypeImg" : "air",
"Unit" : 1,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "13344"
},
How does your block looks like.Vomera wrote: ↑Friday 05 March 2021 15:38 Hi ! I am figuring out an issue with the styling.
Today i added air quality.
What i can style =
Text and class, but not the ICON.
I can do it with other things perfectly, but here the icon doesnt change. So i thought maybe i used an icon from the newest fontawesome, so i took one i use with other data, but still it doesnt change. Could it be that its not scripted? For what i can see its just a data block.
(in the mean time i will update to 3.7.5.
Lucht now 10 and shows green how it supposed to be.
custom.jsOutput JSON idx 13344Code: Select all
// Luchtkwaliteit function getStatus_13344(block){ var Data = block.device.Data; if(parseFloat(Data)>300){ block.addClass='luchtbovendriehonderd'; block.icon = 'fas fa-skull-crossbones'; } else if(parseFloat(Data) >201){ block.addClass='luchtboventweehonderd'; block.icon = 'far fa-sad-tear'; } else if(parseFloat(Data) >151){ block.addClass='luchtbovenhonderdvijftig'; block.icon = 'far fa-frown'; } else if(parseFloat(Data) >101){ block.addClass='luchtbovenhonderd'; block.icon = 'far fa-meh'; } else if(parseFloat(Data) >51){ block.addClass='luchtbovenvijtig'; block.icon = 'far fa-smile'; } else if(parseFloat(Data) >0){ block.addClass='luchtbovennul'; block.icon = 'fas fa-battery-full'; } else { block.addClass= 'none'; block.icon = 'far fa-smile-beam'; } }
Code: Select all
{ "AddjMulti" : 1.0, "AddjMulti2" : 1.0, "AddjValue" : 0.0, "AddjValue2" : 0.0, "BatteryLevel" : 255, "CustomImage" : 0, "Data" : "10 ppm", "Description" : "", "Favorite" : 0, "HardwareID" : 7, "HardwareName" : "DUMMY", "HardwareType" : "Dummy (Does nothing, use for virtual switches only)", "HardwareTypeVal" : 15, "HaveTimeout" : false, "ID" : "17470", "LastUpdate" : "2021-03-05 15:20:01", "Name" : "Lucht", "Notifications" : "false", "PlanID" : "0", "PlanIDs" : [ 0 ], "Protected" : false, "Quality" : "Excellent", "ShowNotifications" : true, "SignalLevel" : "-", "SubType" : "Voltcraft CO-20", "Timers" : "false", "Type" : "Air Quality", "TypeImg" : "air", "Unit" : 1, "Used" : 1, "XOffset" : "0", "YOffset" : "0", "idx" : "13344" },
edit:
This is what i see when i inspect the code:
![]()
Code: Select all
icon: 'fas fa-cloud-sun'
Custom.cssHow does your block looks like.
It is possible to changre this icon in there also
add this to your block for exampleCode: Select all
icon: 'fas fa-cloud-sun'
Code: Select all
.luchtbovennul {
background: rgba(0,153,102,1.0) !important;
background-clip: padding-box;
color: white;
icon: 'fas fa-cloud-sun';
}
config.js
Code: Select all
blocks[13344] = {} // Luchtkwaliteit
blocks[13344]['width'] = 4;
blocks[13344]['title'] = '';
blocks[13344]['icon'] = 'fas fa-gamepad';
It is (was) a bug.Vomera wrote: ↑Friday 05 March 2021 15:38 Hi ! I am figuring out an issue with the styling.
Today i added air quality.
Domoticz:
Dashticz
What i can style =
Text and class, but not the ICON.
I can do it with other things perfectly, but here the icon doesnt change. So i thought maybe i used an icon from the newest fontawesome, so i took one i use with other data, but still it doesnt change. Could it be that its not scripted? For what i can see its just a data block.
in the mean time i will update to 3.7.5 > 3.7.5 gives also the same result.
Lucht now 10 and shows green how it supposed to be.
custom.jsOutput JSON idx 13344Code: Select all
// Luchtkwaliteit function getStatus_13344(block){ var Data = block.device.Data; if(parseFloat(Data)>300){ block.addClass='luchtbovendriehonderd'; block.icon = 'fas fa-skull-crossbones'; } else if(parseFloat(Data) >201){ block.addClass='luchtboventweehonderd'; block.icon = 'far fa-sad-tear'; } else if(parseFloat(Data) >151){ block.addClass='luchtbovenhonderdvijftig'; block.icon = 'far fa-frown'; } else if(parseFloat(Data) >101){ block.addClass='luchtbovenhonderd'; block.icon = 'far fa-meh'; } else if(parseFloat(Data) >51){ block.addClass='luchtbovenvijtig'; block.icon = 'far fa-smile'; } else if(parseFloat(Data) >0){ block.addClass='luchtbovennul'; block.icon = 'fas fa-battery-full'; } else { block.addClass= 'none'; block.icon = 'far fa-smile-beam'; } }
Code: Select all
{ "AddjMulti" : 1.0, "AddjMulti2" : 1.0, "AddjValue" : 0.0, "AddjValue2" : 0.0, "BatteryLevel" : 255, "CustomImage" : 0, "Data" : "10 ppm", "Description" : "", "Favorite" : 0, "HardwareID" : 7, "HardwareName" : "DUMMY", "HardwareType" : "Dummy (Does nothing, use for virtual switches only)", "HardwareTypeVal" : 15, "HaveTimeout" : false, "ID" : "17470", "LastUpdate" : "2021-03-05 15:20:01", "Name" : "Lucht", "Notifications" : "false", "PlanID" : "0", "PlanIDs" : [ 0 ], "Protected" : false, "Quality" : "Excellent", "ShowNotifications" : true, "SignalLevel" : "-", "SubType" : "Voltcraft CO-20", "Timers" : "false", "Type" : "Air Quality", "TypeImg" : "air", "Unit" : 1, "Used" : 1, "XOffset" : "0", "YOffset" : "0", "idx" : "13344" },
edit:
This is what i see when i inspect the code:
edit1: 3.7.5 gives also the same result.
Yes! you fixed another bug! it works now!
Users browsing this forum: No registered users and 1 guest