forked from rweijnen/marstek-fw-checker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
216 lines (197 loc) · 10.8 KB
/
index.html
File metadata and controls
216 lines (197 loc) · 10.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Marstek Firmware Query Tool</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<header>
<h1>Marstek Firmware Query Tool</h1>
<p>Check what firmware versions are available from Marstek servers</p>
<div class="work-in-progress-banner">
<span class="wip-icon">🚧</span>
<span class="wip-text">Work in Progress</span>
<button class="info-btn" onclick="showWipInfo()" title="Click for more information">ℹ️</button>
</div>
</header>
<div class="form-container">
<!-- Login Section -->
<div id="loginSection" class="login-section">
<h2>🔐 Login to Marstek Account</h2>
<div class="disclaimer-notice">
<strong>⚠️ Disclaimer:</strong> This is an unofficial, community-developed tool and is not affiliated with, endorsed by, or supported by Marstek. Use at your own risk. Always verify firmware compatibility before installation.
</div>
<div class="disclaimer-notice" style="margin-top: 15px; background: #2d3748; border-left: 3px solid #FFA500;">
<strong>📱 Note:</strong> When using this tool, you will be logged out from the official Marstek app on your mobile device due to session limitations.
</div>
<form id="loginForm">
<div class="form-group">
<label for="email">Email <span class="required">*</span></label>
<input type="email" id="email" name="email" required>
</div>
<div class="form-group">
<label for="password">Password <span class="required">*</span></label>
<input type="password" id="password" name="password" required>
</div>
<button type="submit" id="loginBtn">Login</button>
</form>
</div>
<!-- Devices Section -->
<div id="devicesSection" class="devices-section">
<h2>📱 Your Devices
<button class="console-btn inline" onclick="showDevicesRawData()" title="Show raw devices API response">
<span class="console-icon">▢</span>
</button>
</h2>
<div class="disclaimer-notice" style="margin-bottom: 20px;">
<strong>Remember:</strong> This unofficial tool is provided as-is. Neither Marstek nor the tool author are responsible for any issues arising from its use.
</div>
<div id="deviceGrid" class="device-grid">
<!-- Devices will be populated here -->
</div>
<button id="logoutBtn" class="btn btn-secondary" style="margin-top: 20px;">Logout</button>
</div>
</div>
<div id="loading" class="loading" style="display: none;">
<div class="spinner"></div>
<p>Checking Marstek servers...</p>
</div>
<div id="results" class="results" style="display: none;">
<h2>Results</h2>
<div id="resultContent"></div>
</div>
<div id="error" class="error" style="display: none;">
<h2>Error</h2>
<div id="errorContent"></div>
</div>
</div>
<!-- WIP Info Modal -->
<div id="wipModal" class="modal" style="display: none;">
<div class="modal-content" style="max-width: 600px;">
<div class="modal-header">
<h2>🚧 Work in Progress Notice</h2>
<span class="modal-close" onclick="closeWipModal()">×</span>
</div>
<div class="modal-body">
<div class="firmware-section">
<h3>⚠️ Current Development Status</h3>
<p>We are actively working on improving support for newer Marstek devices, particularly:</p>
<ul style="color: #e0e0e0; margin: 15px 0;">
<li><strong>Venus E V3 (VNSE3-0)</strong> - Enhanced firmware detection</li>
<li><strong>CT002/CT003</strong> - Now using dedicated AC Couple OTA endpoint</li>
<li><strong>API Parameters</strong> - Optimizing version detection for all models</li>
</ul>
<h3 style="margin-top: 20px;">🔄 What This Means</h3>
<p>During this transition period, you may experience:</p>
<ul style="color: #e0e0e0; margin: 15px 0;">
<li>Inconsistent firmware detection for newer models</li>
<li>Some devices showing "No updates" when updates exist</li>
<li>Changes in how firmware versions are reported</li>
</ul>
<h3 style="margin-top: 20px;">✅ What's Working</h3>
<p>The following features remain fully functional:</p>
<ul style="color: #e0e0e0; margin: 15px 0;">
<li>Device authentication and listing</li>
<li>Venus E V1/V2 (HMG-50) firmware checks</li>
<li>Firmware download functionality</li>
</ul>
<p style="margin-top: 20px; padding: 15px; background: #404040; border-radius: 6px; border-left: 3px solid #FF9800;">
<strong>Note:</strong> We're using firmware version "100" as a baseline to detect all available updates.
This may show more updates than actually needed for your device. Please verify compatibility before installing.
</p>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" onclick="closeWipModal()">Got it!</button>
</div>
</div>
</div>
<!-- Console Data Modal -->
<div id="consoleModal" class="modal console-modal" style="display: none;">
<div class="modal-content" style="max-width: 900px;">
<div class="modal-header">
<h2 id="consoleModalTitle">Raw API Data</h2>
<span class="modal-close" onclick="closeConsoleModal()">×</span>
</div>
<div class="modal-body">
<div class="firmware-section" id="apiTestSection" style="display: none;">
<h3>🔧 API Tester</h3>
<div class="api-tester">
<div style="margin-bottom: 15px;">
<label for="apiUrl" style="display: block; margin-bottom: 5px; color: #e0e0e0; font-weight: 600;">API URL:</label>
<input type="text" id="apiUrl" style="width: 100%; padding: 8px; background: #2d2d2d; color: #e0e0e0; border: 1px solid #555; border-radius: 4px; font-family: 'Courier New', monospace; font-size: 12px;" placeholder="Enter API URL">
</div>
<div style="margin-bottom: 15px;">
<button class="btn btn-primary" onclick="testCustomUrl()">🚀 Test API Call</button>
<button class="btn btn-secondary" onclick="resetToOriginal()">↺ Reset to Original</button>
</div>
</div>
</div>
<div class="firmware-section">
<h3>📡 Raw API Response</h3>
<div class="console-output">
<pre id="consoleContent" style="background: #1a1a1a; color: #00ff41; padding: 20px; border-radius: 8px; font-family: 'Courier New', monospace; font-size: 12px; line-height: 1.4; overflow-x: auto; white-space: pre-wrap; border: 1px solid #333; max-height: 500px; overflow-y: auto;">
Loading...
</pre>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-secondary" onclick="copyConsoleContent()">📋 Copy to Clipboard</button>
<button class="btn btn-primary" onclick="closeConsoleModal()">Close</button>
</div>
</div>
</div>
<!-- Firmware Details Modal -->
<div id="firmwareModal" class="modal" style="display: none;">
<div class="modal-content">
<div class="modal-header">
<h2 id="modalDeviceName">Device Firmware</h2>
<span class="modal-close">×</span>
</div>
<div class="modal-body" id="modalBody">
<!-- Firmware details will be populated here -->
</div>
<div class="modal-footer">
<button id="closeModalBtn" class="btn btn-secondary">Close</button>
</div>
</div>
</div>
<!-- Advanced Settings Modal -->
<div id="advancedModal" class="modal" style="display: none;">
<div class="modal-content">
<div class="modal-header">
<h2 id="advancedModalTitle">Advanced Settings</h2>
<button class="console-btn" onclick="showAdvancedConsoleData()" title="Show raw API data" style="position: absolute; right: 60px; top: 20px;">
<span class="console-icon">▢</span>
</button>
<span class="modal-close" onclick="closeAdvancedModal()">×</span>
</div>
<div class="modal-body" id="advancedModalBody">
<!-- Advanced settings will be populated here -->
</div>
<div class="modal-footer">
<button class="btn btn-secondary" onclick="copyAdvancedSettings()">📋 Copy Settings</button>
<button class="btn btn-primary" onclick="closeAdvancedModal()">Close</button>
</div>
</div>
</div>
<footer>
<p>This tool queries Marstek servers to see what firmware versions are currently available.</p>
<p><strong>Note:</strong> This tool shows available firmware, not whether your device needs updating. Compare versions manually.</p>
<div class="author-info">
<p>
<strong>Author:</strong> <a href="https://github.com/rweijnen" target="_blank">Remko Weijnen</a> |
<strong>Source Code:</strong> <a href="https://github.com/rweijnen/marstek-fw-checker" target="_blank">GitHub Repository</a>
</p>
</div>
<div class="version-info" id="versionInfo">
<p><small>Loading version info...</small></p>
</div>
</footer>
<script src="script.js"></script>
</body>
</html>