FHEM - Hausautomations-Systeme > Sonstige Systeme

fhempy: tuya (lokal)

(1/98) > >>

dominik:
Hallo,

ich habe soeben die lokale Steuerung von Tuya umgebaut damit man lokal Updates der Devices sofort erhält. Dies sollte stabiler als die tuya_cloud Variante funktionieren, da dort die Server immer wieder Probleme machten.
Generell funktioniert das für alle Tuya Devices, egal ob Parkside, LSC, usw.. Also alles was auch in der SmartLife App funktioniert.

Einrichtung:

1. fhempy installieren
https://github.com/dominikkarall/fhempy#installation

2. tuya einrichten
https://github.com/dominikkarall/fhempy/blob/master/FHEM/bindings/python/fhempy/lib/tuya/README.md

Warum muss dabei auch der Cloud Zugang eingerichtet werden?
Über die Cloud wird einmalig die Konfiguration des Devices heruntergeladen, damit man weiß wie die lokalen Daten zu interpretieren sind. Danach werden keine Commands mehr von fhempy an die Tuya Cloud geschickt.

Dieses Modul ist ausschließlich für TuYa WiFi Devices geeignet. TuYa ZigBee Devices kann man über tuya_cloud oder Zigbee2mqtt (lokal) einbinden.

MiKn:
hmm, was mache ich falsch  ::) Nach dem erfolgreichen Device Scan (11 Geräte gefunden) kommt bei set tuya_system create_device Multi_Mode_Gateway und ich kann keine Geräte mehr ein/ausschalten.

Device:

