fhempy: tuya (lokal)

Begonnen von dominik, 26 April 2022, 19:12:25

Vorheriges Thema - Nächstes Thema

dominik

Ich weiß schon woran es liegt, tuya hat was umgestellt bei der Cloud Abfrage. Ich melde mich morgen mit einem Fix.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Maista

Ah ...schön zu hören  ;D
Wollte Dir gerade das Log von fhempy_local schicken ;)

Dann schon mal danke.

Ich hab hier meine Aqaura durch das fhempy wieder aktiviert bekommen.
Das hat zwar eine weile gedauert und plötzlich wurde der CC2530 doch via USB gefunden.
Bin gerade dabei die vier Temp/Feuchte Sensoren und drei Schalter wieder ins System zu bringen.
Das funktionierte eines Tages nicht mehr auf dem alten Pi.

Kaffee-Spende folgt  :D

Schönen Abend

dominik

Danke dir vielmals für die Spende!!

tuya sollte jetzt wieder funktionieren, bitte fhempy Update und dann nochmals einen Scan machen.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Maista

Moin Dominik,

gerne ;)

Ich versuche gerade eine LEDVANCE RGBW Tuya-Steuerung auf Tasmota umzuflashen.
Klappt aber noch nicht.
Leider wird das Teil ja nicht in der Tuya-Cloud angezeigt.

Update läuft. Bin gespannt

Maista

Ei guck...kaum macht mans Richtig (Du  O:-) ) funktionierts!

Danke!

Werd im Wohnzimmer im EG noch die zwei XXXL-Leuchten einschalten.
Dann kann ich die auch noch anlegen.

Schönes Wochenende

Gerd

Maista

Ändert Tuya das öfter Mal oder wieso ist das nur bei mir gewesen?
Zufall?

Maista

Im Log hab ich noch eine Meldung gefunden

Zitat2023.04.16 14:27:38 1: ws:127.0.0.1:15733 disconnected, waiting to reappear (fhempy_local)
2023.04.16 14:27:38 1: BindingsIo (fhempy_local): ERROR during connection setup: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2023.04.16 14:27:49 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/10_BindingsIo.pm line 558.
2023.04.16 14:27:49 1: ws:127.0.0.1:15733 reappeared (fhempy_local)

dominik

Zitat von: Maista am 16 April 2023, 14:13:22Moin Dominik,

gerne ;)

Ich versuche gerade eine LEDVANCE RGBW Tuya-Steuerung auf Tasmota umzuflashen.
Klappt aber noch nicht.
Leider wird das Teil ja nicht in der Tuya-Cloud angezeigt.

Update läuft. Bin gespannt

Wenn es in der SmartLife App geht, sollte es auch via tuya gehen.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

dominik

Zitat von: Maista am 16 April 2023, 14:25:42Ändert Tuya das öfter Mal oder wieso ist das nur bei mir gewesen?
Zufall?
Eigentlich selten, war vor paar Tagen. Hatte es im tinytuya Repository gesehen, dass das jemand gemeldet hatte.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

dominik

Zitat von: Maista am 16 April 2023, 14:29:21Im Log hab ich noch eine Meldung gefunden

Zitat2023.04.16 14:27:38 1: ws:127.0.0.1:15733 disconnected, waiting to reappear (fhempy_local)
2023.04.16 14:27:38 1: BindingsIo (fhempy_local): ERROR during connection setup: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2023.04.16 14:27:49 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/10_BindingsIo.pm line 558.
2023.04.16 14:27:49 1: ws:127.0.0.1:15733 reappeared (fhempy_local)
Das passt soweit, sieht gut aus!
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Maista

Zitat von: dominik am 16 April 2023, 14:52:50
Zitat von: Maista am 16 April 2023, 14:13:22Moin Dominik,

gerne ;)

Ich versuche gerade eine LEDVANCE RGBW Tuya-Steuerung auf Tasmota umzuflashen.
Klappt aber noch nicht.
Leider wird das Teil ja nicht in der Tuya-Cloud angezeigt.

Update läuft. Bin gespannt

Wenn es in der SmartLife App geht, sollte es auch via tuya gehen.
Nein leider nicht. Die sieht man nur mit der LEDVANCE APP.
Irgendwer hat hier im Forum das zwar irgend wie hin bekommen durch eine ID aus einer deiner Listen,
aber hab das bisher ja nicht probieren können.

LEDVANCE hat da scheinbar irgend etwas am Code anders.

dominik

Die LEDVANCE musst du leider manuell anlegen, stimmt, das geht nicht über die Cloud.

Hier war das Issue damals:
https://github.com/fhempy/fhempy/issues/128
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Maista

Ich hab jetzt die beiden XXXL-"Leuchtmittel" noch aktiviert.
Das klappt nun auch alles.

Muss ich jetzt dann probieren ob es manuell mit LEDVANCE irgendwie klappt.

Flashen lassen will sich das Ding gerade nicht.

satprofi

Danke. Ganzen tag keine devices gefunden, nach update jetzt wieder 8 devices lokal gefunden.
gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram

Gisbert

Hallo dominik,

ich hab mich total verheddert.

Ich hatte zunächst ein Gerät (ein Luftentfeuchter) und wollte einen schaltbare Steckdose integrieren (Aubess Smart Socket 20A/EM).

Beide Geräte sind in der Smart Life App drin, und ich kann beide dort bedienen, jedoch hab ich es nicht geschafft die Steckdose in Fhem reinzubekommen.

Nach weiteren erfolglosen Schritten habe ich alle Fhem-Devices, die mit fhempy zu tun haben, gelöscht und neu angelegt, wie es in der Anleitung drin steht.

Sobald ich versuche set tuya_system scan_devices auszuführen, bekomme ich folgende Fehlermeldung (ein list, anonymisiert). Außer dem state gibt es keine weiteren Readings.
define tuya_system fhempy tuya setup XXX YYY ZZZ
attr tuya_system group tuya
attr tuya_system room fhempy
#   API_KEY    XXX
#   API_SECRET YYY
#   CFGFN     
#   DEF        tuya setup XXX YYY ZZZ
#   DEVICEID   0
#   FHEMPYTYPE tuya
#   FUUID      643d028f-f33f-e986-3ff2-c236c6684572fa47
#   IODev      fhempy_local
#   NAME       tuya_system
#   NR         1413
#   PYTHONTYPE tuya
#   REGION     eu
#   STATE      {'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 28841002: 'No permissions. Your subscription to cloud development plan has expired.'"}
#   TYPE       fhempy
#   eventCount 13
#   READINGS:
#     2023-04-17 10:59:14   state           {'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 28841002: 'No permissions. Your subscription to cloud development plan has expired.'"}
#   args:
#     tuya_system
#     fhempy
#     tuya
#     setup
#     XXX
#     YYY
#     ZZZ
#   argsh:
#   helper:
#     bm:
#       fhempy_Attr:
#         cnt        2
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        17.04. 10:25:53
#         max        0.0055689811706543
#         tot        0.0103530883789062
#         mAr:
#           set
#           tuya_system
#           room
#           fhempy
#       fhempy_Define:
#         cnt        1
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        17.04. 10:25:51
#         max        0.0197279453277588
#         tot        0.0197279453277588
#         mAr:
#           HASH(0x560828b8d850)
#           ARRAY(0x5608275c1e08)
#           HASH(0x56082896c198)
#       fhempy_Get:
#         cnt        11
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        17.04. 10:29:35
#         max        0.00527095794677734
#         tot        0.0436744689941406
#         mAr:
#           HASH(0x560828b8d850)
#           ARRAY(0x560828985228)
#           HASH(0x560828408050)
#       fhempy_Set:
#         cnt        49
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        17.04. 10:59:14
#         max        0.013293981552124
#         tot        0.065415620803833
#         mAr:
#           HASH(0x560828b8d850)
#           ARRAY(0x5608276b5118)
#           HASH(0x560827afe190)
#
setstate tuya_system {'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 28841002: 'No permissions. Your subscription to cloud development plan has expired.'"}
setstate tuya_system 2023-04-17 10:59:14 state {'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 28841002: 'No permissions. Your subscription to cloud development plan has expired.'"}


Ein list der log-Datei, ab dem Zeitpunkt, an dem ich alles neu definiert hatte:
2023-04-17 10:23:29,488 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.647...
2023-04-17 10:23:29,495 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-17 10:23:29,543 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-17 10:23:30,467 - INFO     - websockets.server: connection open
2023-04-17 10:23:30,468 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-17 10:26:17,511 - ERROR    - tuya_system: getdevices: {'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 28841002: 'No permissions. Your subscription to cloud development plan has expired.'"}
2023-04-17 10:26:57,387 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-04-17 10:26:57,388 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-17 10:26:57,388 - INFO     - websockets.server: server closing
2023-04-17 10:27:07,401 - INFO     - websockets.server: connection closed
2023-04-17 10:27:07,401 - INFO     - websockets.server: server closed
2023-04-17 10:27:07,406 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-04-17 10:27:09,205 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.647...
2023-04-17 10:27:09,211 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-17 10:27:09,260 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-17 10:27:18,013 - INFO     - websockets.server: connection open
2023-04-17 10:27:18,013 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-17 10:28:38,315 - INFO     - fhempy.lib.fhem_pythonbinding: Shutdown initiated...
2023-04-17 10:28:38,316 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-17 10:28:38,317 - INFO     - websockets.server: server closing
2023-04-17 10:28:44,729 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.647...
2023-04-17 10:28:44,736 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-17 10:28:44,784 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-17 10:28:54,703 - INFO     - websockets.server: connection open
2023-04-17 10:28:54,703 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-17 10:29:35,662 - ERROR    - tuya_system: getdevices: {'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 28841002: 'No permissions. Your subscription to cloud development plan has expired.'"}
2023-04-17 10:34:20,524 - ERROR    - tuya_system: getdevices: {'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 28841002: 'No permissions. Your subscription to cloud development plan has expired.'"}
2023-04-17 10:42:28,745 - INFO     - fhempy.lib.fhem_pythonbinding: Shutdown initiated...
2023-04-17 10:42:28,747 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-17 10:42:28,748 - INFO     - websockets.server: server closing
2023-04-17 10:42:34,720 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.647...
2023-04-17 10:42:34,727 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-17 10:42:34,775 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-17 10:42:44,013 - INFO     - websockets.server: connection open
2023-04-17 10:42:44,014 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-17 10:42:44,372 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-04-17 10:42:44,372 - INFO     - websockets.server: server closing
2023-04-17 10:42:54,380 - INFO     - websockets.server: connection closed
2023-04-17 10:42:54,381 - INFO     - websockets.server: server closed
2023-04-17 10:42:54,387 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-04-17 10:43:15,668 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.647...
2023-04-17 10:43:15,675 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-17 10:43:15,723 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-17 10:43:25,014 - INFO     - websockets.server: connection open
2023-04-17 10:43:25,014 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-17 10:43:33,199 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2023-04-17 10:43:33,202 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2023-04-17 10:43:45,020 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2023-04-17 10:43:45,054 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-04-17 10:43:45,055 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-17 10:43:45,057 - INFO     - websockets.server: server closing
2023-04-17 10:43:55,113 - INFO     - websockets.server: connection closed
2023-04-17 10:43:55,114 - INFO     - websockets.server: server closed
2023-04-17 10:43:55,117 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-04-17 10:44:16,720 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.647...
2023-04-17 10:44:16,726 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-17 10:44:16,775 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-17 10:44:25,608 - INFO     - websockets.server: connection open
2023-04-17 10:44:25,609 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-17 10:59:14,556 - ERROR    - tuya_system: getdevices: {'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 28841002: 'No permissions. Your subscription to cloud development plan has expired.'"}

Hier noch der Fhem-log aus diesem Zeitraum:
2023.04.17 10:23:11.621 1: define tuya_system fhempy tuya setup anw55jvakna7uqhe8wdt a0bb4d723bc54ea8b4775a1bcf9998eb bf25adc3b33d91441acnxr: Before you use fhempy please define BindingsIo once:
define fhempy_local BindingsIo fhempy
2023.04.17 10:23:26.624 3: BindingsIo v1.0.1
2023.04.17 10:23:26.638 3: fhempyServer v1.0.0
2023.04.17 10:23:26.787 3: fhempyserver_15733: starting
2023.04.17 10:23:26.860 3: fhempyserver_15733: using logfile: ./log/fhempy-2023-04-17.log
2023.04.17 10:23:27.792 3: fhempyserver_15733: read: end of file reached while sysread
2023.04.17 10:23:27.794 3: fhempyserver_15733: stopped
2023.04.17 10:23:27.840 3: fhempyserver_15733: starting
2023.04.17 10:23:27.914 3: fhempyserver_15733: using logfile: ./log/fhempy-2023-04-17.log
2023.04.17 10:23:30.456 3: Opening fhempy_local device ws:127.0.0.1:15733
2023.04.17 10:23:30.476 3: fhempy_local device opened
2023.04.17 10:25:51.793 3: fhempy v1.0.0 (tuya: tuya_system)
2023.04.17 10:27:07.397 1: ws:127.0.0.1:15733 disconnected, waiting to reappear (fhempy_local)
2023.04.17 10:27:07.435 1: BindingsIo (fhempy_local): ERROR during connection setup: 127.0.0.1: Connection refused (111)
2023.04.17 10:27:07.436 3: fhempyserver_15733: read: end of file reached while sysread
2023.04.17 10:27:07.438 3: fhempyserver_15733: stopped
2023.04.17 10:27:07.488 3: fhempyserver_15733: starting
2023.04.17 10:27:07.567 3: fhempyserver_15733: using logfile: ./log/fhempy-2023-04-17.log
2023.04.17 10:27:18.052 1: ws:127.0.0.1:15733 reappeared (fhempy_local)
2023.04.17 10:28:43.026 3: fhempyserver_15733: stopped
2023.04.17 10:28:43.105 3: fhempyserver_15733: starting
2023.04.17 10:28:43.181 3: fhempyserver_15733: using logfile: ./log/fhempy-2023-04-17.log
2023.04.17 10:28:43.187 1: ws:127.0.0.1:15733 disconnected, waiting to reappear (fhempy_local)
2023.04.17 10:28:54.742 1: ws:127.0.0.1:15733 reappeared (fhempy_local)
2023.04.17 10:42:33.020 3: fhempyserver_15733: stopped
2023.04.17 10:42:33.101 3: fhempyserver_15733: starting
2023.04.17 10:42:33.176 3: fhempyserver_15733: using logfile: ./log/fhempy-2023-04-17.log
2023.04.17 10:42:33.181 1: ws:127.0.0.1:15733 disconnected, waiting to reappear (fhempy_local)
2023.04.17 10:42:44.058 1: ws:127.0.0.1:15733 reappeared (fhempy_local)
2023.04.17 10:42:54.377 1: ws:127.0.0.1:15733 disconnected, waiting to reappear (fhempy_local)
2023.04.17 10:42:54.413 3: fhempyserver_15733: read: end of file reached while sysread
2023.04.17 10:42:54.415 3: fhempyserver_15733: stopped
2023.04.17 10:43:14.040 3: fhempyserver_15733: starting
2023.04.17 10:43:14.125 3: fhempyserver_15733: using logfile: ./log/fhempy-2023-04-17.log
2023.04.17 10:43:25.053 1: ws:127.0.0.1:15733 reappeared (fhempy_local)
2023.04.17 10:43:55.110 1: ws:127.0.0.1:15733 disconnected, waiting to reappear (fhempy_local)
2023.04.17 10:43:55.280 3: fhempyserver_15733: read: end of file reached while sysread
2023.04.17 10:43:55.282 3: fhempyserver_15733: stopped
2023.04.17 10:44:15.026 3: fhempyserver_15733: starting
2023.04.17 10:44:15.102 3: fhempyserver_15733: using logfile: ./log/fhempy-2023-04-17.log
2023.04.17 10:44:25.650 1: ws:127.0.0.1:15733 reappeared (fhempy_local)

Wenn ich in fhempy_local ein restart durchführe, dann verschwindet die Fehlermeldung in tuya_system und der der state ist wieder "ready".

Kannst du mir helfen?

Viele Grüße
Gisbert
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | tuya local | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY