From 26e54a56db078d08065778c67d159bb84f642d96 Mon Sep 17 00:00:00 2001 From: eduard256 Date: Fri, 17 Apr 2026 21:26:25 +0000 Subject: [PATCH] Add Xiaomi camera frontend flow - xiaomi.html: 6-state machine (loading, login, captcha, verify, region, notfound) - index.html: navigateXiaomi redirects type=xiaomi probes to xiaomi.html - icons/mihome.webp: 944B Mi Home logo for hero section - Flow: detect Xiaomi via miIO probe -> login Mi Cloud -> pick region -> fetch device list -> match camera by IP -> create.html?url=xiaomi://... --- www/icons/mihome.webp | Bin 0 -> 944 bytes www/index.html | 35 ++ www/xiaomi.html | 760 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 795 insertions(+) create mode 100644 www/icons/mihome.webp create mode 100644 www/xiaomi.html diff --git a/www/icons/mihome.webp b/www/icons/mihome.webp new file mode 100644 index 0000000000000000000000000000000000000000..869a77835c5f776ca9509f1bca5a48b02319d88d GIT binary patch literal 944 zcmV;h15f-?Nk&Gf0{{S5MM6+kP&go*0{{Tf7yz9CDv$t>06vjMok}I7BB82S2q>@; z2~FFp=pz^L--sR)7pu$h6?5c}USEgK5x2L_|bHL=|t;;XT(ur>p|Pi(<0;H!D_=0G;KqQ#VWjQ1i|6RDO_ez1 zal5n&q+@2{-U*KlKv@j$gN4B}Gcz+X_y7R@-rbTLPL_YDgZ>py@Tz5^)T%ZG;7TaN zfB`?vrszZKbO^+s(a99xzm;W(q@SXFPCW7Ro6n@8Gd~0)guWFjYUtFC33jwEpMf~T zs@n6t75xiO2Etx5{G1Z0aoW&slRo)sWk(ANjd{VWc!x5%dZbI zUU=z4vqtc0#*Epv_>@erxj>M3M~T;WVxvY=jer%2Y2g36)MM~*3Ml(0B4xpwM^Oy> z0#GnHr_iGjA=ifvL~v7`V!9cLt?m;7Hl916eWqE_Q7Pl4C=?{Gv8D||af|Ocz!s~1 z@G)Q$C1RpI`q9;I#su9aNS;m;vqA^QnnlSV zb&0l=S``$p1JRlSg4Tu}nuLDy@s)r8ehyJs^~1x2F711D>LZ({dtGCH8CjU(_=4z! z|4|N4GHa*jQhI#iBCR@aV3|p{e)Jdg#ybthq{IoQj zHauKaWk@P3ze=8Ud1xt=R#rl^#nG0m!VIhxO61gjLF)eAcEGr S&eB*H>WYb}3CKVI000133B(ov literal 0 HcmV?d00001 diff --git a/www/index.html b/www/index.html index 17f39ae..e3d277b 100644 --- a/www/index.html +++ b/www/index.html @@ -327,6 +327,11 @@ return; } + if (data.type === 'xiaomi') { + navigateXiaomi(ip, data); + return; + } + if (data.type === 'standard' || data.reachable) { navigateStandard(ip, data); return; @@ -411,6 +416,36 @@ window.location.href = 'standard.html?' + p.toString(); } + function navigateXiaomi(ip, data) { + var p = new URLSearchParams(); + p.set('ip', ip); + + var probes = data.probes || {}; + + if (probes.ports && probes.ports.open && probes.ports.open.length) { + p.set('ports', probes.ports.open.join(',')); + } + if (probes.arp) { + if (probes.arp.mac) p.set('mac', probes.arp.mac); + if (probes.arp.vendor) p.set('vendor', probes.arp.vendor); + } + if (probes.http && probes.http.server) { + p.set('server', probes.http.server); + } + if (probes.dns && probes.dns.hostname) { + p.set('hostname', probes.dns.hostname); + } + if (probes.ping && probes.ping.latency_ms) { + p.set('latency', Math.round(probes.ping.latency_ms)); + } + if (probes.xiaomi) { + if (probes.xiaomi.device_id) p.set('xiaomi_device_id', probes.xiaomi.device_id); + if (probes.xiaomi.stamp) p.set('xiaomi_stamp', probes.xiaomi.stamp); + } + + window.location.href = 'xiaomi.html?' + p.toString(); + } + function navigateHomeKit(ip, data) { var p = new URLSearchParams(); p.set('ip', ip); diff --git a/www/xiaomi.html b/www/xiaomi.html new file mode 100644 index 0000000..d2d3eb0 --- /dev/null +++ b/www/xiaomi.html @@ -0,0 +1,760 @@ + + + + + + + Strix - Xiaomi Camera + + + + +
+ +
+ +
+
+
+ +

Xiaomi Camera

+
+ +
+ + +
+
+
+
Loading...
+
+
+ + +
+
+
+ + +
+ +
+ + +
+ + +
+ +
+ + +
+
+
+ + captcha + +
+ +
+ +
+ + +
+
+
+ +
+ +
+ +
+ +
+ + +
+
+ + +
+ + +
+ + +
+ + +
+ + +
+
+
Camera not found
+

No camera with IP

+

in this Mi Home account / region.

+
+ + +
+
+
+ + + + + + +