Dashticz v3.7.3 beta Topic is solved

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

smaus
Posts: 84
Joined: Sunday 18 February 2018 9:32
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz v3.7.3 beta

Post 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
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.7.3 beta

Post 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?
smaus
Posts: 84
Joined: Sunday 18 February 2018 9:32
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz v3.7.3 beta

Post 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?
User avatar
madpatrick
Posts: 662
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Dashticz v3.7.3 beta

Post by madpatrick »

What is in the field UV_DomoticzIP in your Uservariables ?
check in settings/uservariables and search for this field
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.14b on Tab8" =-
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.7.3 beta

Post 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

smaus
Posts: 84
Joined: Sunday 18 February 2018 9:32
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz v3.7.3 beta

Post 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
Vomera
Posts: 184
Joined: Wednesday 06 September 2017 9:11
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz v3.7.3 beta

Post 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.
Last edited by Vomera on Friday 05 March 2021 15:51, edited 2 times in total.
User avatar
madpatrick
Posts: 662
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Dashticz v3.7.3 beta

Post 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'
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.14b on Tab8" =-
Vomera
Posts: 184
Joined: Wednesday 06 September 2017 9:11
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz v3.7.3 beta

Post 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
Last edited by Vomera on Friday 05 March 2021 15:52, edited 1 time in total.
User avatar
madpatrick
Posts: 662
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Dashticz v3.7.3 beta

Post by madpatrick »

How does your block looks in CONFIG.JS ?
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.14b on Tab8" =-
Vomera
Posts: 184
Joined: Wednesday 06 September 2017 9:11
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz v3.7.3 beta

Post 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
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.7.3 beta

Post 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?
Vomera
Posts: 184
Joined: Wednesday 06 September 2017 9:11
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz v3.7.3 beta

Post by Vomera »

Thanks! :) Then i know i didnt do anything wrong :D haha i will test it tomorrow and will let you know!
Vomera
Posts: 184
Joined: Wednesday 06 September 2017 9:11
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz v3.7.3 beta

Post 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!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest