Sonoff SNZB-02 Sensor Node-red?

Node-RED als CCU3/RaspberryMatic Addon, WebApp, HomeKit, ...

Moderator: Co-Administratoren

Antworten
Alfi84
Beiträge: 50
Registriert: 17.05.2020, 11:04
System: Alternative CCU (auf Basis OCCU)
Hat sich bedankt: 8 Mal

Sonoff SNZB-02 Sensor Node-red?

Beitrag von Alfi84 » 18.01.2022, 20:31

Guten Abend,

ich beschäftige mich gerade mit Node-Red und versuche dort mich Stück für Stück in das Thema reinzufinden.
Habe es auch hinbekommen meinen Aquara Fenstersensor über ConBee2 zu integrieren und die Daten in eine Variable auf die CCU3 (RM 3.61.5) zu senden. Nun habe ich einen Sonoff SNZB-02 Temp/Hum.-Sensor den ich gerne integrieren möchte. Das Anlernen hat ohne Probleme funktioniert. Nur leider komme ich hier nicht weiter. Ich habe es noch nicht hinbekommen mir die Daten anzeigen zu lassen, die das Teil ausgibt.
Das node-red-contrib-ewelink lässt sich nicht installieren, da kein Phyton auf der Raspberrymatic läuft!?

Kann mir hier jemand einen Tipp geben wie ich hier weiter komme? Oder funktioniert das nicht so wie ich mir das hier denke?

Vielen Dank vorab!

Gruß
Alfi84
RPi 3B+ | RPI-RF-MOD | RaspberryMatic | CuxD | Redmatic | conbee2
RP 4 | iobroker
NUC8i5 | Proxmox | Homeassistent

rr745
Beiträge: 305
Registriert: 19.01.2021, 14:53
System: CCU
Hat sich bedankt: 28 Mal
Danksagung erhalten: 34 Mal

Re: Sonoff SNZB-02 Sensor Node-red?

Beitrag von rr745 » 18.01.2022, 21:58

hm.... ich habe auf raspberrymatic redmatic, sowue node-red-contrib-ewelink installiert. läuft einwandfrei.
Dateianhänge
Screenshot_20220118_220147_org.mozilla.firefox.jpg
Wenn etwas schiefgehen kann, dann geht es schief (Murphy)

Alfi84
Beiträge: 50
Registriert: 17.05.2020, 11:04
System: Alternative CCU (auf Basis OCCU)
Hat sich bedankt: 8 Mal

Re: Sonoff SNZB-02 Sensor Node-red?

Beitrag von Alfi84 » 19.01.2022, 05:38

Bei mir kommt folgende Meldung im log:

Code: Alles auswählen

2022-01-19T04:36:32.678Z installieren : node-red-contrib-ewelink 2.0.0

2022-01-19T04:36:31.849Z npm install --no-package-lock --global-style --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-contrib-ewelink@2.0.0
2022-01-19T04:36:58.882Z [err] npm
2022-01-19T04:36:58.883Z [err]  WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
2022-01-19T04:37:05.434Z [err] npm
2022-01-19T04:37:05.435Z [err]  ERR! code 1
2022-01-19T04:37:05.435Z [err] npm ERR! path
2022-01-19T04:37:05.435Z [err]  /usr/local/addons/redmatic/var/node_modules/node-red-contrib-ewelink/node_modules/utf-8-validate
2022-01-19T04:37:05.445Z [err] npm ERR!
2022-01-19T04:37:05.446Z [err]  command failed
2022-01-19T04:37:05.446Z [err] npm ERR! command sh -c node-gyp-build
2022-01-19T04:37:05.446Z [err] npm ERR! gyp info it worked if it ends with ok
2022-01-19T04:37:05.446Z [err] npm 
2022-01-19T04:37:05.447Z [err] ERR! gyp info using node-gyp@7.1.2
2022-01-19T04:37:05.447Z [err] npm ERR! gyp info using node@14.16.0 | linux | arm64
2022-01-19T04:37:05.447Z [err] npm ERR! gyp ERR! find Python 
2022-01-19T04:37:05.447Z [err] npm
2022-01-19T04:37:05.447Z [err]  ERR! gyp ERR! find Python Python is not set from command line or npm configuration
2022-01-19T04:37:05.447Z [err] npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
2022-01-19T04:37:05.447Z [err] npm ERR! gyp ERR! find Python checking if "python3" can be used
2022-01-19T04:37:05.447Z [err] npm ERR!
2022-01-19T04:37:05.447Z [err]  gyp ERR! find Python - "python3" is not in PATH or produced an error
2022-01-19T04:37:05.447Z [err] npm ERR!
2022-01-19T04:37:05.448Z [err]  gyp ERR! find Python checking if "python" can be used
2022-01-19T04:37:05.448Z [err] npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
2022-01-19T04:37:05.448Z [err] npm ERR! gyp ERR! find Python checking if "python2" can be used
2022-01-19T04:37:05.448Z [err] npm
2022-01-19T04:37:05.448Z [err]  ERR! gyp ERR! find Python - "python2" is not in PATH or produced an error
2022-01-19T04:37:05.448Z [err] npm 
2022-01-19T04:37:05.448Z [err] ERR! gyp ERR! find Python 
2022-01-19T04:37:05.448Z [err] npm ERR!
2022-01-19T04:37:05.448Z [err]  gyp ERR! find Python **********************************************************
2022-01-19T04:37:05.448Z [err] npm ERR!
2022-01-19T04:37:05.449Z [err]  gyp ERR! find Python You need to install the latest version of Python.
2022-01-19T04:37:05.449Z [err] npm ERR!
2022-01-19T04:37:05.449Z [err]  gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
2022-01-19T04:37:05.449Z [err] npm ERR!
2022-01-19T04:37:05.449Z [err]  gyp ERR! find Python you can try one of the following options:
2022-01-19T04:37:05.449Z [err] npm 
2022-01-19T04:37:05.449Z [err] ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
2022-01-19T04:37:05.449Z [err] npm
2022-01-19T04:37:05.449Z [err]  ERR!
2022-01-19T04:37:05.449Z [err]  gyp ERR! find Python   (accepted by both node-gyp and npm)
2022-01-19T04:37:05.449Z [err] npm 
2022-01-19T04:37:05.449Z [err] ERR! gyp ERR! find Python - Set the environment variable PYTHON
2022-01-19T04:37:05.449Z [err] npm
2022-01-19T04:37:05.450Z [err]  
2022-01-19T04:37:05.450Z [err] ERR! gyp ERR! find Python - Set the npm configuration variable python:
2022-01-19T04:37:05.450Z [err] npm
2022-01-19T04:37:05.450Z [err]  ERR! gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
2022-01-19T04:37:05.450Z [err] npm ERR!
2022-01-19T04:37:05.450Z [err]  gyp ERR! find Python For more information consult the documentation at:
2022-01-19T04:37:05.450Z [err] npm 
2022-01-19T04:37:05.451Z [err] ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
2022-01-19T04:37:05.451Z [err] npm ERR! gyp ERR! find Python **********************************************************
2022-01-19T04:37:05.451Z [err] npm ERR! gyp ERR! find Python 
2022-01-19T04:37:05.451Z [err] npm ERR! gyp ERR! configure error 
2022-01-19T04:37:05.451Z [err] npm 
2022-01-19T04:37:05.451Z [err] ERR! gyp ERR! stack Error: Could not find any Python installation to use
2022-01-19T04:37:05.451Z [err] npm ERR!
2022-01-19T04:37:05.451Z [err]  gyp ERR! stack     at PythonFinder.fail (/usr/local/addons/redmatic/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:302:47)
2022-01-19T04:37:05.451Z [err] npm 
2022-01-19T04:37:05.451Z [err] ERR! gyp ERR! stack     at PythonFinder.runChecks (/usr/local/addons/redmatic/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:136:21)
2022-01-19T04:37:05.451Z [err] npm
2022-01-19T04:37:05.452Z [err]  ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/addons/redmatic/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:179:16)
2022-01-19T04:37:05.452Z [err] npm ERR!
2022-01-19T04:37:05.452Z [err]  gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/addons/redmatic/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:266:16)
2022-01-19T04:37:05.452Z [err] npm 
2022-01-19T04:37:05.452Z [err] ERR! gyp ERR! stack     at exithandler (child_process.js:315:5)
2022-01-19T04:37:05.452Z [err] npm ERR!
2022-01-19T04:37:05.452Z [err]  gyp ERR! stack     at ChildProcess.errorhandler (child_process.js:327:5)
2022-01-19T04:37:05.452Z [err] npm
2022-01-19T04:37:05.452Z [err]  ERR! gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
2022-01-19T04:37:05.452Z [err] npm ERR!
2022-01-19T04:37:05.453Z [err]  gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
2022-01-19T04:37:05.453Z [err] npm 
2022-01-19T04:37:05.453Z [err] ERR! gyp ERR! stack     at onErrorNT (internal/child_process.js:465:16)
2022-01-19T04:37:05.453Z [err] npm ERR!
2022-01-19T04:37:05.453Z [err]  gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:80:21)
2022-01-19T04:37:05.453Z [err] npm ERR!
2022-01-19T04:37:05.453Z [err]  gyp ERR! System Linux 5.10.63
2022-01-19T04:37:05.453Z [err] npm
2022-01-19T04:37:05.453Z [err]  ERR! gyp ERR! command "/usr/local/addons/redmatic/bin/node" "/usr/local/addons/redmatic/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2022-01-19T04:37:05.453Z [err] npm ERR!
2022-01-19T04:37:05.453Z [err]  gyp ERR! cwd /usr/local/addons/redmatic/var/node_modules/node-red-contrib-ewelink/node_modules/utf-8-validate
2022-01-19T04:37:05.453Z [err] npm 
2022-01-19T04:37:05.454Z [err] ERR! gyp ERR! node -v v14.16.0
2022-01-19T04:37:05.454Z [err] npm 
2022-01-19T04:37:05.454Z [err] ERR! gyp ERR! node-gyp -v v7.1.2
2022-01-19T04:37:05.454Z [err] npm
2022-01-19T04:37:05.454Z [err]  ERR! gyp ERR! not ok
2022-01-19T04:37:05.752Z [err] 
2022-01-19T04:37:05.753Z [err] npm ERR! A complete log of this run can be found in:
2022-01-19T04:37:05.753Z [err] npm ERR!
2022-01-19T04:37:05.753Z [err]      /usr/local/addons/redmatic/var/npm-cache/_logs/2022-01-19T04_37_05_462Z-debug.log
2022-01-19T04:37:05.860Z rc=1
Bei der Suche nach der Möglichkeit Phyton zu installieren bin ich dann auf diesen viewtopic.php?f=65&t=70683&start=250#p694525 gestoßen
RPi 3B+ | RPI-RF-MOD | RaspberryMatic | CuxD | Redmatic | conbee2
RP 4 | iobroker
NUC8i5 | Proxmox | Homeassistent

Alfi84
Beiträge: 50
Registriert: 17.05.2020, 11:04
System: Alternative CCU (auf Basis OCCU)
Hat sich bedankt: 8 Mal

Re: Sonoff SNZB-02 Sensor Node-red?

Beitrag von Alfi84 » 19.01.2022, 19:52

Musstest du vorher noch was installieren? Oder hat das mit node-red-contrib-ewelink auf Anhieb geklappt?
RPi 3B+ | RPI-RF-MOD | RaspberryMatic | CuxD | Redmatic | conbee2
RP 4 | iobroker
NUC8i5 | Proxmox | Homeassistent

rr745
Beiträge: 305
Registriert: 19.01.2021, 14:53
System: CCU
Hat sich bedankt: 28 Mal
Danksagung erhalten: 34 Mal

Re: Sonoff SNZB-02 Sensor Node-red?

Beitrag von rr745 » 20.01.2022, 11:07

Alfi84 hat geschrieben:
19.01.2022, 19:52
Musstest du vorher noch was installieren? Oder hat das mit node-red-contrib-ewelink auf Anhieb geklappt?
gute frage, keine ahnung ob sich zwischenzeitlich was geändert. man kann sich aber helfen.....
von github
node-red-contrib-ewelink

downloaden. und nach /usr/local/addons/redmatic/var/node_modules kopieren.
damit das paket nach einem neustart von redmatic nicht wieder verschwindet und erhalten bleibt
in der datei
/usr/local/addons/redmatic/var/package.json

dies eintragen:

"node-red-contrib-ewelink": "~2.0.0",

dann ist alles gut.
Wenn etwas schiefgehen kann, dann geht es schief (Murphy)

Alfi84
Beiträge: 50
Registriert: 17.05.2020, 11:04
System: Alternative CCU (auf Basis OCCU)
Hat sich bedankt: 8 Mal

Re: Sonoff SNZB-02 Sensor Node-red?

Beitrag von Alfi84 » 20.01.2022, 20:37

Das hat erstmal funktioniert. Vielen Dank👍
Bei den Nodes ist jedoch ein rotes Ausrufezeichen davor 🔺node-red-contrib-ewelink!?

Nur mal zum Verständnis: Muss ich mir die app laden und einen account anlegen?
Irgendwie schnalle ich das mit den Sonoff Sensoren nicht. Die Aquara waren ein Kinderspiel dagegen.
Dachte das geht mit den Sonoff´s auch so easy🙄
RPi 3B+ | RPI-RF-MOD | RaspberryMatic | CuxD | Redmatic | conbee2
RP 4 | iobroker
NUC8i5 | Proxmox | Homeassistent

rr745
Beiträge: 305
Registriert: 19.01.2021, 14:53
System: CCU
Hat sich bedankt: 28 Mal
Danksagung erhalten: 34 Mal

Re: Sonoff SNZB-02 Sensor Node-red?

Beitrag von rr745 » 21.01.2022, 10:10

Alfi84 hat geschrieben:
20.01.2022, 20:37
Das hat erstmal funktioniert. Vielen Dank👍
Bei den Nodes ist jedoch ein rotes Ausrufezeichen davor 🔺node-red-contrib-ewelink!?

Nur mal zum Verständnis: Muss ich mir die app laden und einen account anlegen?
Irgendwie schnalle ich das mit den Sonoff Sensoren nicht. Die Aquara waren ein Kinderspiel dagegen.
Dachte das geht mit den Sonoff´s auch so easy🙄
du musst natürlich deinen ewelink account hinterlegen . s. anhang
Dateianhänge
ewelink.jpg
Wenn etwas schiefgehen kann, dann geht es schief (Murphy)

Alfi84
Beiträge: 50
Registriert: 17.05.2020, 11:04
System: Alternative CCU (auf Basis OCCU)
Hat sich bedankt: 8 Mal

Re: Sonoff SNZB-02 Sensor Node-red?

Beitrag von Alfi84 » 21.01.2022, 11:12

Gibt es denn eine andere Möglichkeit die beiden Werte (Temp/Hum) aus dem Sensor zu lesen?
Bei meinem Aquara Fenstersensor habe ich das ganz simple mit dem converter in eine Variable der CCU geschrieben.

Wie gesagt ist der Sonoff SNZB-02 bereits angelernt.
RPi 3B+ | RPI-RF-MOD | RaspberryMatic | CuxD | Redmatic | conbee2
RP 4 | iobroker
NUC8i5 | Proxmox | Homeassistent

rr745
Beiträge: 305
Registriert: 19.01.2021, 14:53
System: CCU
Hat sich bedankt: 28 Mal
Danksagung erhalten: 34 Mal

Re: Sonoff SNZB-02 Sensor Node-red?

Beitrag von rr745 » 21.01.2022, 16:15

Alfi84 hat geschrieben:
21.01.2022, 11:12
Gibt es denn eine andere Möglichkeit die beiden Werte (Temp/Hum) aus dem Sensor zu lesen?
Bei meinem Aquara Fenstersensor habe ich das ganz simple mit dem converter in eine Variable der CCU geschrieben.

Wie gesagt ist der Sonoff SNZB-02 bereits angelernt.
man nehme eine zugbee bridge (sonoff) mit tasmota flashen und dann geschieht die kommuniktion via mqtt lokal. Das wäre eine weitere möglichkeit
Wenn etwas schiefgehen kann, dann geht es schief (Murphy)

Alfi84
Beiträge: 50
Registriert: 17.05.2020, 11:04
System: Alternative CCU (auf Basis OCCU)
Hat sich bedankt: 8 Mal

Re: Sonoff SNZB-02 Sensor Node-red?

Beitrag von Alfi84 » 21.01.2022, 19:26

Aber den Aquara musste ich auch nicht flashen.
Und wie gesagt, ist der Sonoff ja bereits in node-red als device angemeldet. Ich habe ja einen conbee2 als brigde.
Also muss es doch irgendeine node geben, die mir die nötigen Daten ausspuckt!? :roll:
RPi 3B+ | RPI-RF-MOD | RaspberryMatic | CuxD | Redmatic | conbee2
RP 4 | iobroker
NUC8i5 | Proxmox | Homeassistent

Antworten

Zurück zu „RedMatic“