Loxberry icon indicating copy to clipboard operation
Loxberry copied to clipboard

Read location coordinates from Loxone

Open christianTF opened this issue 11 months ago • 2 comments

… and save it in general.json

https://www.loxforum.com/forum/projektforen/loxberry/allgemeines-aa/426311-loxberry-core-geographischen-koordinaten?p=427056#post427056

  • Show Field in the Miniserver widget
  • Field is allowed to stay empty
  • Show button to request data
  • No automatic update of location data (user needs to refresh the data himself by pressing the button again)
  • Add data on Perl/PHP GetMiniserver functions

christianTF avatar Mar 18 '24 13:03 christianTF

Hatte schon daran gedacht eine Lib-Funktion zu machen und die Koordinaten nicht noch mit in die general.json zu bringen. Ist ja doch eher eine Spezialanwendung, daher auch nicht zu schlimm wenn der Abruf der Koordinaten länger dauert.

In etwa:

$geocoord = LoxBerry::System::get_geolocation($msnr);

Die Funktion holt die LoxAPP3.json, extrahiert die Location und gibt sie aus.

mschlenstedt avatar Mar 18 '24 14:03 mschlenstedt

Note that the Lox2MQTT plugin already publishes the structure file over MQTT ( if enabled in the configuration) so any MQTT based plugin can grab it

nufke avatar Mar 20 '24 20:03 nufke