You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Socket API: Document all 7 commands with request/response examples
- list_devices, get_instantaneous_demand, get_device_data
- get_network_info, get_history_data, plus unsupported commands
- Add field-by-field explanations and unit conversion formulas
- HTTP API: Expand documentation with complete endpoint details
- Authentication (HTTP Basic Auth) with curl examples
- Document get_usage_data, get_device_list, get_instantaneous_demand
- Include request/response examples in XML and JSON
- Clients API: Add comprehensive usage guide
- Full Python examples for both Socket and HTTP clients
- Comparison table: Socket vs HTTP (protocol, auth, speed, features)
- Clear recommendations for when to use each approach
- Data Models: Complete reference with all fields documented
- Document all 6 models: DeviceInfo, DeviceList, InstantaneousDemand
- CurrentSummation, UsageData, NetworkInfo
- Include JSON response examples and usage patterns
- Explain computed properties and unit conversions
- Remove embedded agent reasoning from socket_api.md
- Clean up parenthetical authentication discussion
- Professional reference manual format throughout
Expands documentation from ~130 lines to 838 lines with 35+ code examples.
The `meter_reader` library provides two client implementations for the Eagle Gateway.
3
+
The `meter_reader` library provides two client implementations for the EAGLE Gateway, each suited to different deployment scenarios and authentication requirements.
4
4
5
-
## Base Client
5
+
## Overview
6
+
7
+
Both clients inherit from the abstract `EagleClient` base class, which defines the common interface for interacting with the gateway. Choose based on your gateway's network configuration and authentication setup:
8
+
9
+
***Socket API**: Fast, low-overhead XML-based communication (Port 5002)
10
+
***HTTP API**: Standard HTTP with JSON responses and authentication support (Port 80)
11
+
12
+
## Base Client Interface
6
13
7
14
::: meter_reader.clients.base.EagleClient
8
15
handler: python
@@ -14,9 +21,46 @@ The `meter_reader` library provides two client implementations for the Eagle Gat
14
21
- get_network_info
15
22
- get_current_summation
16
23
24
+
All implementations must provide these methods, ensuring consistent behavior across protocols.
25
+
17
26
## Socket Client
18
27
19
-
The `EagleSocketClient` communicates via the local XML API on port 5002. This is the traditional method for most integrations.
28
+
The `EagleSocketClient` communicates via the raw TCP socket API on port 5002. This is the fastest and lowest-latency option, making it ideal for real-time monitoring and historical data queries.
@@ -25,16 +69,71 @@ The `EagleSocketClient` communicates via the local XML API on port 5002. This is
25
69
- __init__
26
70
- list_devices
27
71
- get_instantaneous_demand
72
+
- get_current_summation
73
+
- get_usage_data
74
+
- get_network_info
28
75
- get_history_data
29
76
30
77
## HTTP Client
31
78
32
-
The `EagleHttpClient` communicates via the local web interface API (`cgi_manager`) on port 80. This method uses JSON responses where possible and supports username/password authentication.
79
+
The `EagleHttpClient` communicates via HTTP POST requests to the `/cgi-bin/cgi_manager` endpoint on port 80. Responses are returned as JSON. This client supports username/password authentication and is useful for deployments where HTTP is preferred over raw sockets.
0 commit comments