no different wit added port 8
How old is the realtek-poe package in that build?
Last time this ”poe doesn’t work” question came up with a non official build it had an obsolete realtek-poe package.
Package is based on last commit that was August 28th.
Is the ZyXEL GS1900-24EP supported currently? I'm thinking about buying one of these to put OpenWrt on.
I never submitted a pull request for this as the PoE chip used is a Realtek and not currently supported by the current realtek-poe package. I could submit a pull request with non-working PoE but haven't worked on this in months. I would suggest the GS1900-24HP if you need a 24 port POE device, the GS1900-24EP only has 12 PoE ports.
Thanks, I was looking at the GS1900-24EP because the chassis is smaller and I was hoping it would have lower idle power consumption (and I don't need all 24 ports to support PoE).
As a side note, if anyone has power consumption information for the GS1900 switches, it would be nice to see!
Hello,
I run OpenWrt on several Zyxel switches (GS1900-8 and GS1900-24) and it works very well.
I now would like to add POE support on a GS1900-8HP switch.
What's the recommended method ?
I tried the method described here for the GS1900-10HP but that didn't work.
I installed files from here and chmoded them :
/bin/poe.lua
/etc/init.d/poe
/etc/config/poe
I started the POE script, activated all the ports in /etc/config/poe and rebooted, but I get this :
# ubus call poe info
Command failed: Not found
Uh that page is heavily outdated. You need the realtek-poe
package which is installed by default on snapshot builds. For a 22.03.x you need to build from source as the CI builds are expired. You can also find such a build by @Borromini a few posts up.
Yikes, I totally forgot about that. I've updated the wiki entry to reflect the present situation.
@Fremont You can grab the latest binary for 22.03 here.
Better use the link mrnuke provided.
I restarted from a fresh install :
firstboot && reboot now
The status pages says :
Model ZyXEL GS1900-8HP v2 Switch
Architecture RTL8380
Target Platform realtek/rtl838x
Firmware Version OpenWrt 22.03.4 r20123-38ccc47687 / LuCI openwrt-22.03 branch git-23.093.57104-ce20b4a
Kernel Version 5.10.176
I downloaded realtek-poe_2022-08-28-39c93d39-1_mips_4kec.ipk from https://drive.proton.me/urls/E1TAHKAFH8#Nc3WSK9QRWiY which I installed with this command :
opkg install /tmp/realtek-poe_2022-08-28-39c93d39-1_mips_4kec.ipk
I then edited the /etc/config/poe file and put in it :
config global
option budget '70'
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'
I rebooted and here's the result :
# ubus call poe info
{
"firmware": "v0.0",
"budget": 70.000000,
"consumption": 0.000000,
"ports": {
"lan1": {
"priority": 2,
"status": "unknown"
},
"lan2": {
"priority": 2,
"status": "unknown"
},
"lan3": {
"priority": 2,
"status": "unknown"
},
"lan4": {
"priority": 2,
"status": "unknown"
},
"lan5": {
"priority": 2,
"status": "unknown"
},
"lan6": {
"priority": 2,
"status": "unknown"
},
"lan7": {
"priority": 2,
"status": "unknown"
},
"lan8": {
"priority": 2,
"status": "unknown"
}
}
}
I plugged a (OpenWRT-running) POE access point in lan2, but it doesn't light up. There seem to be no current on the ports.
I've seen this kind of behaviour myself before unfortunately. Sometimes it would help to lower the budget specified in the config file (but it could be hit and miss...). What might help as well is to reboot into the OEM firmware, have it provide power to your AP, and then try OpenWrt again.
@mrnuke Am I mistaken or were there packages available for download on GitHub? I can't find them anymore on Hurricos' repo.
Yes they were. Apparently they "expire" after a while, which I did not realize would happen:
I could have sworn there was an "official" openwrt snapshot build:
https://downloads.openwrt.org/snapshots/packages/mips_4kec/packages/realtek-poe_39c93d39-2_mips_4kec.ipk
Thank you very much for your help (and your work for bringing POE to OpenWRT) !
I downloaded the latest snapshot, installed luci, installed the realtek-poe package and it worked flawlessly !
My GS110TPP running a recent master snapshot (5.15.112 r0-8d618a31) is exhibiting strange POE-Port-LED behaviour after fully booting. It is as if the Ports were numbered right to left.
In the beginning I had a /etc/config/poe
based on the example in git, like on my Zyxels:
config global
option budget '120'
config port
option enable '1'
option id '1'
option name 'lan1'
option poe_plus '1'
option priority '2'
and so on, counting up the 'id' X
, and the 'name' lanX
.
This results in wrong ubus call poe info
output, and wrong LEDs:
Port 1 POE activates LED of PORT 8, and Port1 consumption shows up on lan8
ubus.
Port 2 POE activates LED of PORT 7, and Port2 consumption shows up on lan7
ubus.
...
Port 8 POE activates LED of PORT 1, and Port8 consumption shows up on lan1
ubus.
I then changed the /etc/config/poe
to this scheme
config port
option enable '1'
option id '1'
option name 'lan8'
option poe_plus '1'
option priority '2'
and this time incrementing 'id' up to 8 (as before), but this time decrementing lanX
down to 1.
This gets me correct ubus
output, but the LEDs are still wrong. I reloaded the config, then rebooted to make sure.
During bootup, say the first 30 seconds, the POE-LEDs are correct. Then start misbehaving.
Don't know, if this actually matters here, but I added rtknetwork on
to my bootcmd
to have correct Port LINK LEDs. @andyboeh explained, why that was only needed on the Netgears.
Thanks for creating realtek-poe. My HomeAssistant now correctly displays the stats from my POE ports, and toggles the correct ports on my Netgear, and my Zyxels!
The POE-LEDs being inverted on my single Gs110TPP is a minor annoyance, that I could live with, but just wanted to make sure by asking here, that I did not mess up somewhere.
How did you do the HA integration?
A work in progress with some rough edges:
- A script calling mosquitto_pub on Openwrt sends a (slightly extented) json-output from
ubus call poe info
via MQTT, scheduled via cron. - A self-written simple init-script runs the same script in 'listen'-mode, where it waits for commands arriving via mosquitto_sub to toggle/set POE and/or Layer2 -access.
- Upon start-up 'Discovery-messages' are sent to HA-Discovery-topic, so that all sensors/ports all show up automagically.
- if you install/setup lldpd with RoomNames as 'location', then the entities will even show up in the correct rooms automatically.
200 lines of ASH scipt (Just change mqtt.ip/hostname):
The service, and the cronjob:
https://pastebin.com/JqZpNUg0
It needs a recent enough 'realtek-poe'-package, that includes the ubus poe manage
function. Currently the number of ports is hardcoded to 8.
@stragies , from patebin it's removed, have you another location where I can find this?
I tried to edit my previous message, but I got a modal complaining, that I'm posting code...
Service File and cronjob: https://pastebin.com/SpFZRM1M
The script itself: https://pastebin.com/Mf9Pnxvf
I meant to work on it some more, maybe spin up a github project or smth, make it a real openwrt package. But time was a bit short this summer, didn't got around to it. Feel free to build on the ideaa, if you want the lay the first stone.
Hello,
I'm running OpenWRT with POE on a ZyXEL GS1900-8HP v1 Switch.
You helped me to get it working some months ago.
I installed the snapshot version of OpenWRT.
The stable version 23.05.0 is now out.
Do you know if I still have to installed a snapshot version to get POE to work on my switch, or can it now work with the stable version ?
Thanks!
It works with stable out of the box - I did an attended sysupgrade a few days ago on all my switches. However, there were reports on some Mac address issues, I would wait for 23.05.1 which is rumored to be out soon-ish.