PoE total consumption higher than individual consumption

Hey there

Can anyone explain to me whyubus call poe info brings this result. As far as I'm aware, that total is closer to 10 watts than 90 watts?

	"firmware": "v16.3",
	"budget": 130.000000,
	"consumption": 90.000000,
	"ports": {
		"lan1": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Searching"
		},
		"lan2": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Delivering power",
			"consumption": 2.900000
		},
		"lan3": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Searching"
		},
		"lan4": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Delivering power",
			"consumption": 3.400000
		},
		"lan5": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Searching"
		},
		"lan6": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Delivering power",
			"consumption": 3.200000
		},
		"lan7": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Searching"
		},
		"lan8": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Searching"
		},
		"lan9": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Searching"
		},
		"lan10": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Searching"
		},
		"lan11": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Searching"
		},
		"lan12": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Searching"

2.9 + 3.4 + 3.2 == 9.5

Yes, it's coser to 10.

Out of curiosity what's your uptime?

(Theory: perhaps its total Watthours)

Waht is the power limit on these devices? For PoE+ 30W doesn't seem unlikely, in which case this might be reporting the allocated power budget instead of the actual power consumption.

Uptime 43 days, so probably not accumulated consumption

@svanheule two devices are Cudy AP3000 v1 PoE APs. Their rated consumption is max 12W but they support 802.3at/af
The last device is a Raspberry Pi 4 with a PoE splitter which supports 802.3at/af

So you might be right in the total power budget.

Any clue what happens if I go over?

From your other post, I assume this is output from a GS1900-24EP? I don't know what the default class-based allocations are for that platform (Realtek PSE). @jonasj might know (or know who to ask).

If this is in fact the allocated power budget, then you won't be able to go over 130W. A fourth device will work, but a fifth will not. For that you would need to switch to a different power budgeting mode using the actual power consumption.

This is the output from GS1900-24EP, yes.

Using the standard config from the hardware wiki.

Is there any way to force it to only deliver per PoE (15 watts) and not PoE+ (30 watts) since the power consumption is way below?

config global
        option force_baudrate '115200'
        option force_dialect 'realtek'
	option budget	'130'

config port
	option enable	'1'
	option id	'1'
	option name	'lan1'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'2'
	option name	'lan2'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'3'
	option name	'lan3'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'4'
	option name	'lan4'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'5'
	option name	'lan5'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'6'
	option name	'lan6'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'7'
	option name	'lan7'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'8'
	option name	'lan8'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'9'
	option name	'lan9'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'10'
	option name	'lan10'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'11'
	option name	'lan11'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'12'
	option name	'lan12'
	option poe_plus	'1'
	option priority	'2'

I answered my own question by looking at the github page and deducting that I could enforce a different poe option.

I'm down to using 46 watts with this config, and ubus call poe info yields the result below

config global
        option force_baudrate '115200'
        option force_dialect 'realtek'
	option budget	'130'

config port
	option enable	'1'
	option id	'1'
	option name	'lan1'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'2'
	option name	'lan2'
	option poe_plus	'2'
	option priority	'2'
config port
	option enable	'1'
	option id	'3'
	option name	'lan3'
	option poe_plus	'2'
	option priority	'2'
config port
	option enable	'1'
	option id	'4'
	option name	'lan4'
	option poe_plus	'2'
	option priority	'2'
config port
	option enable	'1'
	option id	'5'
	option name	'lan5'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'6'
	option name	'lan6'
	option poe_plus	'2'
	option priority	'2'
config port
	option enable	'1'
	option id	'7'
	option name	'lan7'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'8'
	option name	'lan8'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'9'
	option name	'lan9'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'10'
	option name	'lan10'
	option poe_plus	'1'
	option priority	'2'
config port
	option enable	'1'
	option id	'11'
	option name	'lan11'
	option poe_plus	'2'
	option priority	'2'
config port
	option enable	'1'
	option id	'12'
	option name	'lan12'
	option poe_plus	'2'
	option priority	'2'

{
	"firmware": "v16.3",
	"budget": 130.000000,
	"consumption": 46.200001,
	"ports": {
		"lan1": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Searching"
		},
		"lan2": {
			"priority": 2,
			"mode": "PoE",
			"status": "Delivering power",
			"consumption": 2.800000
		},
		"lan3": {
			"priority": 2,
			"mode": "PoE",
			"status": "Searching"
		},
		"lan4": {
			"priority": 2,
			"mode": "PoE",
			"status": "Delivering power",
			"consumption": 3.400000
		},
		"lan5": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Searching"
		},
		"lan6": {
			"priority": 2,
			"mode": "PoE",
			"status": "Delivering power",
			"consumption": 3.700000
		},
		"lan7": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Searching"
		},
		"lan8": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Searching"
		},
		"lan9": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Searching"
		},
		"lan10": {
			"priority": 2,
			"mode": "PoE+",
			"status": "Searching"
		},
		"lan11": {
			"priority": 2,
			"mode": "PoE",
			"status": "Searching"
		},
		"lan12": {
			"priority": 2,
			"mode": "PoE",
			"status": "Searching"
		}
	}
}

Setting poe_plus to '2' is the same as setting it to '0' (802.3af mode). Only '1' actually has any impact (802.3at mode). The power allocated to a device is now the maximum of the 802.3af standard, i.e. 15.4W.

Can you get the output of ubus call poe debug? I suspect the device will be using "pre-allocated" power to determine the total power output.

Had a brief look at the protocol docs for Broadcom PSE and Realtek PSE. I suppose this is a parsing issue.

For Broadcom, the value at offset 2 in the reply is the power consumption (https://svanheule.net/switches/software/broadcom_poe_control_protocol#get_port_config). But for Realtek PSE, this seems to be the allocated power at offset 2, the overall consumption is at offset 7 (https://github.com/jameywine/realtek-doc/blob/main/datasheets/RTL8238B%20Host%20Command%20Guide.pdf, page 38-39)

realtek-poe doesn't seem to handle this properly. (https://github.com/Hurricos/realtek-poe/blob/2bd359f858530a36ed4c63d14c4d044cd743d9b1/src/main.c#L529)

Ah well, here I thought I could read something in the code. Thanks for clarifying.

ubus call poe debug reports this.

{
	"reported_budget": 119.900002,
	"num_detected_ports": 16,
	"port_map_en": 1,
	"device_id": 313,
	"ports": {
		"lan1": {
			"power_limit_type": 1,
			"power_budget": 15.000000,
			"priority": 2,
			"primary_pse_output": 32,
			"mapping": 7
		},
		"lan2": {
			"power_limit_type": 1,
			"power_budget": 15.000000,
			"priority": 2,
			"primary_pse_output": 32,
			"mapping": 6
		},
		"lan3": {
			"power_limit_type": 1,
			"power_budget": 15.000000,
			"priority": 2,
			"primary_pse_output": 32,
			"mapping": 5
		},
		"lan4": {
			"power_limit_type": 1,
			"power_budget": 15.000000,
			"priority": 2,
			"primary_pse_output": 32,
			"mapping": 4
		},
		"lan5": {
			"power_limit_type": 1,
			"power_budget": 15.000000,
			"priority": 2,
			"primary_pse_output": 32,
			"mapping": 3
		},
		"lan6": {
			"power_limit_type": 1,
			"power_budget": 15.000000,
			"priority": 2,
			"primary_pse_output": 32,
			"mapping": 2
		},
		"lan7": {
			"power_limit_type": 1,
			"power_budget": 15.000000,
			"priority": 2,
			"primary_pse_output": 32,
			"mapping": 1
		},
		"lan8": {
			"power_limit_type": 1,
			"power_budget": 15.000000,
			"priority": 2,
			"primary_pse_output": 32,
			"mapping": 0
		},
		"lan9": {
			"power_limit_type": 1,
			"power_budget": 15.000000,
			"priority": 2,
			"primary_pse_output": 34,
			"mapping": 3
		},
		"lan10": {
			"power_limit_type": 1,
			"power_budget": 15.000000,
			"priority": 2,
			"primary_pse_output": 34,
			"mapping": 2
		},
		"lan11": {
			"power_limit_type": 1,
			"power_budget": 15.000000,
			"priority": 2,
			"primary_pse_output": 34,
			"mapping": 1
		},
		"lan12": {
			"power_limit_type": 1,
			"power_budget": 15.000000,
			"priority": 2,
			"primary_pse_output": 34,
			"mapping": 0
		}
	},
	"mapping": {
		"enabled": 1,
		"lan1": 7,
		"lan2": 6,
		"lan3": 5,
		"lan4": 4,
		"lan5": 3,
		"lan6": 2,
		"lan7": 1,
		"lan8": 0,
		"lan9": 3,
		"lan10": 2,
		"lan11": 1,
		"lan12": 0
	}
}

I'm not familiar with the workflow of solutions like this.
Would one usually go about making the change and compiling the code again, or request the author to fix it, or.. ?

It depends ... this userspace approach like realtek-poe does is rather deprecated because the kernel has the PSE-PD framework with kernel drivers.

For the Realtek PSE, I'm developing a driver at https://github.com/openwrt/openwrt/pull/23222 and https://lore.kernel.org/netdev/20260612132944.460646-1-jelonek.jonas@gmail.com/. This doesn't read that value because the PSE-PD framework doesn't have a way (yet) to pass a combined consumption. So the issue is not existent there, having a full consumption would fall back to summing up the individual consumption of each port.

If you still want to fix it, doing a pull request on your own in realtek-poe would be the way to go, I guess the author might not have the time right now to fix that.

I was just preempting possible trouble in the future.
I am not looking specifically for a total consumption, but I am looking to have space for more than 5 PoE devices in the future.

I just stumbled across this possible problem when trying to figure out what my individual devices were using so I could determine specs for future equipment