Skip to content

Instantly share code, notes, and snippets.

@flipphillips
Last active May 12, 2020 18:11
Show Gist options
  • Save flipphillips/0f5c02e75d6a068c5f8c644b68e49a61 to your computer and use it in GitHub Desktop.
Save flipphillips/0f5c02e75d6a068c5f8c644b68e49a61 to your computer and use it in GitHub Desktop.
GetObserverIP[ip_] := Module[{wx, ins, raw},
wx = Import["http://" <> ip <> "/livedata.htm", "XMLObject"];
ins = Cases[wx, XMLElement["input", _, _], Infinity];
raw = Flatten[
Map[{"name" -> "value"} /. #[[2]] &, ins[[1 ;; -6]]]];
Quiet[MapAt[ToExpression,
MapAt[DateObject[#] &, raw, {1, 2}], {8 ;; -1, 2}]]]
@flipphillips
Copy link
Author

Very hacky and dependent on the web page as dumped from firmware version 4.5.2 and beyond...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment