fhempy: Tuya Cloud

Begonnen von dominik, 30 Juli 2021, 21:36:48

Vorheriges Thema - Nächstes Thema

dominik

Poste mal das Log von fhempy und FHEM, dann schau ich mir das an.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

thburkhart

oh super :-)

du meinst das FHEM allgemeinen Log mit dem Teil des entsprechenden Fehlers?

Wo finde ich fhempy?
1 RASPI4B, 1 RASPI3B, 2 CUL, 2 Jeelink, 60 Tuya-Devices (Schalter, Dimmer, Sensoren, Cameras), 30 HUE-Lampen, 5 MAX! WTs, 16 MAX! HTs, 12 MAX! FKs, 1 Bresser 5in1, 1 OilFox, 8 ALEXA Echos und Dots, FHEM, 5 Tasmota-Devices, SonOff -Bridge, PowerFox, Buderus KM200

dominik

Ja genau + das fhempy Log, das findest du im gleichen Log Ordner von FHEM.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

thburkhart

ok
das steht im FHEM Log:

2021.10.08 16:12:51 1 : Downloading https://raw.githubusercontent.com/dominikkarall/fhempy/master/controls_pythonbinding.txt
2021.10.08 16:12:51 1 :
2021.10.08 16:12:51 1 : pythonbinding
2021.10.08 16:12:52 1 : UPD FHEM/10_PythonModule.pm
2021.10.08 16:12:53 3 : Watchdog WDT_THOMAS_F2 triggered
2021.10.08 16:12:53 3 : TelegramBot_SendIt THB_WarnBot: Failed with :FAILED peer not found :@thburkhart::
2021.10.08 16:12:53 3 : TelegramBot_Callback THB_WarnBot: resulted in NonBlockingGet: returned FAILED peer not found :@thburkhart: from SendIt
2021.10.08 16:12:53 3 : FAILED peer not found :@thburkhart:
2021.10.08 16:12:53 1 : UPD FHEM/10_BindingsIo.pm
2021.10.08 16:13:00 1 : saving fhem.cfg
2021.10.08 16:13:00 1 : saving ./log/fhem2.save
2021.10.08 16:13:00 1 :
2021.10.08 16:13:00 1 : New entries in the CHANGED file:
2021.10.08 16:13:00 1 : 2020-12-31: Further updates are done via pip
2021.10.08 16:13:00 1 :             No need to change anything, everything is done for you :)
2021.10.08 16:13:00 1 :             Happy New Year!
2021.10.08 16:13:00 1 : 2020-12-23: Save xiaomi_tokens credentials
2021.10.08 16:13:00 1 :             Add ip address to xiaomi_tokens
2021.10.08 16:13:00 1 :             Create miio/gateway3 device out of xiaomi_tokens
2021.10.08 16:13:00 1 :             Add firmware version to xiaomi_gateway3
2021.10.08 16:13:00 1 :             Fix icons in googlecast
2021.10.08 16:13:00 1 :             Fix python version check
2021.10.08 16:13:00 1 :             First version of gfprobt (irrigation control)
2021.10.08 16:13:00 1 : 2020-12-03: Remote peers: Please read new installation instructions https://github.com/dominikkarall/fhempy
2021.10.08 16:13:00 1 : 2020-10-19: Initial release of CHANGED file :)
2021.10.08 16:13:00 1 : Calling /usr/bin/perl ./contrib/commandref_join.pl -noWarnings, this may take a while
2021.10.08 16:13:37 1 :
2021.10.08 16:13:37 1 : update finished, "shutdown restart" is needed to activate the changes.



im Ordner log gibt's bei mir nurFhem*.log und alexa*.log

1 RASPI4B, 1 RASPI3B, 2 CUL, 2 Jeelink, 60 Tuya-Devices (Schalter, Dimmer, Sensoren, Cameras), 30 HUE-Lampen, 5 MAX! WTs, 16 MAX! HTs, 12 MAX! FKs, 1 Bresser 5in1, 1 OilFox, 8 ALEXA Echos und Dots, FHEM, 5 Tasmota-Devices, SonOff -Bridge, PowerFox, Buderus KM200

dominik

Du hast jetzt nur ein Update gemacht oder? Du musst auch noch die weiteren Commands ausführen die in der Anleitung stehen.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

thburkhart

#200
ja Update ist gelaufen
ich mache mich dran

bin nicht weit gekommen:

FHEM
update add https://raw.githubusercontent.com/dominikkarall/fhempy/master/controls_pythonbinding.txt
update
define local_pybinding BindingsIo Python

letzteres wird wieder mit "Cannot load module BindingsIo" quittiert

fehlt da das Python?
das hatte ich mit
root@THB-PI3B1:~# sudo apt install python3 python3-pip python3-dev libffi-dev li                                                                                                                                                                                                                                             bssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libglib2.0-dev libdbus-                                                                                                                                                                                                                                             1-dev bluez libbluetooth-dev git

Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
autoconf ist schon die neueste Version (2.69-11).
build-essential ist schon die neueste Version (12.6).
git ist schon die neueste Version (1:2.20.1-2+deb10u3).
libdbus-1-dev ist schon die neueste Version (1.12.20-0+deb10u1).
libffi-dev ist schon die neueste Version (3.2.1-9).
libglib2.0-dev ist schon die neueste Version (2.58.3-2+deb10u2).
libjpeg-dev ist schon die neueste Version (1:1.5.2-2+deb10u1).
python3 ist schon die neueste Version (3.7.3-1).
python3-dev ist schon die neueste Version (3.7.3-1).
zlib1g-dev ist schon die neueste Version (1:1.2.11.dfsg-1).
bluez ist schon die neueste Version (5.50-1.2~deb10u1+rpt2).
libbluetooth-dev ist schon die neueste Version (5.50-1.2~deb10u1+rpt2).
libssl-dev ist schon die neueste Version (1.1.1d-0+deb10u6+rpt1).
python3-pip ist schon die neueste Version (18.1-5+rpt1).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 12 nicht aktualisiert.


installiert


nach dem Update finde ich FHEM-Log:
2021.10.08 18:16:03 1: reload: Error:Modul 10_BindingsIo deactivated:
Can't locate Protocol/WebSocket/Frame.pm in @INC (you may need to install the Protocol::WebSocket::Frame module) (@INC contains: ./lib ./FHEM . /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/arm-linux-gnueabihf/perl5/5.28 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base ./FHEM/lib) at ./FHEM/10_BindingsIo.pm line 13.
BEGIN failed--compilation aborted at ./FHEM/10_BindingsIo.pm line 13.

2021.10.08 18:16:03 0: Can't locate Protocol/WebSocket/Frame.pm in @INC (you may need to install the Protocol::WebSocket::Frame module) (@INC contains: ./lib ./FHEM . /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/arm-linux-gnueabihf/perl5/5.28 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base ./FHEM/lib) at ./FHEM/10_BindingsIo.pm line 13.
BEGIN failed--compilation aborted at ./FHEM/10_BindingsIo.pm line 13.



keine Ahnung, wie ich das beheben soll...

root@THB-PI3B1:~# sudo cpan Protocol::WebSocket
Loading internal logger. Log::Log4perl recommended for better logging
Reading '/root/.cpan/Metadata'
  Database was generated on Mon, 24 May 2021 15:17:02 GMT
Fetching with LWP:
http://www.cpan.org/authors/01mailrc.txt.gz
Reading '/root/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with LWP:
http://www.cpan.org/modules/02packages.details.txt.gz
Reading '/root/.cpan/sources/modules/02packages.details.txt.gz'
  Database was generated on Fri, 08 Oct 2021 16:29:02 GMT
............................................................................DONE
Fetching with LWP:
http://www.cpan.org/modules/03modlist.data.gz
Reading '/root/.cpan/sources/modules/03modlist.data.gz'
DONE
Writing /root/.cpan/Metadata
Running install for module 'Protocol::WebSocket'
Checksum for /root/.cpan/sources/authors/id/V/VT/VTI/Protocol-WebSocket-0.26.tar.gz ok
'YAML' not installed, will not store persistent state
Configuring V/VT/VTI/Protocol-WebSocket-0.26.tar.gz with Build.PL
Creating new 'Build' script for 'Protocol-WebSocket' version '0.26'
  VTI/Protocol-WebSocket-0.26.tar.gz
  /usr/bin/perl Build.PL --installdirs site -- OK
Running Build for V/VT/VTI/Protocol-WebSocket-0.26.tar.gz
cp lib/Protocol/WebSocket/Request.pm blib/lib/Protocol/WebSocket/Request.pm
cp lib/Protocol/WebSocket/Response.pm blib/lib/Protocol/WebSocket/Response.pm
cp lib/Protocol/WebSocket/Handshake/Server.pm blib/lib/Protocol/WebSocket/Handshake/Server.pm
cp lib/Protocol/WebSocket/URL.pm blib/lib/Protocol/WebSocket/URL.pm
cp lib/Protocol/WebSocket/Cookie/Request.pm blib/lib/Protocol/WebSocket/Cookie/Request.pm
cp lib/Protocol/WebSocket/Message.pm blib/lib/Protocol/WebSocket/Message.pm
cp lib/Protocol/WebSocket/Cookie.pm blib/lib/Protocol/WebSocket/Cookie.pm
cp lib/Protocol/WebSocket/Stateful.pm blib/lib/Protocol/WebSocket/Stateful.pm
cp lib/Protocol/WebSocket.pm blib/lib/Protocol/WebSocket.pm
cp lib/Protocol/WebSocket/Handshake/Client.pm blib/lib/Protocol/WebSocket/Handshake/Client.pm
cp lib/Protocol/WebSocket/Handshake.pm blib/lib/Protocol/WebSocket/Handshake.pm
cp lib/Protocol/WebSocket/Frame.pm blib/lib/Protocol/WebSocket/Frame.pm
cp lib/Protocol/WebSocket/Cookie/Response.pm blib/lib/Protocol/WebSocket/Cookie/Response.pm
cp lib/Protocol/WebSocket/Client.pm blib/lib/Protocol/WebSocket/Client.pm
  VTI/Protocol-WebSocket-0.26.tar.gz
  ./Build -- OK
Running Build test for VTI/Protocol-WebSocket-0.26.tar.gz
t/client.t ........................... ok
t/cookie.t ........................... ok
t/draft-hixie-75/request.t ........... ok
t/draft-hixie-75/response.t .......... ok
t/draft-ietf-hybi-00/client-ssl.t .... ok
t/draft-ietf-hybi-00/client.t ........ ok
t/draft-ietf-hybi-00/frame.t ......... ok
t/draft-ietf-hybi-00/request.t ....... ok
t/draft-ietf-hybi-00/response.t ...... ok
t/draft-ietf-hybi-00/server-ssl.t .... ok
t/draft-ietf-hybi-00/server.t ........ ok
t/draft-ietf-hybi-10/client.t ........ ok
t/draft-ietf-hybi-10/request.t ....... ok
t/draft-ietf-hybi-10/response.t ...... ok
t/draft-ietf-hybi-10/server.t ........ ok
t/draft-ietf-hybi-17/client.t ........ ok
t/draft-ietf-hybi-17/frame.t ......... ok
t/draft-ietf-hybi-17/request.t ....... ok
t/draft-ietf-hybi-17/request_psgi.t .. ok
t/draft-ietf-hybi-17/response.t ...... ok
t/draft-ietf-hybi-17/server.t ........ ok
t/frame.t ............................ Name "Protocol::WebSocket::Frame::MAX_FRAGMENTS_AMOUNT" used only once: possible typo at t/frame.t line 85.
t/frame.t ............................ ok
t/message.t .......................... ok
t/request_common.t ................... Name "Protocol::WebSocket::Message::MAX_MESSAGE_SIZE" used only once: possible typo at t/request_common.t line 26.
t/request_common.t ................... ok
t/response_common.t .................. Name "Protocol::WebSocket::Message::MAX_MESSAGE_SIZE" used only once: possible typo at t/response_common.t line 22.
t/response_common.t .................. ok
t/rsv.t .............................. ok
t/url.t .............................. ok
All tests successful.
Files=27, Tests=685, 10 wallclock secs ( 0.56 usr  0.11 sys +  8.22 cusr  0.73 csys =  9.62 CPU)
Result: PASS
  VTI/Protocol-WebSocket-0.26.tar.gz
  ./Build test -- OK
Running Build install for VTI/Protocol-WebSocket-0.26.tar.gz
Installing /usr/local/share/perl/5.28.1/Protocol/WebSocket.pm
Installing /usr/local/share/perl/5.28.1/Protocol/WebSocket/URL.pm
Installing /usr/local/share/perl/5.28.1/Protocol/WebSocket/Message.pm
Installing /usr/local/share/perl/5.28.1/Protocol/WebSocket/Cookie.pm
Installing /usr/local/share/perl/5.28.1/Protocol/WebSocket/Frame.pm
Installing /usr/local/share/perl/5.28.1/Protocol/WebSocket/Handshake.pm
Installing /usr/local/share/perl/5.28.1/Protocol/WebSocket/Response.pm
Installing /usr/local/share/perl/5.28.1/Protocol/WebSocket/Client.pm
Installing /usr/local/share/perl/5.28.1/Protocol/WebSocket/Stateful.pm
Installing /usr/local/share/perl/5.28.1/Protocol/WebSocket/Request.pm
Installing /usr/local/share/perl/5.28.1/Protocol/WebSocket/Cookie/Response.pm
Installing /usr/local/share/perl/5.28.1/Protocol/WebSocket/Cookie/Request.pm
Installing /usr/local/share/perl/5.28.1/Protocol/WebSocket/Handshake/Server.pm
Installing /usr/local/share/perl/5.28.1/Protocol/WebSocket/Handshake/Client.pm
Installing /usr/local/man/man3/Protocol::WebSocket::Cookie::Response.3pm
Installing /usr/local/man/man3/Protocol::WebSocket::URL.3pm
Installing /usr/local/man/man3/Protocol::WebSocket::Message.3pm
Installing /usr/local/man/man3/Protocol::WebSocket::Response.3pm
Installing /usr/local/man/man3/Protocol::WebSocket::Stateful.3pm
Installing /usr/local/man/man3/Protocol::WebSocket::Request.3pm
Installing /usr/local/man/man3/Protocol::WebSocket::Cookie::Request.3pm
Installing /usr/local/man/man3/Protocol::WebSocket::Frame.3pm
Installing /usr/local/man/man3/Protocol::WebSocket::Cookie.3pm
Installing /usr/local/man/man3/Protocol::WebSocket::Client.3pm
Installing /usr/local/man/man3/Protocol::WebSocket::Handshake.3pm
Installing /usr/local/man/man3/Protocol::WebSocket::Handshake::Client.3pm
Installing /usr/local/man/man3/Protocol::WebSocket::Handshake::Server.3pm
Installing /usr/local/man/man3/Protocol::WebSocket.3pm
  VTI/Protocol-WebSocket-0.26.tar.gz
  ./Build install  -- OK


Hilfe !
1 RASPI4B, 1 RASPI3B, 2 CUL, 2 Jeelink, 60 Tuya-Devices (Schalter, Dimmer, Sensoren, Cameras), 30 HUE-Lampen, 5 MAX! WTs, 16 MAX! HTs, 12 MAX! FKs, 1 Bresser 5in1, 1 OilFox, 8 ALEXA Echos und Dots, FHEM, 5 Tasmota-Devices, SonOff -Bridge, PowerFox, Buderus KM200

dominik

Hmmm...schau Mal ob 10_BindingsIo.pm im FHEM Verzeichnis liegt.

Aus irgendeinem Grund wird das nicht heruntergeladen!?
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

thburkhart

#202
ja das liegt dort vom 28.9.2021 5 kB groß




define local_pybinding BindingsIo Python

liefert nun "local_pybinding already defined, delete it first"

jedoch :
DeviceOverview
tuya_system
???
Internals
DEF
tuya xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
FUUID
608f0930-f33f-21fb-9ec2-59dc29258e55e0dd
NAME
tuya_system
NR
1531
PYTHONTYPE
tuya
STATE
???
TYPE
PythonModule



1 RASPI4B, 1 RASPI3B, 2 CUL, 2 Jeelink, 60 Tuya-Devices (Schalter, Dimmer, Sensoren, Cameras), 30 HUE-Lampen, 5 MAX! WTs, 16 MAX! HTs, 12 MAX! FKs, 1 Bresser 5in1, 1 OilFox, 8 ALEXA Echos und Dots, FHEM, 5 Tasmota-Devices, SonOff -Bridge, PowerFox, Buderus KM200

dominik

Ok, vorher war scheinbar Websocket nicht installiert.

Mach jetzt bitte nochmals ein define und poste das Log.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

thburkhart

#204
local_pybinding already defined, delete it first


DeviceOverview
tuya_system
???
Internals
DEF
tuya qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
FUUID
608f0930-f33f-21fb-9ec2-59dc29258e55e0dd
NAME
tuya_system
NR
1531
PYTHONTYPE
tuya
STATE
???
TYPE
PythonModule
1 RASPI4B, 1 RASPI3B, 2 CUL, 2 Jeelink, 60 Tuya-Devices (Schalter, Dimmer, Sensoren, Cameras), 30 HUE-Lampen, 5 MAX! WTs, 16 MAX! HTs, 12 MAX! FKs, 1 Bresser 5in1, 1 OilFox, 8 ALEXA Echos und Dots, FHEM, 5 Tasmota-Devices, SonOff -Bridge, PowerFox, Buderus KM200

dominik

Schritt für Schritt bitte...

Wenn local_pybinding already defined, dann prüfe nun bitte, ob local_pybinding auf "opened" steht.

Bitte in deinem Post auch das DEF löschen, da dort deine Zugangsdaten enthalten sind.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

thburkhart

ok gemacht

local_pybinding  steht auf opened
1 RASPI4B, 1 RASPI3B, 2 CUL, 2 Jeelink, 60 Tuya-Devices (Schalter, Dimmer, Sensoren, Cameras), 30 HUE-Lampen, 5 MAX! WTs, 16 MAX! HTs, 12 MAX! FKs, 1 Bresser 5in1, 1 OilFox, 8 ALEXA Echos und Dots, FHEM, 5 Tasmota-Devices, SonOff -Bridge, PowerFox, Buderus KM200

dominik

Ok, das ist schon mal gut. Dann mach jetzt bitte so wie es im Readme steht (https://github.com/dominikkarall/fhempy/blob/master/FHEM/bindings/python/fhempy/lib/tuya_cloud/README.md):
define tuya_cloud_connector PythonModule tuya_cloud setup CLIENT_ID CLIENT_SECRET USERNAME PASSWORD
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

thburkhart

#208
jetzt hat sich FHEM erst mal aufgehängt

als ich local_pybinding

angeklickt hatte

der PI ist wohl abgestürzt
1 RASPI4B, 1 RASPI3B, 2 CUL, 2 Jeelink, 60 Tuya-Devices (Schalter, Dimmer, Sensoren, Cameras), 30 HUE-Lampen, 5 MAX! WTs, 16 MAX! HTs, 12 MAX! FKs, 1 Bresser 5in1, 1 OilFox, 8 ALEXA Echos und Dots, FHEM, 5 Tasmota-Devices, SonOff -Bridge, PowerFox, Buderus KM200

dominik

fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik