Dashticz v3.6 master

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.6 master

Post by Lokonli »

Do you see issues with all your graphs?

Can you post the code from CONFIG.js for a graph with problems?

Sent from my SM-A320FL using Tapatalk

Remelco
Posts: 15
Joined: Sunday 16 December 2018 12:45
Target OS: NAS (Synology & others)
Domoticz version: 2020.1
Contact:

Re: Dashticz v3.6 master

Post by Remelco »

Yes , I have 2 graphs and both have the same problem.
Also the icons are disappeared from nu.nl and nos.nl

my config.js of the graphs:

// Definition 'Elektriciteit' graph
blocks[p1_grafiek_elektra] = {
title: 'Energie',
graph: ['line','bar','bar'],
custom : {
"vandaag": {
range: 'day',
filter: '12 hours',
data: {
netto: 'd.v+d.v2-d.r1-d.r2',
gebruikt: 'd.v+d.v2',
geleverd: '-d.r1-d.r2'
}
},
"maand": {
range: 'month',
filter: '1 months',
data: {
netto: 'd.v+d.v2-d.r1-d.r2',
gebruikt: 'd.v+d.v2',
geleverd: '-d.r1-d.r2'
}
},
"jaar": {
range: 'year',
filter: '12 months',
data: {
netto: 'd.v+d.v2-d.r1-d.r2',
gebruikt: 'd.v+d.v2',
geleverd: '-d.r1-d.r2'
}
}
},
legend: true,
datasetColors:['blue','red','yellow']
}

// Definition 'Gas' graph
blocks[p1_grafiek_gas] = {
title: 'Gas',
width: 12,
height: '425px',
custom : {
"dag": {
graph: 'bar',
range: 'day',
filter: '24 hours',
data: {
Gas: 'd.v'
}
},
"maand": {
graph: 'bar',
range: 'month',
data: {
Gas: 'd.v'
},
},
"jaar": {
graph: 'line',
range: 'year',
data: {
Gas: 'd.v'
}
},
},
legend: false,
datasetColors: ['yellow'],
displayFormats : {
minute: 'h:mm',
hour: 'h:mm',
day: 'DD MMM',
week: 'DD MMM',
month: 'MMM',
}
}
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.6 master

Post by Lokonli »

Remelco wrote: Tuesday 29 September 2020 20:19 Yes , I have 2 graphs and both have the same problem.
Also the icons are disappeared from nu.nl and nos.nl

my config.js of the graphs:
Spoiler: show

Code: Select all

// Definition 'Elektriciteit' graph
blocks[p1_grafiek_elektra] = {
    title: 'Energie',
    graph: ['line','bar','bar'],
    custom : {
        "vandaag": {
            range: 'day',
            filter: '12 hours',
            data: {
                netto: 'd.v+d.v2-d.r1-d.r2',
                gebruikt: 'd.v+d.v2',
                geleverd: '-d.r1-d.r2'
            }
        },
        "maand": {
            range: 'month',
            filter: '1 months',
            data: {
                netto: 'd.v+d.v2-d.r1-d.r2',
                gebruikt: 'd.v+d.v2',
                geleverd: '-d.r1-d.r2'
            }
        },
        "jaar": {
            range: 'year',
            filter: '12 months',
            data: {
                netto: 'd.v+d.v2-d.r1-d.r2',
                gebruikt: 'd.v+d.v2',
                geleverd: '-d.r1-d.r2'
            }
        }
    },
    legend: true,
    datasetColors:['blue','red','yellow']
}

// Definition 'Gas' graph
blocks[p1_grafiek_gas] = {
	title: 'Gas',
  width: 12,
  height: '425px',
  custom : {
  	"dag": {
               graph: 'bar',
  		range: 'day',
                filter: '24 hours',
		  data: {
		  	Gas: 'd.v'
		  }  		  		
  	},
  	"maand": {
               graph: 'bar',
  		range: 'month',
		  data: {
		  	Gas: 'd.v'
		  },		  
  	},
  	"jaar": {
               graph: 'line',
  		range: 'year',
		  data: {
		  	Gas: 'd.v'
		  }  		  		
  	},
  },
  legend: false,
  datasetColors: ['yellow'],
	  displayFormats : {
	  minute: 'h:mm',
	  hour: 'h:mm',
	  day: 'DD MMM',
	  week: 'DD MMM',
	  month: 'MMM',
	}
}
How did you define p1_grafiek_elektra and p1_grafiek_gas?
Remelco
Posts: 15
Joined: Sunday 16 December 2018 12:45
Target OS: NAS (Synology & others)
Domoticz version: 2020.1
Contact:

Re: Dashticz v3.6 master

Post by Remelco »

Is this what you meant?

var p1_elektra_nu = '56_1';
var p1_elektra_vandaag = '56_2';
var p1_elektra_totaal = '56_3';
var p1_grafiek_gas = 'graph_57';
var p1_grafiek_elektra = 'graph_56';
Jimster
Posts: 82
Joined: Tuesday 04 February 2020 11:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Dashticz v3.6 master

Post by Jimster »

I use an older tablet (Samsung Galaxy Tab 3) for Dashticz, since 3.6 the OWM data isn't visible anymore. I tried an incognito tab, cleared browser data and cookies, restarted, but no luck. On every other devices the data is visible. I guess this is because of the older Android version (4.4.2). I'm tried Chrome and Fully Kiosk Browser. Does this have anything to do with CORS not being supported?
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.6 master

Post by Lokonli »

Remelco wrote: Tuesday 29 September 2020 21:14 Is this what you meant?

var p1_elektra_nu = '56_1';
var p1_elektra_vandaag = '56_2';
var p1_elektra_totaal = '56_3';
var p1_grafiek_gas = 'graph_57';
var p1_grafiek_elektra = 'graph_56';
Yes, thanks.

I cannot completely reproduce your issue, but I've fixed some bugs that might have caused this.

Can you test latest beta? (3.6.2)
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.6 master

Post by Lokonli »

Remelco wrote: Tuesday 29 September 2020 20:19 Yes , I have 2 graphs and both have the same problem.
Also the icons are disappeared from nu.nl and nos.nl
For the missing icons: which icons do you mean exactly? Can you attach a screenshot?

If you use an icon from fontawesome check whether the icon still exists (fontawesome.com).

Sometimes you have to completely refresh the cache.
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.6 master

Post by Lokonli »

Jimster wrote: Tuesday 29 September 2020 21:19 I use an older tablet (Samsung Galaxy Tab 3) for Dashticz, since 3.6 the OWM data isn't visible anymore. I tried an incognito tab, cleared browser data and cookies, restarted, but no luck. On every other devices the data is visible. I guess this is because of the older Android version (4.4.2). I'm tried Chrome and Fully Kiosk Browser. Does this have anything to do with CORS not being supported?
Yes, could be.

As a small test, can you try the following:

In the file ./js/weather_owm.js, line 63, remove the first two slashes.

So change:

Code: Select all

//    _CORS_PATH +
into

Code: Select all

    _CORS_PATH +
Jimster
Posts: 82
Joined: Tuesday 04 February 2020 11:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Dashticz v3.6 master

Post by Jimster »

Lokonli wrote: Tuesday 29 September 2020 22:48
Jimster wrote: Tuesday 29 September 2020 21:19 I use an older tablet (Samsung Galaxy Tab 3) for Dashticz, since 3.6 the OWM data isn't visible anymore. I tried an incognito tab, cleared browser data and cookies, restarted, but no luck. On every other devices the data is visible. I guess this is because of the older Android version (4.4.2). I'm tried Chrome and Fully Kiosk Browser. Does this have anything to do with CORS not being supported?
Yes, could be.

As a small test, can you try the following:

In the file ./js/weather_owm.js, line 63, remove the first two slashes.

So change:

Code: Select all

//    _CORS_PATH +
into

Code: Select all

    _CORS_PATH +
Yes, it works now.
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.6 master

Post by Lokonli »

Jimster wrote: Tuesday 29 September 2020 23:25
Lokonli wrote: Tuesday 29 September 2020 22:48
Jimster wrote: Tuesday 29 September 2020 21:19 I use an older tablet (Samsung Galaxy Tab 3) for Dashticz, since 3.6 the OWM data isn't visible anymore. I tried an incognito tab, cleared browser data and cookies, restarted, but no luck. On every other devices the data is visible. I guess this is because of the older Android version (4.4.2). I'm tried Chrome and Fully Kiosk Browser. Does this have anything to do with CORS not being supported?
Yes, could be.

As a small test, can you try the following:

In the file ./js/weather_owm.js, line 63, remove the first two slashes.

So change:

Code: Select all

//    _CORS_PATH +
into

Code: Select all

    _CORS_PATH +
Yes, it works now.
hmm, interesting.
I have to check why it doesn't work on Android 4.4.2 without CORS proxy.
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.6 master

Post by Lokonli »

Jimster wrote: Tuesday 29 September 2020 23:25
Lokonli wrote: Tuesday 29 September 2020 22:48
Jimster wrote: Tuesday 29 September 2020 21:19 I use an older tablet (Samsung Galaxy Tab 3) for Dashticz, since 3.6 the OWM data isn't visible anymore. I tried an incognito tab, cleared browser data and cookies, restarted, but no luck. On every other devices the data is visible. I guess this is because of the older Android version (4.4.2). I'm tried Chrome and Fully Kiosk Browser. Does this have anything to do with CORS not being supported?
Yes, could be.

As a small test, can you try the following:

In the file ./js/weather_owm.js, line 63, remove the first two slashes.

So change:

Code: Select all

//    _CORS_PATH +
into

Code: Select all

    _CORS_PATH +
Yes, it works now.
I've slightly changed the request to OpenWeatherMap, which might solve the CORS issue on Android 4.4.2.

Can you help with testing? I don't have an android 4.4.2 device.

The new new file can be downloaded from:
https://raw.githubusercontent.com/Dasht ... her_owm.js

or:
switch to the git branch 'testowm'
Jimster
Posts: 82
Joined: Tuesday 04 February 2020 11:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Dashticz v3.6 master

Post by Jimster »

Lokonli wrote: Wednesday 30 September 2020 14:28
Jimster wrote: Tuesday 29 September 2020 23:25
Lokonli wrote: Tuesday 29 September 2020 22:48

Yes, could be.

As a small test, can you try the following:

In the file ./js/weather_owm.js, line 63, remove the first two slashes.

So change:

Code: Select all

//    _CORS_PATH +
into

Code: Select all

    _CORS_PATH +
Yes, it works now.
I've slightly changed the request to OpenWeatherMap, which might solve the CORS issue on Android 4.4.2.

Can you help with testing? I don't have an android 4.4.2 device.

The new new file can be downloaded from:
https://raw.githubusercontent.com/Dasht ... her_owm.js

or:
switch to the git branch 'testowm'
I did git checkout testown
Tested it, but unfortunately it doesn't work.
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.6 master

Post by Lokonli »

ok, thanks for testing.
I'll add an additional config setting ...
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.6 master

Post by Lokonli »

Jimster wrote: Wednesday 30 September 2020 16:34
Lokonli wrote: Wednesday 30 September 2020 14:28
Jimster wrote: Tuesday 29 September 2020 23:25
Yes, it works now.
I've slightly changed the request to OpenWeatherMap, which might solve the CORS issue on Android 4.4.2.

Can you help with testing? I don't have an android 4.4.2 device.

The new new file can be downloaded from:
https://raw.githubusercontent.com/Dasht ... her_owm.js

or:
switch to the git branch 'testowm'
I did git checkout testown
Tested it, but unfortunately it doesn't work.
I've created a new beta.
Add the following to CONFIG.js to enable the CORS proxy for OWM:

Code: Select all

config['use_cors'] = 1;
Can you test the latest beta?
Remelco
Posts: 15
Joined: Sunday 16 December 2018 12:45
Target OS: NAS (Synology & others)
Domoticz version: 2020.1
Contact:

Re: Dashticz v3.6 master

Post by Remelco »

Lokonli wrote: Tuesday 29 September 2020 22:31
Remelco wrote: Tuesday 29 September 2020 21:14 Is this what you meant?

var p1_elektra_nu = '56_1';
var p1_elektra_vandaag = '56_2';
var p1_elektra_totaal = '56_3';
var p1_grafiek_gas = 'graph_57';
var p1_grafiek_elektra = 'graph_56';
Yes, thanks.

I cannot completely reproduce your issue, but I've fixed some bugs that might have caused this.

Can you test latest beta? (3.6.2)
I have tested the latest beta date 30-9-2020 but stil no graph.
The icons are nu.nl.png and nos.png
Attachments
Icon aanwezig.png
Icon aanwezig.png (36.62 KiB) Viewed 1704 times
Icon weg.png
Icon weg.png (3.89 KiB) Viewed 1704 times
Grafiek leeg V3.6 (ook bij beta).png
Grafiek leeg V3.6 (ook bij beta).png (25.96 KiB) Viewed 1704 times
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.6 master

Post by Lokonli »

Remelco wrote: Wednesday 30 September 2020 21:22
Lokonli wrote: Tuesday 29 September 2020 22:31
Remelco wrote: Tuesday 29 September 2020 21:14 Is this what you meant?

var p1_elektra_nu = '56_1';
var p1_elektra_vandaag = '56_2';
var p1_elektra_totaal = '56_3';
var p1_grafiek_gas = 'graph_57';
var p1_grafiek_elektra = 'graph_56';
Yes, thanks.

I cannot completely reproduce your issue, but I've fixed some bugs that might have caused this.

Can you test latest beta? (3.6.2)
I have tested the latest beta date 30-9-2020 but stil no graph.
The icons are nu.nl.png and nos.png
hmm, annoying.

Can you open DevTools in Chrome by pressing F12. Then refresh Dashticz. Do you see any error in the DevTools console tab?
or failed network requests on the DevTools network tab?
Jimster
Posts: 82
Joined: Tuesday 04 February 2020 11:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Dashticz v3.6 master

Post by Jimster »

Lokonli wrote: Wednesday 30 September 2020 20:48
I've created a new beta.
Add the following to CONFIG.js to enable the CORS proxy for OWM:

Code: Select all

config['use_cors'] = 1;
Can you test the latest beta?
Yes with the latest beta and adding this line it works now. Thanks!
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.6 master

Post by Lokonli »

Remelco wrote: Wednesday 30 September 2020 21:22
Lokonli wrote: Tuesday 29 September 2020 22:31
Remelco wrote: Tuesday 29 September 2020 21:14 Is this what you meant?

var p1_elektra_nu = '56_1';
var p1_elektra_vandaag = '56_2';
var p1_elektra_totaal = '56_3';
var p1_grafiek_gas = 'graph_57';
var p1_grafiek_elektra = 'graph_56';
Yes, thanks.

I cannot completely reproduce your issue, but I've fixed some bugs that might have caused this.

Can you test latest beta? (3.6.2)
I have tested the latest beta date 30-9-2020 but stil no graph.
The icons are nu.nl.png and nos.png
Found it. Totally forgot the following:

The graph now support 'multidevices'

However, that means in the custom graph you have to add the device id to the value, as follows:

Code: Select all

blocks[p1_grafiek_gas] = {
    title: 'Gas',
    width: 12,
    height: '425px',
    custom : {
    "dag": {
    graph: 'bar',
    range: 'day',
    filter: '24 hours',
    data: {
    Gas: 'd.v_57'			//_57 added
    }
    },
    "maand": {
    graph: 'bar',
    range: 'month',
    data: {
    Gas: 'd.v_57'			//_57 added
    },
    },
    "jaar": {
    graph: 'line',
    range: 'year',
    data: {
    Gas: 'd.v_57'			//_57 added
    }
    },
    },
    legend: false,
    datasetColors: ['yellow'],
    displayFormats : {
    minute: 'h:mm',
    hour: 'h:mm',
    day: 'DD MMM',
    week: 'DD MMM',
    month: 'MMM',
    }
    }

That should do it ...
Remelco
Posts: 15
Joined: Sunday 16 December 2018 12:45
Target OS: NAS (Synology & others)
Domoticz version: 2020.1
Contact:

Re: Dashticz v3.6 master

Post by Remelco »

Lokonli wrote: Wednesday 30 September 2020 22:41
Remelco wrote: Wednesday 30 September 2020 21:22
Lokonli wrote: Tuesday 29 September 2020 22:31

Yes, thanks.

I cannot completely reproduce your issue, but I've fixed some bugs that might have caused this.

Can you test latest beta? (3.6.2)
I have tested the latest beta date 30-9-2020 but stil no graph.
The icons are nu.nl.png and nos.png
Found it. Totally forgot the following:

The graph now support 'multidevices'

However, that means in the custom graph you have to add the device id to the value, as follows:

Code: Select all

blocks[p1_grafiek_gas] = {
    title: 'Gas',
    width: 12,
    height: '425px',
    custom : {
    "dag": {
    graph: 'bar',
    range: 'day',
    filter: '24 hours',
    data: {
    Gas: 'd.v_57'			//_57 added
    }
    },
    "maand": {
    graph: 'bar',
    range: 'month',
    data: {
    Gas: 'd.v_57'			//_57 added
    },
    },
    "jaar": {
    graph: 'line',
    range: 'year',
    data: {
    Gas: 'd.v_57'			//_57 added
    }
    },
    },
    legend: false,
    datasetColors: ['yellow'],
    displayFormats : {
    minute: 'h:mm',
    hour: 'h:mm',
    day: 'DD MMM',
    week: 'DD MMM',
    month: 'MMM',
    }
    }

That should do it ...
For the gas the graph is is working.
I am only struggling with the elecric graph. Where can I add the d.v. to d.v._56.

This is not working:
data: {
netto: 'd.v_56+d.v2-d.r1-d.r2',
gebruikt: 'd.v_56+d.v2',
geleverd: '-d.r1-d.r2'
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.6 master

Post by Lokonli »

try:

Code: Select all

data: {
netto: 'd.v_56+d.v2_56-d.r1_56-d.r2_56',
gebruikt: 'd.v_56+d.v2_56',
geleverd: '-d.r1_56-d.r2_56'
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest