Neues Modul JSONREADINGS zur Einbindung beliebiger json-Daten per URL

Begonnen von bgewehr, 24 Juni 2015, 15:46:38

Vorheriges Thema - Nächstes Thema

dev0

@Waldmensch: Ohne es getestet zu haben: In den beiden each Anweisungen musst Du nur $ref dereferenzieren. Je nach Kontext %{ $ref } oder @{ $ref }, aber vielleicht ließt Bernd ja hier noch mit...

KOAL

Hallo Jungs,

ich wollte JSON-Daten einer Webseite laden aber bekomme nur Fehlermeldungen.

RPI4:
JSON is up to date (4.02).

TEST FHEM:
define BerlinMuenchen JSONREADINGS https://www.google.de/maps/dir/Berlin/M%C3%BCnchen/@50.3122547,9.90211,7z/data=!3m1!4b1!4m13!4m12!1m5!1m1!1s0x47a84e373f035901:0x42120465b5e3b70!2m2!1d13.404954!2d52.5200066!1m5!1m1!1s0x479e75f9a38c5fd9:0x10cb84a7db1987d!2m2!1d11.5819806!2d48.1351253 120


FHEM-LOG:
2020.09.20 12:37:32.051 1: reload: Error:Modul 70_JSONREADINGS deactivated:
Experimental each on scalar is now forbidden at ./FHEM/70_JSONREADINGS.pm line 122.
Type of arg 1 to each must be hash or array (not private variable) at ./FHEM/70_JSONREADINGS.pm line 122, near "$ref) "
Experimental each on scalar is now forbidden at ./FHEM/70_JSONREADINGS.pm line 126.
Type of arg 1 to each must be hash or array (not private variable) at ./FHEM/70_JSONREADINGS.pm line 126, near "$ref) "

2020.09.20 12:37:32.051 0: Experimental each on scalar is now forbidden at ./FHEM/70_JSONREADINGS.pm line 122.
Type of arg 1 to each must be hash or array (not private variable) at ./FHEM/70_JSONREADINGS.pm line 122, near "$ref) "
Experimental each on scalar is now forbidden at ./FHEM/70_JSONREADINGS.pm line 126.
Type of arg 1 to each must be hash or array (not private variable) at ./FHEM/70_JSONREADINGS.pm line 126, near "$ref) "

2020.09.20 12:38:19.399 1: PERL WARNING: Subroutine JSONREADINGS_Initialize redefined at ./FHEM/70_JSONREADINGS.pm line 40.
2020.09.20 12:38:19.400 1: PERL WARNING: Subroutine JSONREADINGS_Define redefined at ./FHEM/70_JSONREADINGS.pm line 51.
2020.09.20 12:38:19.401 1: PERL WARNING: Subroutine JSONREADINGS_GetStatus redefined at ./FHEM/70_JSONREADINGS.pm line 74.
2020.09.20 12:38:19.403 1: reload: Error:Modul 70_JSONREADINGS deactivated:
Experimental each on scalar is now forbidden at ./FHEM/70_JSONREADINGS.pm line 122.
Type of arg 1 to each must be hash or array (not private variable) at ./FHEM/70_JSONREADINGS.pm line 122, near "$ref) "
Experimental each on scalar is now forbidden at ./FHEM/70_JSONREADINGS.pm line 126.
Type of arg 1 to each must be hash or array (not private variable) at ./FHEM/70_JSONREADINGS.pm line 126, near "$ref) "

2020.09.20 12:38:19.403 0: Experimental each on scalar is now forbidden at ./FHEM/70_JSONREADINGS.pm line 122.
Type of arg 1 to each must be hash or array (not private variable) at ./FHEM/70_JSONREADINGS.pm line 122, near "$ref) "
Experimental each on scalar is now forbidden at ./FHEM/70_JSONREADINGS.pm line 126.
Type of arg 1 to each must be hash or array (not private variable) at ./FHEM/70_JSONREADINGS.pm line 126, near "$ref) "


Was kann da sein?
Danke
LG
KOAL
1X DEBAIN 11 ESXI VM, Openvpn-Server, FHEM, DHCP, HM-LAN W, USB-Enocean, Smartvisu V3.X
1X UBUNU 20.X LTS ESXI VM, AUTO-SERVER, Openvpn-Backup Server
1X UBUNU 20.X LTS ESXI VM, MAILSERVER, CLOUD
1X Lockerstor 4, NAS + APC CS650
1X WIN-10 ESXI VM, BLUEIRIS CAM Server

bgewehr

Ich habe inzwischen meine Nutzung von JSONREADINGS eingestellt und nutze statt dessen expandJSON. Deswegen habe ich auch aktuell keinen Use-Case mehr, um das Modul weiterzuentwickeln. Vielleicht mag ein anderer übernehmen?
FritzBox 7590, Synology DS216+II mit Docker
Docker: FHEM mit hmlan, Homebridge, node-red, mosquitto, ems-collector für Buderus EMS mit AVR Net-IO
Gartenwasser über MQTT auf R/Pi A+
Volkszaehler.org auf R/Pi 2B mit Pi_Erweiterung
Raspberrymatic auf R/Pi 4B mit RPI-RF-MOD u. CUL868