P1 multigraph - no data coming in?

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
renerene
Posts: 351
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

P1 multigraph - no data coming in?

Post by renerene »

my P1 muligraph is not working anymore. Used to work months ago. Device has not changed, same IDX (427)
Even tested the code principle from the read-the-docs

Result: no lines, no data. Here is the screenshot from the </>show data hamburger menu:
Image

Code: Select all

//based on https://dashticz.readthedocs.io/en/beta/blocks/graphs.html#custom-graphs

blocks['multigraph_427'] = {
    title: 'My Power',
    devices: [427],
    graph: ['line','bar','bar'],
    custom : {
        "last day": {
            range: 'day',
            filter: '24 hours',
            data: {
                nett: 'd.v_427+d.v2_427-d.r1_427-d.r2_427',
                usage: 'd.v_427+d.v2_427',
                generation: '-d.r1_427-d.r2_427'
            }
        },
        "last 2 weeks": {
            range: 'month',
            filter: '14 days',
            data: {
                nett: 'd.v_427+d.v2_427-d.r1_427-d.r2_427',
                usage: 'd.v_427+d.v2_427',
                generation: '-d.r1_427-d.r2_427'
            }
        },
        "last 6 months": {
            range: 'year',
            filter: '6 months',
            data: {
                nett: 'd.v_427+d.v2_427-d.r1_427-d.r2_427',
                usage: 'd.v_427+d.v2_427',
                generation: '-d.r1_427-d.r2_427'
            }
        }
    },
    legend: true,
    datasetColors:['blue','red','yellow']
}
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: P1 multigraph - no data coming in?

Post by Lokonli »

Domoticz changed.

Replace d.v_427 with d.v1_427
renerene
Posts: 351
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: P1 multigraph - no data coming in?

Post by renerene »

Lokonli wrote: Monday 28 April 2025 22:25 Replace d.v_427 with d.v1_427
No, that does not work:

Image

Code: Select all

blocks['multigraph_427'] = {
    title: 'My Power',
    devices: [427],
    graph: ['line','bar','bar'],
    custom : {
        "last day": {
            range: 'day',
            filter: '24 hours',
            data: {
                nett: 'd.v1_427+d.v2_427-d.r1_427-d.r2_427',
                usage: 'd.v1_427+d.v2_427',
                generation: '-d.r1_427-d.r2_427'
            }
        },
        "last 2 weeks": {
            range: 'month',
            filter: '14 days',
            data: {
                nett: 'd.v1_427+d.v2_427-d.r1_427-d.r2_427',
                usage: 'd.v1_427+d.v2_427',
                generation: '-d.r1_427-d.r2_427'
            }
        },
        "last 6 months": {
            range: 'year',
            filter: '6 months',
            data: {
                nett: 'd.v1_427+d.v2_427-d.r1_427-d.r2_427',
                usage: 'd.v1_427+d.v2_427',
                generation: '-d.r1_427-d.r2_427'
            }
        }
    },
    legend: true,
    datasetColors:['blue','red','yellow']
}
Image

Json dump:

Code: Select all

{
	"ActTime" : 1745912962,
	"AstrTwilightEnd" : "23:19",
	"AstrTwilightStart" : "03:50",
	"CivTwilightEnd" : "21:33",
	"CivTwilightStart" : "05:36",
	"DayLength" : "14:42",
	"NautTwilightEnd" : "22:21",
	"NautTwilightStart" : "04:48",
	"ServerTime" : "2025-04-29 09:49:22",
	"SunAtSouth" : "13:34",
	"Sunrise" : "06:13",
	"Sunset" : "20:55",
	"app_version" : "2024.7",
	"result" : 
	[
		{
			"AddjMulti" : 1.0,
			"AddjMulti2" : 1.0,
			"AddjValue" : 0.0,
			"AddjValue2" : 0.0,
			"BatteryLevel" : 255,
			"Counter" : "48837.268",
			"CounterDeliv" : "28909.955",
			"CounterDelivToday" : "0.109 kWh",
			"CounterToday" : "1.760 kWh",
			"CustomImage" : 0,
			"Data" : "33917776;14919492;8214093;20695862;83;0",
			"Description" : "",
			"Favorite" : 1,
			"HardwareDisabled" : false,
			"HardwareID" : 16,
			"HardwareName" : "stroommeter-USB1",
			"HardwareType" : "P1 Smart Meter USB",
			"HardwareTypeVal" : 4,
			"HaveTimeout" : false,
			"ID" : "0001",
			"LastUpdate" : "2025-04-29 09:49:16",
			"Name" : "Stroom",
			"Notifications" : "false",
			"PlanID" : "0",
			"PlanIDs" : 
			[
				0
			],
			"Protected" : false,
			"ShowNotifications" : true,
			"SignalLevel" : "-",
			"SubType" : "Energy",
			"SwitchTypeVal" : 0,
			"Timers" : "false",
			"Type" : "P1 Smart Meter",
			"TypeImg" : "counter",
			"Unit" : 1,
			"Usage" : "83 Watt",
			"UsageDeliv" : "0 Watt",
			"Used" : 1,
			"XOffset" : "0",
			"YOffset" : "0",
			"idx" : "427",
			"price" : "0.4171"
		}
	],
	"status" : "OK",
	"title" : "Devices"
}
renerene
Posts: 351
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: P1 multigraph - no data coming in?

Post by renerene »

problem solved

found the correct data field names using

Code: Select all

columns[3]['blocks'] = ['graph_427'];
Image

maybe the rename issue had something to do with filling in the cost fields in DZ settings
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: P1 multigraph - no data coming in?

Post by Lokonli »

Good, thanks!

You have a single tariff meter I assume?

My P1 meter gives v1, v2 and r1,r2 values.

I'm working on an update of the graph module, so that the default graphs will be dependent on the device type and will give more useful graphs by default. For P1 meters I'll include the detection of single tariff and double tariff meters.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest