Hallo, ich habe eine EATON PW 5115 750VA und suche dazu das Protokoll der seriellen Schnittstelle. Hab bereits im Internet gesucht und nur das Protokoll von APC USVs gesehen. Was ich auch gefunden habe ist, dass bei manchen USVs einfach ein Pin auf High oder Low gesetzt wird. Hat jemand Infos zu meiner USV, welches Protokoll die verwendet? MfG Tom
Hallo Gerd, hab jetzt was rauslesen können aus der Datei etapro.c
1 | ser_flush_in(upsfd, "", nut_debug_level); |
2 | ser_send(upsfd, "RI\r"); /* identify */ |
3 | |
4 | x = etapro_get_response("SR"); /* manufacturer */ |
5 | if (x < 0) { |
6 | dstate_datastale(); |
7 | return; |
8 | }
|
9 | x = etapro_get_response("SS"); /* model */ |
10 | if (x < 0) { |
11 | dstate_datastale(); |
12 | return; |
13 | }
|
14 | x = etapro_get_response("ST"); /* mfr date */ |
15 | if (x < 0) { |
16 | dstate_datastale(); |
17 | return; |
18 | }
|
19 | x = etapro_get_response("SU"); /* UPS ident */ |
20 | if (x < 0) { |
21 | dstate_datastale(); |
22 | return; |
23 | }
|
24 | |
25 | ser_send(upsfd, "RP\r"); /* read measurements */ |
26 | |
27 | x = etapro_get_response("SO"); /* status flags */ |
28 | if (x < 0) { |
29 | dstate_datastale(); |
30 | return; |
31 | }
|
32 | flags = x; |
33 | |
34 | x = etapro_get_response("SG"); /* input voltage, 0xFF = 270V */ |
35 | if (x < 0) { |
36 | dstate_datastale(); |
37 | return; |
38 | }
|
39 | utility = (270.0 / 255) * x; |
40 | |
41 | x = etapro_get_response("SH"); /* output voltage, 0xFF = 270V */ |
42 | if (x < 0) { |
43 | dstate_datastale(); |
44 | return; |
45 | }
|
46 | outvolt = (270.0 / 255) * x; |
47 | |
48 | x = etapro_get_response("SI"); /* battery voltage, 0xFF = 14V */ |
49 | if (x < 0) { |
50 | dstate_datastale(); |
51 | return; |
52 | }
|
53 | |
54 | /* TODO: >= 1000VA models have a 24V battery (max 28V) - check
|
55 | the model string returned by the RI command. */
|
56 | battvolt = (14.0 / 255) * x; |
57 | |
58 | x = etapro_get_response("SL"); /* load (on battery), 0xFF = 150% */ |
59 | if (x < 0) { |
60 | dstate_datastale(); |
61 | return; |
62 | }
|
63 | loadpct = (150.0 / 255) * x; |
64 | |
65 | x = etapro_get_response("SN"); /* time running on battery */ |
66 | if (x < 0) { |
67 | dstate_datastale(); |
68 | return; |
69 | }
|
70 | /* This is the time how long the UPS has been running on battery
|
71 | (in seconds, reset to zero after power returns), but there
|
72 | seems to be no variable defined for this yet... */
|
73 | |
74 | status_init(); |
75 | |
76 | if (!(flags & 0x02)) |
77 | status_set("OFF"); |
78 | else if (flags & 0x01) |
79 | status_set("OL"); |
80 | else
|
81 | status_set("OB"); |
82 | |
83 | if (!(flags & 0x04)) |
84 | status_set("LB"); |
85 | |
86 | /* TODO bit 3: 1 = ok, 0 = fault */
|
87 | |
88 | if (flags & 0x10) |
89 | status_set("BOOST"); |
90 | |
91 | if (loadpct > 100.0) |
92 | status_set("OVER"); |
93 | |
94 | /* Battery voltage out of range (lower than LB, or too high). */
|
95 | if (flags & 0x20) |
96 | status_set("RB"); |
Leider aber nicht aus der eaton-mib.c Die Dateien sind unter drivers. Kann bitte jemand drüber schaun der C besser kann? MfG Tom
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.