--- Code: ---defmod tuya_system fhempy tuya setup jg7m955ybb9h9xxxxxxx 50e149d0f0dd4d57bd0e0f59xxxxxx bf026b88d79daxxxxxx
attr tuya_system room fhempy
setstate tuya_system 1 devices found localy
setstate tuya_system 2022-04-26 20:15:36 bf026b88d79da17609afuy_icon https://images.tuyaeu.com/smart/icon/ay1555059089863sMgqv/4c20ba802ef497cb51ab4fa933518ed6.png
setstate tuya_system 2022-04-26 20:15:36 bf026b88d79da17609afuy_id bf026b88d79da17609afuy
setstate tuya_system 2022-04-26 20:16:27 bf026b88d79da17609afuy_ip offline
setstate tuya_system 2022-04-26 20:15:36 bf026b88d79da17609afuy_localkey 35daa79d7719990e
setstate tuya_system 2022-04-26 20:15:36 bf026b88d79da17609afuy_name Wireless Switch  2
setstate tuya_system 2022-04-26 20:15:36 bf026b88d79da17609afuy_productid eg9bol3v
setstate tuya_system 2022-04-26 20:15:36 bf259133001a731855apjh_icon https://images.tuyaeu.com/smart/icon/ay1468288548509686pw/a6150ff03eec4554fe10fcf0f5db016f.png
setstate tuya_system 2022-04-26 20:15:36 bf259133001a731855apjh_id bf259133001a731855apjh
setstate tuya_system 2022-04-26 20:16:27 bf259133001a731855apjh_ip offline
setstate tuya_system 2022-04-26 20:15:36 bf259133001a731855apjh_localkey 35daa79d7719990e
setstate tuya_system 2022-04-26 20:15:36 bf259133001a731855apjh_name Szenenschalter
setstate tuya_system 2022-04-26 20:15:36 bf259133001a731855apjh_productid axpdxqgu
setstate tuya_system 2022-04-26 20:15:36 bf327f76aacfe9bea9sgid_icon https://images.tuyaeu.com/smart/icon/ay15550606765900nC10/0379c639a05f5ab771126816d45c9ece.png
setstate tuya_system 2022-04-26 20:15:36 bf327f76aacfe9bea9sgid_id bf327f76aacfe9bea9sgid
setstate tuya_system 2022-04-26 20:16:27 bf327f76aacfe9bea9sgid_ip offline
setstate tuya_system 2022-04-26 20:15:36 bf327f76aacfe9bea9sgid_localkey 3795eb5db5719fe1
setstate tuya_system 2022-04-26 20:15:36 bf327f76aacfe9bea9sgid_name Other
setstate tuya_system 2022-04-26 20:15:36 bf327f76aacfe9bea9sgid_productid nmpejc607a8u1cim
setstate tuya_system 2022-04-26 20:15:36 bf3e7723e71e2f0bf5crga_icon https://images.tuyaeu.com/smart/icon/ay1528101790270lcTle/1c0e8abe197ca4e3b4556d10495326c4.png
setstate tuya_system 2022-04-26 20:15:36 bf3e7723e71e2f0bf5crga_id bf3e7723e71e2f0bf5crga
setstate tuya_system 2022-04-26 20:16:27 bf3e7723e71e2f0bf5crga_ip offline
setstate tuya_system 2022-04-26 20:15:36 bf3e7723e71e2f0bf5crga_localkey 35daa79d7719990e
setstate tuya_system 2022-04-26 20:15:36 bf3e7723e71e2f0bf5crga_name Filament bulb
setstate tuya_system 2022-04-26 20:15:36 bf3e7723e71e2f0bf5crga_productid zfbj19qm
setstate tuya_system 2022-04-26 20:15:36 bf4e7302b54b31e7e5iawx_icon https://images.tuyaeu.com/smart/icon/bay1590985471642quoi/7bf56ec7badbc505eec2356669a293ca.jpg
setstate tuya_system 2022-04-26 20:15:36 bf4e7302b54b31e7e5iawx_id bf4e7302b54b31e7e5iawx
setstate tuya_system 2022-04-26 20:16:27 bf4e7302b54b31e7e5iawx_ip offline
setstate tuya_system 2022-04-26 20:15:36 bf4e7302b54b31e7e5iawx_localkey 35daa79d7719990e
setstate tuya_system 2022-04-26 20:15:36 bf4e7302b54b31e7e5iawx_name Thermostat Valve
setstate tuya_system 2022-04-26 20:15:36 bf4e7302b54b31e7e5iawx_productid b6wax7g0
setstate tuya_system 2022-04-26 20:15:36 bf5918ac10bc804aadgoza_icon https://images.tuyaeu.com/smart/icon/ay15327721968035jwx9/b1db85c4c19fa20be8b8968868e2f859.png
setstate tuya_system 2022-04-26 20:15:36 bf5918ac10bc804aadgoza_id bf5918ac10bc804aadgoza
setstate tuya_system 2022-04-26 20:16:27 bf5918ac10bc804aadgoza_ip offline
setstate tuya_system 2022-04-26 20:15:36 bf5918ac10bc804aadgoza_localkey 35daa79d7719990e
setstate tuya_system 2022-04-26 20:15:36 bf5918ac10bc804aadgoza_name Dimmer Wohnzimmer
setstate tuya_system 2022-04-26 20:15:36 bf5918ac10bc804aadgoza_productid fjjbhx9d
setstate tuya_system 2022-04-26 20:15:36 bf71189d140ea394dfishb_icon https://images.tuyaeu.com/smart/icon/ay1534490862266NApJD/e7203743227d4bf6f93443ca7d45ae04.png
setstate tuya_system 2022-04-26 20:15:36 bf71189d140ea394dfishb_id bf71189d140ea394dfishb
setstate tuya_system 2022-04-26 20:16:27 bf71189d140ea394dfishb_ip 192.168.1.80
setstate tuya_system 2022-04-26 20:15:36 bf71189d140ea394dfishb_localkey 35daa79d7719990e
setstate tuya_system 2022-04-26 20:15:36 bf71189d140ea394dfishb_name Multi Mode Gateway
setstate tuya_system 2022-04-26 20:15:36 bf71189d140ea394dfishb_productid rm7ec3fg
setstate tuya_system 2022-04-26 20:16:27 bf71189d140ea394dfishb_version 3.3
setstate tuya_system 2022-04-26 20:15:36 bf9a2d0837b2c754c8f1qf_icon https://images.tuyaeu.com/smart/icon/bay16152549642749hEX/e693b723a191a2f8bf0f4d05d731ea62.png
setstate tuya_system 2022-04-26 20:15:36 bf9a2d0837b2c754c8f1qf_id bf9a2d0837b2c754c8f1qf
setstate tuya_system 2022-04-26 20:16:27 bf9a2d0837b2c754c8f1qf_ip offline
setstate tuya_system 2022-04-26 20:15:36 bf9a2d0837b2c754c8f1qf_localkey 3795eb5db5719fe1
setstate tuya_system 2022-04-26 20:15:36 bf9a2d0837b2c754c8f1qf_name USB RF IR
setstate tuya_system 2022-04-26 20:15:36 bf9a2d0837b2c754c8f1qf_productid pwla5warkrwbza0m
setstate tuya_system 2022-04-26 20:15:36 bfc6fc95442d988644evzt_icon https://images.tuyaeu.com/smart/icon/ay1555059089863sMgqv/4c20ba802ef497cb51ab4fa933518ed6.png
setstate tuya_system 2022-04-26 20:15:36 bfc6fc95442d988644evzt_id bfc6fc95442d988644evzt
setstate tuya_system 2022-04-26 20:16:27 bfc6fc95442d988644evzt_ip offline
setstate tuya_system 2022-04-26 20:15:36 bfc6fc95442d988644evzt_localkey 35daa79d7719990e
setstate tuya_system 2022-04-26 20:15:36 bfc6fc95442d988644evzt_name Wireless Switch
setstate tuya_system 2022-04-26 20:15:36 bfc6fc95442d988644evzt_productid eg9bol3v
setstate tuya_system 2022-04-26 20:15:36 bfcc0e45c8200202d4puhb_icon https://images.tuyaeu.com/smart/ir/icon/9kndaqkry6f4.png
setstate tuya_system 2022-04-26 20:15:36 bfcc0e45c8200202d4puhb_id bfcc0e45c8200202d4puhb
setstate tuya_system 2022-04-26 20:16:27 bfcc0e45c8200202d4puhb_ip offline
setstate tuya_system 2022-04-26 20:15:36 bfcc0e45c8200202d4puhb_localkey 3795eb5db5719fe1
setstate tuya_system 2022-04-26 20:15:36 bfcc0e45c8200202d4puhb_name Set-top Box
setstate tuya_system 2022-04-26 20:15:36 bfcc0e45c8200202d4puhb_productid 000000ac36
setstate tuya_system 2022-04-26 20:15:36 bfe3654e51aeecf866puer_icon https://images.tuyaeu.com/smart/icon/ay1523512777050bLIId/f2360f527259e6e8662cb351095cd056.jpg
setstate tuya_system 2022-04-26 20:15:36 bfe3654e51aeecf866puer_id bfe3654e51aeecf866puer
setstate tuya_system 2022-04-26 20:16:27 bfe3654e51aeecf866puer_ip offline
setstate tuya_system 2022-04-26 20:15:36 bfe3654e51aeecf866puer_localkey 35daa79d7719990e
setstate tuya_system 2022-04-26 20:15:36 bfe3654e51aeecf866puer_name HY368RT Zigbee
setstate tuya_system 2022-04-26 20:15:36 bfe3654e51aeecf866puer_productid cwnjrr72
setstate tuya_system 2022-04-26 21:16:33 state 1 devices found localy

--- Ende Code ---

Logfile:

--- Code: ---2022-04-26 20:45:57,195 - WARNING  - ring_doorbell.doorbot: Your Ring account does not have an active subscription.
2022-04-26 20:45:57,250 - ERROR    - RingDoorBell: Failed to update readings, please report here: https://forum.fhem.de/index.php/topic,117381
Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 276, in update_readings
    await self.update_if_available("existing_doorbell_type")
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 312, in update_if_available
    if hasattr(self._rdevice, reading):
  File "/home/fhem/.local/lib/python3.8/site-packages/ring_doorbell/doorbot.py", line 138, in existing_doorbell_type
    return DOORBELL_EXISTING_TYPE[
KeyError: 5
2022-04-26 20:50:58,984 - WARNING  - ring_doorbell.doorbot: Your Ring account does not have an active subscription.
2022-04-26 20:50:59,039 - ERROR    - RingDoorBell: Failed to update readings, please report here: https://forum.fhem.de/index.php/topic,117381
Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 276, in update_readings
    await self.update_if_available("existing_doorbell_type")
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 312, in update_if_available
    if hasattr(self._rdevice, reading):
  File "/home/fhem/.local/lib/python3.8/site-packages/ring_doorbell/doorbot.py", line 138, in existing_doorbell_type
    return DOORBELL_EXISTING_TYPE[
KeyError: 5
2022-04-26 20:56:00,772 - WARNING  - ring_doorbell.doorbot: Your Ring account does not have an active subscription.
2022-04-26 20:56:00,828 - ERROR    - RingDoorBell: Failed to update readings, please report here: https://forum.fhem.de/index.php/topic,117381
Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 276, in update_readings
    await self.update_if_available("existing_doorbell_type")
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 312, in update_if_available
    if hasattr(self._rdevice, reading):
  File "/home/fhem/.local/lib/python3.8/site-packages/ring_doorbell/doorbot.py", line 138, in existing_doorbell_type
    return DOORBELL_EXISTING_TYPE[
KeyError: 5
2022-04-26 21:01:02,566 - WARNING  - ring_doorbell.doorbot: Your Ring account does not have an active subscription.
2022-04-26 21:01:02,621 - ERROR    - RingDoorBell: Failed to update readings, please report here: https://forum.fhem.de/index.php/topic,117381
Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 276, in update_readings
    await self.update_if_available("existing_doorbell_type")
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 312, in update_if_available
    if hasattr(self._rdevice, reading):
  File "/home/fhem/.local/lib/python3.8/site-packages/ring_doorbell/doorbot.py", line 138, in existing_doorbell_type
    return DOORBELL_EXISTING_TYPE[
KeyError: 5
2022-04-26 21:06:04,417 - WARNING  - ring_doorbell.doorbot: Your Ring account does not have an active subscription.
2022-04-26 21:06:04,473 - ERROR    - RingDoorBell: Failed to update readings, please report here: https://forum.fhem.de/index.php/topic,117381
Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 276, in update_readings
    await self.update_if_available("existing_doorbell_type")
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 312, in update_if_available
    if hasattr(self._rdevice, reading):
  File "/home/fhem/.local/lib/python3.8/site-packages/ring_doorbell/doorbot.py", line 138, in existing_doorbell_type
    return DOORBELL_EXISTING_TYPE[
KeyError: 5
2022-04-26 21:10:31,688 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to execute function Set: Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 255, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 326, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.8/asyncio/tasks.py", line 494, in wait_for
    return fut.result()
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py", line 173, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/utils.py", line 282, in handle_set
    return await fct_call(hash, final_params)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 210, in set_create_device
    if nameid == dev["name_esc"] + "_" + dev["id"]:
KeyError: 'id'
(id: 4668725)
2022-04-26 21:11:06,231 - WARNING  - ring_doorbell.doorbot: Your Ring account does not have an active subscription.
2022-04-26 21:11:06,288 - ERROR    - RingDoorBell: Failed to update readings, please report here: https://forum.fhem.de/index.php/topic,117381
Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 276, in update_readings
    await self.update_if_available("existing_doorbell_type")
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 312, in update_if_available
    if hasattr(self._rdevice, reading):
  File "/home/fhem/.local/lib/python3.8/site-packages/ring_doorbell/doorbot.py", line 138, in existing_doorbell_type
    return DOORBELL_EXISTING_TYPE[
KeyError: 5
2022-04-26 21:12:07,737 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2022-04-26 21:12:12,872 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2022-04-26 21:12:13,275 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy...
2022-04-26 21:12:13,280 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-04-26 21:12:13,305 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-04-26 21:12:22,948 - INFO     - websockets.server: connection open
2022-04-26 21:12:22,949 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-04-26 21:12:24,171 - WARNING  - asyncio: Executing <Task finished name='Task-30' coro=<tuya.Define() done, defined at /home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py:27> result=None created at /usr/lib/python3.8/asyncio/tasks.py:475> took 0.211 seconds
2022-04-26 21:12:25,078 - ERROR    - RingDoorBell: Failed to update readings, please report here: https://forum.fhem.de/index.php/topic,117381
Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 276, in update_readings
    await self.update_if_available("existing_doorbell_type")
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 312, in update_if_available
    if hasattr(self._rdevice, reading):
  File "/home/fhem/.local/lib/python3.8/site-packages/ring_doorbell/doorbot.py", line 138, in existing_doorbell_type
    return DOORBELL_EXISTING_TYPE[
KeyError: 5
2022-04-26 21:12:26,023 - WARNING  - ring_doorbell.doorbot: Your Ring account does not have an active subscription.
2022-04-26 21:12:26,134 - ERROR    - RingDoorBell: Failed to update readings, please report here: https://forum.fhem.de/index.php/topic,117381
Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 276, in update_readings
    await self.update_if_available("existing_doorbell_type")
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 312, in update_if_available
    if hasattr(self._rdevice, reading):
  File "/home/fhem/.local/lib/python3.8/site-packages/ring_doorbell/doorbot.py", line 138, in existing_doorbell_type
    return DOORBELL_EXISTING_TYPE[
KeyError: 5
2022-04-26 21:12:36,707 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy...
2022-04-26 21:12:36,724 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-04-26 21:12:36,774 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-04-26 21:12:41,081 - INFO     - websockets.server: connection open
2022-04-26 21:12:41,082 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-04-26 21:12:42,227 - WARNING  - asyncio: Executing <Task finished name='Task-34' coro=<tuya.Define() done, defined at /home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py:27> result=None created at /usr/lib/python3.8/asyncio/tasks.py:475> took 0.173 seconds
2022-04-26 21:12:43,089 - ERROR    - RingDoorBell: Failed to update readings, please report here: https://forum.fhem.de/index.php/topic,117381
Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 276, in update_readings
    await self.update_if_available("existing_doorbell_type")
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 312, in update_if_available
    if hasattr(self._rdevice, reading):
  File "/home/fhem/.local/lib/python3.8/site-packages/ring_doorbell/doorbot.py", line 138, in existing_doorbell_type
    return DOORBELL_EXISTING_TYPE[
KeyError: 5
2022-04-26 21:12:44,047 - WARNING  - ring_doorbell.doorbot: Your Ring account does not have an active subscription.
2022-04-26 21:12:44,100 - ERROR    - RingDoorBell: Failed to update readings, please report here: https://forum.fhem.de/index.php/topic,117381
Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 276, in update_readings
    await self.update_if_available("existing_doorbell_type")
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 312, in update_if_available
    if hasattr(self._rdevice, reading):
  File "/home/fhem/.local/lib/python3.8/site-packages/ring_doorbell/doorbot.py", line 138, in existing_doorbell_type
    return DOORBELL_EXISTING_TYPE[
KeyError: 5
2022-04-26 21:14:21,197 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to execute function Set: Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 255, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 326, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.8/asyncio/tasks.py", line 494, in wait_for
    return fut.result()
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py", line 173, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/utils.py", line 282, in handle_set
    return await fct_call(hash, final_params)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 210, in set_create_device
    if nameid == dev["name_esc"] + "_" + dev["id"]:
KeyError: 'id'
(id: 62115870)
2022-04-26 21:16:43,129 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to execute function Set: Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 255, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 326, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.8/asyncio/tasks.py", line 494, in wait_for
    return fut.result()
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py", line 173, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/utils.py", line 282, in handle_set
    return await fct_call(hash, final_params)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 210, in set_create_device
    if nameid == dev["name_esc"] + "_" + dev["id"]:
KeyError: 'id'
(id: 88114945)
2022-04-26 21:17:46,228 - WARNING  - ring_doorbell.doorbot: Your Ring account does not have an active subscription.
2022-04-26 21:17:46,306 - ERROR    - RingDoorBell: Failed to update readings, please report here: https://forum.fhem.de/index.php/topic,117381
Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 276, in update_readings
    await self.update_if_available("existing_doorbell_type")
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 312, in update_if_available
    if hasattr(self._rdevice, reading):
  File "/home/fhem/.local/lib/python3.8/site-packages/ring_doorbell/doorbot.py", line 138, in existing_doorbell_type
    return DOORBELL_EXISTING_TYPE[
KeyError: 5
2022-04-26 21:17:46,343 - ERROR    - RingDoorBell: Failed to poll dings...
Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 176, in update_dings_loop_thread
    alerts = self._ring.active_alerts()
  File "/home/fhem/.local/lib/python3.8/site-packages/ring_doorbell/__init__.py", line 140, in active_alerts
    for alert in self.dings_data:
TypeError: 'NoneType' object is not iterable
2022-04-26 21:18:22,371 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to execute function Set: Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 255, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 326, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.8/asyncio/tasks.py", line 494, in wait_for
    return fut.result()
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py", line 173, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/utils.py", line 282, in handle_set
    return await fct_call(hash, final_params)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 210, in set_create_device
    if nameid == dev["name_esc"] + "_" + dev["id"]:
KeyError: 'id'
(id: 83984081)
2022-04-26 21:21:19,901 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to execute function Set: Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 255, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 326, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.8/asyncio/tasks.py", line 494, in wait_for
    return fut.result()
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py", line 173, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/utils.py", line 282, in handle_set
    return await fct_call(hash, final_params)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 210, in set_create_device
    if nameid == dev["name_esc"] + "_" + dev["id"]:
KeyError: 'id'
(id: 62891581)
2022-04-26 21:22:48,183 - WARNING  - ring_doorbell.doorbot: Your Ring account does not have an active subscription.
2022-04-26 21:22:48,241 - ERROR    - RingDoorBell: Failed to update readings, please report here: https://forum.fhem.de/index.php/topic,117381
Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 276, in update_readings
    await self.update_if_available("existing_doorbell_type")
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/ring/ring.py", line 312, in update_if_available
    if hasattr(self._rdevice, reading):
  File "/home/fhem/.local/lib/python3.8/site-packages/ring_doorbell/doorbot.py", line 138, in existing_doorbell_type
    return DOORBELL_EXISTING_TYPE[
KeyError: 5

--- Ende Code ---

Fehlermeldung:

--- Code: ---Failed to execute function Set: Traceback (most recent call last):
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 255, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 326, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.8/asyncio/tasks.py", line 494, in wait_for
    return fut.result()
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py", line 173, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/utils.py", line 282, in handle_set
    return await fct_call(hash, final_params)
  File "/home/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 210, in set_create_device
    if nameid == dev["name_esc"] + "_" + dev["id"]:
KeyError: 'id'
--- Ende Code ---

dominik:
Danke für die Logs!

Fehler ist behoben und sollte mit 0.1.293 funktionieren.

MiKn:

--- Zitat von: dominik am 26 April 2022, 22:15:00 ---Danke für die Logs!

Fehler ist behoben und sollte mit 0.1.293 funktionieren.

--- Ende Zitat ---

Sehr gerne!

Fehler behoben. Es werden beim Scan 11 Geräte gefunden, aber ich kann nur das Multi_Mode_Gateway anlegen. Die anderen Geräte sind alle als Oflline gekennzeichnet und nur als Reading unter tuya_system zu sehen.


--- Code: ---defmod tuya_system fhempy tuya setup x1 y2 z3

setstate tuya_system 1 devices found localy
setstate tuya_system 2022-04-26 22:57:04 bf026b88d79da17609afuy_icon https://images.tuyaeu.com/smart/icon/ay1555059089863sMgqv/4c20ba802ef497cb51ab4fa933518ed6.png
setstate tuya_system 2022-04-26 22:57:04 bf026b88d79da17609afuy_id bf026b88d79da17609afuy
setstate tuya_system 2022-04-26 22:57:56 bf026b88d79da17609afuy_ip offline
setstate tuya_system 2022-04-26 22:57:04 bf026b88d79da17609afuy_localkey 35daa79d7719990e
setstate tuya_system 2022-04-26 22:57:04 bf026b88d79da17609afuy_name Wireless Switch  2
setstate tuya_system 2022-04-26 22:57:04 bf026b88d79da17609afuy_productid eg9bol3v
setstate tuya_system 2022-04-26 22:57:04 bf259133001a731855apjh_icon https://images.tuyaeu.com/smart/icon/ay1468288548509686pw/a6150ff03eec4554fe10fcf0f5db016f.png
setstate tuya_system 2022-04-26 22:57:04 bf259133001a731855apjh_id bf259133001a731855apjh
setstate tuya_system 2022-04-26 22:57:56 bf259133001a731855apjh_ip offline
setstate tuya_system 2022-04-26 22:57:04 bf259133001a731855apjh_localkey 35daa79d7719990e
setstate tuya_system 2022-04-26 22:57:04 bf259133001a731855apjh_name Szenenschalter
setstate tuya_system 2022-04-26 22:57:04 bf259133001a731855apjh_productid axpdxqgu
setstate tuya_system 2022-04-26 22:57:04 bf327f76aacfe9bea9sgid_icon https://images.tuyaeu.com/smart/icon/ay15550606765900nC10/0379c639a05f5ab771126816d45c9ece.png
setstate tuya_system 2022-04-26 22:57:04 bf327f76aacfe9bea9sgid_id bf327f76aacfe9bea9sgid
setstate tuya_system 2022-04-26 22:57:56 bf327f76aacfe9bea9sgid_ip offline
setstate tuya_system 2022-04-26 22:57:04 bf327f76aacfe9bea9sgid_localkey 3795eb5db5719fe1
setstate tuya_system 2022-04-26 22:57:04 bf327f76aacfe9bea9sgid_name Other
setstate tuya_system 2022-04-26 22:57:04 bf327f76aacfe9bea9sgid_productid nmpejc607a8u1cim
setstate tuya_system 2022-04-26 22:57:04 bf3e7723e71e2f0bf5crga_icon https://images.tuyaeu.com/smart/icon/ay1528101790270lcTle/1c0e8abe197ca4e3b4556d10495326c4.png
setstate tuya_system 2022-04-26 22:57:04 bf3e7723e71e2f0bf5crga_id bf3e7723e71e2f0bf5crga
setstate tuya_system 2022-04-26 22:57:56 bf3e7723e71e2f0bf5crga_ip offline
setstate tuya_system 2022-04-26 22:57:04 bf3e7723e71e2f0bf5crga_localkey 35daa79d7719990e
setstate tuya_system 2022-04-26 22:57:04 bf3e7723e71e2f0bf5crga_name Filament bulb
setstate tuya_system 2022-04-26 22:57:04 bf3e7723e71e2f0bf5crga_productid zfbj19qm
setstate tuya_system 2022-04-26 22:57:04 bf4e7302b54b31e7e5iawx_icon https://images.tuyaeu.com/smart/icon/bay1590985471642quoi/7bf56ec7badbc505eec2356669a293ca.jpg
setstate tuya_system 2022-04-26 22:57:04 bf4e7302b54b31e7e5iawx_id bf4e7302b54b31e7e5iawx
setstate tuya_system 2022-04-26 22:57:56 bf4e7302b54b31e7e5iawx_ip offline
setstate tuya_system 2022-04-26 22:57:04 bf4e7302b54b31e7e5iawx_localkey 35daa79d7719990e
setstate tuya_system 2022-04-26 22:57:04 bf4e7302b54b31e7e5iawx_name Thermostat Valve
setstate tuya_system 2022-04-26 22:57:04 bf4e7302b54b31e7e5iawx_productid b6wax7g0
setstate tuya_system 2022-04-26 22:57:03 bf5918ac10bc804aadgoza_icon https://images.tuyaeu.com/smart/icon/ay15327721968035jwx9/b1db85c4c19fa20be8b8968868e2f859.png
setstate tuya_system 2022-04-26 22:57:03 bf5918ac10bc804aadgoza_id bf5918ac10bc804aadgoza
setstate tuya_system 2022-04-26 22:57:56 bf5918ac10bc804aadgoza_ip offline
setstate tuya_system 2022-04-26 22:57:03 bf5918ac10bc804aadgoza_localkey 35daa79d7719990e
setstate tuya_system 2022-04-26 22:57:03 bf5918ac10bc804aadgoza_name Dimmer Wohnzimmer
setstate tuya_system 2022-04-26 22:57:03 bf5918ac10bc804aadgoza_productid fjjbhx9d
setstate tuya_system 2022-04-26 22:57:04 bf71189d140ea394dfishb_icon https://images.tuyaeu.com/smart/icon/ay1534490862266NApJD/e7203743227d4bf6f93443ca7d45ae04.png
setstate tuya_system 2022-04-26 22:57:04 bf71189d140ea394dfishb_id bf71189d140ea394dfishb
setstate tuya_system 2022-04-26 22:57:56 bf71189d140ea394dfishb_ip 192.168.1.80
setstate tuya_system 2022-04-26 22:57:04 bf71189d140ea394dfishb_localkey 35daa79d7719990e
setstate tuya_system 2022-04-26 22:57:04 bf71189d140ea394dfishb_name Multi Mode Gateway
setstate tuya_system 2022-04-26 22:57:04 bf71189d140ea394dfishb_productid rm7ec3fg
setstate tuya_system 2022-04-26 22:57:56 bf71189d140ea394dfishb_version 3.3
setstate tuya_system 2022-04-26 22:57:04 bf9a2d0837b2c754c8f1qf_icon https://images.tuyaeu.com/smart/icon/bay16152549642749hEX/e693b723a191a2f8bf0f4d05d731ea62.png
setstate tuya_system 2022-04-26 22:57:04 bf9a2d0837b2c754c8f1qf_id bf9a2d0837b2c754c8f1qf
setstate tuya_system 2022-04-26 22:57:56 bf9a2d0837b2c754c8f1qf_ip offline
setstate tuya_system 2022-04-26 22:57:04 bf9a2d0837b2c754c8f1qf_localkey 3795eb5db5719fe1
setstate tuya_system 2022-04-26 22:57:04 bf9a2d0837b2c754c8f1qf_name USB RF IR
setstate tuya_system 2022-04-26 22:57:04 bf9a2d0837b2c754c8f1qf_productid pwla5warkrwbza0m
setstate tuya_system 2022-04-26 22:57:04 bfc6fc95442d988644evzt_icon https://images.tuyaeu.com/smart/icon/ay1555059089863sMgqv/4c20ba802ef497cb51ab4fa933518ed6.png
setstate tuya_system 2022-04-26 22:57:04 bfc6fc95442d988644evzt_id bfc6fc95442d988644evzt
setstate tuya_system 2022-04-26 22:57:56 bfc6fc95442d988644evzt_ip offline
setstate tuya_system 2022-04-26 22:57:04 bfc6fc95442d988644evzt_localkey 35daa79d7719990e
setstate tuya_system 2022-04-26 22:57:04 bfc6fc95442d988644evzt_name Wireless Switch
setstate tuya_system 2022-04-26 22:57:04 bfc6fc95442d988644evzt_productid eg9bol3v
setstate tuya_system 2022-04-26 22:57:04 bfcc0e45c8200202d4puhb_icon https://images.tuyaeu.com/smart/ir/icon/9kndaqkry6f4.png
setstate tuya_system 2022-04-26 22:57:04 bfcc0e45c8200202d4puhb_id bfcc0e45c8200202d4puhb
setstate tuya_system 2022-04-26 22:57:56 bfcc0e45c8200202d4puhb_ip offline
setstate tuya_system 2022-04-26 22:57:04 bfcc0e45c8200202d4puhb_localkey 3795eb5db5719fe1
setstate tuya_system 2022-04-26 22:57:04 bfcc0e45c8200202d4puhb_name Set-top Box
setstate tuya_system 2022-04-26 22:57:04 bfcc0e45c8200202d4puhb_productid 000000ac36
setstate tuya_system 2022-04-26 22:57:04 bfe3654e51aeecf866puer_icon https://images.tuyaeu.com/smart/icon/ay1523512777050bLIId/f2360f527259e6e8662cb351095cd056.jpg
setstate tuya_system 2022-04-26 22:57:04 bfe3654e51aeecf866puer_id bfe3654e51aeecf866puer
setstate tuya_system 2022-04-26 22:57:56 bfe3654e51aeecf866puer_ip offline
setstate tuya_system 2022-04-26 22:57:04 bfe3654e51aeecf866puer_localkey 35daa79d7719990e
setstate tuya_system 2022-04-26 22:57:04 bfe3654e51aeecf866puer_name HY368RT Zigbee
setstate tuya_system 2022-04-26 22:57:04 bfe3654e51aeecf866puer_productid cwnjrr72
setstate tuya_system 2022-04-26 22:57:56 state 1 devices found localy


--- Ende Code ---

dominik:
Hast du eine spezielle Netzwerkkonfiguration? Oder auf dem FHEM Host eine Firewall? Die Ports 6666 und 6667 via UDP müssen freigeschaltet sein.

Falls der Scan die Devices dennoch nicht findet, kannst du diese auch manuell anlegen:


--- Code: ---define wifi_plug fhempy tuya api DEVICE_ID IP LOCAL_KEY VERSION API_KEY API_SECRET
--- Ende Code ---

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln