diff --git a/data/cmdvartab b/data/cmdvartab index 6073717f36..5e5c6f72fa 100644 --- a/data/cmdvartab +++ b/data/cmdvartab @@ -162,6 +162,7 @@ VARDESC outlet.id "Outlet system identifier" VARDESC outlet.desc "Outlet description" VARDESC outlet.switch "Outlet switch control" VARDESC outlet.status "Outlet switch status" +VARDESC outlet.protect.status "Outlet Protection status" VARDESC outlet.switchable "Outlet switch ability" VARDESC outlet.autoswitch.charge.low "Remaining battery level to power off this outlet (percent)" VARDESC outlet.delay.shutdown "Interval to wait before shutting down this outlet (seconds)" @@ -170,6 +171,7 @@ VARDESC outlet.1.id "Outlet system identifier" VARDESC outlet.1.desc "Outlet description" VARDESC outlet.1.switch "Outlet switch control" VARDESC outlet.1.status "Outlet switch status" +VARDESC outlet.1.protect.status "Outlet Protection status" VARDESC outlet.1.switchable "Outlet switch ability" VARDESC outlet.1.ecocontrol "Outlet High Efficiency (aka ECO) control info" VARDESC outlet.1.autoswitch.charge.low "Remaining battery level to power off this outlet (percent)" @@ -179,6 +181,7 @@ VARDESC outlet.2.id "Outlet system identifier" VARDESC outlet.2.desc "Outlet description" VARDESC outlet.2.switch "Outlet switch control" VARDESC outlet.2.status "Outlet switch status" +VARDESC outlet.2.protect.status "Outlet Protection status" VARDESC outlet.2.switchable "Outlet switch ability" VARDESC outlet.2.ecocontrol "Outlet High Efficiency (aka ECO) control info" VARDESC outlet.2.autoswitch.charge.low "Remaining battery level to power off this outlet (percent)" diff --git a/docs/nut-names.txt b/docs/nut-names.txt index fb9b53d339..6fd692fd38 100644 --- a/docs/nut-names.txt +++ b/docs/nut-names.txt @@ -695,6 +695,8 @@ of the user manual. (on/off) | on | outlet.n.status | Outlet switch status (on/off) | on +| outlet.n.protect.status | Outlet protection status + (0-2) | protected | outlet.n.alarm | Alarms for outlets and PDU, published in ups.alarm | outlet 1 low voltage warning diff --git a/drivers/mge-hid.c b/drivers/mge-hid.c index 1b23b15e0e..625e6f86b8 100644 --- a/drivers/mge-hid.c +++ b/drivers/mge-hid.c @@ -1510,11 +1510,9 @@ static hid_info_t mge_hid2nut[] = { "outlet.1.id", 0, 0, "UPS.OutletSystem.Outlet.[2].OutletID", NULL, "%.0f", HU_FLAG_STATIC, NULL }, { "outlet.1.desc", ST_FLAG_RW | ST_FLAG_STRING, 20, "UPS.OutletSystem.Outlet.[2].OutletID", NULL, "PowerShare Outlet 1", HU_FLAG_ABSENT, NULL }, { "outlet.1.switchable", 0, 0, "UPS.OutletSystem.Outlet.[2].PresentStatus.Switchable", NULL, "%s", HU_FLAG_STATIC, yes_no_info }, - /* FIXME: should better use UPS.OutletSystem.Outlet.[1].Status? */ - /* Duplicate data for some units that use a different path, - * Only the first valid one will be used */ + /* FIXME: should better use UPS.OutletSystem.Outlet.[1].Status? */ { "outlet.1.status", 0, 0, "UPS.OutletSystem.Outlet.[2].PresentStatus.SwitchOn/Off", NULL, "%s", 0, on_off_info }, - { "outlet.1.status", 0, 0, "UPS.OutletSystem.Outlet.[1].Status", NULL, "%s", 0, eaton_outlet_protection_status_info }, + { "outlet.1.protect.status", 0, 0, "UPS.OutletSystem.Outlet.[1].Status", NULL, "%s", 0, eaton_outlet_protection_status_info }, { "outlet.1.designator", 0, 0, "UPS.OutletSystem.Outlet.[1].iDesignator", NULL, NULL, HU_FLAG_STATIC, stringid_conversion }, /* FIXME */ /* For low end models, with 1 non backup'ed outlet */ { "outlet.1.status", 0, 0, "UPS.PowerSummary.PresentStatus.ACPresent", NULL, "%s", 0, on_off_info }, @@ -1536,7 +1534,8 @@ static hid_info_t mge_hid2nut[] = { "outlet.2.switchable", ST_FLAG_RW | ST_FLAG_STRING, 3, "UPS.OutletSystem.Outlet.[3].PresentStatus.Switchable", NULL, "%s", HU_FLAG_SEMI_STATIC, pegasus_yes_no_info }, /* Generic version (RO) for other models */ { "outlet.2.switchable", 0, 0, "UPS.OutletSystem.Outlet.[3].PresentStatus.Switchable", NULL, "%s", 0, yes_no_info }, - { "outlet.2.status", 0, 0, "UPS.OutletSystem.Outlet.[1].Status", NULL, "%s", 0, on_off_info }, + { "outlet.2.status", 0, 0, "UPS.OutletSystem.Outlet.[3].PresentStatus.SwitchOn/Off", NULL, "%s", 0, on_off_info }, + { "outlet.2.protect.status", 0, 0, "UPS.OutletSystem.Outlet.[1].Status", NULL, "%s", 0, eaton_outlet_protection_status_info }, /* FIXME: should better use UPS.OutletSystem.Outlet.[1].Status? */ { "outlet.2.autoswitch.charge.low", ST_FLAG_RW | ST_FLAG_STRING, 3, "UPS.OutletSystem.Outlet.[3].RemainingCapacityLimit", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL }, { "outlet.2.delay.shutdown", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.OutletSystem.Outlet.[3].ShutdownTimer", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL },