FHEMSync (Alternative zu FHEM2FHEM/RFHEM)

Begonnen von dominik, 18 März 2020, 21:55:46

Vorheriges Thema - Nächstes Thema

dominik

Das sieht jetzt schon gut aus. fhemsync Device wird schon gefunden!

Jetzt bitte noch das Attribut
FHEMSync-ssl trueevent-aggregator
auf
FHEMSync-ssl true
setzen, da duerfte was reingerutscht sein.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

punker

Hab wieder was geändert:
Internals:
   FUUID      5e75cbac-f33f-55ca-70eb-f24fdf71b2b33530
   LAST_START 2020-03-21 11:17:40
   LAST_STOP  2020-03-21 11:17:43
   NAME       fhemsync
   NR         636
   NTFY_ORDER 50-fhemsync
   STARTS     98
   STATE      stopped
   TYPE       FHEMSYNC
   logfile    ./log/fhemsync-%Y-%m-%d.log
   CoProcess:
     cmdFn      FHEMSYNC_getCMD
     name       fhemsync
     state      stopped
   READINGS:
     2020-03-21 11:17:43   fhemsync        stopped
Attributes:
   FHEMSync-filter room=FHEMSync
   FHEMSync-port 8083
   FHEMSync-selfsignedcert true
   FHEMSync-server 192.168.2.219
   FHEMSync-ssl trueevent-aggregator
   FHEMSync-webname fhem
   devStateIcon stopped:control_home@red:start stopping:control_on_off@orange running.*:control_on_off@green:stop
   remote-filter room=FHEMSync
   remote-port 8083
   remote-selfsignedcert false
   remote-server 192.168.2.161
   remote-ssl false
   remote-webname fhem
   room       FHEMSync
   stateFormat fhemsync
   verbose    0


log
[MAIN   ] Starting FHEMSync...
[MAIN   ] Options: {"version":"1.0.4","fhem":true,"port":true,"webname":true,"device":true,"ssl":true,"selfSignedCert":true}
[MASTER ]   executing: https://192.168.2.219:8083/fhem?XHR=1
[MASTER ]   executing: https://192.168.2.219:8083/fhem?XHR=1&cmd=jsonlist2%20fhemsync
[MASTER ] FHEMSYNC device detected: fhemsync
[SLAVE  ] config: value for ssl has to be boolean.


funzt weiterhin nicht
LG

Dieter

The truth is out there!

dominik

Bitte nicht so viel auf einmal aendern, lass uns das Schritt fuer Schritt machen:
FHEMSync-ssl trueevent-aggregator

Hier liegt der Fehler. Ich weiss nicht wie das trueevent-aggregator da rein kommt, eigentlich geht das nur auf false/true setzen. Bitte daher auf true setzen.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

punker

#48
wenn ich das attribut FHEMSync-ssl setzen will kommt false und trueevent-aggregator!
sobald ich das attribut FHEMSync-ssl auf true setze stürzt fhem ab!
LG

Dieter

The truth is out there!

dominik

Achje, ja, ich sehe den Fehler bei mir. Wobei, lass das mal so und loesche nur das remote-ssl Attribut.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

punker

list
Internals:
   FUUID      5e75f0d6-f33f-55ca-c4e9-4550cf7ac6a50294
   LAST_START 2020-03-21 12:10:43
   LAST_STOP  2020-03-21 12:10:46
   NAME       fhemsync
   NR         635
   NTFY_ORDER 50-fhemsync
   STARTS     2
   STATE      stopped
   TYPE       FHEMSYNC
   logfile    ./log/fhemsync-%Y-%m-%d.log
   CoProcess:
     cmdFn      FHEMSYNC_getCMD
     name       fhemsync
     state      stopped
   READINGS:
     2020-03-21 12:10:46   fhemsync        stopped
Attributes:
   FHEMSync-server 192.168.2.219
   FHEMSync-webname fhem
   devStateIcon stopped:control_home@red:start stopping:control_on_off@orange running.*:control_on_off@green:stop
   remote-server 192.168.2.161
   remote-webname fhem
   room       FHEMSync
   stateFormat fhemsync


so läuft FHEM
Sobald ich das Attribut FHEMSync-selfsignedcert auf true stelle stürzt FHEM ab!

log
[MAIN   ] Starting FHEMSync...
[MAIN   ] Options: {"version":"1.0.4","fhem":true,"webname":true,"device":true,"ssl":true}
[MASTER ]   executing: https://192.168.2.219:8083/fhem?XHR=1
(node:7542) UnhandledPromiseRejectionWarning: RequestError: Error: self signed certificate
    at new RequestError (/usr/lib/node_modules/fhemsync/node_modules/request-promise-core/lib/errors.js:14:15)
    at Request.plumbing.callback (/usr/lib/node_modules/fhemsync/node_modules/request-promise-core/lib/plumbing.js:87:29)
    at Request.RP$callback [as _callback] (/usr/lib/node_modules/fhemsync/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at self.callback (/usr/lib/node_modules/fhemsync/node_modules/request/request.js:185:22)
    at Request.emit (events.js:311:20)
    at Request.onRequestError (/usr/lib/node_modules/fhemsync/node_modules/request/request.js:877:8)
    at ClientRequest.emit (events.js:311:20)
    at TLSSocket.socketErrorListener (_http_client.js:426:9)
    at TLSSocket.emit (events.js:311:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:7542) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:7542) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


LG

Dieter

The truth is out there!

dominik

Danke dir fuer die vielen Tests. Ich werde nun bei mir ein HTTPS mit basicAuth aufsetzen um das im Detail zu testen. Leider schmiert mir gerade FHEM beim Aktivieren von HTTPS ab.

Ich gebe dir Bescheid sobald du wieder testen kannst.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

dominik

So, ich habe jetzt bei mir beide auf HTTPS mit Auth umgestellt.

Bitte die beiden *.pm Dateien nochmals aus dem 1. Post herunterladen und reloaden.
fhemsync per npm auf Version 1.0.5 aktualisieren.

Hier mein List
Internals:
   FD         55
   FUUID      5e727ac6-f33f-faa4-6063-768b9f6e89c60206
   LAST_START 2020-03-21 13:33:13
   LAST_STOP  2020-03-21 13:33:09
   NAME       fhemsync
   NR         51738
   NTFY_ORDER 50-fhemsync
   PID        24302
   STARTS     878
   STATE      running /usr/bin/fhemsync
   TYPE       FHEMSYNC
   currentlogfile ./log/fhemsync-2020-03-21.log
   logfile    ./log/fhemsync-%Y-%m-%d.log
   CoProcess:
     cmdFn      FHEMSYNC_getCMD
     name       fhemsync
     state      running /usr/bin/fhemsync
   READINGS:
     2020-03-21 13:33:13   fhemsync        running /usr/bin/fhemsync
Attributes:
   FHEMSync-auth crypt:.....
   FHEMSync-selfsignedcert true
   FHEMSync-ssl true
   devStateIcon stopped:control_home@red:start stopping:control_on_off@orange running.*:control_on_off@green:stop
   remote-auth USER:PASSWORT
   remote-selfsignedcert true
   remote-server 192.168.86.39
   remote-ssl true
   room       FHEMSync
   stateFormat fhemsync


Remote IP: 192.168.86.39
Master IP: 192.168.86.150 (habe ich als FHEMSync-server nicht gesetzt, da default 127.0.0.1 ist und ich keine Zugriffsbeschraenkungen eingerichtet habe)
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

punker

also bei mir funzt es nicht!
Sobald ich FHEMSync-selfsignedcert auf true stelle stürzt FHEM ab!
LG

Dieter

The truth is out there!

dominik

Kannst du bitte mal im FHEM Log schauen was da fuer ein Fehler zu finden ist? Ich kann den bei mir leider nicht nachstellen.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

punker

#55
Im FHEM.log steht kein Fehler drin, wahrscheinlich müsste ich verbose erst auf 5 setzen?
Aber jetzt hab ichs mal umgedreht probiert, also den bisherigen Hauptinstanz-Server und den Remote-Server vertauscht und so rum funzt es!!!
[MAIN   ] Starting FHEMSync...
[MAIN   ] Options: {"version":"1.0.5","fhem":true,"device":true}
[MASTER ]   executing: http://192.168.2.161:8083/fhem?XHR=1
[MASTER ]   executing: http://192.168.2.161:8083/fhem?XHR=1&cmd=jsonlist2%20fhemsync
[MASTER ] FHEMSYNC device detected: fhemsync
[SLAVE  ]   executing: https://192.168.2.219:8083/fhem?XHR=1
[MASTER ] starting longpoll: http://192.168.2.161:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON&timestamp=1584800228069
[SLAVE  ] starting longpoll: https://192.168.2.219:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON&timestamp=1584800228504
[MASTER ] Fetching FHEM devices...
[MASTER ]   executing: http://192.168.2.161:8083/fhem?XHR=1&cmd=jsonlist2%20TYPE%3DFHEMSYNC_DEVICE
[MASTER ] got: 1 results
[SLAVE  ] Fetching FHEM devices...
[SLAVE  ]   executing: https://192.168.2.219:8083/fhem?XHR=1&cmd=jsonlist2%20room%3DFHEMSync
[SLAVE  ] got: 1 results
[MASTER ]   executing: http://192.168.2.161:8083/fhem?XHR=1&cmd=set%20TFS_Compizimmer%20x_json%20%7B%22Name%22%3A%22TFS_Compizimmer%22%2C%22PossibleSets%22%3A%22%22%2C%22PossibleAttrs%22%3A%22alias%20comment%3AtextField-long%20eventMap%3AtextField-long%20group%20room%20suppressReading%20userReadings%3AtextField-long%20verbose%3A0%2C1%2C2%2C3%2C4%2C5%20IODev%20do_not_notify%3A0%2C1%20ignore%3A0%2C1%20model%3AS300TH%2CKS300%2CASH2200%20showtime%3A0%2C1%20strangeTempDiff%20event-aggregator%20event-min-interval%20event-on-change-reading%20event-on-update-reading%20oldreadings%20stateFormat%3AtextField-long%20timestamp-on-change-reading%201%20DbLogExclude%20Haus%20Haus_map%20alexaName%20alexaProactiveEvents%3A1%2C0%20alexaRoom%20cmdIcon%20devStateIcon%20devStateIcon%3AtextField-long%20devStateStyle%20device_timeout%20fp_energie%20fp_garten%20fp_mein%20fp_system%20fp_system1%20fp_wohnung%20genericDeviceType%3Asecurity%2Cignore%2Cswitch%2Coutlet%2Clight%2ClightSceneParamsToSave%20homebridgeMapping%3AtextField-long%20icon%20ignore_battery%20lightSceneRestoreOnlyIfChanged%3A1%2C0%2Cscene%2Cspeaker%2Cblind%2Cthermometer%2Cthermostat%2Ccontact%2Cgarage%2Cwindow%2Clock%20raum%20raum_map%20room_map%20sortby%20structexclude%20webCmd%20webCmdLabel%3AtextField-long%20widgetOverride%20userattr%22%2C%22Internals%22%3A%7B%22CHANGED%22%3A%22null%22%2C%22CODE%22%3A%225%22%2C%22CUL868_MSGCNT%22%3A%224%22%2C%22CUL868_RAWMSG%22%3A%22K41044239%22%2C%22CUL868_RSSI%22%3A%22-78.5%22%2C%22CUL868_TIME%22%3A%222020-03-21%2015%3A12%3A55%22%2C%22DEF%22%3A%225%22%2C%22FUUID%22%3A%225c42d2ee-f33f-55ca-c362-cee9c16d75578b02%22%2C%22LASTInputDev%22%3A%22CUL868%22%2C%22MSGCNT%22%3A%224%22%2C%22NAME%22%3A%22TFS_Compizimmer%22%2C%22NR%22%3A%22152%22%2C%22STATE%22%3A%22T%3A%2020.4%20%20H%3A%2039.4%22%2C%22TYPE%22%3A%22CUL_WS%22%2C%22corr1%22%3A%220%22%2C%22corr2%22%3A%220%22%2C%22corr3%22%3A%220%22%2C%22corr4%22%3A%220%22%7D%2C%22Readings%22%3A%7B%22DEVFAMILY%22%3A%7B%22Value%22%3A%22WS300%22%2C%22Time%22%3A%222020-03-21%2015%3A12%3A55%22%7D%2C%22DEVTYPE%22%3A%7B%22Value%22%3A%22S300TH%22%2C%22Time%22%3A%222020-03-21%2015%3A12%3A55%22%7D%2C%22humidity%22%3A%7B%22Value%22%3A%2239.4%22%2C%22Time%22%3A%222020-03-21%2015%3A12%3A55%22%7D%2C%22state%22%3A%7B%22Value%22%3A%22T%3A%2020.4%20%20H%3A%2039.4%22%2C%22Time%22%3A%222020-03-21%2015%3A12%3A55%22%7D%2C%22temperature%22%3A%7B%22Value%22%3A%2220.4%22%2C%22Time%22%3A%222020-03-21%2015%3A12%3A55%22%7D%7D%2C%22Attributes%22%3A%7B%22IODev%22%3A%22CUL868%22%2C%22event-on-change-reading%22%3A%22.*%22%2C%22fp_wohnung%22%3A%22368%2C471%2C4%2CCompizimmer%2C%22%2C%22genericDeviceType%22%3A%22thermometer%22%2C%22icon%22%3A%22temperature_humidity%22%2C%22model%22%3A%22S300TH%22%2C%22room%22%3A%22FHEMSync%2CCompizimmer%22%7D%7D

Hab dazu probeweise ein S300TH Thermometer in den FHEMSync Raum gelegt.
Das tauchte dann am anderen Raspi auf!
Seitdem stürzt allerdings dieser Raspi minütlich ab!

Zur Hardware - der HauptFHEM ist ein BananaPi Pro und der RemoteFHEM ein Raspi3B
LG

Dieter

The truth is out there!

dominik

Hmm...das ist eigenartig. Kommt dann auf diesen Raspi irgendeine Fehlermeldung im FHEM Log oder fhemsync Log?
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

carlos

Also bei mir geht es jetzt auch, jedoch mit folgendem Ergebnis:
[SLAVE  ] Fetching FHEM devices...
[SLAVE  ]   executing: http://xxx:8083/fhem?XHR=1&cmd=jsonlist2%20room%3DFHEMSync
[SLAVE  ] got: 0 results

Er findet im Raum FHEMSync keine devices, da sind aber 2 drin.
wenn ich die URL von Hand aufrufe auch kein Ergebnis:

{
  "Arg":"room=FHEMSync",
  "Results": [
  ],
  "totalResultsReturned":0
}


auch wenn ich in FHEM egal ob auf dem Master oder slave 'jsonlist2 room FHEMSync' absetzte kein Ergebnis.

Gruß

Carlos
FHEM svn auf Intel NUC mit proxmox, 3 Raspberry Pi, signalduino, nanoCUL,  toom Baumarkt Funksteckdosen, einige sonoffs, hue, shelly

dominik

Zwischen room und FHEMSync muss ein = sein, probier das mal manuell. Wenn das geht, dann schauen wir weiter.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

punker

hier das fhem.log
2020.03.21 15:29:58.147 3: fhemsync: starting
2020.03.21 15:29:58.157 3: fhemsync: using logfile: ./log/fhemsync-2020-03-21.log
2020.03.21 15:30:03.717 3: fhemsync: read: end of file reached while sysread
2020.03.21 15:30:03.717 3: fhemsync: stopped
2020.03.21 15:30:17.377 3: fhemsync: starting
2020.03.21 15:30:17.391 3: fhemsync: using logfile: ./log/fhemsync-2020-03-21.log
2020.03.21 15:30:18.661 3: fhemsync: read: end of file reached while sysread
2020.03.21 15:30:18.662 3: fhemsync: stopped
2020.03.21 15:30:33.217 3: fhemsync: starting
2020.03.21 15:30:33.232 3: fhemsync: using logfile: ./log/fhemsync-2020-03-21.log
2020.03.21 15:30:34.811 3: fhemsync: read: end of file reached while sysread
2020.03.21 15:30:34.812 3: fhemsync: stopped
2020.03.21 15:30:48.391 3: fhemsync: starting
2020.03.21 15:30:48.407 3: fhemsync: using logfile: ./log/fhemsync-2020-03-21.log
Can't use string ("null") as an ARRAY ref while "strict refs" in use at fhem.pl line 4582.
2020.03.21 15:30:52 2: [MaxScan] UtilsMaxScan_Initialize.68 MaxScan is starting
2020.03.21 15:30:53.111 1: Including fhem.cfg
2020.03.21 15:30:53.155 3: telnet: port 7072 opened
2020.03.21 15:30:53.453 3: WEB: port 8083 opened
2020.03.21 15:30:53.554 2: eventTypes: loaded 292 events from demolog/eventTypes.txt
2020.03.21 15:30:53.876 0: [echodevice] load ECHO Device ECHO_709418075143066P
2020.03.21 15:30:53.879 0: [echodevice] load ECHO Device ECHO_70941807515226UP
2020.03.21 15:30:53.882 0: [echodevice] load ECHO Device EchoDot_Compizimmer
2020.03.21 15:30:53.885 0: [echodevice] load ECHO Device EchoDot_WZDieter
2020.03.21 15:30:53.887 0: [echodevice] load ECHO Device EchoDot_SZDieter
2020.03.21 15:30:53.890 1: Including /var/log/fhem/fhem.save
2020.03.21 15:30:53.933 0: Featurelevel: 6
2020.03.21 15:30:53.933 0: Server started with 14 defined entities (fhem.pl:21337/2020-03-02 perl:5.028001 os:linux user:fhem pid:31568)
2020.03.21 15:33:30.665 0: Server shutdown


Bei mir legt er das erkannte Device an, stürzt dann aber laufend ab!
LG

Dieter

The truth is out there!