Page 5 of 5

Re: Dashticz v3.7.3 beta

Posted: Friday 19 February 2021 17:08
by smaus
Lokonli wrote: Thursday 18 February 2021 22:48
smaus wrote: Thursday 18 February 2021 21:31 type=command&param=getuservariables error js/domoticz-api.js:107

has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
hmm, not a typical error.

Locate this network request on the network tab of Devtools.

If you open this network request directly in a browser window, what is then the Domoticz reply?

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

Re: Dashticz v3.7.3 beta

Posted: Friday 19 February 2021 18:11
by Lokonli
smaus wrote: Friday 19 February 2021 17:08
Lokonli wrote: Thursday 18 February 2021 22:48
smaus wrote: Thursday 18 February 2021 21:31 type=command&param=getuservariables error js/domoticz-api.js:107

has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
hmm, not a typical error.

Locate this network request on the network tab of Devtools.

If you open this network request directly in a browser window, what is then the Domoticz reply?

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
That 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?

Re: Dashticz v3.7.3 beta

Posted: Friday 19 February 2021 19:39
by smaus
Lokonli wrote: Friday 19 February 2021 18:11
smaus wrote: Friday 19 February 2021 17:08
Lokonli wrote: Thursday 18 February 2021 22:48
hmm, not a typical error.

Locate this network request on the network tab of Devtools.

If you open this network request directly in a browser window, what is then the Domoticz reply?

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
That 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?
Value" : "192.168.2.159:8084 but my ip is 192.168.1.159:8084?

Re: Dashticz v3.7.3 beta

Posted: Friday 19 February 2021 19:42
by madpatrick
What is in the field UV_DomoticzIP in your Uservariables ?
check in settings/uservariables and search for this field

Re: Dashticz v3.7.3 beta

Posted: Friday 19 February 2021 21:49
by Lokonli
smaus wrote:
Lokonli wrote: Friday 19 February 2021 18:11
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
That 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?
Value" : "192.168.2.159:8084 but my ip is 192.168.1.159:8084?
Probably the variable was created by a Domoticz script or device. It's not used by Dashticz.

Sent from my SM-A320FL using Tapatalk


Re: Dashticz v3.7.3 beta

Posted: Sunday 21 February 2021 23:04
by smaus
Lokonli wrote: Friday 19 February 2021 21:49
smaus wrote:
Lokonli wrote: Friday 19 February 2021 18:11
That 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?
Value" : "192.168.2.159:8084 but my ip is 192.168.1.159:8084?
Probably the variable was created by a Domoticz script or device. It's not used by Dashticz.

Sent from my SM-A320FL using Tapatalk
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

Re: Dashticz v3.7.3 beta

Posted: Friday 05 March 2021 15:38
by Vomera
Hi ! I am figuring out an issue with the styling.

Today i added air quality.

Domoticz:
Image

Dashticz
Image

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.js

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';
   }
}
Output JSON idx 13344

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:

Image
edit1: 3.7.5 gives also the same result.

Re: Dashticz v3.7.3 beta

Posted: Friday 05 March 2021 15:44
by madpatrick
Vomera wrote: Friday 05 March 2021 15:38 Hi ! I am figuring out an issue with the styling.

Today i added air quality.

Image

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.js

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';
   }
}
Output JSON idx 13344

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:

Image
How does your block looks like.
It is possible to changre this icon in there also
add this to your block for example

Code: Select all

icon: 'fas fa-cloud-sun'

Re: Dashticz v3.7.3 beta

Posted: Friday 05 March 2021 15:50
by Vomera
How does your block looks like.
It is possible to changre this icon in there also
add this to your block for example

Code: Select all

icon: 'fas fa-cloud-sun'
Custom.css

Code: Select all

.luchtbovennul {
	background: rgba(0,153,102,1.0) !important;
    background-clip: padding-box;
	color: white;
	icon: 'fas fa-cloud-sun';
}
I add it but still the air.png shows up, maybe i think its coded like this.


Image

Re: Dashticz v3.7.3 beta

Posted: Friday 05 March 2021 15:52
by madpatrick
How does your block looks in CONFIG.JS ?

Re: Dashticz v3.7.3 beta

Posted: Friday 05 March 2021 15:56
by Vomera
madpatrick wrote: Friday 05 March 2021 15:52 How does your block looks in CONFIG.JS ?
config.js

Code: Select all

blocks[13344] = {} // Luchtkwaliteit
blocks[13344]['width'] = 4;
blocks[13344]['title'] = '';
blocks[13344]['icon'] = 'fas fa-gamepad';
Change it to gamepad for example, use it also on another block

Re: Dashticz v3.7.3 beta

Posted: Saturday 06 March 2021 18:20
by Lokonli
Vomera wrote: Friday 05 March 2021 15:38 Hi ! I am figuring out an issue with the styling.

Today i added air quality.

Domoticz:
Image

Dashticz
Image

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.js

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';
   }
}
Output JSON idx 13344

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:

Image
edit1: 3.7.5 gives also the same result.
It is (was) a bug.

For air quality not an icon, but the image 'air.png' is used by default.
Setting an icon didn't work in that case: always the image was shown.

I've made a fix in latest beta. Can you test?

Re: Dashticz v3.7.3 beta

Posted: Saturday 06 March 2021 20:09
by Vomera
Thanks! :) Then i know i didnt do anything wrong :D haha i will test it tomorrow and will let you know!

Re: Dashticz v3.7.3 beta

Posted: Sunday 07 March 2021 11:49
by Vomera
Lokonli wrote: Saturday 06 March 2021 18:20
Vomera wrote: Friday 05 March 2021 15:38
It is (was) a bug.

For air quality not an icon, but the image 'air.png' is used by default.
Setting an icon didn't work in that case: always the image was shown.

I've made a fix in latest beta. Can you test?
Yes! you fixed another bug! it works now!