FHEM Forum

FHEM - Hausautomations-Systeme => Sonstige Systeme => Thema gestartet von: dominik am 26 April 2022, 19:12:25

Titel: fhempy: tuya (lokal)
Beitrag von: dominik am 26 April 2022, 19:12:25
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.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: MiKn am 26 April 2022, 21:29:46
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:
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


Logfile:
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


Fehlermeldung:
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'
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 26 April 2022, 22:15:00
Danke für die Logs!

Fehler ist behoben und sollte mit 0.1.293 funktionieren.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: MiKn am 26 April 2022, 23:03:34
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.

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.

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

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 26 April 2022, 23:08:44
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:

define wifi_plug fhempy tuya api DEVICE_ID IP LOCAL_KEY VERSION API_KEY API_SECRET
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 26 April 2022, 23:14:44
Achso, das habe ich vergessen zu schreiben, dies ist NUR für WiFi Geräte. ZigBee Geräte muss man über Zigbee2mqtt einbinden wenn man sie lokal steuern will.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: MiKn am 26 April 2022, 23:23:34
Zitat von: dominik am 26 April 2022, 23:14:44
Achso, das habe ich vergessen zu schreiben, dies ist NUR für WiFi Geräte. ZigBee Geräte muss man über Zigbee2mqtt einbinden wenn man sie lokal steuern will.

achso, das wußte ich nicht, na dann bleibe ich erstmal bei der tuya_Cloud Variante solange mein Dimmer nicht in Zigbee2mqtt integriert ist.

Danke!
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: darthi am 27 April 2022, 14:04:36
Danke funktioniert mit meinem Robi super!
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 30 April 2022, 18:48:31
Zitat von: dominik am 26 April 2022, 19:12:25
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.


hmm, wo liegt denn da der Unterschied zur Cloud-Version?


ich habe bislang:

define tuya_cloud_connector PythonModule tuya_cloud setup ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9xxxxxxxx456aa8155d2a0ea xxxxxxxx@gmx.net xxxxxxxx smartlife Europe



neue DEF ist:
define tuya_system fhempy tuya setup API_KEY API_SECRET DEVICE_ID
set tuya_system start_scan


wie steige ich von Cloud um ?

ich ersetze einfach
"tuya_cloud_connector"   durch "tuya_system"

"PythonModule tuya_cloud" durch "fhempy tuya"?

oder nur "tuya_cloud" durch "tuya"?

Ich habe ja ca. 80 Defines wie diese:

## TUYA temphum ########################################################################################################

define Temp1 PythonModule tuya_cloud tuya_cloud_connector bf4ae6b15fe239b42bxvpl
setuuid Temp1 625f01ef-f33f-fd5f-eb72-266acf996be40377
attr Temp1 alias Temperatur Terrasse
attr Temp1 group TempHum
attr Temp1 room TUYA TempHum
attr Temp1 userReadings Temp: temperature [C] Hum: humidity [%]

define SVG_Temp1 SVG dblog_THB:THB_temp-hum_db_tuya:HISTORY
setuuid SVG_Temp1 625f06fd-f33f-fd5f-c62e-7cd09a6ce7def42d
attr SVG_Temp1 alias Temp1 Aussen Terrasse Tuya heute
attr SVG_Temp1 fixedrange day
attr SVG_Temp1 group TemperaturAussen
attr SVG_Temp1 label " Temp- min: $data{min1}, max: $data{max1}, last: $data{currval1}"
attr SVG_Temp1 plotfunction Temp1
attr SVG_Temp1 room Temperaturen Aussen,Terrasse
attr SVG_Temp1 title "Terrasse Tuya1 heute"



Sehe ich richtig, dass ich einmalig noch den bestehenden Cloud-zugang zur Autorisierung verwende, solange diese noch aktiv ist und nicht 25.000$ im Jahr kostet?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 30 April 2022, 20:38:47
Der Cloud Zugang bei diesem Plugin dient nur dafür, dass man die Spezifikation der einzelnen Datenpunkte (DPs) erhält.

Du kannst deine tuya_cloud Devices sogar parallel dazu nutzen. Daher einfach das hier anlegen:
define tuya_system fhempy tuya setup API_KEY API_SECRET DEVICE_ID
set tuya_system start_scan


Du kannst dann die einzelnen Devices über das set create_device Command anlegen.
Wenn dann alles funktioniert, kannst du die tuya_cloud Devices löschen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 30 April 2022, 21:16:48
wenn ich also später ein weiteres Device anlerne, muss ich dann wieder Zugang zur Cloud haben?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 30 April 2022, 22:05:24
Ja, es wäre vorteilhaft. Du kannst es auch komplett ohne Cloud nutzen, dann musst du aber die Attribute tuya_functions_spec und tuya_status_spec selbst manuell setzen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 01 Mai 2022, 10:18:30
Zitat von: dominik am 30 April 2022, 20:38:47
Der Cloud Zugang bei diesem Plugin dient nur dafür, dass man die Spezifikation der einzelnen Datenpunkte (DPs) erhält.

Du kannst deine tuya_cloud Devices sogar parallel dazu nutzen. Daher einfach das hier anlegen:
define tuya_system fhempy tuya setup API_KEY API_SECRET DEVICE_ID
set tuya_system start_scan


Du kannst dann die einzelnen Devices über das set create_device Command anlegen.
Wenn dann alles funktioniert, kannst du die tuya_cloud Devices löschen.

so, habe es parallel am laufen, 1 gerät erfolgreich eingebunden.

DEVICEID   0
   FHEMPYTYPE tuya
   FUUID      626e3fab-f33f-6462-c95c-8eb14102c2232e33
   IODev      local_pybinding
   NAME       tuya_system
   NR         2714
   PYTHONTYPE tuya
   REGION     eu
   STATE      ready
   TYPE       fhempy
   READINGS:
     2022-05-01 10:07:34   state           ready
   args:
     tuya_system
     fhempy
     tuya
     setup
     xxxxxxxxx
     xxxxxxxxx
     Gang_oben_bfb727311ed41a0cc8ycsq
   argsh:
Attributes:
   group      tuya
   room       CUL_fhempy


das device ist aber immer noch nur mit tuya_cloud verbunden. mit set tuya_system scan_devices tut sich nichts.
muss ich jedes device jetzt manuell anlegen?


komme mit dem punkt nicht klar -> Open "API Groups" on the tuya portal  , wo finde ich den am portal?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 Mai 2022, 10:25:59
Bitte deine Credentials (API Key/Secret) beim Posten entfernen!

Der Scan tut nichts? Ändert sich state beim Scan? Oder ist was im fhempy Log zu sehen?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 01 Mai 2022, 10:58:48
Das kommt nach restart

2022-05-01 10:56:27,816 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy...
2022-05-01 10:56:27,829 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-05-01 10:56:27,986 - WARNING  - asyncio: Executing <Task pending name='Task-1' coro=<async_main() running at /opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py:456> wait_for=<_GatheringFuture pending cb=[<TaskWakeupMethWrapper object at 0x75c32760>()] created at /usr/lib/python3.9/asyncio/tasks.py:704> cb=[_run_until_complete_cb() at /usr/lib/python3.9/asyncio/base_events.py:184] created at /usr/lib/python3.9/asyncio/base_events.py:621> took 0.169 seconds
2022-05-01 10:56:27,993 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-05-01 10:56:38,835 - INFO     - websockets.server: connection open
2022-05-01 10:56:38,841 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-05-01 10:56:47,357 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy...
2022-05-01 10:56:47,374 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-05-01 10:56:47,549 - WARNING  - asyncio: Executing <Task pending name='Task-1' coro=<async_main() running at /opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py:456> wait_for=<_GatheringFuture pending cb=[<TaskWakeupMethWrapper object at 0x75b62760>()] created at /usr/lib/python3.9/asyncio/tasks.py:704> cb=[_run_until_complete_cb() at /usr/lib/python3.9/asyncio/base_events.py:184] created at /usr/lib/python3.9/asyncio/base_events.py:621> took 0.192 seconds
2022-05-01 10:56:47,557 - INFO     - websockets.server: server listening on 0.0.0.0:15733


bei set scan tut sich nichts....
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 01 Mai 2022, 11:32:58
wollte gerade wifi_plug definieren

Failed to load module tuya: Traceback (most recent call last): File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 210, in handle_function await self.define_module(hash, module_object) File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 301, in define_module await asyncio.wait_for( File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for return fut.result() File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 63, in Define self.tt_version = float(args[7]) ValueError: could not convert string to float: 'cce6628286ff4289a78c37532ce5bbed'


kannst du es mir ausdeutschen ? ;-)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 Mai 2022, 11:35:47
Wg. Scan: Ich denke du hast den Tuya Account noch nicht fertig eingerichtet.

Öffne das Projekt im Tuya Portal, dann gehst du auf Service API und prüfst ob dort IoT Core, Authorization und Device Status Notification als APIs hinterlegt sind. Wenn nicht, dann mit dem blauen Button rechts "Go To Authorize" hinzufügen.

Wg. wifi_plug, dein define ist nicht ganz korrekt.
define wifi_plug fhempy tuya PRODUCT_ID DEVICE_ID IP LOCAL_KEY [VERSION] [API_KEY] [API_SECRET]


Die [] sind NICHT zu verwenden, das ist nur die Syntax, dass das Argument optional ist.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 01 Mai 2022, 11:40:47
Zitat von: dominik am 01 Mai 2022, 11:35:47
Wg. Scan: Ich denke du hast den Tuya Account noch nicht fertig eingerichtet.




meinst du das hier?  die tuya_clod funktioniert ja, warum tuya_system nicht. muss ich jetzt monatlich neu verlängern? geht aber nicht
IoT Core is a restricted item, you have already purchased 1 and cannot purchase again

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 01 Mai 2022, 11:43:36
Zitat von: dominik am 01 Mai 2022, 11:35:47


Wg. wifi_plug, dein define ist nicht ganz korrekt.
define wifi_plug fhempy tuya PRODUCT_ID DEVICE_ID IP LOCAL_KEY [VERSION] [API_KEY] [API_SECRET]


Die [] sind NICHT zu verwenden, das ist nur die Syntax, dass das Argument optional ist.

[]  hab ich nicht verwendet, local_key [version] hab ich ausgelassen, was wären die?

ZitatDu kannst dann die einzelnen Devices über das set create_device Command anlegen.
hab ich auch nicht zur auswahl. passt das modul etwa nicht? fhem update hab ich vorher gemacht.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 Mai 2022, 11:51:38
Ok, bitte dann die Cloud Parameter mit zu verwenden.

define wifi_plug fhempy tuya PRODUCT_ID DEVICE_ID IP LOCAL_KEY [VERSION] [API_KEY] [API_SECRET]

VERSION = 3.3
API_KEY = aus der Tuya Cloud Console
API_SECRET = aus der Tuya Cloud Console

Du dürftest aber dennoch zu viele Parameter angegeben haben. Poste mal dein define und mach änder die Keys.

IoT Core musst du auf alle Fälle verlängern. Da steht auch "Extend Trial", was passiert wenn du dort drauf klickst? Meins läuft (leider) noch ein paar Monate, daher hatte ich noch nie zu verlängern und kenne den Prozess nicht.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 01 Mai 2022, 11:56:35
Zitat von: dominik am 01 Mai 2022, 11:51:38


IoT Core musst du auf alle Fälle verlängern. Da steht auch "Extend Trial", was passiert wenn du dort drauf klickst? Meins läuft (leider) noch ein paar Monate, daher hatte ich noch nie zu verlängern und kenne den Prozess nicht.

IoT core geht nicht zu verlängern, (IoT Core is a restricted item, you have already purchased 1 and cannot purchase again) max. 1 monat. tuya_Cloud klappt aber noch.
Kann nur 25000.-/jahr kaufen (???) , sicher nicht.
wenns nicht mehr geht, pech gehabt. schade um deine tolle arbeit.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 Mai 2022, 12:03:24
Wenn tuya_cloud noch geht, dann muss es mit dem tuya lokal auch funktionieren. Sind ja die selben API Infos.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 01 Mai 2022, 12:45:39
Zitat von: dominik am 01 Mai 2022, 11:51:38

Du dürftest aber dennoch zu viele Parameter angegeben haben. Poste mal dein define und mach änder die Keys.



tuya SP112_RTL bfb727311ed41a0cc8ycsq 192.168.0.91 3.3 xxxxx xxxxx
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 Mai 2022, 14:10:00
Da fehlt ein Wert im Define. Wahrscheinlich product_id?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 01 Mai 2022, 14:31:58
Hallo Dominik,
vielen Dank für deine hervorragende Arbeit.
Mit "scan_devices" konnte ich fast alle meiner Devices anlegen.
1. Problem:
Obwohl ich alle Devices aus der Scan-Liste angelegt habe, erscheinen
einige Devices wieder nach dem Scan auf der Liste.
2. Problem:
Da im Scan die Device-Typen: Smoke Detector,  Water leak sensor und pir
nicht aufgeführt waren, habe ich diese manuell angelegt.
Leider kommt die Fehlermeldung:
Failed to connect to device
Auszug Log:
2022-05-01 14:26:11,678 - ERROR    - Bewegungsmelder_Tuya_bf728d260af2218b1b1gpk: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 383, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('xxx.xxx.xxx.92', 6668)


Kann es sein, dass diese Device-Typen für local nicht geeignet sind, da sie nicht ständig
online sind. Über die Cloud funktionieren die Device bestens.
Beste Grüße
Armin
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 Mai 2022, 20:58:47
Hi,
1.: Die Devices werden nach jedem Scan der Liste hinzugefügt, das passt so.

2.: Stimmt, an diese Devices habe ich noch gar nicht gedacht. Die funktionieren mit diesem Modul nicht, da sie nicht immer online sind.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 01 Mai 2022, 21:07:56
Hallo,
Danke für deine Info.
Wirst du noch diese Device-Typen aufnehmen?
Viele Grüße
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 Mai 2022, 21:10:53
Da gibt es leider bisher keine Möglichkeit. Die Devices gehen erst online wenn sie etwas senden. Vielleicht geht ein permanenter Connection Versuch.

Kannst du Mal ein Signal triggern damit es online geht und genau in der Zeit das define machen?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 02 Mai 2022, 10:47:23
Hallo,
wenn ich in einem Fenster einen trigger sende habe ich in einem
anderen Fenster für eine sehr kurze Zeit die Aktualisierung des state.
Anschließend kommt dann wieder die Meldung im state: Failed to connect to device
Für mich sieht es so aus, als ob das Device kurzzeitig auf online und dann wieder
offline geht. Verbose hatte ich auf 5. Es kommen keine neuen Einträge im Log.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 Mai 2022, 17:49:08
Bedeutet das, wenn du den Trigger machst, bekommst du kurz in FHEM eine Info? Was steht dann im state, oder gibt es sogar andere Readings?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 02 Mai 2022, 18:34:22
Wenn der Trigger ausgelöst wird, erscheint ganz kurz im state das Reading und im
LogFile kann man den state sehen.
2022-05-02_18:28:54 Wasserlecksensor_bfe0c3d5be1780ba831cmt Failed to connect to device
2022-05-02_18:29:07 Wasserlecksensor_bfe0c3d5be1780ba831cmt Failed to connect to device
2022-05-02_18:29:20 Wasserlecksensor_bfe0c3d5be1780ba831cmt Failed to connect to device
2022-05-02_18:29:33 Wasserlecksensor_bfe0c3d5be1780ba831cmt Failed to connect to device
2022-05-02_18:29:45 Wasserlecksensor_bfe0c3d5be1780ba831cmt alarm
2022-05-02_18:29:46 Wasserlecksensor_bfe0c3d5be1780ba831cmt Failed to connect to device
2022-05-02_18:29:59 Wasserlecksensor_bfe0c3d5be1780ba831cmt Failed to connect to device
2022-05-02_18:30:12 Wasserlecksensor_bfe0c3d5be1780ba831cmt Failed to connect to device
2022-05-02_18:30:25 Wasserlecksensor_bfe0c3d5be1780ba831cmt Failed to connect to device
2022-05-02_18:30:39 Wasserlecksensor_bfe0c3d5be1780ba831cmt Failed to connect to device
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 Mai 2022, 18:42:22
Oh, cool! Dann sollte es sogar implementierbar sein.

Kannst du mir die product id von dem Device nennen? Das Device in FHEM hat sonst keine weiteren Readings, nur state?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 02 Mai 2022, 21:49:45
Water leak sensor ->   product_id fiw6widv6xqjolsi

Es gibt noch das Reading: dp_04 -> battery_percentage
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 Mai 2022, 21:55:59
Kannst du mir bitte einen Screenshot der Readings Posten? Danke!
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 02 Mai 2022, 22:08:35
siehe Anlage
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 Mai 2022, 22:43:49
Probier bitte mit Version 0.1.305 ob das Signal jedes mal empfangen wird. Mit der Version wird 15s versucht die Verbindung aufzubauen und nur 1s bis zum nächsten Verbindungsversuch gewartet. Damit sollte jeder Trigger erkannt werden. Bin gespannt ob das klappt...

Lass dich nicht von der Fehlermeldung im state irritieren, diese wird weiterhin kommen, aber es sollte dann auch ganz kurz das "alarm" kommen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 03 Mai 2022, 08:33:05
Nach auslösen des Triggers wird für 1 Sekunde der Alarmzustand angezeigt.
Dann reloadet die Seite und zeigt die Einstiegseite an.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 03 Mai 2022, 08:37:03
Heißt das es funktioniert jetzt? Was meinst du mit Einstiegsseite?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 03 Mai 2022, 10:08:40
Nein, es funktioniert leider nicht.
Unter Einstiegsseite s. Anlage
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 03 Mai 2022, 14:59:26
Damit ich mir in der Analyse leichter tue, bitte noch um folgende Infos:
- das Auslösen des Triggers ist im Event Log nun jedesmal ersichtlich?
- im FHEM Device Reading wird der Alarm in State für 1s angezeigt?
- nach dem Alarm reloaded die FHEM Seite, das Device selbst existiert aber weiterhin und hat im Reading state den Connection Fehler drin?

Bitte um Rückmeldung zu den 3 Fragen. Danke
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 03 Mai 2022, 18:40:42
Im Event Log ist der Trigger immer ersichtlich, s. Anlage.
Im STATE wird Failed to connect to device angezeigt.
Im state wird für 1 s alarm angezeigt.
Nach dem Reload der FHEM Seite existiert das Device
weiterhin und im state steht der Connection Fehler.
2022-05-03 18:30:07.724 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation cmd_event: Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-03 18:30:07.735 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation wait_timer: 03.05.2022 18:30:08 cmd_1_2 Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-03 18:30:07.761 fhempy Wasserlecksensor_bfe0c3d5be1780ba831cmt alarm
2022-05-03 18:30:08.514 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation cmd_event: Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-03 18:30:08.530 fhempy Wasserlecksensor_bfe0c3d5be1780ba831cmt Failed to connect to device
2022-05-03 18:32:21.915 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation cmd_event: Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-03 18:32:21.926 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation wait_timer: 03.05.2022 18:32:22 cmd_1_2 Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-03 18:32:21.974 fhempy Wasserlecksensor_bfe0c3d5be1780ba831cmt alarm
2022-05-03 18:32:22.969 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation cmd_event: Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-03 18:32:22.979 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation wait_timer: 03.05.2022 18:32:23 cmd_1_3 Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-03 18:32:23.707 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation cmd_event: Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-03 18:32:23.726 fhempy Wasserlecksensor_bfe0c3d5be1780ba831cmt Failed to connect to device
2022-05-03 18:34:38.399 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation cmd_event: Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-03 18:34:38.412 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation wait_timer: 03.05.2022 18:34:39 cmd_1_2 Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-03 18:34:38.437 fhempy Wasserlecksensor_bfe0c3d5be1780ba831cmt alarm
2022-05-03 18:34:38.872 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation cmd_event: Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-03 18:34:38.889 fhempy Wasserlecksensor_bfe0c3d5be1780ba831cmt Failed to connect to device
2022-05-03 18:34:53.255 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation cmd_event: Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-03 18:34:53.266 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation wait_timer: 03.05.2022 18:34:54 cmd_1_2 Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-03 18:34:53.284 fhempy Wasserlecksensor_bfe0c3d5be1780ba831cmt alarm
2022-05-03 18:34:54.210 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation cmd_event: Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-03 18:34:54.224 fhempy Wasserlecksensor_bfe0c3d5be1780ba831cmt Failed to connect to device

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 03 Mai 2022, 22:17:32
Bitte mal mit der neuen Version ausprobieren und mir dann das Log posten. Danke!

Statt des Fehlers sollte nun offline stehen. Warum nach dem Alarm die Seite weg ist, ist mir noch komplett unklar, aber vielleicht hilft das Log aus der neuen Version weiter.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 04 Mai 2022, 14:48:35
Statt der Fehlermeldung steht jetzt offline.
Ansonsten halt sich nichts geändert.
EventMonitor
2022-05-04 14:19:42.382 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation cmd_event: Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-04 14:19:42.391 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation wait_timer: 04.05.2022 14:19:43 cmd_1_2 Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-04 14:19:42.423 fhempy Wasserlecksensor_bfe0c3d5be1780ba831cmt alarm
2022-05-04 14:19:43.473 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation cmd_event: Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-04 14:19:43.477 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation wait_timer: 04.05.2022 14:19:44 cmd_1_3 Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-04 14:19:44.296 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation cmd_event: Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-04 14:19:44.319 fhempy Wasserlecksensor_bfe0c3d5be1780ba831cmt offline
2022-05-04 14:27:31.711 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation cmd_event: Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-04 14:27:31.717 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation wait_timer: 04.05.2022 14:27:32 cmd_1_2 Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-04 14:27:31.741 fhempy Wasserlecksensor_bfe0c3d5be1780ba831cmt alarm
2022-05-04 14:27:32.729 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation cmd_event: Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-04 14:27:32.734 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation wait_timer: 04.05.2022 14:27:33 cmd_1_3 Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-04 14:27:33.765 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation cmd_event: Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-04 14:27:33.770 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation wait_timer: 04.05.2022 14:27:34 cmd_1_4 Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-04 14:27:34.164 DOIF DOIF_Warnung_Wasserleck_Warmwasserzirkulation cmd_event: Wasserlecksensor_bfe0c3d5be1780ba831cmt
2022-05-04 14:27:34.278 fhempy Wasserlecksensor_bfe0c3d5be1780ba831cmt offline

Device Log
2022-05-04_14:09:30 Wasserlecksensor_bfe0c3d5be1780ba831cmt offline
2022-05-04_14:13:15 Wasserlecksensor_bfe0c3d5be1780ba831cmt alarm
2022-05-04_14:13:17 Wasserlecksensor_bfe0c3d5be1780ba831cmt offline
2022-05-04_14:14:46 Wasserlecksensor_bfe0c3d5be1780ba831cmt alarm
2022-05-04_14:14:48 Wasserlecksensor_bfe0c3d5be1780ba831cmt offline
2022-05-04_14:15:36 Wasserlecksensor_bfe0c3d5be1780ba831cmt alarm
2022-05-04_14:15:37 Wasserlecksensor_bfe0c3d5be1780ba831cmt offline
2022-05-04_14:17:06 Wasserlecksensor_bfe0c3d5be1780ba831cmt alarm
2022-05-04_14:17:08 Wasserlecksensor_bfe0c3d5be1780ba831cmt offline
2022-05-04_14:19:42 Wasserlecksensor_bfe0c3d5be1780ba831cmt alarm
2022-05-04_14:19:44 Wasserlecksensor_bfe0c3d5be1780ba831cmt offline
2022-05-04_14:27:31 Wasserlecksensor_bfe0c3d5be1780ba831cmt alarm
2022-05-04_14:27:34 Wasserlecksensor_bfe0c3d5be1780ba831cmt offline

fhempy_log
2022-05-04 14:27:31,492 - ERROR    - Wasserlecksensor_bfe0c3d5be1780ba831cmt: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 383, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('xxx.xxx.xxx.xx', 6668)


Im Logfile gibt es nur zu dem DOIF einen Eintrag.
2022.05.04 14:27:32.724 2: DOIF_Warnung_Wasserleck_Warmwasserzirkulation: set Castdevice_OG.Badezimmer "Achtung, es gibt ein Leck in der Warmwasserzirkulation"
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 05 Mai 2022, 21:00:19
Hat das Device Attribute und welche Werte sind da hinterlegt? Bitte um Screenshot.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 05 Mai 2022, 21:05:51
Ein Update habe ich auch noch bereitgestellt, da sollte nun ein paar Readings mehr auftauchen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 05 Mai 2022, 21:48:06
Nach dem Neustart stand im Device state -> Initializing...
und blieb so stehen. Nach Auslösen des Triggers wurde
im state der richtige Status angezeigt und blieb auch erhalten.
Allerdings wurde die Seite nach dem Auslösen wieder reloadet.
Anbei der gewünschte Screenshot. Die angekündigten Mehr Readings
kamen aber nicht.
Ich denke, du bist kurz vor dem Ziel. Jedenfalls sieht es schon
sehr gut aus.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 05 Mai 2022, 22:05:54
Hmm...local_pybinding steht bei dir eh auf Version 0.1.307, oder? Wenn ja, kannst du bitte das Device löschen und nochmals anlegen? Bitte vor dem nochmaligen Anlegen fhempy restart machen. Mich wundert es nämlich, dass die weiteren Readings nicht da sind, die kommen nämlich von der Cloud und sollten vor dem Alarm bereits angezeigt werden.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 05 Mai 2022, 22:26:26
Oh ja, das sieht schon ganz anders aus
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 05 Mai 2022, 22:32:11
Das sieht schon besser aus :) was passiert nun wenn der Alarm kommt? Da sollten dann die Attribute generiert werden, schick mir bitte nach dem Alarm noch einen Screenshot.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 05 Mai 2022, 22:54:43
Sehr gerne
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 05 Mai 2022, 22:59:59
Bitte auch noch die Attribute.

Kommt es weiterhin noch zum "falschen Reload" der Seite beim Alarm?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 05 Mai 2022, 23:09:08
Kommt es weiterhin noch zum "falschen Reload" der Seite beim Alarm?
Ja
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 05 Mai 2022, 23:15:06
Im Log ist weiterhin nix zu sehen? fhem.log und fhempy.log?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 06 Mai 2022, 08:17:53
Nein, es gibt keine Eintragungen in den Logs.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 Mai 2022, 20:45:27
Bitte noch ein Test mit 0.1.308 ob da im fhempy Log etwas auftaucht wenn die Seite reloaded wird.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 06 Mai 2022, 21:45:28
Nach dem Update hatte ich die 309er Version.
Aber keinen Eintrag im fhempy Log.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 Mai 2022, 21:49:58
Spannend, das ist mir echt ein Rätsel.

Generell funktioniert es ja, nur die Seite wird reloaded, oder? Gibt es sonst noch irgendeinen anderen Fehler?

Ich habe bei Verwandten noch einen Tuya Rauchmelder installiert, ich werde mir diesen mal ausborgen und muss das selber im Debug Mode testen. Das kann aber noch paar Wochen dauern bis ich den Rauchmelder bei mir habe.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 07 Mai 2022, 10:29:54
Ja, es funktioniert erstmal. Danke für deine hervorragende Arbeit.
Wäre es noch möglich, Smoke Detector und pir jetzt schon
aufzunehmen?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 07 Mai 2022, 11:00:53
Die sollten auch schon funktionieren. Du musst die jedoch manuell anlegen, da die IP Adresse nicht erkannt werden kann nachdem sie nicht durchgehend online sind.

Ich werde noch eine Funktion beim setup Device einbauen, dass man auch "offline" Devices anlegen kann (set ... create_device) und dann später im Device die IP als Attribut hinterlegt.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 07 Mai 2022, 13:37:14
Vielen Dank für deine Info.
Ich werde es mal ausprobieren und das Ergebnis berichten.
Schönes Wochenende.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 08 Mai 2022, 18:40:55
Hallo Dominik,
habe gerade das erste Mal am Wassersensor einen Alarm provoziert.
In FHEM kommt leider nichts an und es gibt auch keine Log Einträge.
Auch im EventMonitor wird nichts angezeigt.
Löse ich den Alarm Trigger in FHEM aus, so funktioniert alles, wie
du es programmiert hast.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 08 Mai 2022, 19:23:50
Die IP Adresse passt sicher? Nach dem Anlegen mach bitte noch sicherheitshalber einen fhempy Restart.

Was meinst du mit dem Alarm aus FHEM?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 08 Mai 2022, 20:39:13
 fhempy Restart gemacht
IP Adresse ist richtig.
In der TUYA App bekomme ich auch eine Alarmmeldung.

ZitatWas meinst du mit dem Alarm aus FHEM?

Die Triggereingabe in der FHEM Komandozeile.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 08 Mai 2022, 21:15:48
Poste bitte einen Screenshot vom gesamten Device. Bitte nur APIKEY und APISECRET unkenntlich machen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 08 Mai 2022, 21:33:13
Bitte sehr
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 08 Mai 2022, 23:06:25
Kann es sein, dass du API KEY und API SECRET gar nicht im define angegeben hast?

Bitte mal alle Parameter wie hier beschrieben im define rein nehmen, auch die optionalen:
https://github.com/dominikkarall/fhempy/blob/master/FHEM/bindings/python/fhempy/lib/tuya/README.md#individual-device
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 08 Mai 2022, 23:07:39
Noch eine Frage, geht das Device gar nicht auf offline?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 09 Mai 2022, 13:24:58
Hallo Domonik,
Asche auf mein Haupt. Ich hatte eine falsche DEVICE_ID
in der Def. Es funktioniert so, wie es soll. Danke für den
Schubser. Der Bewegungsmelder funktioniert auch.
Den Rauchmelder muss ich noch testen.
BG
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 09 Mai 2022, 17:43:15
Super! Hast du da auch das Reload Problem?

Btw, ich habe das Setup Device umgestellt, du kannst nun auch offline Devices anlegen und später die IP im Device setzen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 09 Mai 2022, 22:18:07
ZitatSuper! Hast du da auch das Reload Problem?
unverändert
ZitatBtw, ich habe das Setup Device umgestellt, du kannst nun auch offline Devices anlegen und später die IP im Device setzen.
Funktioniert gut
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 09 Mai 2022, 22:23:05
Ok, das mit dem Reload werde ich dann mal mit dem Feuermelder testen sobald ich den bei mir hab.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 12 Mai 2022, 21:42:22
Hallo hab auch umgestellt
Wie sieht das mit den Magnetkontakten aus
bekomm hierbei keine aktualisieung
die bleiben immer offline
ne idee
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 12 Mai 2022, 22:34:14
Sind das Magnetkontakte die per WiFi ein Signal senden? Dann sollten sie genauso funktionieren. Prüfe sicherheitshalber die IP und DeviceID ob alles korrekt ist.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 12 Mai 2022, 22:38:35
Hallo Dominik,
seit update auf 335 habe ich im Device
local_pybinding
im Reading version update finished...please wait zu stehen
und es verändert sich nicht.
Ist das ein bug?
BG
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 12 Mai 2022, 23:21:41
Mach einfach einen fhempyserver_15733 restart.

Der Restart nach dem Update macht aktuell noch ein Problem.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 13 Mai 2022, 06:01:35
Zitat von: dominik am 12 Mai 2022, 22:34:14
Sind das Magnetkontakte die per WiFi ein Signal senden? Dann sollten sie genauso funktionieren. Prüfe sicherheitshalber die IP und DeviceID ob alles korrekt ist.

Ja sind WiFi von LSC device Id hab ich aber bekomme keine IP
da das senden ja nicht mal eine sekunde dauert
könnte man das irgendwie rausfinden?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 13 Mai 2022, 07:43:43
Die IP musst du selbst setzen, die kann fhempy leider nicht ausfindig machen, da das Device wirklich nur ganz kurz online ist.

Daher...am Router schauen welche IP das Device bekommen hat UND diese beim Router gleich als fixe IP einstellen. Diese trägst du dann im define des Devices ein.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 15 Mai 2022, 07:00:09
Hab ich gemacht, kommt aber keine reaktion auch im eventmonitor nicht.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Moonraker1 am 24 Mai 2022, 20:28:23
Hallo Dominik,

ich habe heute erfolgreich meine Pool-Wärmepumpe (Smart-Life App steuerbar) mit fhempy lokal in FHEM eingebunden.
Eine Sache klappt aber noch nicht ganz: Ich kann über das angelegte fhem-device die beiden auch in den Attributen aufgeführten Modi "cool" und "heating" anwählen.
Die WP hat aber noch einen dritten Modus, nämlich Leise. Dieser wird (wenn ich ihn über die Smartlife App einstelle) auch in den FHEM readings unter mode als "mute" angezeigt, also offensichtlich vom Modul auch korrekt ausgelesen.
Jedoch unter den "set"-Parametern werden nur "cool" und "heating" als Wahlmöglichkeiten angezeigt.
Eine manuelle Ergänzung der Attribute "tuya_spec_functions" und "tuya_spec_status" brachte leider keinerlei Erfolg.

Wie lässt sich das Problem lösen?

-- Ergänzung: ich hatte soeben noch die Idee über die fhem-Kommandozeile 'set #devicename# mode mute' einzugeben, das hat geklappt!!

liegt also anscheinend nur an der "set" Listendefinition irgendwo in einem der fhem-Module, aber in welchem..???

vielen Dank schon mal für Hilfe
Olli


edit: Das Thema hat sich durch abwarten von selbst gelöst. Inzwischen ist auch der Wert "mute" im "set" device Listenfeld aufgetaucht --> klappt alles bestens.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 Juni 2022, 22:05:54
Hi,

super, dass es klappt :)

Zur Info, wenn du bei den Attributen etwas änderst, musst du das Device nochmals initialisieren. Das geht am schnellsten durch einen fhempy Restart oder nochmaliges Setzen des IODev. Daher hat es wahrscheinlich nicht gleich geklappt.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 04 Juni 2022, 21:58:39
Hallo Dominik,
jedes mal, wenn ich local_pybinding restart mache, geht der local_pybinding auf disconnected und
der Python server geht auf offline. Erst ein shutdown restart sartet den Python server wieder.
Ist das noch ein Bug oder mache ich etwas falsch?
Auszug aus dem Log
2022.06.04 21:53:07.404 1: BindingsIo (local_pybinding): ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2022.06.04 21:53:17.445 1: BindingsIo (local_pybinding): ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2022.06.04 21:53:27.480 1: BindingsIo (local_pybinding): ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2022.06.04 21:53:37.519 1: BindingsIo (local_pybinding): ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2022.06.04 21:53:47.547 1: BindingsIo (local_pybinding): ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2022.06.04 21:53:57.590 1: BindingsIo (local_pybinding): ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 04 Juni 2022, 22:19:59
Poste bitte auch noch das fhempy Log beim Restart.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 04 Juni 2022, 22:52:36
Bitte sehr
2022-06-04 22:42:51,633 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2022-06-04 22:42:51,765 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2022-06-04 22:42:51,767 - INFO     - websockets.server: server closing
2022-06-04 22:43:01,777 - ERROR    - fhempy.lib.fhem: Connection closed, can't send message.
2022-06-04 22:43:01,777 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 166, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 186, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 332, in handle_function
    await self.sendBackReturn(hash, ret)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 110, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 930, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-04 22:43:01,777 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message(id: 8286308)
2022-06-04 22:43:01,778 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"function":"Set","msgtype":"function","defargsh":{},"PYTHONTYPE":"tuya","NAME":"Air_conditioner_33051602e09806002e71","args":["Air_conditioner_33051602e09806002e71","?"],"id":"8286308","defargs":["Air_conditioner_33051602e09806002e71","fhempy","tuya","hw50w7qvxluhslkk","33051602e09806002e71","192.168.178.75","d286d82bcff59bc1","3.3","fq83awrvav6glwxl28ed","59327720c0834b8d8d4bc010f9b9a072"],"argsh":{}}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 144, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 169, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 121, in sendBackError
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-04 22:43:01,778 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 166, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 186, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 332, in handle_function
    await self.sendBackReturn(hash, ret)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 110, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 930, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-04 22:43:01,779 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message(id: 34544046)
2022-06-04 22:43:01,779 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"argsh":{},"defargs":["Badezimmervorhang_83652817a4e57c966383","fhempy","tuya","t6ief6k56sapz1ey","83652817a4e57c966383","192.168.178.101","448e956ebc228af8","3.3","fq83awrvav6glwxl28ed","59327720c0834b8d8d4bc010f9b9a072"],"id":"34544046","PYTHONTYPE":"tuya","NAME":"Badezimmervorhang_83652817a4e57c966383","args":["Badezimmervorhang_83652817a4e57c966383","?"],"defargsh":{},"function":"Set","msgtype":"function"}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 144, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 169, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 121, in sendBackError
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-04 22:43:01,780 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 166, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 186, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 332, in handle_function
    await self.sendBackReturn(hash, ret)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 110, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 930, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-04 22:43:01,780 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message(id: 49209709)
2022-06-04 22:43:01,780 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"id":"49209709","defargs":["Garderobenlicht_67600068c44f33f54a31","fhempy","tuya","pxphdeyqak8mxld4","67600068c44f33f54a31","192.168.178.81","a15bde2385777214","3.3","fq83awrvav6glwxl28ed","59327720c0834b8d8d4bc010f9b9a072"],"argsh":{},"msgtype":"function","function":"Set","defargsh":{},"args":["Garderobenlicht_67600068c44f33f54a31","?"],"NAME":"Garderobenlicht_67600068c44f33f54a31","PYTHONTYPE":"tuya"}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 144, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 169, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 121, in sendBackError
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-04 22:43:01,781 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 166, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 186, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 332, in handle_function
    await self.sendBackReturn(hash, ret)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 110, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 930, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-04 22:43:01,781 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message(id: 1898266)
2022-06-04 22:43:01,782 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"argsh":{},"defargs":["Fritzphone_Ladeschale_SZ_bfc0100ce21d5d7715kbjp","fhempy","tuya","qexu7r2qg0i3bm9g","bfc0100ce21d5d7715kbjp","192.168.178.69","c7375d0348ded912","3.3","fq83awrvav6glwxl28ed","59327720c0834b8d8d4bc010f9b9a072"],"id":"1898266","PYTHONTYPE":"tuya","args":["Fritzphone_Ladeschale_SZ_bfc0100ce21d5d7715kbjp","?"],"NAME":"Fritzphone_Ladeschale_SZ_bfc0100ce21d5d7715kbjp","defargsh":{},"function":"Set","msgtype":"function"}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 144, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 169, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 121, in sendBackError
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-04 22:43:01,782 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _w
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 10 Juni 2022, 18:38:20
Hallo Dominik,
da das Problem weiterhin besteht wollte ich nachfragen,
ob du schon Zeit hattest, dich mit dem Problem zu beschäftigen.
Beste Grüße
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 10 Juni 2022, 22:46:58
Hi,

kannst du mir bitte das weitere Log posten? Ich glaube es ist abgeschnitten.
Es scheint so, als ob nach dem shutdown noch immer Messages von FHEM rein kommen, obwohl die Websocket Connection schon geschlossen ist. Kann sein, dass da noch Messages nachverarbeitet werden. Bitte daher zumindest ein paar Sekunden mehr vom Log.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 11 Juni 2022, 21:20:49
Hi,
sorry, hat etwas gedauert. Habe gerade es nochmals versucht.
Anbei das Log.OSError: [Errno 113] Connect call failed ('192.168.178.85', 6668)
2022-06-11 21:07:06,290 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2022-06-11 21:07:06,296 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2022-06-11 21:07:08,969 - ERROR    - Bewegungsmelder_Tuya_bf728d260af2218b1b1gpk: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 384, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.92', 6668)
2022-06-11 21:07:08,984 - ERROR    - Ladestation_Saugroboter_EG_bf4e3f442e327a1baav18i: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 384, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.80', 6668)
2022-06-11 21:07:08,990 - ERROR    - Rauchmelder_AZ_00812426e8db84b82551: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 384, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.86', 6668)
2022-06-11 21:07:09,208 - ERROR    - Wasserlecksensor_bfe0c3d5be1780ba831cmt: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 384, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.85', 6668)
2022-06-11 21:07:12,071 - ERROR    - Ladestation_Saugroboter_EG_bf4e3f442e327a1baav18i: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 384, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.80', 6668)
2022-06-11 21:07:12,072 - ERROR    - Rauchmelder_AZ_00812426e8db84b82551: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 384, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.86', 6668)
2022-06-11 21:07:12,082 - ERROR    - Bewegungsmelder_Tuya_bf728d260af2218b1b1gpk: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 384, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.92', 6668)
2022-06-11 21:07:12,650 - ERROR    - Wasserlecksensor_bfe0c3d5be1780ba831cmt: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 384, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.85', 6668)
2022-06-11 21:07:13,475 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2022-06-11 21:07:13,520 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2022-06-11 21:07:13,725 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2022-06-11 21:07:13,732 - INFO     - websockets.server: server closing
2022-06-11 21:07:23,747 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 166, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 186, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 332, in handle_function
    await self.sendBackReturn(hash, ret)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 110, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 930, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-11 21:07:23,748 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message(id: 70302647)
2022-06-11 21:07:23,748 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"defargs":["Air_conditioner_33051602e09806002e71","fhempy","tuya","hw50w7qvxluhslkk","33051602e09806002e71","192.168.178.75","d286d82bcff59bc1","3.3","fq83awrvav6glwxl28ed","59327720c0834b8d8d4bc010f9b9a072"],"defargsh":{},"PYTHONTYPE":"tuya","function":"Set","argsh":{},"msgtype":"function","NAME":"Air_conditioner_33051602e09806002e71","id":"70302647","args":["Air_conditioner_33051602e09806002e71","?"]}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 144, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 169, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 121, in sendBackError
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-11 21:07:23,749 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 166, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 186, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 332, in handle_function
    await self.sendBackReturn(hash, ret)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 110, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 930, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-11 21:07:23,749 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message(id: 60558836)
2022-06-11 21:07:23,749 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"id":"60558836","args":["Badezimmervorhang_83652817a4e57c966383","?"],"function":"Set","PYTHONTYPE":"tuya","argsh":{},"defargsh":{},"defargs":["Badezimmervorhang_83652817a4e57c966383","fhempy","tuya","t6ief6k56sapz1ey","83652817a4e57c966383","192.168.178.101","448e956ebc228af8","3.3","fq83awrvav6glwxl28ed","59327720c0834b8d8d4bc010f9b9a072"],"msgtype":"function","NAME":"Badezimmervorhang_83652817a4e57c966383"}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 144, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 169, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 121, in sendBackError
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-11 21:07:23,750 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 166, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 186, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 332, in handle_function
    await self.sendBackReturn(hash, ret)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 110, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 930, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-11 21:07:23,751 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message(id: 31296897)
2022-06-11 21:07:23,751 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"defargs":["Castdevice_Dachboden_Ueberwachung_38237338a4e57cb3ebca","fhempy","tuya","paq3mq0gnaf7s1tc","38237338a4e57cb3ebca","192.168.178.109","a84276fc0235282f","3.3","fq83awrvav6glwxl28ed","59327720c0834b8d8d4bc010f9b9a072"],"defargsh":{},"argsh":{},"PYTHONTYPE":"tuya","function":"Set","NAME":"Castdevice_Dachboden_Ueberwachung_38237338a4e57cb3ebca","msgtype":"function","id":"31296897","args":["Castdevice_Dachboden_Ueberwachung_38237338a4e57cb3ebca","?"]}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 144, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 169, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 121, in sendBackError
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-11 21:07:23,752 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 166, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 186, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 332, in handle_function
    await self.sendBackReturn(hash, ret)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 110, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 930, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-11 21:07:23,752 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message(id: 877006)
2022-06-11 21:07:23,752 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"args":["Fritzphone_Ladeschale_SZ_bfc0100ce21d5d7715kbjp","?"],"id":"877006","NAME":"Fritzphone_Ladeschale_SZ_bfc0100ce21d5d7715kbjp","msgtype":"function","defargs":["Fritzphone_Ladeschale_SZ_bfc0100ce21d5d7715kbjp","fhempy","tuya","qexu7r2qg0i3bm9g","bfc0100ce21d5d7715kbjp","192.168.178.69","c7375d0348ded912","3.3","fq83awrvav6glwxl28ed","59327720c0834b8d8d4bc010f9b9a072"],"defargsh":{},"argsh":{},"PYTHONTYPE":"tuya","function":"Set"}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 144, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 169, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 121, in sendBackError
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-11 21:07:23,753 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 166, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 186, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 332, in handle_function
    await self.sendBackReturn(hash, ret)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 110, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 930, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-11 21:07:23,753 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message(id: 48201288)
2022-06-11 21:07:23,754 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"id":"48201288","args":["Garderobenlicht_67600068c44f33f54a31","?"],"defargsh":{},"defargs":["Garderobenlicht_67600068c44f33f54a31","fhempy","tuya","pxphdeyqak8mxld4","67600068c44f33f54a31","192.168.178.81","a15bde2385777214","3.3","fq83awrvav6glwxl28ed","59327720c0834b8d8d4bc010f9b9a072"],"argsh":{},"PYTHONTYPE":"tuya","function":"Set","NAME":"Garderobenlicht_67600068c44f33f54a31","msgtype":"function"}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 144, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 169, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 121, in sendBackError
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-11 21:07:23,757 - INFO     - websockets.server: connection closed
2022-06-11 21:07:23,757 - INFO     - websockets.server: server closed
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 11 Juni 2022, 22:51:39
Hmm...server closed passt eigentlich. Exit 1 sollte aber auch noch dort stehen.
Läuft der Prozess danach noch? Mach danach mal ein "ps -efa|grep fhempy" auf der Linux Console.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 12 Juni 2022, 07:58:42
Guten Morgen,
Zitatps -efa|grep fhempy
Hier die Ausgabe:
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 12 Juni 2022, 09:08:25
Welche Version verwendest du aktuell?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 12 Juni 2022, 10:06:41
Angezeigt wird immer: version update finished...please wait, s. Anlage.
Ich bin mir sicher, dass ich die Version 0.1.362 habe.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 12 Juni 2022, 10:12:27
Mach mal set fhempyserver_15733 restart
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 12 Juni 2022, 10:16:38
Es hat sich nichts verändert
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 12 Juni 2022, 10:21:04
Bitte das fhempy Log dazu posten
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 12 Juni 2022, 10:22:36
Muss mich korrigieren, siehe Anlage.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 12 Juni 2022, 10:30:24
Wenn ich ein set local_pybinding update mache, ist das alte Problem wieder da.
Ein  set fhempyserver_15733 restart hilft und es läuft wieder.

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 12 Juni 2022, 10:35:47
Drück jetzt auf Update bei fhempy und poste das Log ab diesen Zeitpunkt. Dann auch ein ps -efa|grep fhempy und dann noch ein ps -efa|grep PID wobei PID die Nummer aus dem grep fhempy ist.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 12 Juni 2022, 11:15:38
Hier das Log:
2022-06-12 10:51:38,274 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2022-06-12 10:51:38,278 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2022-06-12 10:51:38,940 - ERROR    - Rauchmelder_AZ_00812426e8db84b82551: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 384, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.86', 6668)
2022-06-12 10:51:38,956 - ERROR    - Ladestation_Saugroboter_EG_bf4e3f442e327a1baav18i: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 384, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.80', 6668)
2022-06-12 10:51:39,133 - ERROR    - Wasserlecksensor_bfe0c3d5be1780ba831cmt: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 384, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.85', 6668)
2022-06-12 10:51:39,875 - ERROR    - Bewegungsmelder_Tuya_bf728d260af2218b1b1gpk: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 384, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.92', 6668)
2022-06-12 10:51:41,516 - ERROR    - Ladestation_Saugroboter_EG_bf4e3f442e327a1baav18i: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 384, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.80', 6668)
2022-06-12 10:51:41,520 - ERROR    - Rauchmelder_AZ_00812426e8db84b82551: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 384, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.86', 6668)
2022-06-12 10:51:41,874 - ERROR    - Wasserlecksensor_bfe0c3d5be1780ba831cmt: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 384, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.85', 6668)
2022-06-12 10:51:42,632 - ERROR    - Bewegungsmelder_Tuya_bf728d260af2218b1b1gpk: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 384, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 669, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.92', 6668)
2022-06-12 10:51:43,221 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2022-06-12 10:51:43,244 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2022-06-12 10:51:43,396 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2022-06-12 10:51:43,399 - INFO     - websockets.server: server closing
2022-06-12 10:51:53,412 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 166, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 186, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 332, in handle_function
    await self.sendBackReturn(hash, ret)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 110, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 930, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-12 10:51:53,413 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message(id: 17710557)
2022-06-12 10:51:53,413 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"argsh":{},"PYTHONTYPE":"tuya","NAME":"Air_conditioner_33051602e09806002e71","function":"Set","defargsh":{},"id":"17710557","defargs":["Air_conditioner_33051602e09806002e71","fhempy","tuya","hw50w7qvxluhslkk","33051602e09806002e71","192.168.178.75","d286d82bcff59bc1","3.3","fq83awrvav6glwxl28ed","59327720c0834b8d8d4bc010f9b9a072"],"msgtype":"function","args":["Air_conditioner_33051602e09806002e71","?"]}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 144, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 169, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 121, in sendBackError
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-12 10:51:53,414 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 166, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 186, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 332, in handle_function
    await self.sendBackReturn(hash, ret)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 110, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 930, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-12 10:51:53,417 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message(id: 11794353)
2022-06-12 10:51:53,419 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"NAME":"Badezimmervorhang_83652817a4e57c966383","function":"Set","PYTHONTYPE":"tuya","argsh":{},"id":"11794353","defargsh":{},"defargs":["Badezimmervorhang_83652817a4e57c966383","fhempy","tuya","t6ief6k56sapz1ey","83652817a4e57c966383","192.168.178.101","448e956ebc228af8","3.3","fq83awrvav6glwxl28ed","59327720c0834b8d8d4bc010f9b9a072"],"msgtype":"function","args":["Badezimmervorhang_83652817a4e57c966383","?"]}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 144, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 169, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 121, in sendBackError
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-12 10:51:53,419 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 166, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 186, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 332, in handle_function
    await self.sendBackReturn(hash, ret)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 110, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 930, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-12 10:51:53,420 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message(id: 38297861)
2022-06-12 10:51:53,420 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"args":["Castdevice_Dachboden_Ueberwachung_38237338a4e57cb3ebca","?"],"msgtype":"function","defargs":["Castdevice_Dachboden_Ueberwachung_38237338a4e57cb3ebca","fhempy","tuya","paq3mq0gnaf7s1tc","38237338a4e57cb3ebca","192.168.178.109","a84276fc0235282f","3.3","fq83awrvav6glwxl28ed","59327720c0834b8d8d4bc010f9b9a072"],"id":"38297861","defargsh":{},"argsh":{},"PYTHONTYPE":"tuya","function":"Set","NAME":"Castdevice_Dachboden_Ueberwachung_38237338a4e57cb3ebca"}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 144, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 169, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 121, in sendBackError
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-12 10:51:53,421 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 166, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 186, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 332, in handle_function
    await self.sendBackReturn(hash, ret)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 110, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 930, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-12 10:51:53,421 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message(id: 74702197)
2022-06-12 10:51:53,422 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"defargsh":{},"id":"74702197","argsh":{},"PYTHONTYPE":"tuya","NAME":"Emma_bf623c4459370bd192tywm","function":"Set","args":["Emma_bf623c4459370bd192tywm","?"],"msgtype":"function","defargs":["Emma_bf623c4459370bd192tywm","fhempy","tuya","smignajbaljjp2wa","bf623c4459370bd192tywm","192.168.178.89","bc09bdd536d6f7f6","3.3","fq83awrvav6glwxl28ed","59327720c0834b8d8d4bc010f9b9a072"]}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 144, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 169, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 121, in sendBackError
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-12 10:51:53,423 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 166, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 186, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 332, in handle_function
    await self.sendBackReturn(hash, ret)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 110, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 930, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-12 10:51:53,423 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message(id: 23952104)
2022-06-12 10:51:53,424 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"args":["Fritzphone_Ladeschale_SZ_bfc0100ce21d5d7715kbjp","?"],"defargs":["Fritzphone_Ladeschale_SZ_bfc0100ce21d5d7715kbjp","fhempy","tuya","qexu7r2qg0i3bm9g","bfc0100ce21d5d7715kbjp","192.168.178.69","c7375d0348ded912","3.3","fq83awrvav6glwxl28ed","59327720c0834b8d8d4bc010f9b9a072"],"msgtype":"function","id":"23952104","defargsh":{},"argsh":{},"PYTHONTYPE":"tuya","function":"Set","NAME":"Fritzphone_Ladeschale_SZ_bfc0100ce21d5d7715kbjp"}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 144, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 169, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 121, in sendBackError
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-06-12 10:51:53,427 - INFO     - websockets.server: connection closed
2022-06-12 10:51:53,427 - INFO     - websockets.server: server closed

Und dann
ZitatDann auch ein ps -efa|grep fhempy und dann noch ein ps -efa|grep PID wobei PID die Nummer aus dem grep fhempy ist.
Titel: Antw:fhempy: tuya (lokal) - probleme bei FHEM Update
Beitrag von: thburkhart am 23 Juni 2022, 08:50:04
hallo,
seit ein paar Tagen gelingt ein FHEM-Update bzgl. pythonbinding
nicht mehr:

2022.06.22 18:42:43 1 : Downloading https://raw.githubusercontent.com/dominikkarall/fhempy/master/controls_pythonbinding.txt
2022.06.22 18:42:43 1 :
2022.06.22 18:42:43 1 : pythonbinding
2022.06.22 18:42:43 1 : UPD FHEM/10_PythonModule.pm
2022.06.22 18:42:43 1 : UPD FHEM/10_fhempyServer.pm
2022.06.22 18:42:44 1 : saving fhem.cfg
2022.06.22 18:42:44 1 : saving ./log/fhem2.save
2022.06.22 18:42:44 1 :
2022.06.22 18:42:44 1 : New entries in the CHANGED file:
2022.06.22 18:42:44 1 : See https://github.com/dominikkarall/fhempy/releases for details
2022.06.22 18:42:44 1 : Calling /usr/bin/perl ./contrib/commandref_modular.pl, this may take a while
2022.06.22 18:42:44 1 :
2022.06.22 18:42:44 1 : update finished, "shutdown restart" is needed to activate the changes.
2022-06-22 18:42:44 Global global UPDATE
2022.06.22 18:42:58 1 : BindingsIo (local_pybinding): ERROR JSON: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "\x{3}\x{ef}\x{bf}\x{bd}") at /usr/local/share/perl/5.32.1/JSON.pm line 190.
2022.06.22 18:42:58 1 : BindingsIo (local_pybinding): received JSON was:  �
2022.06.22 18:43:08 1 : ws:127.0.0.1:15733 disconnected, waiting to reappear (local_pybinding)
2022.06.22 18:43:08 1 : BindingsIo (local_pybinding): ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2022.06.22 18:43:21 1 : PERL WARNING: Deep recursion on subroutine "main::CallFn" at fhem.pl line 3970.
2022.06.22 18:43:21 1 : PERL WARNING: Deep recursion on subroutine "main::CallFn" at fhem.pl line 1947.
2022.06.22 18:43:25 1 : ws:127.0.0.1:15733 reappeared (local_pybinding)
2022.06.22 18:43:46 1 : PERL WARNING: Deep recursion on subroutine "main::readingsEndUpdate" at (eval 553488) line 1.
2022.06.22 18:43:46 1 : PERL WARNING: Use of uninitialized value in string eq at (eval 553491) line 1.
2022.06.22 18:43:48 1 : PERL WARNING: Use of uninitialized value in string eq at (eval 553700) line 1.
2022.06.22 18:43:54 1 : PERL WARNING: Use of uninitialized value in string eq at (eval 554655) line 1.



woran könnte das liegen

Beste Grüße

Thomas
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 29 Juni 2022, 14:47:30
Was passiert nach einem shutdown Restart oder nur fhempy Restart? Bitte auch fhempy Log posten.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Wasserwerk33 am 29 Juni 2022, 22:15:47
Hallo Leute,
vielleicht ist es ja eine doofe Frage. Aber benötige ich diese Programme zusätzlich?? Also die die Oben stehen??

Hatte es nämlich erst mit der Cloud Probiert aber die wollte nicht so ganz Funktoniren. Jetzt weiß ich nicht genau ob die noch benötige oder nicht. 

Danke für eure Hilfe.

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 29 Juni 2022, 23:01:01
Ne, du musst nix extra installieren. Sieht bei dir schon ganz gut aus, musst nur noch bei dem einem Device das Define anpassen. Statt offline schreibst du die IP an der Stelle rein.

Da die anderen Devices offline anzeigen, stell bitte sicher, dass die IPs fix bleiben.
Titel: Antw:fhempy: tuya (lokal) - probleme bei FHEM Update
Beitrag von: thburkhart am 30 Juni 2022, 12:27:04
Zitat von: thburkhart am 23 Juni 2022, 08:50:04
hallo,
seit ein paar Tagen gelingt ein FHEM-Update bzgl. pythonbinding
nicht mehr:

2022.06.22 18:42:43 1 : Downloading https://raw.githubusercontent.com/dominikkarall/fhempy/master/controls_pythonbinding.txt
2022.06.22 18:42:43 1 :
2022.06.22 18:42:43 1 : pythonbinding
2022.06.22 18:42:43 1 : UPD FHEM/10_PythonModule.pm
2022.06.22 18:42:43 1 : UPD FHEM/10_fhempyServer.pm
2022.06.22 18:42:44 1 : saving fhem.cfg
2022.06.22 18:42:44 1 : saving ./log/fhem2.save
2022.06.22 18:42:44 1 :
2022.06.22 18:42:44 1 : New entries in the CHANGED file:
2022.06.22 18:42:44 1 : See https://github.com/dominikkarall/fhempy/releases for details
2022.06.22 18:42:44 1 : Calling /usr/bin/perl ./contrib/commandref_modular.pl, this may take a while
2022.06.22 18:42:44 1 :
2022.06.22 18:42:44 1 : update finished, "shutdown restart" is needed to activate the changes.
2022-06-22 18:42:44 Global global UPDATE
2022.06.22 18:42:58 1 : BindingsIo (local_pybinding): ERROR JSON: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "\x{3}\x{ef}\x{bf}\x{bd}") at /usr/local/share/perl/5.32.1/JSON.pm line 190.
2022.06.22 18:42:58 1 : BindingsIo (local_pybinding): received JSON was:  �
2022.06.22 18:43:08 1 : ws:127.0.0.1:15733 disconnected, waiting to reappear (local_pybinding)
2022.06.22 18:43:08 1 : BindingsIo (local_pybinding): ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2022.06.22 18:43:21 1 : PERL WARNING: Deep recursion on subroutine "main::CallFn" at fhem.pl line 3970.
2022.06.22 18:43:21 1 : PERL WARNING: Deep recursion on subroutine "main::CallFn" at fhem.pl line 1947.
2022.06.22 18:43:25 1 : ws:127.0.0.1:15733 reappeared (local_pybinding)
2022.06.22 18:43:46 1 : PERL WARNING: Deep recursion on subroutine "main::readingsEndUpdate" at (eval 553488) line 1.
2022.06.22 18:43:46 1 : PERL WARNING: Use of uninitialized value in string eq at (eval 553491) line 1.
2022.06.22 18:43:48 1 : PERL WARNING: Use of uninitialized value in string eq at (eval 553700) line 1.
2022.06.22 18:43:54 1 : PERL WARNING: Use of uninitialized value in string eq at (eval 554655) line 1.



woran könnte das liegen

Beste Grüße

Thomas


hallo domikik,

kannst du dir das erklären ?

Herzliche Grüße

Thomas
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 30 Juni 2022, 14:01:45
Zitat von: dominik am 29 Juni 2022, 14:47:30
Was passiert nach einem shutdown Restart oder nur fhempy Restart? Bitte auch fhempy Log posten.

Das war an dich gerichtet :)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 10 Juli 2022, 17:40:50
Bin gerade dabei einen Wandthermostat für eine Fussbodenheizung (BEOK TOL47WIFI ) einzubinden.
Soweit funktioniert alles erst einmal lokal - vielen Dank für das coole Modul.

Meine Fragen sind:

1. Gibt es für die Devices so etwas wie eine setList wie bei MQTT Devices?
2. Das genericDeviceType ist thermostat, wie definiere ich desired-temp= ...
3. Wie sieht das RhasspyMapping für die Sprachsteuerung aus?
Das folgende geh jedenfalls nicht ...
SetOnOff:cmdOn=on,cmdOff=off
GetOnOff:currentVal=switch,valueOff=off
SetNumeric:currentVal=temp_set,cmd=temp_set,minVal=4.5,maxVal=29.5,step=0.5,type=Temperatur
GetNumeric:currentVal=temp_set,part=0,type=temp_set


VG Denis
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 12 Juli 2022, 20:10:54
In letzter Zeit vermehrt keine zustandsänderung nach absetzen der Befehle. Entweder cloudprobleme,  oder doch fhempy?
bin ich allein?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 12 Juli 2022, 20:44:55
Zitat von: denis.robel am 10 Juli 2022, 17:40:50
Bin gerade dabei einen Wandthermostat für eine Fussbodenheizung (BEOK TOL47WIFI ) einzubinden.
Soweit funktioniert alles erst einmal lokal - vielen Dank für das coole Modul.

Meine Fragen sind:

1. Gibt es für die Devices so etwas wie eine setList wie bei MQTT Devices?
2. Das genericDeviceType ist thermostat, wie definiere ich desired-temp= ...
3. Wie sieht das RhasspyMapping für die Sprachsteuerung aus?
Das folgende geh jedenfalls nicht ...
SetOnOff:cmdOn=on,cmdOff=off
GetOnOff:currentVal=switch,valueOff=off
SetNumeric:currentVal=temp_set,cmd=temp_set,minVal=4.5,maxVal=29.5,step=0.5,type=Temperatur
GetNumeric:currentVal=temp_set,part=0,type=temp_set


VG Denis
1. setList gibt es nicht, da alles automatisch erstellt wird
2., 3.: Bitte im entsprechenden Sprachassistent Thread nachfragen wie es eingestellt werden muss.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 12 Juli 2022, 20:46:33
Zitat von: satprofi am 12 Juli 2022, 20:10:54
In letzter Zeit vermehrt keine zustandsänderung nach absetzen der Befehle. Entweder cloudprobleme,  oder doch fhempy?
bin ich allein?

Mit dem lokalen Modul geht nur die Initialisierung über die Cloud, der Rest läuft komplett lokal. Mit dem Cloud Modul habe ich oft (fast immer) das Problem, dass die Zustandsänderungen nicht ankommen...leider...das liegt aber an Tuya.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 13 Juli 2022, 08:49:07
tuya local läuft bei mur leider nicht. scgaffe es nicht, auf bullseye
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 13 Juli 2022, 15:36:12
Was für einen Fehler bekommst du mit TuYa local?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 14 Juli 2022, 11:30:34
Scan klappt nicht.
Tuya_System ist angelegt,  device Manuel hinzugefügt auch ok. Nur Scan findet keine weiteren Geräte mehr.
das manuell angelegte device ist komischerweise als tuya_cloud gelistet.
versteh das ganze nicht.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 14 Juli 2022, 17:14:19
Poste Mal das manuell angelegte Device bitte.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 14 Juli 2022, 18:15:01


Internals:
   API_KEY   
   API_SECRET
   DEF        tuya setup jxxxxxxx ccexxxxxxxxxx Gang_oben_bfb727311ed41a0cc8ycsq
   DEVICEID   0
   FHEMPYTYPE tuya
   FUUID      626e3fab-f33f-6462-c95c-8eb14102c2232e33
   IODev      local_pybinding
   NAME       tuya_system
   NR         517
   PYTHONTYPE tuya
   REGION     eu
   STATE      ready
   TYPE       fhempy
   READINGS:
     2022-06-06 12:19:19   state           ready
   args:
     tuya_system
     fhempy
     tuya
     setup
     jxxxxxx
     ccxxxxxxx
     Gang_oben_bfb727311ed41a0cc8ycsq
   argsh:
Attributes:
   group      tuya
   room       CUL_fhempy

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 14 Juli 2022, 19:27:38
wenn du auf scan drückst, kommt dann zumindest kurz die Info wie viele Devices gefunden wurden?

Bitte auch noch das manuell angelegte Device posten.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 15 Juli 2022, 07:14:19
das ist ja das manuelle. weil beim scan wird nichts gefunden.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 15 Juli 2022, 16:20:15
Bitte deine keys oben noch entfernen.

Wenn du auf Scan drückst, passiert nix beim State? Weil da sollte zuerst die Meldung kommen wie viele Devices in der Cloud gefunden wurden. Wenn das nicht der Fall ist, prüfe bitte nochmals Id und key.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 15 Juli 2022, 16:26:40
Achja, noch eine Frage, in der TuYa Cloud wenn du dich einloggst siehst du die Geräte im Projekt gelistet?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 16 Juli 2022, 08:54:41
ja, alle. sogar "online"
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 16 Juli 2022, 08:55:33
Zitat von: dominik am 15 Juli 2022, 16:20:15
Bitte deine keys oben noch entfernen.

Wenn du auf Scan drückst, passiert nix beim State? Weil da sollte zuerst die Meldung kommen wie viele Devices in der Cloud gefunden wurden. Wenn das nicht der Fall ist, prüfe bitte nochmals Id und key.

richtig, nichts passiert
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 16 Juli 2022, 10:16:01
Zitat von: dominik am 15 Juli 2022, 16:26:40
Achja, noch eine Frage, in der TuYa Cloud wenn du dich einloggst siehst du die Geräte im Projekt gelistet?
?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 16 Juli 2022, 10:59:37
...und der letzte Parameter darf nicht der Devicename sein, sonder die Device ID.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 16 Juli 2022, 11:25:05
Zitat von: dominik am 16 Juli 2022, 10:59:37
...und der letzte Parameter darf nicht der Devicename sein, sonder die Device ID.

Toll, jetzt ist auch das weg nach scandevice.........
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 16 Juli 2022, 11:27:51
Verstehe ich nicht ganz was du damit meinst? Bitte ein bisschen mehr Infos.
Wenn's für dich ok ist, kannst du mir per PN den Developer Login von der TuYa Plattform schicken, dann schau ich mir das an. Ich denke so kommen wir am schnellsten zum Ziel.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 16 Juli 2022, 13:12:03
du hast PN. Vielleicht klappts ja bei dir.

Ich habe die device id angegeben, und nach dem scan ist jetzt das device verschwunden in fhem.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 16 Juli 2022, 13:19:14
Hallo!
Gute neuigkeiten. Habe jetzt tuya_system gelöscht, neu angelegt, und siehe da er findet jetzt 3 von 5 devices!
wie das denn?

jetzt muss ich die devices nur mehr in fhem finden......
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 16 Juli 2022, 13:37:00
Jetzt nur mehr create_device machen. Die automatische Anlage der Devices habe ich deaktiviert, da manche ziemlich viele Devices haben aber nicht alle anlegen wollen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 16 Juli 2022, 13:44:55
Zitat von: dominik am 16 Juli 2022, 13:37:00
Jetzt nur mehr create_device machen. Die automatische Anlage der Devices habe ich deaktiviert, da manche ziemlich viele Devices haben aber nicht alle anlegen wollen.

ja, mach ich, aber nur 1 wird angelegt. der rest nicht. was jetzt wieder schuld?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 16 Juli 2022, 13:48:28
Was passiert bei den anderen wenn du create_device machst? Log?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 16 Juli 2022, 14:07:02
Zitat von: dominik am 16 Juli 2022, 13:48:28
Was passiert bei den anderen wenn du create_device machst? Log?

nix ! das fhem_log wirft mir nur diese zeilen aus, verbose 5


2022.07.16 14:04:33 4: BindingsIo (local_pybinding): start fhempyFunction: tuya_system => Set (70542736)
2022.07.16 14:04:33 4: BindingsIo (local_pybinding): <<< WS: {"function":"Set","FHEMPYTYPE":"tuya","NAME":"tuya_system","defargs":["tuya_system","fhempy","tuya","setup","jusdyxxxxxxxxx","cce6628xxxxxxxxxxxxx","bfb727311ed41a0cc8ycsq"],"id":"70542736","defargsh":{},"argsh":{},"msgtype":"function","args":["tuya_system","?"],"PYTHONTYPE":"tuya"}
2022.07.16 14:04:33 5: DevIo_SimpleWrite local_pybinding: 7b2266756e6374696f6e223a22536574222c224648454d505954595045223a2274757961222c224e414d45223a22747579615f73797374656d222c2264656661726773223a5b22747579615f73797374656d222c226668656d7079222c2274757961222c227365747570222c226a75736479336e76626134377234763163347376222c226363653636323832383666663432383961373863333735333263653562626564222c2262666237323733313165643431613063633879637371225d2c226964223a223730353432373336222c226465666172677368223a7b7d2c226172677368223a7b7d2c226d736774797065223a2266756e6374696f6e222c2261726773223a5b22747579615f73797374656d222c223f225d2c22505954484f4e54595045223a2274757961227d
2022.07.16 14:04:33 5: BindingsIo (local_pybinding): DevIo_SimpleRead
2022.07.16 14:04:33 5: BindingsIo (local_pybinding): DevIo_SimpleRead WithTimeout
2022.07.16 14:04:33 5: BindingsIo (local_pybinding): QUEUE: start handling - 0
2022.07.16 14:04:33 5: BindingsIo (local_pybinding): QUEUE: finished handling - 0
2022.07.16 14:04:33 5: BindingsIo (local_pybinding): DevIo_SimpleRead
2022.07.16 14:04:33 5: BindingsIo (local_pybinding): DevIo_SimpleRead WithTimeout
2022.07.16 14:04:33 4: BindingsIo (local_pybinding): >>> WS: {"function": "Set", "FHEMPYTYPE": "tuya", "NAME": "tuya_system", "defargs": ["tuya_system", "fhempy", "tuya", "setup", "jusdy3xxxxxxx", "cce6628286ff4289xxxxxxx", "bfb727311ed41a0cc8ycsq"], "id": "70542736", "defargsh": {}, "argsh": {}, "msgtype": "function", "args": ["tuya_system", "?"], "PYTHONTYPE": "tuya", "finished": 1, "returnval": "Unknown argument ?, choose one of scan_devices:noArg create_device:Wohnzimmer_bffee61d5656c19f0e6zas,Gang_oben_bfb727311ed41a0cc8ycsq,AWOW+32.8ft_WIFI__music_RGB_light_strip_bf7d89a7f6cc66b9adaufh,Smart_Digital_LED_Strip_bf66cd5d458b7a1f03to3k,Socket_4_bf50219899eabfb485synp"}
2022.07.16 14:04:33 5: BindingsIo (local_pybinding): QUEUE: start handling - 1
2022.07.16 14:04:33 5: processMessage: {"function": "Set", "FHEMPYTYPE": "tuya", "NAME": "tuya_system", "defargs": ["tuya_system", "fhempy", "tuya", "setup", "jusdy3nvbxxxxxx", "cce6628286xxxxxx", "bfb727311ed41a0cc8ycsq"], "id": "70542736", "defargsh": {}, "argsh": {}, "msgtype": "function", "args": ["tuya_system", "?"], "PYTHONTYPE": "tuya", "finished": 1, "returnval": "Unknown argument ?, choose one of scan_devices:noArg create_device:Wohnzimmer_bffee61d5656c19f0e6zas,Gang_oben_bfb727311ed41a0cc8ycsq,AWOW+32.8ft_WIFI__music_RGB_light_strip_bf7d89a7f6cc66b9adaufh,Smart_Digital_LED_Strip_bf66cd5d458b7a1f03to3k,Socket_4_bf50219899eabfb485synp"}
2022.07.16 14:04:33 5: BindingsIo (local_pybinding): QUEUE: finished handling - 0
2022.07.16 14:04:33 4: BindingsIo (local_pybinding): end fhempyFunction: tuya_system => Set (70542736) - result: Unknown argument ?, choose one of scan_devices:noArg create_device:Wohnzimmer_bffee61d5656c19f0e6zas,Gang_oben_bfb727311ed41a0cc8ycsq,AWOW+32.8ft_WIFI__music_RGB_light_strip_bf7d89a7f6cc66b9adaufh,Smart_Digital_LED_Strip_bf66cd5d458b7a1f03to3k,Socket_4_bf50219899eabfb485synp
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 16 Juli 2022, 14:15:46
habe es nochmals probiert, und es sieht so aus das nur das 1. in der liste aus cloud angelegt wird. habe das angelegte gelöscht, und anderes versucht anzulegen, klappt nicht. nur das 1. in der liste legt sich immer neu an
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 16 Juli 2022, 14:18:45
Bitte fhempy Log nach dem create_device vom 2. Device posten.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 16 Juli 2022, 14:27:23
hallo.
fehler gefunden. musste alle über die tuya_cloud angelegten devices löschen, erst danach konnte ich die neuen createn.
auf das musst erst kommen. danke für deine geduld.
lg
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 16 Juli 2022, 14:33:56
Ah, ja, weil es ist der selbe Devicename. Kann ich noch schauen ob ich da eine Fehlermeldung generieren kann.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Wasserwerk33 am 20 Juli 2022, 10:40:07
Hallo Leute,

habe immer eine server Stopped. Was habe ich falsch gemacht??

defmod tuya_system fhempy tuya setup  mk8mcxngauhxxxxxxx 9f6688f13d27480cbdf7axxxxxxxx 32804800bcddc2xxxxx
                                                            (Access ID/Client ID:)   (Access Secret/Client Secret:)      (smartlife Geräte ID:)

Das müsste doch so richtig sein oder??

und der schreibt immer running und Springt dann wieder in stopped:
(fhempyserver_15733)

Habe ich was vergessen??

Danke für eure Hilfe.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 29 Juli 2022, 12:23:24
schalter schalten wie wild.
in fhem gerade gesehen

Failed to execute function Define: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 169, in _new_conn conn = connection.create_connection( File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 73, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -3] Temporary failure in name resolution During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1012, in _validate_conn conn.connect() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 353, in connect conn = self._new_conn() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 181, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno -3] Temporary failure in name resolution During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/fhem/.local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 574, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openapi.tuyaeu.com', port=443): Max retries exceeded with url: /v1.0/token?grant_type=1 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 307, in handle_function ret = await self.execute_function(hash, fhem_reply_done, nmInstance) File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 378, in execute_function ret = await asyncio.wait_for( File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for return fut.result() File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 85, in Define await self.setup_cloud() File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 93, in setup_cloud self.tuya_cloud = await utils.run_blocking( File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 34, in run_blocking return await asyncio.get_event_loop().run_in_executor(pool, function) File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/opt/fhem/.local/lib/python3.9/site-packages/tinytuya/__init__.py", line 1890, in __init__ self.token = self._gettoken() File "/opt/fhem/.local/lib/python3.9/site-packages/tinytuya/__init__.py", line 1995, in _gettoken response_dict = self._tuyaplatform('token?grant_type=1') File "/opt/fhem/.local/lib/python3.9/site-packages/tinytuya/__init__.py", line 1956, in _tuyaplatform response = requests.get(url, headers=headers) File "/opt/fhem/.local/lib/python3.9/site-packages/requests/api.py", line 75, in get return request('get', url, params=params, **kwargs) File "/opt/fhem/.local/lib/python3.9/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/opt/fhem/.local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "/opt/fhem/.local/lib/python3.9/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "/opt/fhem/.local/lib/python3.9/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openapi.tuyaeu.com', port=443): Max retries exceeded with url: /v1.0/token?grant_type=1 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 31 Juli 2022, 10:34:30
Hallo.
habe hier einen Smartmeter eingebunden, der mir dieses reading liefert

phase_a

{"electricCurrent":3.12,"power":0.749,"voltage":238.8}

Wie bekomme ich die einzelnen Werte als eigenes reading?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: JF Mennedy am 01 August 2022, 10:00:59

Zitat von: satprofi am 31 Juli 2022, 10:34:30
Hallo.
habe hier einen Smartmeter eingebunden, der mir dieses reading liefert

phase_a

{"electricCurrent":3.12,"power":0.749,"voltage":238.8}

Wie bekomme ich die einzelnen Werte als eigenes reading?
Userreadings und split function
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 01 August 2022, 15:08:38
hmmm, wo finde ich tips bitte?
split?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 August 2022, 22:27:26
Zitat von: Wasserwerk33 am 20 Juli 2022, 10:40:07
Hallo Leute,

habe immer eine server Stopped. Was habe ich falsch gemacht??

defmod tuya_system fhempy tuya setup  mk8mcxngauhxxxxxxx 9f6688f13d27480cbdf7axxxxxxxx 32804800bcddc2xxxxx
                                                            (Access ID/Client ID:)   (Access Secret/Client Secret:)      (smartlife Geräte ID:)

Das müsste doch so richtig sein oder??

und der schreibt immer running und Springt dann wieder in stopped:
(fhempyserver_15733)

Habe ich was vergessen??

Danke für eure Hilfe.

Poste bitte das fhempy Log, dort sollte der Fehler ersichtlich sein.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 August 2022, 22:28:53
Zitat von: satprofi am 29 Juli 2022, 12:23:24
schalter schalten wie wild.
in fhem gerade gesehen

Failed to execute function Define: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 169, in _new_conn conn = connection.create_connection( File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 73, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -3] Temporary failure in name resolution During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1012, in _validate_conn conn.connect() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 353, in connect conn = self._new_conn() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 181, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno -3] Temporary failure in name resolution During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/fhem/.local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 574, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openapi.tuyaeu.com', port=443): Max retries exceeded with url: /v1.0/token?grant_type=1 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 307, in handle_function ret = await self.execute_function(hash, fhem_reply_done, nmInstance) File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 378, in execute_function ret = await asyncio.wait_for( File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for return fut.result() File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 85, in Define await self.setup_cloud() File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 93, in setup_cloud self.tuya_cloud = await utils.run_blocking( File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 34, in run_blocking return await asyncio.get_event_loop().run_in_executor(pool, function) File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/opt/fhem/.local/lib/python3.9/site-packages/tinytuya/__init__.py", line 1890, in __init__ self.token = self._gettoken() File "/opt/fhem/.local/lib/python3.9/site-packages/tinytuya/__init__.py", line 1995, in _gettoken response_dict = self._tuyaplatform('token?grant_type=1') File "/opt/fhem/.local/lib/python3.9/site-packages/tinytuya/__init__.py", line 1956, in _tuyaplatform response = requests.get(url, headers=headers) File "/opt/fhem/.local/lib/python3.9/site-packages/requests/api.py", line 75, in get return request('get', url, params=params, **kwargs) File "/opt/fhem/.local/lib/python3.9/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/opt/fhem/.local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "/opt/fhem/.local/lib/python3.9/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "/opt/fhem/.local/lib/python3.9/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openapi.tuyaeu.com', port=443): Max retries exceeded with url: /v1.0/token?grant_type=1 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

Netzwerkfehler zu dem Zeitpunkt? [Errno -3] Temporary failure in name resolution klingt danach.

Tritt der Fehler noch immer auf?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 August 2022, 22:31:15
Zitat von: satprofi am 31 Juli 2022, 10:34:30
Hallo.
habe hier einen Smartmeter eingebunden, der mir dieses reading liefert

phase_a

{"electricCurrent":3.12,"power":0.749,"voltage":238.8}

Wie bekomme ich die einzelnen Werte als eigenes reading?

Kannst du mir bitte einen Screenshot vom gesamten Device aus FHEM posten? Bitte API SECRET im Screenshot entfernen. Vielleicht kann ich das generell implementieren, dass Objekte immer aufgeteilt werden. Z.B. phase_a_electricCurrent, phase_a_power, usw.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 05 August 2022, 08:39:31
bitte sehr, vielleicht kannst was damit anfangen

DEF        tuya nqxxxxxxxx bf812d9f66xxxxxxx 192.168.178.58 fe77b7xxxxxx 3.3 tfwt7ksmxxxxxxxx b82406cf399c471xxxxxxx
   DEVICEID   bf812d9f66c2xxxxxx
   FHEMPYTYPE tuya
   FUUID      62e56e0c-f33f-e87c-3d60-4dd71820063cbd4a
   IODev      local_pybinding
   NAME       GroWatt_bf812d9f66c2fbeec4uqbe
   NR         261
   PYTHONTYPE tuya
   STATE      {"electricCurrent":0.91,"power":0.059,"voltage":237.0}
   TYPE       fhempy
   OLDREADINGS:
   READINGS:
     2022-07-30 19:44:46   active_time     1659191115
     2022-08-05 08:35:56   alarm_set_2     [{"alarmCode":"overcurrent","doAction":false,"threshold":"60"},{"alarmCode":"ammeter_overvoltage","doAction":false,"threshold":"245"},{"alarmCode":"under_voltage","doAction":false,"threshold":"180"},{"alarmCode":"insufficient_balance","doAction":false,"threshold":"30"}]
     2022-08-05 08:35:56   balance_energy  0.0
     2022-07-30 19:44:46   biz_type        18
     2022-07-30 19:44:46   category        zndb
     2022-08-05 08:35:56   charge_energy   0.0
     2022-08-05 08:35:56   clear_energy    off
     2022-07-30 19:44:46   create_time     1659104955
     2022-08-05 08:35:56   dp_06           CUIAA44AADs=
     2022-07-30 22:08:43   dp_17           AQAAPAMAAPUEAAC0CAAAHg==
     2022-07-31 14:35:18   electricCurrent 4
     2022-08-05 08:35:56   event_clear     off
     2022-08-05 08:35:56   fault           0
     2022-07-31 14:03:12   forward_energie_total 655
     2022-08-05 08:35:56   forward_energy_total 20.97
     2022-07-30 19:44:46   icon            smart/icon/ay1536897190133VVeLx/32346148448dd9829abb97ce317c5e82.png
     2022-07-30 19:44:46   id              bf812d9f66c2fbexxxxxx
     2022-07-30 19:44:46   ip              178.18.xxx.xxx
     2022-07-30 19:44:46   lat             47.x
     2022-07-30 19:44:46   local_key       fe77b794exxxxxx
     2022-07-30 19:44:46   lon             16.x
     2022-07-30 19:44:46   name            GroWatt
     2022-07-30 19:44:46   online          1
     2022-07-30 19:44:46   owner_id        3080xxxx
     2022-08-05 08:35:56   phase_a         {"electricCurrent":0.91,"power":0.059,"voltage":237.0}
     2022-07-30 19:44:46   product_id      nqbs1onwskmmmaac
     2022-07-30 19:44:46   product_name    wifi smart meter
     2022-08-05 08:35:56   state           on
     2022-07-30 19:44:46   sub             0
     2022-07-30 19:44:47   switch          on
     2022-08-05 08:35:56   switch_prepayment off
     2022-07-30 19:44:46   time_zone       +02:00
     2022-07-30 19:44:46   uid             eu1621020001749bDAT5
     2022-07-30 19:44:46   update_time     1659202197
     2022-07-30 19:44:46   uuid            08063f8792db1b9a
   args:
     GroWatt_bf812d9f66c2fbeec4uqbe
     fhempy
     tuya
     nqbs1onwxxxxx
     bf812d9f66c2fxxxxx
     192.168.178.58
     fe77b794xxxxxx
     3.3
     tfwt7ksmbaxxxxxxx
     b82406cf399c47138dxxxxxxx
   argsh:
Attributes:
   dp_01      forward_energy_total
   dp_10      fault
   dp_12      switch_prepayment
   dp_13      balance_energy
   dp_16      switch
   group      tuya
   room       Heizraum,fhempy
   stateFormat phase_a
   tuya_spec_functions [{'code': 'switch_prepayment', 'dp_id': 12, 'type': 'Boolean', 'values': '{}', 'desc': 'switch prepayment'}, {'code': 'clear_energy', 'dp_id': 14, 'type': 'Boolean', 'values': '{}', 'desc': 'clear energy'}, {'code': 'charge_energy', 'dp_id': 15, 'type': 'Integer', 'values': '{"unit":"kW·h","min":0,"max":50000,"scale":0,"step":1}', 'desc': 'charge energy'}, {'code': 'switch', 'dp_id': 16, 'type': 'Boolean', 'values': '{}', 'desc': 'switch'}, {'code': 'alarm_set_2', 'dp_id': 17, 'type': 'Json', 'values': '{}', 'desc': 'alarm set 2'}, {'code': 'event_clear', 'dp_id': 20, 'type': 'Boolean', 'values': '{}', 'desc': 'event clear'}]
   tuya_spec_status [{'code': 'forward_energy_total', 'dp_id': 1, 'type': 'Integer', 'values': '{"unit":"kW·h","min":0,"max":99999999,"scale":2,"step":1}'}, {'code': 'phase_a', 'dp_id': 6, 'type': 'Json', 'values': '{}'}, {'code': 'fault', 'dp_id': 10, 'type': 'Bitmap', 'values': '{"label":["ov_cr","unbalance_alarm","ov_vol","undervoltage_alarm","miss_phase_alarm","outage_alarm","magnetism_alarm","terminal_alarm","cover_alarm","credit_alarm","no_balance_alarm","battery_alarm","meter_hardware_alarm"]}'}, {'code': 'switch_prepayment', 'dp_id': 12, 'type': 'Boolean', 'values': '{}'}, {'code': 'balance_energy', 'dp_id': 13, 'type': 'Integer', 'values': '{"unit":"kW·h","min":0,"max":99999999,"scale":2,"step":1}'}, {'code': 'clear_energy', 'dp_id': 14, 'type': 'Boolean', 'values': '{}'}, {'code': 'charge_energy', 'dp_id': 15, 'type': 'Integer', 'values': '{"unit":"kW·h","min":0,"max":50000,"scale":0,"step":1}'}, {'code': 'switch', 'dp_id': 16, 'type': 'Boolean', 'values': '{}'}, {'code': 'alarm_set_2', 'dp_id': 17, 'type': 'Json', 'values': '{}'}, {'code': 'event_clear', 'dp_id': 20, 'type': 'Boolean', 'values': '{}'}]
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 05 August 2022, 20:16:15
Das ist ja eigenartig, es gibt gar kein Attribut dp_06=phase_a und trotzdem wird der Wert von phase_a aktualisiert?
Ich schau mir das mal an, ich könnte immer wenn type=Json ist die Werte aufdröseln.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 05 August 2022, 20:59:34
Bitte mit 0.1.386 testen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 06 August 2022, 08:19:43
Zitat von: dominik am 05 August 2022, 20:59:34
Bitte mit 0.1.386 testen.

jetzt wird phase_a nicht mehr aktualisiert :-(

und nach neuscan der devices und anlegen neu von growatt, jetzt keine readings mehr ........

nach neustart des fhmpy servers readings vorhanden, aber keine energiewerte mehr :-( :-(
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 August 2022, 09:44:22
Poste mir bitte nochmals ein list vom Device und mach danach einen fhempy Restart.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 06 August 2022, 09:51:31

Internals:
   CFGFN     
   DEF        tuya nqbs1onwskmxxxx bf812d9f66c2fbeecxxxx 192.168.178.58 fe77b794ef5xxxxx 3.3 tfwt7ksmba4zih1xxxxx b82406cf399c471xxxxxx
   DEVICEID   bf812d9f66c2fbeecxxxxx
   FHEMPYTYPE tuya
   FUUID      62ee19ce-f33f-e87c-c80b-7796c55f2da8ac2e
   IODev      local_pybinding
   NAME       GroWatt
   NR         24841
   PYTHONTYPE tuya
   STATE      online
   TYPE       fhempy
   READINGS:
     2022-08-06 09:39:15   active_time     1659191115
     2022-08-06 09:39:18   balance_energy  0.0
     2022-08-06 09:39:15   biz_type        18
     2022-08-06 09:39:15   category        zndb
     2022-08-06 09:39:15   create_time     1659104955
     2022-08-06 09:49:13   dp_06           CT8ABsIAAZo=
     2022-08-06 09:39:18   fault           0
     2022-08-06 09:41:55   forward_energie_total 655
     2022-08-06 09:49:12   forward_energy_total 26.03
     2022-08-06 09:39:15   icon            smart/icon/ay1536897190133VVeLx/32346148448dd9829abb97ce317c5e82.png
     2022-08-06 09:39:15   id              bf812d9fxxxxxx
     2022-08-06 09:39:15   ip              178.18.162.109
     2022-08-06 09:39:15   lat             47.8506
     2022-08-06 09:39:15   local_key       fe77b794exxxxx
     2022-08-06 09:39:15   lon             16.6159
     2022-08-06 09:39:15   name            GroWatt
     2022-08-06 09:39:15   online          1
     2022-08-06 09:39:15   owner_id        30806176
     2022-08-06 09:47:20   phase_a         6
     2022-08-06 09:39:15   product_id      nqbs1onwskmmmaac
     2022-08-06 09:39:15   product_name    wifi smart meter
     2022-08-06 09:39:18   state           online
     2022-08-06 09:39:15   sub             0
     2022-08-06 09:39:18   switch          on
     2022-08-06 09:39:18   switch_prepayment off
     2022-08-06 09:39:15   time_zone       +02:00
     2022-08-06 09:39:15   uid             eu1621020001749bDAT5
     2022-08-06 09:39:15   update_time     1659202197
     2022-08-06 09:39:15   uuid            08063f8792db1b9a
   args:
     GroWatt
     fhempy
     tuya
     nqbs1onwskmmmaac
     bf812d9f66c2xxxxx
     192.168.178.58
     fe77b794ef5xxxxx
     3.3
     tfwt7ksmba4zixxxxxxx
     b82406cf399c47138dxxxxxxxxx
   argsh:
Attributes:
   alias      GroWatt
   dp_01      forward_energy_total
   dp_10      fault
   dp_12      switch_prepayment
   dp_13      balance_energy
   dp_16      switch
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'switch_prepayment', 'dp_id': 12, 'type': 'Boolean', 'values': '{}', 'desc': 'switch prepayment'}, {'code': 'clear_energy', 'dp_id': 14, 'type': 'Boolean', 'values': '{}', 'desc': 'clear energy'}, {'code': 'charge_energy', 'dp_id': 15, 'type': 'Integer', 'values': '{"unit":"kW·h","min":0,"max":50000,"scale":0,"step":1}', 'desc': 'charge energy'}, {'code': 'switch', 'dp_id': 16, 'type': 'Boolean', 'values': '{}', 'desc': 'switch'}, {'code': 'alarm_set_2', 'dp_id': 17, 'type': 'Json', 'values': '{}', 'desc': 'alarm set 2'}, {'code': 'event_clear', 'dp_id': 20, 'type': 'Boolean', 'values': '{}', 'desc': 'event clear'}]
   tuya_spec_status [{'code': 'forward_energy_total', 'dp_id': 1, 'type': 'Integer', 'values': '{"unit":"kW·h","min":0,"max":99999999,"scale":2,"step":1}'}, {'code': 'phase_a', 'dp_id': 6, 'type': 'Json', 'values': '{}'}, {'code': 'fault', 'dp_id': 10, 'type': 'Bitmap', 'values': '{"label":["ov_cr","unbalance_alarm","ov_vol","undervoltage_alarm","miss_phase_alarm","outage_alarm","magnetism_alarm","terminal_alarm","cover_alarm","credit_alarm","no_balance_alarm","battery_alarm","meter_hardware_alarm"]}'}, {'code': 'switch_prepayment', 'dp_id': 12, 'type': 'Boolean', 'values': '{}'}, {'code': 'balance_energy', 'dp_id': 13, 'type': 'Integer', 'values': '{"unit":"kW·h","min":0,"max":99999999,"scale":2,"step":1}'}, {'code': 'clear_energy', 'dp_id': 14, 'type': 'Boolean', 'values': '{}'}, {'code': 'charge_energy', 'dp_id': 15, 'type': 'Integer', 'values': '{"unit":"kW·h","min":0,"max":50000,"scale":0,"step":1}'}, {'code': 'switch', 'dp_id': 16, 'type': 'Boolean', 'values': '{}'}, {'code': 'alarm_set_2', 'dp_id': 17, 'type': 'Json', 'values': '{}'}, {'code': 'event_clear', 'dp_id': 20, 'type': 'Boolean', 'values': '{}'}]
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 August 2022, 10:31:37
Schau bitte mal im fhempy Log ob Fehler vorliegen und poste mir diese bitte.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 06 August 2022, 11:22:55
meinst das?


empy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-08-06 10:05:04,806 - WARNING  - GroWatt_bf812d9f66c2fbeec4uqbe: dp_06 in spec but not found locally. This should be reported to TuYa
2022-08-06 10:05:04,905 - WARNING  - GroWatt_bf812d9f66c2fbeec4uqbe: dp_14 in spec but not found locally. This should be reported to TuYa
2022-08-06 10:05:04,928 - WARNING  - GroWatt_bf812d9f66c2fbeec4uqbe: dp_15 in spec but not found locally. This should be reported to TuYa
2022-08-06 10:05:04,970 - WARNING  - GroWatt_bf812d9f66c2fbeec4uqbe: dp_17 in spec but not found locally. This should be reported to TuYa
2022-08-06 10:05:04,991 - WARNING  - GroWatt_bf812d9f66c2fbeec4uqbe: dp_20 in spec but not found locally. This should be reported to TuYa
2022-08-06 10:05:05,030 - WARNING  - GroWatt_bf812d9f66c2fbeec4uqbe: dp_14 in spec but not found locally. This should be reported to TuYa
2022-08-06 10:05:05,051 - WARNING  - GroWatt_bf812d9f66c2fbeec4uqbe: dp_15 in spec but not found locally. This should be reported to TuYa
2022-08-06 10:05:05,061 - WARNING  - Velux_Socket_bfe4369aa3daab28e1r83q: dp_17 in spec but not found locally. This should be reported to TuYa
2022-08-06 10:05:05,091 - WARNING  - GroWatt_bf812d9f66c2fbeec4uqbe: dp_17 in spec but not found locally. This should be reported to TuYa
2022-08-06 10:05:05,123 - WARNING  - GroWatt_bf812d9f66c2fbeec4uqbe: dp_20 in spec but not found locally. This should be reported to TuYa
2022-08-06 10:05:05,709 - ERROR    - tuya_cloud_connector: Please activate OpenPulsar: https://developer.tuya.com/en/docs/iot/subscribe-mq?id=Kavqcrvckbh9h
2022-08-06 10:05:06,337 - ERROR    - Smart_Bulb_2_bf1e761f9250ba6bd0jemt: 'result'
Traceback (most recent call last):
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 August 2022, 12:41:50
Ja, genau. Geht das Log noch weiter? Auch das Traceback zur Smart_Bubl wäre noch interessant, da dort ein Fehler mit "result" aufgetreten ist.

Sehe ich richtig, dass phase_a jetzt den Wert 6 bekommen hat?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 August 2022, 12:49:02
Ich vermute folgendes:
Du hattest vorher das Device über tuya_cloud im Einsatz. Daher wurde es noch über tuya_cloud aktualisiert, obwohl es schon über tuya (local) angelegt wurde.
Der Wert den du über tuya local bekommst ist:
     2022-08-06 09:49:13   dp_06           CT8ABsIAAZo=
Da sind die Werte drin "verborgen". Schau bitte ob sich dp_06 aktualisiert. Wenn ja, müssen wir die Werte dort dekodieren.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 August 2022, 12:52:43
Wenn sich der Wert ändert, schick mir bitte mehrer (ca. 5) dp_06 Wert und poste die zugehören Werte aus der App, damit ich weiß welcher Wert sich dahinter befinden sollte.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 August 2022, 13:15:38
python3 convert.py CT8ABsIAAZo=
0000 1001 0011 1111 0000 0000 0000 0110 1100 0010 0000 0000 0000 0001 1001 1010 0011 1101

1001 0011 1111 = 236,7 Volt
0110 1100 0010 = 1.730 Ampere
0001 1001 1010 = 410 Watt

Das kommt ziemlich gut hin, weil 236.7 * 1.730 ergibt ca. 410 Watt.

Das Problem ist nun nur mehr, dass das ganze Device spezifisch ist. D.h. ich muss es wahrscheinlich anhand der Device Category (zndb) festlegen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 06 August 2022, 13:31:28
Zitat von: dominik am 06 August 2022, 12:41:50
Ja, genau. Geht das Log noch weiter? Auch das Traceback zur Smart_Bubl wäre noch interessant, da dort ein Fehler mit "result" aufgetreten ist.

Sehe ich richtig, dass phase_a jetzt den Wert 6 bekommen hat?

phase_a  hab ich manuel kurz angelegt.
die smart bulb is offline, deshalb fehler.  habe den smartmeter nie in der cloud, ausser über die app.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 06 August 2022, 13:34:57
Zitat von: dominik am 06 August 2022, 13:15:38
python3 convert.py CT8ABsIAAZo=
0000 1001 0011 1111 0000 0000 0000 0110 1100 0010 0000 0000 0000 0001 1001 1010 0011 1101

1001 0011 1111 = 236,7 Volt
0110 1100 0010 = 1.730 Ampere
0001 1001 1010 = 410 Watt

Das kommt ziemlich gut hin, weil 236.7 * 1.730 ergibt ca. 410 Watt.

Das Problem ist nun nur mehr, dass das ganze Device spezifisch ist. D.h. ich muss es wahrscheinlich anhand der Device Category (zndb) festlegen.

soweit war ich auch schon,  nur den binärcode wusste ich nicht aufzubröseln.
kann man nicht ein userreading mit deinem convert anlegen?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 August 2022, 13:47:28
Können ja, aber das wird lang. Ich baue den Converter mal für das dir Device Category ein, dann kannst du testen. Hast du nur eine Phase, oder mehrere?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 06 August 2022, 13:52:48
1 phase
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Konfusius am 06 August 2022, 19:10:05
Das selbe Problem habe ich auch gerade, witzig...

Was für ein Format ist diese Zeichenkette eigentlich, die hier dekodiert wird?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 August 2022, 19:14:19
Jeder Buchstabe sind 6 Bit.
A=000000
Man muss also jeden Buchstaben in Bit umwandeln und danach die Bytes bilden.
Aus AB wird
000000 000001
=> 0000 0000 0001
=> 0x0 0x0 0x1

Wie viele Bytes zusammen einen Wert bilden muss man dann einfach ausprobieren.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 August 2022, 20:47:15
Bitte Version 387 testen, ist in ein paar Minuten online.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Konfusius am 06 August 2022, 21:22:33
Update gemacht, muss ich das Device löschen und neu anlegen lassen?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 August 2022, 21:41:50
Nein, nur fhempy Neustart
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Konfusius am 06 August 2022, 21:49:53
Bei mir sieht es aus wie vorher. Immer noch das dp_06 Reading mit Zeichenkette.
Was ist geändert worden?
Mein Device ist identisch wie das vom satprofi, natürlich andere IDs, logisch
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 August 2022, 21:54:22
Devices mit Category zndb sollten beim dp_id = 6 auf das richtige Format konvertiert werden und
phase_a_voltage
phase_a_power
phase_a_current
als Reading angezeigt werden.

Poste bitte dein list (API Keys loeschen) und schau bitte im fhempy Log ob Fehler vorliegen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Konfusius am 06 August 2022, 21:58:21
ja gern, Type ist zndb, keine Errors im Logfile
fhempy log ? Finde ich auch bei Everything nicht?
FHEMPYTYPE tuya
   FUUID      62ee69ca-f33f-e8a0-7cbc-7e0b9b1d196b29fd
   IODev      pyBinding
   NAME       SmartMeter
   NR         36
   PYTHONTYPE tuya
   STATE      1:on
2:online
   TYPE       fhempy
   eventCount 6
   READINGS:
     2022-08-06 21:26:49   active_time     1659786729
     2022-08-06 21:26:50   balance_energy  0.0
     2022-08-06 21:26:49   biz_type        18
     2022-08-06 21:26:49   category        zndb
     2022-08-06 21:26:49   create_time     1657902594
     2022-08-06 21:56:20   dp_06           CTgAAIwAABA=
     2022-08-06 21:26:50   fault           0
     2022-08-06 21:27:48   forward_energy_total 2.97
     2022-08-06 21:26:49   icon            smart/icon/ay1536897190133VVeLx/32346148448dd9829abb97ce317c5e82.png
     2022-08-06 21:26:49   id              bf5e65db3d968xxxxxx
     2022-08-06 21:26:49   ip              79.140.124.172
     2022-08-06 21:26:49   lat             52.3021
     2022-08-06 21:26:49   local_key       4682e6f9063b6557
     2022-08-06 21:26:49   lon             13.3815
     2022-08-06 21:26:49   name            WLAN-Smart-Meter
     2022-08-06 21:26:49   online          1
     2022-08-06 21:26:49   owner_id        61284962
     2022-08-06 21:26:49   product_id      nqbs1onwsxxxxxxx
     2022-08-06 21:26:49   product_name    wifi smart meter
     2022-08-06 21:43:40   state           online
     2022-08-06 21:26:49   sub             0
     2022-08-06 21:36:09   switch          on
     2022-08-06 21:26:50   switch_prepayment off
     2022-08-06 21:26:49   time_zone       +02:00
     2022-08-06 21:26:49   uid             eu1657898201652WRB6r
     2022-08-06 21:26:49   update_time     1659786729
     2022-08-06 21:26:49   uuid            dd835e4cd9f1ce8c
   args:
     SmartMeter
     fhempy
     tuya
     nqbs1onwsxxxxxx
     bf5e65db3d968eyyyyy
     192.168.19.31
     4682e6f906123456
     3.3
     hrdphtup7mxxxxxxxx
     fed25485277f4325afa37f42bbbbbbb
   argsh:
Attributes:
   devStateIcon 1.on:on 1.off:off@blue
2.online:on@yellow 2.offline:off@red
   dp_01      forward_energy_total
   dp_10      fault
   dp_12      switch_prepayment
   dp_13      balance_energy
   dp_16      switch
   group      tuya
   room       Arbeitszimmer
   stateFormat 1:switch
2:state
   tuya_spec_functions [{'code': 'switch_prepayment', 'dp_id': 12, 'type': 'Boolean', 'values': '{}', 'desc': 'switch prepayment'}, {'code': 'clear_energy', 'dp_id': 14, 'type': 'Boolean', 'values': '{}', 'desc': 'clear energy'}, {'code': 'charge_energy', 'dp_id': 15, 'type': 'Integer', 'values': '{"unit":"kW·h","min":0,"max":50000,"scale":0,"step":1}', 'desc': 'charge energy'}, {'code': 'switch', 'dp_id': 16, 'type': 'Boolean', 'values': '{}', 'desc': 'switch'}, {'code': 'alarm_set_2', 'dp_id': 17, 'type': 'Json', 'values': '{}', 'desc': 'alarm set 2'}, {'code': 'event_clear', 'dp_id': 20, 'type': 'Boolean', 'values': '{}', 'desc': 'event clear'}]
   tuya_spec_status [{'code': 'forward_energy_total', 'dp_id': 1, 'type': 'Integer', 'values': '{"unit":"kW·h","min":0,"max":99999999,"scale":2,"step":1}'}, {'code': 'phase_a', 'dp_id': 6, 'type': 'Json', 'values': '{}'}, {'code': 'fault', 'dp_id': 10, 'type': 'Bitmap', 'values': '{"label":["ov_cr","unbalance_alarm","ov_vol","undervoltage_alarm","miss_phase_alarm","outage_alarm","magnetism_alarm","terminal_alarm","cover_alarm","credit_alarm","no_balance_alarm","battery_alarm","meter_hardware_alarm"]}'}, {'code': 'switch_prepayment', 'dp_id': 12, 'type': 'Boolean', 'values': '{}'}, {'code': 'balance_energy', 'dp_id': 13, 'type': 'Integer', 'values': '{"unit":"kW·h","min":0,"max":99999999,"scale":2,"step":1}'}, {'code': 'clear_energy', 'dp_id': 14, 'type': 'Boolean', 'values': '{}'}, {'code': 'charge_energy', 'dp_id': 15, 'type': 'Integer', 'values': '{"unit":"kW·h","min":0,"max":50000,"scale":0,"step":1}'}, {'code': 'switch', 'dp_id': 16, 'type': 'Boolean', 'values': '{}'}, {'code': 'alarm_set_2', 'dp_id': 17, 'type': 'Json', 'values': '{}'}, {'code': 'event_clear', 'dp_id': 20, 'type': 'Boolean', 'values': '{}'}]
   webCmd     switch on:switch off
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 August 2022, 22:08:46
/opt/fhem/log/fhempy....log

Interessant, dass jedoch dp_06 aktualisiert wird. Bist du sicher auf 0.1.388?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Konfusius am 06 August 2022, 22:09:32
Ja, steht bei py.Binding dahinter
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 August 2022, 22:11:20
Hmmm...bitte dann noch das Log anschauen ob da was ersichtlich ist.

...und dp_06 Reading wird aktualisiert, oder?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Konfusius am 06 August 2022, 22:14:55
Ja gerade gemacht:
WARNING  - SmartMeter: dp_06 in spec but not found locally. This should be reported to TuYa
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 August 2022, 22:15:54
Sonst kein ERROR? Das WARNING ist ok.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Konfusius am 06 August 2022, 22:19:05
Habe eben mal die Last geändert > Readingwert bei dp_06 ändert sich!
Nein sonst alle ok. keine Errors

UND KEINEN STRESS! Ich hab Zeit, nur wenn DU Lust und Zeit hast. Danke für die tolle Arbeit, ich wollte das Smart Meter schon zurück schicken, weil kein
Tasmota mehr drauf ging...
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 August 2022, 22:37:34
Teste bitte mit 0.1.390 und stell vorher das Device auf verbose=5. Danach sollten im fhempy Log jede Menge DEBUG Messages mit
handle type ...
sein. Kopier mir die bitte hier rein.

Kann sein, dass ich die erst morgen anschau...ist schon spät ;)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Konfusius am 06 August 2022, 23:21:56
Auf verbose 5 gestellt Update Neustart
Hier der Log:
2022-08-06 22:58:04,310 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2022-08-06 22:58:04,313 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2022-08-06 22:58:24,407 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2022-08-06 22:58:24,433 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2022-08-06 22:58:24,449 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2022-08-06 22:58:24,451 - INFO     - websockets.server: server closing
2022-08-06 22:58:34,505 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.9/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.9/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 166, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 186, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 345, in handle_function
    await self.sendBackReturn(hash, ret)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 110, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 930, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-08-06 22:58:34,508 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message(id: 15020048)
2022-08-06 22:58:34,510 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"FHEMPYTYPE":"tuya","defargsh":{},"function":"Set","msgtype":"function","id":"15020048","args":["SmartMeter","?"],"NAME":"SmartMeter","defargs":["SmartMeter","fhempy","tuya","nqbs1onwskmmmaac","bf5e65db3d968eedfdos5i","192.168.19.31","4682e6f9063b6557","3.3","hrdphtup7m7qrty354st","fed25485277f4325afa37f4208329c76"],"argsh":{},"PYTHONTYPE":"tuya"}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "/usr/lib/python3.9/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.9/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 144, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 169, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 121, in sendBackError
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 620, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2022-08-06 22:58:34,534 - INFO     - websockets.server: connection closed
2022-08-06 22:58:34,539 - INFO     - websockets.server: server closed
2022-08-06 22:58:34,560 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2022-08-06 22:58:36,176 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.390...
2022-08-06 22:58:36,182 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-08-06 22:58:36,268 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-08-06 22:58:48,401 - INFO     - websockets.server: connection open
2022-08-06 22:58:48,410 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-08-06 22:58:51,051 - DEBUG    - SmartMeter: getdevices: f{resp}
2022-08-06 22:58:51,907 - WARNING  - SmartMeter: dp_06 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:58:51,970 - WARNING  - SmartMeter: dp_14 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:58:51,986 - WARNING  - SmartMeter: dp_15 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:58:52,012 - WARNING  - SmartMeter: dp_17 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:58:52,023 - WARNING  - SmartMeter: dp_20 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:58:52,046 - WARNING  - SmartMeter: dp_14 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:58:52,058 - WARNING  - SmartMeter: dp_15 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:58:52,081 - WARNING  - SmartMeter: dp_17 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:58:52,092 - WARNING  - SmartMeter: dp_20 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:58:52,105 - DEBUG    - SmartMeter: handle type Integer for dp_id 1 with value 299
2022-08-06 22:58:52,117 - DEBUG    - SmartMeter: handle type Bitmap for dp_id 10 with value 0
2022-08-06 22:58:52,129 - DEBUG    - SmartMeter: handle type Boolean for dp_id 12 with value False
2022-08-06 22:58:52,141 - DEBUG    - SmartMeter: handle type Integer for dp_id 13 with value 0
2022-08-06 22:58:52,153 - DEBUG    - SmartMeter: handle type Boolean for dp_id 16 with value True
2022-08-06 22:59:02,242 - INFO     - fhempy.lib.fhem_pythonbinding: Shutdown initiated...
2022-08-06 22:59:02,277 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2022-08-06 22:59:02,283 - INFO     - websockets.server: server closing
2022-08-06 22:59:08,645 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.390...
2022-08-06 22:59:08,652 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-08-06 22:59:08,739 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-08-06 22:59:18,413 - INFO     - websockets.server: connection open
2022-08-06 22:59:18,421 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-08-06 22:59:20,751 - DEBUG    - SmartMeter: getdevices: f{resp}
2022-08-06 22:59:21,619 - WARNING  - SmartMeter: dp_06 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:21,680 - WARNING  - SmartMeter: dp_14 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:21,692 - WARNING  - SmartMeter: dp_15 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:21,715 - WARNING  - SmartMeter: dp_17 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:21,727 - WARNING  - SmartMeter: dp_20 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:21,749 - WARNING  - SmartMeter: dp_14 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:21,761 - WARNING  - SmartMeter: dp_15 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:21,784 - WARNING  - SmartMeter: dp_17 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:21,796 - WARNING  - SmartMeter: dp_20 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:21,809 - DEBUG    - SmartMeter: handle type Integer for dp_id 1 with value 299
2022-08-06 22:59:21,821 - DEBUG    - SmartMeter: handle type Bitmap for dp_id 10 with value 0
2022-08-06 22:59:21,833 - DEBUG    - SmartMeter: handle type Boolean for dp_id 12 with value False
2022-08-06 22:59:21,845 - DEBUG    - SmartMeter: handle type Integer for dp_id 13 with value 0
2022-08-06 22:59:21,857 - DEBUG    - SmartMeter: handle type Boolean for dp_id 16 with value True
2022-08-06 22:59:40,663 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.390...
2022-08-06 22:59:40,669 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-08-06 22:59:40,757 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-08-06 22:59:47,144 - INFO     - websockets.server: connection open
2022-08-06 22:59:47,153 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-08-06 22:59:48,467 - WARNING  - asyncio: Executing <Handle _SelectorDatagramTransport._read_ready() created at /usr/lib/python3.9/asyncio/selector_events.py:259> took 0.102 seconds
2022-08-06 22:59:50,094 - WARNING  - SmartMeter: dp_06 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:50,139 - WARNING  - SmartMeter: dp_14 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:50,151 - WARNING  - SmartMeter: dp_15 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:50,173 - WARNING  - SmartMeter: dp_17 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:50,185 - WARNING  - SmartMeter: dp_20 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:50,207 - WARNING  - SmartMeter: dp_14 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:50,219 - WARNING  - SmartMeter: dp_15 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:50,241 - WARNING  - SmartMeter: dp_17 in spec but not found locally. This should be reported to TuYa
2022-08-06 22:59:50,257 - WARNING  - SmartMeter: dp_20 in spec but not found locally. This should be reported to TuYa

Gute Nacht!
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 August 2022, 23:38:37
Hat sich der Wert von dp_06 während dem Log geändert? Weil im Log erkennt man, dass dp 6 nix geliefert hat. Wenn da doch was kommt, schau bitte noch im Log ob dort handle... steht.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 07 August 2022, 00:04:17
So...hat mir keine Ruhe gelassen....ich glaube ich hab den Fehler gefunden, bitte 0.1.391 testen.
gn8
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 07 August 2022, 08:21:04
Zitat von: dominik am 07 August 2022, 00:04:17
So...hat mir keine Ruhe gelassen....ich glaube ich hab den Fehler gefunden, bitte 0.1.391 testen.
gn8
hallo. siehr ja super aus

hab dir 3 kaffee gespendet, danke

https://paypal.me/todominik
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 07 August 2022, 09:47:40
Super!

Die Änderungen kannst du nur in Python machen. Das findest du hier:
/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py
Ab Zeile 455.
Was zeigt er dir für Werte (power,current,voltage) aktuell an? Kannst du mir mal ein paar Kombinationen posten? Ich glaube Voltage muss auch noch durch 10 dividiert werden, oder?

Kaffeespende gerne via Paypal: https://paypal.me/todominik ich sag schon mal Danke!
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Konfusius am 07 August 2022, 09:47:47
Wow, bei mir ist alles korrekt! Werte identisch mit der Smart App.
Aufm Sonntag um 04:17 Uhr??   Echt jetzt? Das ist der beste Support ever!! Hab ich noch nie erlebt!
Vielen Dank!
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 07 August 2022, 09:50:36
Zitat von: Konfusius am 07 August 2022, 09:47:47
Wow, bei mir ist alles korrekt! Werte identisch mit der Smart App.
Aufm Sonntag um 04:17 Uhr??   Echt jetzt? Das ist der beste Support ever!! Hab ich noch nie erlebt!
Vielen Dank!
Keine Sorge, es war Mitternacht (00:04:17), aber auf die Ergebnisse war ich schon im Traum gespannt :D
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 07 August 2022, 09:50:44
Zitat von: dominik am 07 August 2022, 09:47:40
Super!

Die Änderungen kannst du nur in Python machen. Das findest du hier:
/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py
Ab Zeile 455.
Was zeigt er dir für Werte (power,current,voltage) aktuell an? Kannst du mir mal ein paar Kombinationen posten? Ich glaube Voltage muss auch noch durch 10 dividiert werden, oder?

Kaffeespende gerne via Paypal: https://paypal.me/todominik ich sag schon mal Danke!

werte oassen, die app ist nicht zeitgleich. voltage durch 10, current x0, 1

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 07 August 2022, 09:53:52
Super! :)

current wirklich * 0,1? Ich denke es sind mA die rauskommen. Falls ihr A wollt, dividiere ich noch durch 1000.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 07 August 2022, 09:55:01
hier reale werte.
strom durch 1000 sollte es sein, spannung durch 10
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 07 August 2022, 09:58:25
Passt, ist in paar Minuten online (0.1.392).
Watt lasse ich so, weil kW macht nicht immer Sinn aus meiner Sicht.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Konfusius am 07 August 2022, 10:34:02
Perfekt, jetzt ist es identisch zur tuya Cloud.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 07 August 2022, 11:11:36
 bestens.
hoffe du erhälst writere kaffe gespendet.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 07 August 2022, 11:33:27
wollte gerade mein lokalea fhemoy auf 391 updaten, gehr aber nicht. update eefolreich, aber es steht weiterhin 379
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 07 August 2022, 11:38:40
Drück nochmals auf Update im BindingsIo Device. Das dauert durchaus paar Minuten bis es fertig ist. Wenn es nicht geht, dann bitte um fhempy Log.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: juergen012 am 07 August 2022, 12:23:52
Hallo,
vor einiger Zeit habe ich das fhempy von der "externen" Lösung auf die Interne umgestellt. Jetzt habe ich wieder das Problem mit der Steckdosenleiste (smart_power_strip). die erste Steckdose lässt sich nicht separat schalten. Die Steckdosen 2-4 funktionieren einwandfrei. Es lassen sich mit "switch" alle Steckdosen schalten. Wäreschön, wenn dies gelegentlich geänder wird..ohne Stress!
READINGS:
     2022-06-04 12:53:48   active_time     1626194558
     2022-06-04 12:53:48   biz_type        0
     2022-06-04 12:53:48   category        pc
     2022-06-04 14:25:35   countdown_1     0.0
     2022-06-04 12:24:43   countdown_2     0.0
     2022-06-04 12:24:43   countdown_3     0.0
     2022-06-04 12:24:43   countdown_4     0.0
     2022-06-04 12:24:43   countdown_usb1  0.0
     2022-06-04 12:53:48   create_time     1620742633
     2022-07-10 12:21:56   dp_04           0
     2022-07-10 12:21:56   dp_38           0
     2022-06-04 12:53:48   icon            smart/icon/1555585425a1oqvs7elur_0.jpg
     2022-06-04 12:53:48   id              XXXXXX
     2022-06-30 16:55:37   ip              XXXXXX
     2022-06-04 12:53:48   lat             XXXXXX
     2022-06-04 12:53:48   local_key       XXXXXXX
     2022-06-30 16:55:37   lon             XXXXXXX
     2022-06-04 12:53:48   model           A339
     2022-06-04 12:53:48   name            smart power strip
     2022-08-04 12:05:25   online          1
     2022-06-04 12:53:48   owner_id        XXXXXX
     2022-06-04 12:53:48   product_id      gl5fdiv1tc9mkvlp
     2022-06-04 12:53:48   product_name    smart power strip
     2022-08-07 12:15:50   state           off
     2022-06-04 12:53:48   sub             0
     2022-08-07 12:16:15   switch          off
     2022-06-04 12:24:43   switch_1        off
     2022-08-07 12:16:15   switch_2        off
     2022-08-07 12:15:50   switch_3        off
     2022-08-07 12:15:50   switch_4        off
     2022-08-07 12:15:50   switch_usb1     off
     2022-06-04 12:53:48   time_zone       +01:00
     2022-06-04 12:53:48   uid             euXXXXX
     2022-06-30 16:55:37   update_time     1656600916
     2022-06-04 12:53:48   uuid            XXXXXX
   args:
     smart_power_strip_XXXXX
     fhempy
     tuya
     3.3
   
   argsh:
Attributes:
   DbLogExclude .*
   dp_01      switch_1
   dp_02      switch_2
   dp_03      switch_3
   dp_04      switch_4
   dp_07      switch_usb1
   dp_09      countdown_1
   dp_10      countdown_2
   dp_11      countdown_3
   dp_12      countdown_4
   dp_15      countdown_usb1
   dp_38      switch
   room       fhempy
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 07 August 2022, 12:42:33
Zitat von: dominik am 07 August 2022, 11:38:40
Drück nochmals auf Update im BindingsIo Device. Das dauert durchaus paar Minuten bis es fertig ist. Wenn es nicht geht, dann bitte um fhempy Log.

erledigt. meine platte war voll, musste logfiles löschen
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 07 August 2022, 16:55:33
Zitat von: juergen012 am 07 August 2022, 12:23:52
Hallo,
vor einiger Zeit habe ich das fhempy von der "externen" Lösung auf die Interne umgestellt. Jetzt habe ich wieder das Problem mit der Steckdosenleiste (smart_power_strip). die erste Steckdose lässt sich nicht separat schalten. Die Steckdosen 2-4 funktionieren einwandfrei. Es lassen sich mit "switch" alle Steckdosen schalten. Wäreschön, wenn dies gelegentlich geänder wird..ohne Stress!
READINGS:
     2022-06-04 12:53:48   active_time     1626194558
     2022-06-04 12:53:48   biz_type        0
     2022-06-04 12:53:48   category        pc
     2022-06-04 14:25:35   countdown_1     0.0
     2022-06-04 12:24:43   countdown_2     0.0
     2022-06-04 12:24:43   countdown_3     0.0
     2022-06-04 12:24:43   countdown_4     0.0
     2022-06-04 12:24:43   countdown_usb1  0.0
     2022-06-04 12:53:48   create_time     1620742633
     2022-07-10 12:21:56   dp_04           0
     2022-07-10 12:21:56   dp_38           0
     2022-06-04 12:53:48   icon            smart/icon/1555585425a1oqvs7elur_0.jpg
     2022-06-04 12:53:48   id              XXXXXX
     2022-06-30 16:55:37   ip              XXXXXX
     2022-06-04 12:53:48   lat             XXXXXX
     2022-06-04 12:53:48   local_key       XXXXXXX
     2022-06-30 16:55:37   lon             XXXXXXX
     2022-06-04 12:53:48   model           A339
     2022-06-04 12:53:48   name            smart power strip
     2022-08-04 12:05:25   online          1
     2022-06-04 12:53:48   owner_id        XXXXXX
     2022-06-04 12:53:48   product_id      gl5fdiv1tc9mkvlp
     2022-06-04 12:53:48   product_name    smart power strip
     2022-08-07 12:15:50   state           off
     2022-06-04 12:53:48   sub             0
     2022-08-07 12:16:15   switch          off
     2022-06-04 12:24:43   switch_1        off
     2022-08-07 12:16:15   switch_2        off
     2022-08-07 12:15:50   switch_3        off
     2022-08-07 12:15:50   switch_4        off
     2022-08-07 12:15:50   switch_usb1     off
     2022-06-04 12:53:48   time_zone       +01:00
     2022-06-04 12:53:48   uid             euXXXXX
     2022-06-30 16:55:37   update_time     1656600916
     2022-06-04 12:53:48   uuid            XXXXXX
   args:
     smart_power_strip_XXXXX
     fhempy
     tuya
     3.3
   
   argsh:
Attributes:
   DbLogExclude .*
   dp_01      switch_1
   dp_02      switch_2
   dp_03      switch_3
   dp_04      switch_4
   dp_07      switch_usb1
   dp_09      countdown_1
   dp_10      countdown_2
   dp_11      countdown_3
   dp_12      countdown_4
   dp_15      countdown_usb1
   dp_38      switch
   room       fhempy


Hi,

kannst du mir noch schreiben welche Commands verfügbar sind? Hast du das Device direkt angelegt ohne API Key?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ckmde am 24 August 2022, 21:04:23
Hallo,

ich versuche hier ein Tuyagerät in FHEM einzubinden. Ich habe erstmal einen Tuya Cloudaccount eingerichtet wie beschrieben. Das hat soweit geklappt. Das Gerät eine "Wifi Siren from NEO" wurde auch erkannt. Leider mit dem Status "not support this device". Vermutlich ist dieses Gerät also nicht unterstützt. Product ID ist tgcajioatssnquwh
Im Logfile erscheint folgendes:
2022-08-24 20:30:54,249 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.440...
2022-08-24 20:30:54,251 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-08-24 20:30:54,261 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-08-24 20:31:04,236 - INFO     - websockets.server: connection open
2022-08-24 20:31:04,237 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-08-24 20:31:04,528 - ERROR    - tuya.sirene: Failed create_device
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 406, in create_device
    await fhem.readingsSingleUpdateIfChanged(
TypeError: readingsSingleUpdateIfChanged() missing 1 required positional argument: 'do_trigger'

Das lokale Einrichten klappt auch nicht. Beim Scan wird nichts gefunden und wenn ich das Gerät mit ID und local_key anlege bleibt das Gerät offline. Hier ist mir allerdings auch nicht klar, wie das funktioniert. Das Gerät sendet alle paar Sekunden an 255.255.255.255.6667 ein Paket. Allerdings hört fhempy nicht auf UDP Port 6667. Fhempy selbst sendet nichts an die IP-Adresse des Gerätes. Kann natürlich auch sein, dass das nicht klappt, weil der Gerätetyp nicht bekannt ist.

Welche Infos werden benötigt um das Gerät ggf. zu unterstützen ? Was könnte falsch sein ?

Gruß
Carsten
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 24 August 2022, 21:49:01
Hi,

danke für den Fehlerreport. Da ist wirklich ein Fehler im Code. Ist in 0.1.441 behoben.

Du wirst die Meldung "Please use API_KEY and API_SECRET" bekommen. Daher die Frage, wie sieht dein define aus? Bitte achte darauf, dass du API_KEY/SECRET entfernst wenn du es hier postest.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ckmde am 24 August 2022, 22:50:38
Hallo,

danke für die schnelle Antwort. Das DEF für das lokale Gerät sieht so aus.
tuya tgcajioatssnquwh XXXGeraeteIDXXX 192.168.0.61 XXXLocal_keyXXX 3.3
Habe ich auch mit API_KEY und Secret versucht. Da steht dann als State die ganze Zeit Initializing...
Ich habe das eben nochmal gemacht und auch dazu einen Backtrace im Log gefunden.
2022-08-24 22:40:54,755 - ERROR    - tuya.sirene1: Failed create_device
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 402, in create_device
    await self._create_cloudmapping_dev()
  File "/usr/local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 323, in _create_cloudmapping_dev
    await self.retrieve_tuya_specs()
  File "/usr/local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 299, in retrieve_tuya_specs
    spec = await self.get_tuya_dev_specification()
  File "/usr/local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 258, in get_tuya_dev_specification
    return resp["result"]
KeyError: 'result'

Gruß
Carsten
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 24 August 2022, 23:41:36
Hi,

mach bitte folgendes:
Zuerst setup Device anlegen (wie im README beschrieben)
Aus dem setup Device dann ein create_device machen
Beim erstellten Device steht dann, dass man im DEF das Wort "offline" durch die IP austauschen muss, das bitte machen

Danach sollte es funktionieren.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ckmde am 25 August 2022, 00:42:48
Hallo,

im Prinzip habe ich jetzt das gleiche Gerät nur mit anderem Namen und die gleiche Fehlermeldung im Logfile beim Anlegen. State ist Initializing...
Das Anlegen per create_device ging erst, als ich das Cloudgerät, dass ja noch angelegt war, gelöscht hatte. Aber ok ich will ja auch kein Cloudgerät haben, sondern nur das lokale.

2022-08-25 00:30:03,650 - ERROR    - Sirene_XXXXXGeräteIDXXXXXX: Failed create_device
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 402, in create_device
    await self._create_cloudmapping_dev()
  File "/usr/local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 323, in _create_cloudmapping_dev
    await self.retrieve_tuya_specs()
  File "/usr/local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 299, in retrieve_tuya_specs
    spec = await self.get_tuya_dev_specification()
  File "/usr/local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 258, in get_tuya_dev_specification
    return resp["result"]
KeyError: 'result'

Gruß
Carsten

Zitat von: dominik am 24 August 2022, 23:41:36
Hi,

mach bitte folgendes:
Zuerst setup Device anlegen (wie im README beschrieben)
Aus dem setup Device dann ein create_device machen
Beim erstellten Device steht dann, dass man im DEF das Wort "offline" durch die IP austauschen muss, das bitte machen

Danach sollte es funktionieren.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 31 August 2022, 17:22:21
Hab seit heute
bei einigen devices
fhempy server offline
und version auf 386
neueste version weg unnd wenn ich auf den fhempy ordner gehe dauert es minuten bis er aufmacht
schon erfahrung?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 31 August 2022, 20:58:35
Bitte fhempy manuell aktualisieren:
sudo -u fhem bash
pip3 install --upgrade fhempy

Danach FHEM Neustart.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 31 August 2022, 21:03:27
Zitat von: ckmde am 25 August 2022, 00:42:48
Hallo,

im Prinzip habe ich jetzt das gleiche Gerät nur mit anderem Namen und die gleiche Fehlermeldung im Logfile beim Anlegen. State ist Initializing...
Das Anlegen per create_device ging erst, als ich das Cloudgerät, dass ja noch angelegt war, gelöscht hatte. Aber ok ich will ja auch kein Cloudgerät haben, sondern nur das lokale.

2022-08-25 00:30:03,650 - ERROR    - Sirene_XXXXXGeräteIDXXXXXX: Failed create_device
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 402, in create_device
    await self._create_cloudmapping_dev()
  File "/usr/local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 323, in _create_cloudmapping_dev
    await self.retrieve_tuya_specs()
  File "/usr/local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 299, in retrieve_tuya_specs
    spec = await self.get_tuya_dev_specification()
  File "/usr/local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 258, in get_tuya_dev_specification
    return resp["result"]
KeyError: 'result'

Gruß
Carsten

Ich hab ein Ticket bei Tuya dazu aufgemacht. Die müssen das noch in die Tuya API mit aufnehmen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 31 August 2022, 22:10:27
Zitat von: dominik am 31 August 2022, 20:58:35
Bitte fhempy manuell aktualisieren:
sudo -u fhem bash
pip3 install --upgrade fhempy

Danach FHEM Neustart.

Danke funkt wieder
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 28 September 2022, 16:30:55
Hallo Dominik,
in der fhempy-2022-09-28.log habe ich eine Error Meldung, die sich ständig wiederholt.
2022-09-28 16:21:48,238 - ERROR    - asyncio: Fatal error: protocol.data_received() call failed.
handle_traceback: Handle created at (most recent call last):
  File "/opt/fhem/FHEM/bindings/python/bin/fhempy", line 155, in <module>
    fpb.run()
  File "/opt/fhem/.local/lib/python3.10/site-packages/fhempy/lib/fhem_pythonbinding.py", line 708, in run
    loop.run_until_complete(async_main())
  File "/usr/lib/python3.10/asyncio/base_events.py", line 633, in run_until_complete
    self.run_forever()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 600, in run_forever
    self._run_once()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1888, in _run_once
    handle._run()
  File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/lib/python3.10/asyncio/selector_events.py", line 752, in _add_reader
    self._loop._add_reader(fd, callback, *args)
  File "/usr/lib/python3.10/asyncio/selector_events.py", line 254, in _add_reader
    handle = events.Handle(callback, args, self, None)
protocol: bf623c4459370bd192tywm
transport: <_SelectorSocketTransport fd=25 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
  File "/usr/lib/python3.10/asyncio/selector_events.py", line 868, in _read_ready__data_received
    self._protocol.data_received(data)
  File "/opt/fhem/.local/lib/python3.10/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 415, in data_received
    self.dispatcher.add_data(data)
  File "/opt/fhem/.local/lib/python3.10/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 289, in add_data
    self._dispatch(TuyaMessage(seqno, cmd, retcode, payload, crc))
  File "/opt/fhem/.local/lib/python3.10/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 309, in _dispatch
    self.listener(msg)
  File "/opt/fhem/.local/lib/python3.10/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 375, in _status_update
    decoded_message = self._decode_payload(msg.payload)
  File "/opt/fhem/.local/lib/python3.10/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 595, in _decode_payload
    return json.loads(payload)
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


Mir fällt nur auf, dass bei einigen Devices das Reading state auf Initializing... stehen bleibt.
Kann ich diesen Zustand und die Fehlermeldung abstellen?
Viele Grüße
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 28 September 2022, 17:01:10
Tritt der Fehler bei allen Devices auf? Kann es sein, dass Device vielleicht ein Firmware Update durchgeführt hat?

Kannst du bitte mit der letzten Version auch nochmals testen ob es auf "Initializing..." stehen bleibt?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 28 September 2022, 18:09:13
Ich hatte bereits die Version 0.1.483. Habe trotzdem noch einmal ein update gemacht.
Es bleibt bei "Initializing..."
Soweit ich das mitbekommen habe, habe ich bei der TUYA App ein Update gestern gehabt.
Ein Muster bei den Device kann ich nicht erkennen. Es handelt sich um Steckdosen, Lichtschalter, Vorhangschalter u. Klimaanlage.
Über die TUYA App kann ich alle Device ansteuern.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 28 September 2022, 20:56:08
...und keines der Geräte funktioniert mehr? Es bleiben alle bei "Initializing"?

Ist das seit dem fhempy Update so, oder "von selbst" passiert?

Welche Commands hast du in FHEM für die Devices? Funktionieren die Commands?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 28 September 2022, 21:50:59
Zitat...und keines der Geräte funktioniert mehr? Es bleiben alle bei "Initializing"?
Nur ein Teil der Devices bleiben auf Initializing stehen (s. Anlage). Bei den anderen wird state angezeigt.
ZitatIst das seit dem fhempy Update so, oder "von selbst" passiert?
Genau kann ich es leider nicht sagen.
ZitatWelche Commands hast du in FHEM für die Devices? Funktionieren die Commands?
Ja, die Commands funktionieren soweit bis auf eine Steckdose und einem Schalter.
Hier kommt die Meldung "Command not available for this device", s. Anlage
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 28 September 2022, 22:00:07
Hallo
Hab auch diese problem

ZitatIst das seit dem fhempy Update so, oder "von selbst" passiert?

Hab dieses problem erst nachdem sich meine nous A1 durch die TuYa App aktualisiert haben

hab sie rausgeschmissenn und neu verbunden bleit  aber trotzdem auf initializing
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 28 September 2022, 22:05:52
Habe gerade ein update auf 0.1.485 gemacht.
Probleme bestehen weiterhin.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 28 September 2022, 22:51:13
@ChrisA4, kannst du bitte schauen was bei dir im fhempy Log für ein Fehler auftaucht?

@Sommerfeld, ok, das bedeutet nur 2 Devices funktionieren nicht? Die restlichen funktionieren, aber der Status ist nicht korrekt. Kannst du mir bitte noch posten welchen Commands die Devices haben? Also nicht die webCmds die du angelegt hast, sondern was das Device für Commands bietet.

Klingt alles danach, als hätten sich die Devices auf Protocol Version 3.4 aktualisiert, was aktuell in fhempy noch nicht unterstützt wird. Die Kollegen von tinytuya haben es vor ein paar Tagen integriert:
https://github.com/jasonacox/tinytuya/releases/tag/v1.7.0
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 28 September 2022, 22:59:30
- ERROR    - fhempy.lib.fhem: NO RESPONSE since 60s: readingsSingleUpdate($defs{'NousA1WiFiBT7'},'online','0',1

meinst du so etwas
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 28 September 2022, 23:06:53
ja, der Fehler ist aber halb so wild. Was kommt noch?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 28 September 2022, 23:18:05
find die datei nicht
hab das nur mit journal gemacht
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 28 September 2022, 23:27:23
Das Log vom Peer ist im journalctl, das ist auch korrekt. Findest du dort keine Fehler wo tuya drin steht?
Falls du nicht auf einem Peer bist, dann ist das Log /opt/fhem/log/fhempy...log
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 28 September 2022, 23:41:08
-- Journal begins at Sat 2022-09-24 06:40:46 CEST. --
Sep 28 23:06:19 fhem fhempy[11919]:     status = await self._connected_device.status()
Sep 28 23:06:19 fhem fhempy[11919]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 484, in status
Sep 28 23:06:19 fhem fhempy[11919]:     status = await self.exchange(STATUS)
Sep 28 23:06:19 fhem fhempy[11919]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 463, in exchange
Sep 28 23:06:19 fhem fhempy[11919]:     msg = await self.dispatcher.wait_for(seqno)
Sep 28 23:06:19 fhem fhempy[11919]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 250, in wait_for
Sep 28 23:06:19 fhem fhempy[11919]:     await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout)
Sep 28 23:06:19 fhem fhempy[11919]:   File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
Sep 28 23:06:19 fhem fhempy[11919]:     raise exceptions.TimeoutError() from exc
Sep 28 23:06:19 fhem fhempy[11919]: asyncio.exceptions.TimeoutError
Sep 28 23:34:02 fhem fhempy[11919]: 2022-09-28 23:34:02,393 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
Sep 28 23:34:02 fhem fhempy[11919]: 2022-09-28 23:34:02,395 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
Sep 28 23:34:12 fhem fhempy[11919]: 2022-09-28 23:34:12,614 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
Sep 28 23:34:12 fhem fhempy[11919]: 2022-09-28 23:34:12,777 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
Sep 28 23:34:12 fhem fhempy[11919]: 2022-09-28 23:34:12,865 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
Sep 28 23:34:12 fhem fhempy[11919]: 2022-09-28 23:34:12,867 - INFO     - websockets.server: server closing
Sep 28 23:34:22 fhem fhempy[11919]: 2022-09-28 23:34:22,906 - INFO     - websockets.server: connection closed
Sep 28 23:34:32 fhem fhempy[11919]: 2022-09-28 23:34:32,906 - INFO     - websockets.server: connection closed
Sep 28 23:34:32 fhem fhempy[11919]: 2022-09-28 23:34:32,909 - INFO     - websockets.server: connection closed
Sep 28 23:34:32 fhem fhempy[11919]: 2022-09-28 23:34:32,910 - INFO     - websockets.server: server closed
Sep 28 23:34:32 fhem fhempy[11919]: 2022-09-28 23:34:32,914 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
Sep 28 23:34:32 fhem systemd[1]: fhempy.service: Main process exited, code=exited, status=1/FAILURE
Sep 28 23:34:32 fhem systemd[1]: fhempy.service: Failed with result 'exit-code'.
Sep 28 23:34:32 fhem systemd[1]: fhempy.service: Consumed 9min 22.171s CPU time.
Sep 28 23:34:33 fhem systemd[1]: fhempy.service: Scheduled restart job, restart counter is at 3.
Sep 28 23:34:33 fhem systemd[1]: Stopped FHEM PythonBinding.
Sep 28 23:34:33 fhem systemd[1]: fhempy.service: Consumed 9min 22.171s CPU time.
Sep 28 23:34:33 fhem systemd[1]: Started FHEM PythonBinding.
Sep 28 23:34:34 fhem fhempy[15328]: 2022-09-28 23:34:34,392 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.486...
Sep 28 23:34:34 fhem fhempy[15328]: 2022-09-28 23:34:34,399 - INFO     - fhempy.lib.fhem_pythonbinding: Advertise fhempy on local network with 192.168.1.147:15733
Sep 28 23:34:34 fhem fhempy[15328]: 2022-09-28 23:34:34,779 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
Sep 28 23:34:34 fhem fhempy[15328]: Traceback (most recent call last):
Sep 28 23:34:34 fhem fhempy[15328]:   File "/home/pi/.local/bin/fhempy", line 155, in <module>
Sep 28 23:34:34 fhem fhempy[15328]:     fpb.run()
Sep 28 23:34:34 fhem fhempy[15328]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 708, in run
Sep 28 23:34:34 fhem fhempy[15328]:     loop.run_until_complete(async_main())
Sep 28 23:34:34 fhem fhempy[15328]:   File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
Sep 28 23:34:34 fhem fhempy[15328]:     return future.result()
Sep 28 23:34:34 fhem fhempy[15328]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 617, in async_main
Sep 28 23:34:34 fhem fhempy[15328]:     async with websockets.serve(
Sep 28 23:34:34 fhem fhempy[15328]:   File "/home/pi/.local/lib/python3.9/site-packages/websockets/legacy/server.py", line 1070, in __aenter__
Sep 28 23:34:34 fhem fhempy[15328]:     return await self
Sep 28 23:34:34 fhem fhempy[15328]:   File "/home/pi/.local/lib/python3.9/site-packages/websockets/legacy/server.py", line 1088, in __await_impl__
Sep 28 23:34:34 fhem fhempy[15328]:     server = await self._create_server()
Sep 28 23:34:34 fhem fhempy[15328]:   File "/usr/lib/python3.9/asyncio/base_events.py", line 1494, in create_server
Sep 28 23:34:34 fhem fhempy[15328]:     raise OSError(err.errno, 'error while attempting '
Sep 28 23:34:34 fhem fhempy[15328]: OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 15733): address already in use
Sep 28 23:34:34 fhem fhempy[15328]: 2022-09-28 23:34:34,880 - ERROR    - asyncio: Task was destroyed but it is pending!
Sep 28 23:34:34 fhem fhempy[15328]: source_traceback: Object created at (most recent call last):
Sep 28 23:34:34 fhem fhempy[15328]:   File "/home/pi/.local/lib/python3.9/site-packages/zeroconf/asyncio.py", line 187, in async_register_service
Sep 28 23:34:34 fhem fhempy[15328]:     return await self.zeroconf.async_register_service(
Sep 28 23:34:34 fhem fhempy[15328]:   File "/home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py", line 589, in async_register_service
Sep 28 23:34:34 fhem fhempy[15328]:     return asyncio.ensure_future(self._async_broadcast_service(info, _REGISTER_TIME, None))
Sep 28 23:34:34 fhem fhempy[15328]: task: <Task pending name='Task-7' coro=<Zeroconf._async_broadcast_service() running at /home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py:617> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xb5697790>()] created at /usr/lib/python3.9/asyncio/base_events.py:424> created at /home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py:589>
Sep 28 23:34:34 fhem systemd[1]: fhempy.service: Main process exited, code=exited, status=1/FAILURE
Sep 28 23:34:34 fhem systemd[1]: fhempy.service: Failed with result 'exit-code'.
Sep 28 23:34:34 fhem systemd[1]: fhempy.service: Consumed 1.394s CPU time.
Sep 28 23:34:35 fhem systemd[1]: fhempy.service: Scheduled restart job, restart counter is at 4.
Sep 28 23:34:35 fhem systemd[1]: Stopped FHEM PythonBinding.
Sep 28 23:34:35 fhem systemd[1]: fhempy.service: Consumed 1.394s CPU time.
Sep 28 23:34:35 fhem systemd[1]: Started FHEM PythonBinding.
Sep 28 23:34:36 fhem fhempy[15391]: 2022-09-28 23:34:36,351 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.486...
Sep 28 23:34:36 fhem fhempy[15391]: 2022-09-28 23:34:36,356 - INFO     - fhempy.lib.fhem_pythonbinding: Advertise fhempy on local network with 192.168.1.147:15733
Sep 28 23:34:36 fhem fhempy[15391]: 2022-09-28 23:34:36,732 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
Sep 28 23:34:36 fhem fhempy[15391]: Traceback (most recent call last):
Sep 28 23:34:36 fhem fhempy[15391]:   File "/home/pi/.local/bin/fhempy", line 155, in <module>
Sep 28 23:34:36 fhem fhempy[15391]:     fpb.run()
Sep 28 23:34:36 fhem fhempy[15391]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 708, in run
Sep 28 23:34:36 fhem fhempy[15391]:     loop.run_until_complete(async_main())
Sep 28 23:34:36 fhem fhempy[15391]:   File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
Sep 28 23:34:36 fhem fhempy[15391]:     return future.result()
Sep 28 23:34:36 fhem fhempy[15391]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 617, in async_main
Sep 28 23:34:36 fhem fhempy[15391]:     async with websockets.serve(
Sep 28 23:34:36 fhem fhempy[15391]:   File "/home/pi/.local/lib/python3.9/site-packages/websockets/legacy/server.py", line 1070, in __aenter__
Sep 28 23:34:36 fhem fhempy[15391]:     return await self
Sep 28 23:34:36 fhem fhempy[15391]:   File "/home/pi/.local/lib/python3.9/site-packages/websockets/legacy/server.py", line 1088, in __await_impl__
Sep 28 23:34:36 fhem fhempy[15391]:     server = await self._create_server()
Sep 28 23:34:36 fhem fhempy[15391]:   File "/usr/lib/python3.9/asyncio/base_events.py", line 1494, in create_server
Sep 28 23:34:36 fhem fhempy[15391]:     raise OSError(err.errno, 'error while attempting '
Sep 28 23:34:36 fhem fhempy[15391]: OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 15733): address already in use
Sep 28 23:34:36 fhem fhempy[15391]: 2022-09-28 23:34:36,813 - ERROR    - asyncio: Task was destroyed but it is pending!
Sep 28 23:34:36 fhem fhempy[15391]: source_traceback: Object created at (most recent call last):
Sep 28 23:34:36 fhem fhempy[15391]:   File "/home/pi/.local/lib/python3.9/site-packages/zeroconf/asyncio.py", line 187, in async_register_service
Sep 28 23:34:36 fhem fhempy[15391]:     return await self.zeroconf.async_register_service(
Sep 28 23:34:36 fhem fhempy[15391]:   File "/home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py", line 589, in async_register_service
Sep 28 23:34:36 fhem fhempy[15391]:     return asyncio.ensure_future(self._async_broadcast_service(info, _REGISTER_TIME, None))
Sep 28 23:34:36 fhem fhempy[15391]: task: <Task pending name='Task-7' coro=<Zeroconf._async_broadcast_service() running at /home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py:617> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xb5654610>()] created at /usr/lib/python3.9/asyncio/base_events.py:424> created at /home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py:589>
Sep 28 23:34:36 fhem systemd[1]: fhempy.service: Main process exited, code=exited, status=1/FAILURE
Sep 28 23:34:36 fhem systemd[1]: fhempy.service: Failed with result 'exit-code'.
Sep 28 23:34:36 fhem systemd[1]: fhempy.service: Consumed 1.330s CPU time.
Sep 28 23:34:37 fhem systemd[1]: fhempy.service: Scheduled restart job, restart counter is at 5.
Sep 28 23:34:37 fhem systemd[1]: Stopped FHEM PythonBinding.
Sep 28 23:34:37 fhem systemd[1]: fhempy.service: Consumed 1.330s CPU time.
Sep 28 23:34:37 fhem systemd[1]: Started FHEM PythonBinding.
Sep 28 23:34:38 fhem fhempy[15398]: 2022-09-28 23:34:38,261 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.486...
Sep 28 23:34:38 fhem fhempy[15398]: 2022-09-28 23:34:38,266 - INFO     - fhempy.lib.fhem_pythonbinding: Advertise fhempy on local network with 192.168.1.147:15733
Sep 28 23:34:38 fhem fhempy[15398]: 2022-09-28 23:34:38,642 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
Sep 28 23:34:38 fhem fhempy[15398]: Traceback (most recent call last):
Sep 28 23:34:38 fhem fhempy[15398]:   File "/home/pi/.local/bin/fhempy", line 155, in <module>
Sep 28 23:34:38 fhem fhempy[15398]:     fpb.run()
Sep 28 23:34:38 fhem fhempy[15398]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 708, in run
Sep 28 23:34:38 fhem fhempy[15398]:     loop.run_until_complete(async_main())
Sep 28 23:34:38 fhem fhempy[15398]:   File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
Sep 28 23:34:38 fhem fhempy[15398]:     return future.result()
Sep 28 23:34:38 fhem fhempy[15398]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 617, in async_main
Sep 28 23:34:38 fhem fhempy[15398]:     async with websockets.serve(
Sep 28 23:34:38 fhem fhempy[15398]:   File "/home/pi/.local/lib/python3.9/site-packages/websockets/legacy/server.py", line 1070, in __aenter__
Sep 28 23:34:38 fhem fhempy[15398]:     return await self
Sep 28 23:34:38 fhem fhempy[15398]:   File "/home/pi/.local/lib/python3.9/site-packages/websockets/legacy/server.py", line 1088, in __await_impl__
Sep 28 23:34:38 fhem fhempy[15398]:     server = await self._create_server()
Sep 28 23:34:38 fhem fhempy[15398]:   File "/usr/lib/python3.9/asyncio/base_events.py", line 1494, in create_server
Sep 28 23:34:38 fhem fhempy[15398]:     raise OSError(err.errno, 'error while attempting '
Sep 28 23:34:38 fhem fhempy[15398]: OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 15733): address already in use
Sep 28 23:34:38 fhem fhempy[15398]: 2022-09-28 23:34:38,720 - ERROR    - asyncio: Task was destroyed but it is pending!
Sep 28 23:34:38 fhem fhempy[15398]: source_traceback: Object created at (most recent call last):
Sep 28 23:34:38 fhem fhempy[15398]:   File "/home/pi/.local/lib/python3.9/site-packages/zeroconf/asyncio.py", line 187, in async_register_service
Sep 28 23:34:38 fhem fhempy[15398]:     return await self.zeroconf.async_register_service(
Sep 28 23:34:38 fhem fhempy[15398]:   File "/home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py", line 589, in async_register_service
Sep 28 23:34:38 fhem fhempy[15398]:     return asyncio.ensure_future(self._async_broadcast_service(info, _REGISTER_TIME, None))
Sep 28 23:34:38 fhem fhempy[15398]: task: <Task pending name='Task-8' coro=<Zeroconf._async_broadcast_service() running at /home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py:617> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xb56018b0>()] created at /usr/lib/python3.9/asyncio/base_events.py:424> created at /home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py:589>
Sep 28 23:34:38 fhem systemd[1]: fhempy.service: Main process exited, code=exited, status=1/FAILURE
Sep 28 23:34:38 fhem systemd[1]: fhempy.service: Failed with result 'exit-code'.
Sep 28 23:34:38 fhem systemd[1]: fhempy.service: Consumed 1.250s CPU time.
Sep 28 23:34:38 fhem systemd[1]: fhempy.service: Scheduled restart job, restart counter is at 6.
Sep 28 23:34:38 fhem systemd[1]: Stopped FHEM PythonBinding.
Sep 28 23:34:38 fhem systemd[1]: fhempy.service: Consumed 1.250s CPU time.
Sep 28 23:34:38 fhem systemd[1]: Started FHEM PythonBinding.
Sep 28 23:34:40 fhem fhempy[15403]: 2022-09-28 23:34:40,166 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.486...
Sep 28 23:34:40 fhem fhempy[15403]: 2022-09-28 23:34:40,170 - INFO     - fhempy.lib.fhem_pythonbinding: Advertise fhempy on local network with 192.168.1.147:15733
Sep 28 23:34:40 fhem fhempy[15403]: 2022-09-28 23:34:40,546 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
Sep 28 23:34:40 fhem fhempy[15403]: Traceback (most recent call last):
Sep 28 23:34:40 fhem fhempy[15403]:   File "/home/pi/.local/bin/fhempy", line 155, in <module>
Sep 28 23:34:40 fhem fhempy[15403]:     fpb.run()
Sep 28 23:34:40 fhem fhempy[15403]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 708, in run
Sep 28 23:34:40 fhem fhempy[15403]:     loop.run_until_complete(async_main())
Sep 28 23:34:40 fhem fhempy[15403]:   File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
Sep 28 23:34:40 fhem fhempy[15403]:     return future.result()
Sep 28 23:34:40 fhem fhempy[15403]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 617, in async_main
Sep 28 23:34:40 fhem fhempy[15403]:     async with websockets.serve(
Sep 28 23:34:40 fhem fhempy[15403]:   File "/home/pi/.local/lib/python3.9/site-packages/websockets/legacy/server.py", line 1070, in __aenter__
Sep 28 23:34:40 fhem fhempy[15403]:     return await self
Sep 28 23:34:40 fhem fhempy[15403]:   File "/home/pi/.local/lib/python3.9/site-packages/websockets/legacy/server.py", line 1088, in __await_impl__
Sep 28 23:34:40 fhem fhempy[15403]:     server = await self._create_server()
Sep 28 23:34:40 fhem fhempy[15403]:   File "/usr/lib/python3.9/asyncio/base_events.py", line 1494, in create_server
Sep 28 23:34:40 fhem fhempy[15403]:     raise OSError(err.errno, 'error while attempting '
Sep 28 23:34:40 fhem fhempy[15403]: OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 15733): address already in use
Sep 28 23:34:40 fhem fhempy[15403]: 2022-09-28 23:34:40,623 - ERROR    - asyncio: Task was destroyed but it is pending!
Sep 28 23:34:40 fhem fhempy[15403]: source_traceback: Object created at (most recent call last):
Sep 28 23:34:40 fhem fhempy[15403]:   File "/home/pi/.local/lib/python3.9/site-packages/zeroconf/asyncio.py", line 187, in async_register_service
Sep 28 23:34:40 fhem fhempy[15403]:     return await self.zeroconf.async_register_service(
Sep 28 23:34:40 fhem fhempy[15403]:   File "/home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py", line 589, in async_register_service
Sep 28 23:34:40 fhem fhempy[15403]:     return asyncio.ensure_future(self._async_broadcast_service(info, _REGISTER_TIME, None))
Sep 28 23:34:40 fhem fhempy[15403]: task: <Task pending name='Task-8' coro=<Zeroconf._async_broadcast_service() running at /home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py:617> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xb55b1760>()] created at /usr/lib/python3.9/asyncio/base_events.py:424> created at /home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py:589>
Sep 28 23:34:40 fhem systemd[1]: fhempy.service: Main process exited, code=exited, status=1/FAILURE
Sep 28 23:34:40 fhem systemd[1]: fhempy.service: Failed with result 'exit-code'.
Sep 28 23:34:40 fhem systemd[1]: fhempy.service: Consumed 1.384s CPU time.
Sep 28 23:34:40 fhem systemd[1]: fhempy.service: Scheduled restart job, restart counter is at 7.
Sep 28 23:34:40 fhem systemd[1]: Stopped FHEM PythonBinding.
Sep 28 23:34:40 fhem systemd[1]: fhempy.service: Consumed 1.384s CPU time.
Sep 28 23:34:40 fhem systemd[1]: Started FHEM PythonBinding.
Sep 28 23:34:42 fhem fhempy[15408]: 2022-09-28 23:34:42,028 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.486...
Sep 28 23:34:42 fhem fhempy[15408]: 2022-09-28 23:34:42,034 - INFO     - fhempy.lib.fhem_pythonbinding: Advertise fhempy on local network with 192.168.1.147:15733
Sep 28 23:34:42 fhem fhempy[15408]: 2022-09-28 23:34:42,415 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
Sep 28 23:34:42 fhem fhempy[15408]: Traceback (most recent call last):
Sep 28 23:34:42 fhem fhempy[15408]:   File "/home/pi/.local/bin/fhempy", line 155, in <module>
Sep 28 23:34:42 fhem fhempy[15408]:     fpb.run()
Sep 28 23:34:42 fhem fhempy[15408]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 708, in run
Sep 28 23:34:42 fhem fhempy[15408]:     loop.run_until_complete(async_main())
Sep 28 23:34:42 fhem fhempy[15408]:   File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
Sep 28 23:34:42 fhem fhempy[15408]:     return future.result()
Sep 28 23:34:42 fhem fhempy[15408]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 617, in async_main
Sep 28 23:34:42 fhem fhempy[15408]:     async with websockets.serve(
Sep 28 23:34:42 fhem fhempy[15408]:   File "/home/pi/.local/lib/python3.9/site-packages/websockets/legacy/server.py", line 1070, in __aenter__
Sep 28 23:34:42 fhem fhempy[15408]:     return await self
Sep 28 23:34:42 fhem fhempy[15408]:   File "/home/pi/.local/lib/python3.9/site-packages/websockets/legacy/server.py", line 1088, in __await_impl__
Sep 28 23:34:42 fhem fhempy[15408]:     server = await self._create_server()
Sep 28 23:34:42 fhem fhempy[15408]:   File "/usr/lib/python3.9/asyncio/base_events.py", line 1494, in create_server
Sep 28 23:34:42 fhem fhempy[15408]:     raise OSError(err.errno, 'error while attempting '
Sep 28 23:34:42 fhem fhempy[15408]: OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 15733): address already in use
Sep 28 23:34:42 fhem fhempy[15408]: 2022-09-28 23:34:42,512 - ERROR    - asyncio: Task was destroyed but it is pending!
Sep 28 23:34:42 fhem fhempy[15408]: source_traceback: Object created at (most recent call last):
Sep 28 23:34:42 fhem fhempy[15408]:   File "/home/pi/.local/lib/python3.9/site-packages/zeroconf/asyncio.py", line 187, in async_register_service
Sep 28 23:34:42 fhem fhempy[15408]:     return await self.zeroconf.async_register_service(
Sep 28 23:34:42 fhem fhempy[15408]:   File "/home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py", line 589, in async_register_service
Sep 28 23:34:42 fhem fhempy[15408]:     return asyncio.ensure_future(self._async_broadcast_service(info, _REGISTER_TIME, None))
Sep 28 23:34:42 fhem fhempy[15408]: task: <Task pending name='Task-8' coro=<Zeroconf._async_broadcast_service() running at /home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py:617> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xb55d85f8>()] created at /usr/lib/python3.9/asyncio/base_events.py:424> created at /home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py:589>
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Main process exited, code=exited, status=1/FAILURE
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Failed with result 'exit-code'.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Consumed 1.309s CPU time.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Scheduled restart job, restart counter is at 8.
Sep 28 23:34:42 fhem systemd[1]: Stopped FHEM PythonBinding.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Consumed 1.309s CPU time.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Start request repeated too quickly.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Failed with result 'exit-code'.
Sep 28 23:34:42 fhem systemd[1]: Failed to start FHEM PythonBinding.
^C
pi@fhem:/opt/fhem/log $ sudo journalctl -u fhempy.service -f
-- Journal begins at Sat 2022-09-24 06:40:46 CEST. --
Sep 28 23:34:42 fhem fhempy[15408]: task: <Task pending name='Task-8' coro=<Zeroconf._async_broadcast_service() running at /home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py:617> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xb55d85f8>()] created at /usr/lib/python3.9/asyncio/base_events.py:424> created at /home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py:589>
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Main process exited, code=exited, status=1/FAILURE
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Failed with result 'exit-code'.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Consumed 1.309s CPU time.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Scheduled restart job, restart counter is at 8.
Sep 28 23:34:42 fhem systemd[1]: Stopped FHEM PythonBinding.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Consumed 1.309s CPU time.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Start request repeated too quickly.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Failed with result 'exit-code'.
Sep 28 23:34:42 fhem systemd[1]: Failed to start FHEM PythonBinding.
^C
pi@fhem:/opt/fhem/log $ sudo journalctl -u fhempy.service -f
-- Journal begins at Sat 2022-09-24 06:40:46 CEST. --
Sep 28 23:34:42 fhem fhempy[15408]: task: <Task pending name='Task-8' coro=<Zeroconf._async_broadcast_service() running at /home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py:617> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xb55d85f8>()] created at /usr/lib/python3.9/asyncio/base_events.py:424> created at /home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py:589>
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Main process exited, code=exited, status=1/FAILURE
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Failed with result 'exit-code'.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Consumed 1.309s CPU time.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Scheduled restart job, restart counter is at 8.
Sep 28 23:34:42 fhem systemd[1]: Stopped FHEM PythonBinding.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Consumed 1.309s CPU time.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Start request repeated too quickly.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Failed with result 'exit-code'.
Sep 28 23:34:42 fhem systemd[1]: Failed to start FHEM PythonBinding.
^C
pi@fhem:/opt/fhem/log $ sudo journalctl -u fhempy.service -f
-- Journal begins at Sat 2022-09-24 06:40:46 CEST. --
Sep 28 23:34:42 fhem fhempy[15408]: task: <Task pending name='Task-8' coro=<Zeroconf._async_broadcast_service() running at /home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py:617> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xb55d85f8>()] created at /usr/lib/python3.9/asyncio/base_events.py:424> created at /home/pi/.local/lib/python3.9/site-packages/zeroconf/_core.py:589>
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Main process exited, code=exited, status=1/FAILURE
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Failed with result 'exit-code'.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Consumed 1.309s CPU time.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Scheduled restart job, restart counter is at 8.
Sep 28 23:34:42 fhem systemd[1]: Stopped FHEM PythonBinding.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Consumed 1.309s CPU time.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Start request repeated too quickly.
Sep 28 23:34:42 fhem systemd[1]: fhempy.service: Failed with result 'exit-code'.
Sep 28 23:34:42 fhem systemd[1]: Failed to start FHEM PythonBinding.
-- Journal begins at Sat 2022-09-24 06:40:46 CEST. --
Sep 28 23:06:19 fhem fhempy[11919]:     status = await self._connected_device.status()
Sep 28 23:06:19 fhem fhempy[11919]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 484, in status
Sep 28 23:06:19 fhem fhempy[11919]:     status = await self.exchange(STATUS)
Sep 28 23:06:19 fhem fhempy[11919]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 463, in exchange
Sep 28 23:06:19 fhem fhempy[11919]:     msg = await self.dispatcher.wait_for(seqno)
Sep 28 23:06:19 fhem fhempy[11919]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 250, in wait_for
Sep 28 23:06:19 fhem fhempy[11919]:     await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout)
Sep 28 23:06:19 fhem fhempy[11919]:   File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
Sep 28 23:06:19 fhem fhempy[11919]:     raise exceptions.TimeoutError() from exc
Sep 28 23:06:19 fhem fhempy[11919]: asyncio.exceptions.TimeoutError
Sep 28 23:34:02 fhem fhempy[11919]: 2022-09-28 23:34:02,393 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
Sep 28 23:34:02 fhem fhempy[11919]: 2022-09-28 23:34:02,395 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
Sep 28 23:34:12 fhem fhempy[11919]: 2022-09-28 23:34:12,614 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
Sep 28 23:34:12 fhem fhempy[11919]: 2022-09-28 23:34:12,777 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
Sep 28 23:34:12 fhem fhempy[11919]: 2022-09-28 23:34:12,865 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
Sep 28 23:34:12 fhem fhempy[11919]: 2022-09-28 23:34:12,867 - INFO     - websockets.server: server closing
Sep 28 23:34:22 fhem fhempy[11919]: 2022-09-28 23:34:22,906 - INFO     - websockets.server: connection closed
Sep 28 23:34:32 fhem fhempy[11919]: 2022-09-28 23:34:32,906 - INFO     - websockets.server: connection closed
Sep 28 23:34:32 fhem fhempy[11919]: 2022-09-28 23:34:32,909 - INFO     - websockets.server: connection closed
Sep 28 23:34:32 fhem fhempy[11919]: 2022-09-28 23:34:32,910 - INFO     - websockets.server: server closed
Sep 28 23:34:32 fhem fhempy[11919]: 2022-09-28 23:34:32,914 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
Sep 28 23:34:32 fhem systemd[1]: fhempy.service: Main process exited, code=exited, status=1/FAILURE
Sep 28 23:34:32 fhem systemd[1]: fhempy.service: Failed with result 'exit-code'.
Sep 28 23:34:32 fhem systemd[1]: fhempy.service: Consumed 9min 22.171s CPU time.
Sep 28 23:34:33 fhem systemd[1]: fhempy.service: Scheduled restart job, restart counter is at 3.
Sep 28 23:34:33 fhem systemd[1]: Stopped FHEM PythonBinding.
Sep 28 23:34:33 fhem systemd[1]: fhempy.service: Consumed 9min 22.171s CPU time.
Sep 28 23:34:33 fhem systemd[1]: Started FHEM PythonBinding.
Sep 28 23:34:34 fhem fhempy[15328]: 2022-09-28 23:34:34,392 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.486...
Sep 28 23:34:34 fhem fhempy[15328]: 2022-09-28 23:34:34,399 - INFO     - fhempy.lib.fhem_pythonbinding: Advertise fhempy on local network with 192.168.1.147:15733
Sep 28 23:34:34 fhem fhempy[15328]: 2022-09-28 23:34:34,779 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
Sep 28 23:34:34 fhem fhempy[15328]: Traceback (most recent call last):
Sep 28 23:34:34 fhem fhempy[15328]:   File "/home/pi/.local/bin/fhempy", line 155, in <module>
Sep 28 23:34:34 fhem fhempy[15328]:     fpb.run()
Sep 28 23:34:34 fhem fhempy[15328]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 708, in run
Sep 28 23:34:34 fhem fhempy[15328]:     loop.run_until_complete(async_main())
Sep 28 23:34:34 fhem fhempy[15328]:   File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
Sep 28 23:34:34 fhem fhempy[15328]:     return future.result()
Sep 28 23:34:34 fhem fhempy[15328]:   File "/home/pi/.local/lib/python3.9/site-


kannst du damit was anfagen???
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 28 September 2022, 23:53:31
Nur um sicher zu gehen, das ist von einem Peer und nicht von dem Device wo auch FHEM drauf läuft? Weil teilweise ist im Log ersichtlich, dass ein anderes fhempy schon läuft.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 29 September 2022, 00:00:18
fhem läuft auf  einem raspi wo auch der fhempy sever läuft
komischerweise hab ich in fhem auch ,schon länger,

fhempy_peer_127_0_1_1          0,1,483
fhempy_peer_192_168_1_147  0,1,486
und
pyBinding
de aber immer auf update finish steht

wenn ich die oberen zwei lösche kommen sie nach einigerzeit wieder da hab ich es löschen aufgegeben
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 29 September 2022, 00:41:15
Hab jetzt noch einen neustart aller komponenten durchgeführt

fhempy journal:
-- Journal begins at Sat 2022-09-24 06:40:46 CEST. --
Sep 29 00:11:40 fhem fhempy[477]:     status = await self.exchange(STATUS)
Sep 29 00:11:40 fhem fhempy[477]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 463, in exchange
Sep 29 00:11:40 fhem fhempy[477]:     msg = await self.dispatcher.wait_for(seqno)
Sep 29 00:11:40 fhem fhempy[477]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 250, in wait_for
Sep 29 00:11:40 fhem fhempy[477]:     await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout)
Sep 29 00:11:40 fhem fhempy[477]:   File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
Sep 29 00:11:40 fhem fhempy[477]:     raise exceptions.TimeoutError() from exc
Sep 29 00:11:40 fhem fhempy[477]: asyncio.exceptions.TimeoutError
Sep 29 00:12:21 fhem fhempy[477]: 2022-09-29 00:12:21,770 - ERROR    - fhempy.lib.fhem: NO RESPONSE since 60s: foreach my $fhem_dev (sort keys %main::defs) {  return 1 if(defined($main::defs{$fhem_dev}{TYPE}) && $main::defs{$fhem_dev}{TYPE} eq 'BindingsIo' && $main::defs{$fhem_dev}{IP} eq '127.0.1.1');;}return 0;;
Sep 29 00:14:39 fhem fhempy[477]: 2022-09-29 00:14:39,024 - ERROR    - fhempy.lib.fhem: FHEM took 20222ms for readingsSingleUpdate($defs{'NousA1WiFiBT6'},'online','0',1)



in der app lassen sich aber steuern
hoffe es hilft weiter
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 29 September 2022, 04:45:49
Zitat@Sommerfeld, ok, das bedeutet nur 2 Devices funktionieren nicht? Die restlichen funktionieren, aber der Status ist nicht korrekt. Kannst du mir bitte noch posten welchen Commands die Devices haben? Also nicht die webCmds die du angelegt hast, sondern was das Device für Commands bietet.
Es sind 3 Devices
Vorhangschalter
[{'code': 'control', 'dp_id': 1, 'type': 'Enum', 'values': '{"range":["open","stop","close"]}', 'desc': 'control'}, {'code': 'percent_control', 'dp_id': 2, 'type': 'Integer', 'values': '{"unit":"%","min":0,"max":100,"scale":0,"step":1}', 'desc': 'percent control'}, {'code': 'control_back_mode', 'dp_id': 5, 'type': 'Enum', 'values': '{"range":["forward","back"]}', 'desc': 'control back mode'}, {'code': 'border', 'dp_id': 16, 'type': 'Enum', 'values': '{"range":["up","down","up_delete","down_delete","remove_top_bottom"]}', 'desc': 'border'}, {'code': 'position_best', 'dp_id': 19, 'type': 'Integer', 'values': '{"unit":"%","min":0,"max":100,"scale":0,"step":1}', 'desc': 'position best'}]
Steckdose
[{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': '{}', 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': '{"unit":"s","min":0,"max":86400,"scale":0,"step":1}', 'desc': 'countdown 1'}, {'code': 'relay_status', 'dp_id': 38, 'type': 'Enum', 'values': '{"range":["power_off","power_on","last"]}', 'desc': 'relay status'}, {'code': 'light_mode', 'dp_id': 40, 'type': 'Enum', 'values': '{"range":["relay","pos","none"]}', 'desc': 'light mode'}, {'code': 'child_lock', 'dp_id': 41, 'type': 'Boolean', 'values': '{}', 'desc': 'child lock'}, {'code': 'cycle_time', 'dp_id': 42, 'type': 'String', 'values': '{}', 'desc': 'cycle time'}, {'code': 'random_time', 'dp_id': 43, 'type': 'String', 'values': '{}', 'desc': 'random time'}]
Schalter
[{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': '{}', 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 7, 'type': 'Integer', 'values': '{"unit":"s","min":0,"max":86400,"scale":0,"step":1}', 'desc': 'countdown 1'}, {'code': 'relay_status', 'dp_id': 14, 'type': 'Enum', 'values': '{"range":["power_off","power_on","last"]}', 'desc': 'relay status'}, {'code': 'light_mode', 'dp_id': 15, 'type': 'Enum', 'values': '{"range":["relay","pos","none"]}', 'desc': 'light mode'}, {'code': 'switch_backlight', 'dp_id': 16, 'type': 'Boolean', 'values': '{}', 'desc': 'switch backlight'}, {'code': 'cycle_time', 'dp_id': 17, 'type': 'String', 'values': '{}', 'desc': 'cycle time'}, {'code': 'random_time', 'dp_id': 18, 'type': 'String', 'values': '{}', 'desc': 'random time'}]
Ich hoffe, dass sind die Commands, die du meinst.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 29 September 2022, 07:11:15
Meine Mobile Klima hat auch keine befehlsausführung mehr

Command not available for this device.

von einem DOIF das den ganzen Sommer funktionierte
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 29 September 2022, 08:02:58
Zitat von: ChrisA4 am 29 September 2022, 00:00:18
fhem läuft auf  einem raspi wo auch der fhempy sever läuft
komischerweise hab ich in fhem auch ,schon länger,

fhempy_peer_127_0_1_1          0,1,483
fhempy_peer_192_168_1_147  0,1,486
und
pyBinding
de aber immer auf update finish steht

wenn ich die oberen zwei lösche kommen sie nach einigerzeit wieder da hab ich es löschen aufgegeben

Genau das ist das Problem. Du hast wahrscheinlich einen Service fhempy installiert.
sudo systemctl stop fhempy
sudo systemctl disable fhempy
Danach die beiden Peers löschen. Starte danach den RPi neu um zu prüfen, dass die Devices weg sind.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 29 September 2022, 08:04:10
Zitat von: ChrisA4 am 29 September 2022, 00:41:15
Hab jetzt noch einen neustart aller komponenten durchgeführt

fhempy journal:
-- Journal begins at Sat 2022-09-24 06:40:46 CEST. --
Sep 29 00:11:40 fhem fhempy[477]:     status = await self.exchange(STATUS)
Sep 29 00:11:40 fhem fhempy[477]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 463, in exchange
Sep 29 00:11:40 fhem fhempy[477]:     msg = await self.dispatcher.wait_for(seqno)
Sep 29 00:11:40 fhem fhempy[477]:   File "/home/pi/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 250, in wait_for
Sep 29 00:11:40 fhem fhempy[477]:     await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout)
Sep 29 00:11:40 fhem fhempy[477]:   File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
Sep 29 00:11:40 fhem fhempy[477]:     raise exceptions.TimeoutError() from exc
Sep 29 00:11:40 fhem fhempy[477]: asyncio.exceptions.TimeoutError
Sep 29 00:12:21 fhem fhempy[477]: 2022-09-29 00:12:21,770 - ERROR    - fhempy.lib.fhem: NO RESPONSE since 60s: foreach my $fhem_dev (sort keys %main::defs) {  return 1 if(defined($main::defs{$fhem_dev}{TYPE}) && $main::defs{$fhem_dev}{TYPE} eq 'BindingsIo' && $main::defs{$fhem_dev}{IP} eq '127.0.1.1');;}return 0;;
Sep 29 00:14:39 fhem fhempy[477]: 2022-09-29 00:14:39,024 - ERROR    - fhempy.lib.fhem: FHEM took 20222ms for readingsSingleUpdate($defs{'NousA1WiFiBT6'},'online','0',1)



in der app lassen sich aber steuern
hoffe es hilft weiter
Was steht bei der App bei der Version der Devices?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 29 September 2022, 08:05:00
Zitat von: Sommerfeld am 29 September 2022, 04:45:49
Es sind 3 Devices
Vorhangschalter
[{'code': 'control', 'dp_id': 1, 'type': 'Enum', 'values': '{"range":["open","stop","close"]}', 'desc': 'control'}, {'code': 'percent_control', 'dp_id': 2, 'type': 'Integer', 'values': '{"unit":"%","min":0,"max":100,"scale":0,"step":1}', 'desc': 'percent control'}, {'code': 'control_back_mode', 'dp_id': 5, 'type': 'Enum', 'values': '{"range":["forward","back"]}', 'desc': 'control back mode'}, {'code': 'border', 'dp_id': 16, 'type': 'Enum', 'values': '{"range":["up","down","up_delete","down_delete","remove_top_bottom"]}', 'desc': 'border'}, {'code': 'position_best', 'dp_id': 19, 'type': 'Integer', 'values': '{"unit":"%","min":0,"max":100,"scale":0,"step":1}', 'desc': 'position best'}]
Steckdose
[{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': '{}', 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': '{"unit":"s","min":0,"max":86400,"scale":0,"step":1}', 'desc': 'countdown 1'}, {'code': 'relay_status', 'dp_id': 38, 'type': 'Enum', 'values': '{"range":["power_off","power_on","last"]}', 'desc': 'relay status'}, {'code': 'light_mode', 'dp_id': 40, 'type': 'Enum', 'values': '{"range":["relay","pos","none"]}', 'desc': 'light mode'}, {'code': 'child_lock', 'dp_id': 41, 'type': 'Boolean', 'values': '{}', 'desc': 'child lock'}, {'code': 'cycle_time', 'dp_id': 42, 'type': 'String', 'values': '{}', 'desc': 'cycle time'}, {'code': 'random_time', 'dp_id': 43, 'type': 'String', 'values': '{}', 'desc': 'random time'}]
Schalter
[{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': '{}', 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 7, 'type': 'Integer', 'values': '{"unit":"s","min":0,"max":86400,"scale":0,"step":1}', 'desc': 'countdown 1'}, {'code': 'relay_status', 'dp_id': 14, 'type': 'Enum', 'values': '{"range":["power_off","power_on","last"]}', 'desc': 'relay status'}, {'code': 'light_mode', 'dp_id': 15, 'type': 'Enum', 'values': '{"range":["relay","pos","none"]}', 'desc': 'light mode'}, {'code': 'switch_backlight', 'dp_id': 16, 'type': 'Boolean', 'values': '{}', 'desc': 'switch backlight'}, {'code': 'cycle_time', 'dp_id': 17, 'type': 'String', 'values': '{}', 'desc': 'cycle time'}, {'code': 'random_time', 'dp_id': 18, 'type': 'String', 'values': '{}', 'desc': 'random time'}]
Ich hoffe, dass sind die Commands, die du meinst.
Nein, bitte die Commands die Fhem ausführen kann: on, off, ...
Poste bitte auch ein list vom Device.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 29 September 2022, 08:39:23
ZitatWas steht bei der App bei der Version der Devices?

Hauptmodul V1.1.12
Anderer Typ V1.0.0
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 29 September 2022, 08:50:31
Zitat von: dominik am 29 September 2022, 08:02:58
Genau das ist das Problem. Du hast wahrscheinlich einen Service fhempy installiert.
sudo systemctl stop fhempy
sudo systemctl disable fhempy
Danach die beiden Peers löschen. Starte danach den RPi neu um zu prüfen, dass die Devices weg sind.
Durchgeführt jetzt kommt nur mehr pybinding

Aber die nous und klima gehn nicht
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 29 September 2022, 08:59:31
ZitatPoste bitte auch ein list vom Device
Beispiel Steckdose
Internals:
   .AttrList  tuya_spec_functions tuya_spec_status IODev:local_pybinding event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading
   .FhemMetaInternals 1
   .eventMapCmd An:noArg Aus:noArg
   .triggerUsed 0
   DEF        tuya 0hrfawjkhswcd1aa bff302126d4d3f91e76q5y 192.168.178.80 486d7840b3427127 3.3 1234.... 1234.....
   FHEMPYTYPE tuya
   FUUID      62b015ea-f33f-3b5c-8275-fd7786b26f79a831
   FVERSION   10_fhempy.pm:0.182830/2019-01-16
   IODev      local_pybinding
   NAME       Ladestation_Saugroboter_EG_bff302126d4d3f91e76q5y
   NR         1216
   PYTHONTYPE tuya
   STATE      Initializing...
   TYPE       fhempy
   .attreocr:
     .*
   .attrminint:
   READINGS:
     2022-06-20 08:38:37   active_time     1655670361
     2022-08-30 07:58:34   add_ele         0.001
     2022-06-20 08:38:37   biz_type        0
     2022-06-20 08:38:37   category        cz
     2022-06-20 08:38:38   child_lock      off
     2022-06-20 08:38:38   countdown_1     0.0
     2022-06-20 08:38:37   create_time     1655670361
     2022-09-24 14:26:54   cur_current     0.0
     2022-09-24 14:26:54   cur_power       0.0
     2022-09-24 22:27:22   cur_voltage     236.2
     2022-06-20 08:38:38   dp_21           1
     2022-06-20 08:38:38   dp_22           638
     2022-06-20 08:38:38   dp_23           30636
     2022-06-20 08:38:38   dp_24           17640
     2022-06-20 08:38:38   dp_25           2360
     2022-06-20 08:38:38   dp_26           0
     2022-06-20 08:38:38   dp_39           0
     2022-06-20 08:38:37   icon            smart/icon/ay1514166115504M4mB5/4c2b98c1ca7abc59d1d7068d36247bef.png
     2022-06-20 08:38:37   id              bff302126d4d3f91e76q5y
     2022-06-20 08:38:37   ip              93.201.77.223
     2022-06-20 08:38:37   lat             52.8048
     2022-06-20 08:38:38   light_mode      relay
     2022-06-20 08:38:37   local_key       486d7840b3427127
     2022-06-20 08:38:37   lon             13.0448
     2022-06-20 08:38:37   model           WGH-JLCZ03
     2022-06-20 08:38:37   name            Ladestation_Saugroboter_EG
     2022-09-25 07:56:06   online          0
     2022-06-20 08:38:37   owner_id        15487476
     2022-06-20 08:38:37   product_id      0hrfawjkhswcd1aa
     2022-06-20 08:38:37   product_name    Smart  Plug
     2022-06-20 08:38:38   relay_status    on
     2022-09-29 08:29:48   state           Initializing...
     2022-06-20 08:38:37   sub             0
     2022-06-20 08:38:37   time_zone       +02:00
     2022-06-20 08:38:37   uid             eu1598817427882BAzmt
     2022-06-20 08:38:37   update_time     1655670475
     2022-06-20 08:38:37   uuid            0c04349e4dff76a1
   args:
     Ladestation_Saugroboter_EG_bff302126d4d3f91e76q5y
     fhempy
     tuya
     0hrfawjkhswcd1aa
     bff302126d4d3f91e76q5y
     192.168.178.80
     486d7840b3427127
     3.3
     fq83awrvav6glwxl28ed
     59327720c0834b8d8d4bc010f9b9a072
   argsh:
   helper:
     bm:
       fhempy_Get:
         cnt        7
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        29.09. 08:44:39
         max        0.00679707527160645
         tot        0.034498929977417
         mAr:
           HASH(0x55b412f84cb8)
           ARRAY(0x55b416a6ab08)
           HASH(0x55b416e978d0)
       fhempy_Set:
         cnt        37
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        29.09. 08:35:57
         max        0.00998902320861816
         tot        0.23701286315918
         mAr:
           HASH(0x55b412f84cb8)
           ARRAY(0x55b416bd7ca0)
           HASH(0x55b417288ef8)
   hmccu:
Attributes:
   alias      Ladestation_Saugroboter_EG
   cmdIcon    on:rc_GREEN off:rc_RED
   devStateIcon An:black_Steckdose.on Aus:black_Steckdose.off
   dp_01      switch_1
   dp_09      countdown_1
   dp_17      add_ele
   dp_18      cur_current
   dp_19      cur_power
   dp_20      cur_voltage
   dp_38      relay_status
   dp_40      light_mode
   dp_41      child_lock
   dp_42      cycle_time
   dp_43      random_time
   event-on-change-reading .*
   eventMap   on:An off:Aus
   group      tuya
   icon       ge_wht_steckdose
   room       02_0_EG->02_1_EG_Flur,Tuya
   tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': '{}', 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': '{"unit":"s","min":0,"max":86400,"scale":0,"step":1}', 'desc': 'countdown 1'}, {'code': 'relay_status', 'dp_id': 38, 'type': 'Enum', 'values': '{"range":["power_off","power_on","last"]}', 'desc': 'relay status'}, {'code': 'light_mode', 'dp_id': 40, 'type': 'Enum', 'values': '{"range":["relay","pos","none"]}', 'desc': 'light mode'}, {'code': 'child_lock', 'dp_id': 41, 'type': 'Boolean', 'values': '{}', 'desc': 'child lock'}, {'code': 'cycle_time', 'dp_id': 42, 'type': 'String', 'values': '{}', 'desc': 'cycle time'}, {'code': 'random_time', 'dp_id': 43, 'type': 'String', 'values': '{}', 'desc': 'random time'}]
   tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': '{}'}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': '{"unit":"s","min":0,"max":86400,"scale":0,"step":1}'}, {'code': 'add_ele', 'dp_id': 17, 'type': 'Integer', 'values': '{"min":0,"max":50000,"scale":3,"step":100}'}, {'code': 'cur_current', 'dp_id': 18, 'type': 'Integer', 'values': '{"unit":"mA","min":0,"max":30000,"scale":0,"step":1}'}, {'code': 'cur_power', 'dp_id': 19, 'type': 'Integer', 'values': '{"unit":"W","min":0,"max":80000,"scale":1,"step":1}'}, {'code': 'cur_voltage', 'dp_id': 20, 'type': 'Integer', 'values': '{"unit":"V","min":0,"max":5000,"scale":1,"step":1}'}, {'code': 'relay_status', 'dp_id': 38, 'type': 'Enum', 'values': '{"range":["power_off","power_on","last"]}'}, {'code': 'light_mode', 'dp_id': 40, 'type': 'Enum', 'values': '{"range":["relay","pos","none"]}'}, {'code': 'child_lock', 'dp_id': 41, 'type': 'Boolean', 'values': '{}'}, {'code': 'cycle_time', 'dp_id': 42, 'type': 'String', 'values': '{}'}, {'code': 'random_time', 'dp_id': 43, 'type': 'String', 'values': '{}'}]
   webCmd     on:off
   webCmdLabel Drücken zum Einschalten:Drücken zum Ausschalten

ZitatNein, bitte die Commands die Fhem ausführen kann: on, off, ...
Sind nicht vorhanden
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 29 September 2022, 17:06:54
Ich bin mir ziemlich sicher, dass die Devices auf 3.4 aktualisiert wurden. Diese gehen dann vorerst nicht mehr mit fhempy. Dazu muss ich noch 3.4 implementieren.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 29 September 2022, 18:18:17
Hallo Dominik,
dann warte ich mal ab und berichte dann, wenn es wieder funktionieren sollte.
V G
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 30 September 2022, 06:39:43
Schliesse mich Sommerfeld an
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 30 September 2022, 23:02:46
Testet bitte noch folgendes
sudo -u fhem bash
pip3 install -U tinytuya
python3 -m tinytuya scan


Danach sollte die Liste an Devices kommen in euren Netzwerk inkl. der Info welche Version 3.3 oder 3.4. Postet bitte die Ausgabe.

Solte so aussehen

TinyTuya (Tuya device scanner) [1.7.0]

Scanning on UDP ports 6666 and 6667 for devices (15 retries)...

Unknown v3.3 Device   Product ID = keymxkctp9ukgcvg  [Valid payload]:
    Address = 192.168.86.27,  Device ID = bf551825b5a36f5eexxxxx, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.86.27: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = keyjup78v54myhan  [Valid payload]:
    Address = 192.168.86.28,  Device ID = bfb025e57319a673dxxxxx, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.86.28: DEVICE KEY required to poll for status
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 01 Oktober 2022, 09:02:28
ZitatTestet bitte noch folgendes
Scanning on UDP ports 6666 and 6667 for devices (15 retries)...

Unknown v3.3 Device   Product ID = key7axydcvmea3x9  [Valid payload]:
    Address = 192.168.178.107,  Device ID = bfc5d2965589f02b5cxla9, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.178.107: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = keyjup78v54myhan  [Valid payload]:
    Address = 192.168.178.99,  Device ID = bf7a36070c5531b25aubiy, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.178.99: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = key7axydcvmea3x9  [Valid payload]:
    Address = 192.168.178.104,  Device ID = bffcd6853d5c78d890twox, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.178.104: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = keym9qkuywghyrvs  [Valid payload]:
    Address = 192.168.178.69,  Device ID = bfc0100ce21d5d7715kbjp, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.178.69: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = 35twetlejkkllta0  [Valid payload]:
    Address = 192.168.178.98,  Device ID = bf905cb6a14a43dbf9hhfu, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.178.98: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = key7axydcvmea3x9  [Valid payload]:
    Address = 192.168.178.108,  Device ID = bf3a16beb61c832bb19ycr, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.178.108: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = key7axydcvmea3x9  [Valid payload]:
    Address = 192.168.178.102,  Device ID = bf38db850cdcf1d3ackms3, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.178.102: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = key5ckdnys3pqgec  [Valid payload]:
    Address = 192.168.178.100,  Device ID = bf2f62ca78c544ff14bnmx, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.178.100: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = ozcdjaqrxauonq1f  [Valid payload]:
    Address = 192.168.178.91,  Device ID = bfa7a3c4073dbf8ff9ozuk, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.178.91: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = keyjup78v54myhan  [Valid payload]:
    Address = 192.168.178.97,  Device ID = bf8ddd4db6e46b95cb3lad, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.178.97: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = t6ief6k56sapz1ey  [Valid payload]:
    Address = 192.168.178.90,  Device ID = 83652817dc4f22618a08, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.178.90: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = smignajbaljjp2wa  [Valid payload]:
    Address = 192.168.178.89,  Device ID = bf623c4459370bd192tywm, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.178.89: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = keym9qkuywghyrvs  [Valid payload]:
    Address = 192.168.178.76,  Device ID = bf99d29dcdc176fbecfx9m, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.178.76: DEVICE KEY required to poll for status
                   
Scan Complete!  Found 13 devices.

>> Saving device snapshot data to snapshot.json

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/opt/fhem/.local/lib/python3.10/site-packages/tinytuya/__main__.py", line 57, in <module>
    scanner.scan(color=color, forcescan=force)
  File "/opt/fhem/.local/lib/python3.10/site-packages/tinytuya/scanner.py", line 81, in scan
    devices(verbose=True, maxretry=maxretry, color=color, poll=True, forcescan=forcescan)
  File "/opt/fhem/.local/lib/python3.10/site-packages/tinytuya/scanner.py", line 431, in devices
    with open(SNAPSHOTFILE, "w") as outfile:
PermissionError: [Errno 13] Permission denied: 'snapshot.json'


Eigenartig: In der Aufstellung fehlen Devices.
Laut meinem Fhem scan "found 32 devices, start local scan..."
Nach dieser Anzeige zeigt Fhem "13 devices found localy" an
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 Oktober 2022, 09:08:57
Funktionieren diese 13 Devices mit fhempy?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 01 Oktober 2022, 09:27:20
Bei mir kommt folgendes:


TinyTuya (Tuya device scanner) [1.7.0]

Scanning on UDP ports 6666 and 6667 for devices (15 retries)...

Unknown v3.3 Device   Product ID = keya4gvchmtapm8n  [Valid payload]:
    Address = 192.168.1.148,  Device ID = bf2c81700c9d962d96bxsj, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.1.148: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = z09KPPo1BEvJTua4  [Valid payload]:
    Address = 192.168.1.28,  Device ID = 21320014a4cf12eb2408, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.1.28: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = fvjbqt0r31vaxaf4  [Valid payload]:
    Address = 192.168.1.43,  Device ID = bf60f994ba65089eea3k2g, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.1.43: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = keya4gvchmtapm8n  [Valid payload]:
    Address = 192.168.1.169,  Device ID = bf2deed618aaf0834bplav, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.1.169: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = keya4gvchmtapm8n  [Valid payload]:
    Address = 192.168.1.89,  Device ID = bf4a23f4f8a190e7cb8ytf, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.1.89: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = keya4gvchmtapm8n  [Valid payload]:
    Address = 192.168.1.199,  Device ID = bfd6f8368a299a33c66ziz, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.1.199: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = keya4gvchmtapm8n  [Valid payload]:
    Address = 192.168.1.118,  Device ID = bf5249863250b4bdd3jpx8, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.1.118: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = keya4gvchmtapm8n  [Valid payload]:
    Address = 192.168.1.174,  Device ID = bf4ff99fe700de582025jo, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.1.174: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = keya4gvchmtapm8n  [Valid payload]:
    Address = 192.168.1.90,  Device ID = bfe8664488739843aaiudq, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.1.90: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = keya4gvchmtapm8n  [Valid payload]:
    Address = 192.168.1.136,  Device ID = bf8a37bcac0c0dfb68e0zd, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.1.136: DEVICE KEY required to poll for status
Unknown v3.4 Device   Product ID = keyjup78v54myhan  [Valid payload]:
    Address = 192.168.1.20,  Device ID = bfe228e744139622177nrz, Local Key = ,  Version = 3.4, MAC =
    No Stats for 192.168.1.20: DEVICE KEY required to poll for status
Unknown v3.4 Device   Product ID = keyjup78v54myhan  [Valid payload]:
    Address = 192.168.1.19,  Device ID = bffd0c7e5b7aea4199jaaz, Local Key = ,  Version = 3.4, MAC =
    No Stats for 192.168.1.19: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = keya4gvchmtapm8n  [Valid payload]:
    Address = 192.168.1.121,  Device ID = bfaace0990fdcdadebpxnf, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.1.121: DEVICE KEY required to poll for status
Unknown v3.4 Device   Product ID = keyjup78v54myhan  [Valid payload]:
    Address = 192.168.1.21,  Device ID = bf5f5e83e3cba769c9oia2, Local Key = ,  Version = 3.4, MAC =
    No Stats for 192.168.1.21: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = keya4gvchmtapm8n  [Valid payload]:
    Address = 192.168.1.122,  Device ID = bf4264b6f6b3c5fa8fztz6, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.1.122: DEVICE KEY required to poll for status
Unknown v3.3 Device   Product ID = keya4gvchmtapm8n  [Valid payload]:
    Address = 192.168.1.72,  Device ID = bfeb362a7007656081x09j, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.1.72: DEVICE KEY required to poll for status

Scan Complete!  Found 16 devices.

>> Saving device snapshot data to snapshot.json

Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/opt/fhem/.local/lib/python3.9/site-packages/tinytuya/__main__.py", line 57, in <module>
    scanner.scan(color=color, forcescan=force)
  File "/opt/fhem/.local/lib/python3.9/site-packages/tinytuya/scanner.py", line 81, in scan
    devices(verbose=True, maxretry=maxretry, color=color, poll=True, forcescan=forcescan)
  File "/opt/fhem/.local/lib/python3.9/site-packages/tinytuya/scanner.py", line 431, in devices
    with open(SNAPSHOTFILE, "w") as outfile:
PermissionError: [Errno 13] Permission denied: 'snapshot.json'
fhem@fhem:/home/pi$


mit der der ip 28 ist die klima die nicht mehr steuern geht

mit der ip 19,20,21 sind die nous a1 die auch nicht gehn bzw auf Initializing stehn
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 Oktober 2022, 09:47:51
Ok, die Klima sollte gehen, die anderen sind V3.4 und gehen daher vorerst nicht.
Prüfe bitte ob die Klima in Fhem noch die richtige IP hat, ob sich die eh nicht geändert hat.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 01 Oktober 2022, 10:53:32
Zitat von: dominik am 01 Oktober 2022, 09:47:51
Ok, die Klima sollte gehen, die anderen sind V3.4 und gehen daher vorerst nicht.
Prüfe bitte ob die Klima in Fhem noch die richtige IP hat, ob sich die eh nicht geändert hat.

geht leider nicht, ip stimmt
steht nur auf error und initializing

siehe anhang
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 01 Oktober 2022, 14:56:06
ZitatFunktionieren diese 13 Devices mit fhempy?
Nein, nicht alle, s.:
Stecker-SilverCrest-Hub-Ueberwachung funktioniert
Kamera-TUYA-PC-192-168-178-98 Initializing
Stecker-Homatic-Hub    Initializing Command not available for this device
Gassensor Initializing
Gaestezimmervorhang Initializing Command not available for this device
Emma-Saugroboter Initializing
Motorrad-Ladestation-Carport funktioniert nicht Keine state Aktualisierungf
Fritzphone-Ladestation-Schlafzimmer funktioniert
Wechselschalter-Flur-EG-rechts funktioniert
Wechselschalter-Flur-EG-links funktioniert
Wechselschalter-Flur-OG-links funktioniert
Wechselschalter-Treppenhaus-oben funktioniert
Wechselschalter-Treppenhaus-unten funktioniert
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 Oktober 2022, 16:21:02
Zitat von: ChrisA4 am 01 Oktober 2022, 10:53:32
geht leider nicht, ip stimmt
steht nur auf error und initializing

siehe anhang
Poste bitte das fhempy Log mit den Einträgen von der Klima bei einem fhempy Neustart.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 Oktober 2022, 16:23:30
Zitat von: Sommerfeld am 01 Oktober 2022, 14:56:06
Nein, nicht alle, s.:
Stecker-SilverCrest-Hub-Ueberwachung funktioniert
Kamera-TUYA-PC-192-168-178-98 Initializing
Stecker-Homatic-Hub    Initializing Command not available for this device
Gassensor Initializing
Gaestezimmervorhang Initializing Command not available for this device
Emma-Saugroboter Initializing
Motorrad-Ladestation-Carport funktioniert nicht Keine state Aktualisierungf
Fritzphone-Ladestation-Schlafzimmer funktioniert
Wechselschalter-Flur-EG-rechts funktioniert
Wechselschalter-Flur-EG-links funktioniert
Wechselschalter-Flur-OG-links funktioniert
Wechselschalter-Treppenhaus-oben funktioniert
Wechselschalter-Treppenhaus-unten funktioniert

Ok, probieren wir mal eines nach dem anderen. Poste bitte die Fehler im fhempy Log von Kamera-TUYA-PC-192-168-178-98 und ein list von diesem Device.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 01 Oktober 2022, 17:29:05
ZitatPoste bitte die Fehler im fhempy Log von Kamera-TUYA-PC-192-168-178-98
Es gibt keine Meldungen im fhempy Log.
Das List von der Kamera:
Internals:
   .AttrList  tuya_spec_functions tuya_spec_status IODev:local_pybinding event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading
   .FhemMetaInternals 1
   DEF        tuya 35twetlejkkllta0 bf905cb6a14a43dbf9hhfu 192.168.178.98 f9ea8d1efc541ead 3.3 1234..... 1234....
   DEVICEID   bf905cb6a14a43dbf9hhfu
   FHEMPYTYPE tuya
   FUUID      627cbedf-f33f-3b5c-2b13-1b1d0aca77ec9295
   FVERSION   10_fhempy.pm:0.182830/2019-01-16
   IODev      local_pybinding
   NAME       Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
   NR         1198
   PYTHONTYPE tuya
   STATE      Initializing...
   TYPE       fhempy
   eventCount 149
   .attraggr:
   .attrminint:
   READINGS:
     2022-05-12 10:01:37   active_time     1644234172
     2022-05-13 03:34:14   basic_flip      off
     2022-05-13 03:34:14   basic_indicator on
     2022-05-13 03:34:14   basic_nightvision 0
     2022-05-13 03:34:14   basic_osd       on
     2022-05-12 10:01:37   biz_type        0
     2022-05-12 10:01:37   category        sp
     2022-05-12 10:01:37   create_time     1644234172
     2022-07-17 16:47:27   decibel_sensitivity 0
     2022-07-17 16:47:27   decibel_switch  off
     2022-05-17 04:00:40   dp_101          1
     2022-05-17 04:00:40   dp_103          0
     2022-05-17 04:00:40   dp_104          1
     2022-05-17 04:00:41   dp_106          1
     2022-05-17 04:00:41   dp_108          0
     2022-05-17 04:00:41   dp_109          0|0|0
     2022-05-17 04:00:41   dp_110          5
     2022-05-17 04:00:41   dp_134          0
     2022-05-17 04:00:42   dp_139          0
     2022-05-17 04:00:42   dp_140          0
     2022-05-17 04:00:42   dp_150          1
     2022-05-17 04:00:42   dp_151          2
     2022-05-17 04:00:42   dp_168          0
     2022-05-17 04:00:42   dp_254          192.168.178.98
     2022-05-17 04:00:42   dp_255          0
     2022-05-12 10:01:37   icon            smart/icon/ay1525342462043yjwZs/e9af8e6817e79859b119a322895ffc0b.png
     2022-05-12 10:01:37   id              bf905cb6a14a43dbf9hhfu
     2022-05-12 10:01:37   ip              93.203.85.174
     2022-05-12 10:01:37   lat             52.8048
     2022-05-12 10:01:37   local_key       f9ea8d1efc541ead
     2022-05-12 10:01:37   lon             13.0448
     2022-05-12 10:01:37   model           Überwachungskamera
     2022-07-17 16:47:27   motion_area_switch off
     2022-05-13 03:34:14   motion_sensitivity 1
     2022-08-12 04:02:59   motion_switch   off
     2022-05-13 03:34:14   movement_detect_pic eyJidWNrZXQiOiJ0eS1ldS1zdG9yYWdlMzAiLCJmaWxlcyI6W1siLzZjOTJkNS0xNTQ4NzQ3Ni10dXlhYjcyNTA0NWJmZTE0OTg2Zi9kZXRlY3QvMTY0NDI1ODQxMC5qcGVnP3BhcmFtPWlvYW5KV3p3T3ovKzF1QzFDMTBYMFZYdjcwdHZXNTlZYXpobmtZSmdMNUE9IiwiIl1dLCJ2IjoiMy4wIn0=
     2022-05-12 10:01:37   name            Wohnzimmerkamera
     2022-10-01 17:24:18   online          0
     2022-05-12 10:01:37   owner_id        15487476
     2022-05-12 10:01:37   product_id      35twetlejkkllta0
     2022-10-01 08:34:49   product_name    ZX-5110
     2022-05-13 03:34:14   ptz_stop        on
     2022-07-17 16:47:27   record_mode     2
     2022-07-17 16:47:27   record_switch   on
     2022-05-13 03:34:14   sd_format       false
     2022-05-13 03:34:14   sd_status       0.5
     2022-05-13 03:34:14   sd_storge       0|0|0
     2022-10-01 08:34:48   state           Initializing...
     2022-05-12 10:01:37   sub             0
     2022-05-12 10:01:37   time_zone       +01:00
     2022-05-12 10:01:37   uid             eu1598817427882BAzmt
     2022-05-12 10:01:37   update_time     1644242210
     2022-05-12 10:01:37   uuid            tuyab725045bfe14986f
   args:
     Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
     fhempy
     tuya
     35twetlejkkllta0
     bf905cb6a14a43dbf9hhfu
     192.168.178.98
     f9ea8d1efc541ead
     3.3
     fq83awrvav6glwxl28ed
     59327720c0834b8d8d4bc010f9b9a072
   argsh:
   helper:
     bm:
       fhempy_Attr:
         cnt        1
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        01.10. 08:35:27
         max        0.00529909133911133
         tot        0.00529909133911133
         mAr:
           set
           Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
           alias
           Wohnzimmerkamera
       fhempy_Get:
         cnt        3
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        01.10. 14:34:10
         max        0.00382900238037109
         tot        0.0111401081085205
         mAr:
           HASH(0x55ee65e81598)
           ARRAY(0x55ee6ada2fc0)
           HASH(0x55ee69fc1a90)
       fhempy_Set:
         cnt        420
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        01.10. 14:34:10
         max        0.0880889892578125
         tot        2.80324268341064
         mAr:
           HASH(0x55ee65e81598)
           ARRAY(0x55ee69b23470)
           HASH(0x55ee6924a350)
   hmccu:
Attributes:
   alias      Wohnzimmerkamera
   devStateIcon online:it_wifi@green offline:it_wifi@red
   dp_139     decibel_switch
   dp_140     decibel_sensitivity
   dp_150     record_switch
   dp_151     record_mode
   dp_168     motion_area_switch
   group      tuya
   icon       it_camera@red
   room       02_0_EG->02_4_EG_Wohnzimmer,Tuya
   tuya_spec_functions [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': '{}', 'desc': 'basic indicator'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': '{}', 'desc': 'basic flip'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': '{}', 'desc': 'basic osd'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': '{"range":["0","1","2"]}', 'desc': 'motion sensitivity'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': '{"range":["0","1","2"]}', 'desc': 'basic nightvision'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': '{}', 'desc': 'sd format'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': '{}', 'desc': 'ptz stop'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': '{"range":["1","2","3","4","5","6","7","0"]}', 'desc': 'ptz control'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': '{}', 'desc': 'motion switch'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': '{}', 'desc': 'decibel switch'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': '{"range":["0","1"]}', 'desc': 'decibel sensitivity'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': '{}', 'desc': 'record switch'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': '{"range":["1","2"]}', 'desc': 'record mode'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': '{}', 'desc': 'motion tracking'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': '{}', 'desc': 'motion area switch'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': '{"maxlen":255}', 'desc': 'motion area'}]
   tuya_spec_status [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'sd_storge', 'dp_id': 109, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'sd_status', 'dp_id': 110, 'type': 'Integer', 'values': '{"unit":"","min":1,"max":5,"scale":1,"step":1}'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': '{}'}, {'code': 'movement_detect_pic', 'dp_id': 115, 'type': 'Raw', 'values': '{}'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': '{}'}, {'code': 'sd_format_state', 'dp_id': 117, 'type': 'Integer', 'values': '{"unit":"","min":-20000,"max":20000,"scale":1,"step":1}'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': '{"range":["1","2","3","4","5","6","7","0"]}'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': '{"range":["0","1"]}'}, {'code': 'decibel_upload', 'dp_id': 141, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': '{}'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': '{"range":["1","2"]}'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'alarm_message', 'dp_id': 185, 'type': 'String', 'values': '{}'}
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 Oktober 2022, 17:31:48
Ändern sich die Readings wenn du per SmartLife App etwas änderst?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 01 Oktober 2022, 18:04:17
Nein, keine Änderung der Readings
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 01 Oktober 2022, 18:10:47
Habe die Kamera gerade gelöscht und dann neu angelegt.
Jetzt kommer im Log Warnings.
2022-10-01 18:01:10,110 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_101 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,115 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_103 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,121 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_104 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,126 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_106 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,131 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_108 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,136 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_109 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,141 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_110 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,146 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_111 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,151 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_115 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,156 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_116 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,161 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_117 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,166 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_119 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,171 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_134 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,176 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_139 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,182 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_140 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,187 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_141 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,192 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_150 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,197 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_151 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,202 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_161 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,207 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_168 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,212 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_169 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,218 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_185 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,223 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_101 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,228 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_103 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,233 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_104 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,238 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_106 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,243 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_108 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,249 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_111 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,254 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_116 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,260 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_119 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,265 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_134 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,270 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_139 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,275 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_140 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,280 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_150 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,285 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_151 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,290 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_161 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,296 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_168 in spec but not found locally. This should be reported to TuYa
2022-10-01 18:01:10,301 - WARNING  - Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu: dp_169 in spec but not found locally. This should be reported to TuYa
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 Oktober 2022, 18:11:35
Kommen jetzt updates?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 01 Oktober 2022, 18:27:39
Leider nein
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 Oktober 2022, 21:57:36
Und es hat sicher schon mal funktioniert?
Poste bitte noch ein list vom neuen Device.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 01 Oktober 2022, 23:47:36
Zitat von: dominik am 01 Oktober 2022, 16:21:02
Poste bitte das fhempy Log mit den Einträgen von der Klima bei einem fhempy Neustart.

2022-10-01 23:44:46,103 - ERROR    - NousA1WiFiBT7: Failed create_device
Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/locks.py", line 413, in acquire
    await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
    fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 424, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 354, in _create_cloudmapping_dev
    status = await self._connected_device.status()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 484, in status
    status = await self.exchange(STATUS)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 463, in exchange
    msg = await self.dispatcher.wait_for(seqno)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 250, in wait_for
    await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError


das kommt bei fhempy restart
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 Oktober 2022, 23:55:56
ok, das ist nur das V3.4 Device, das passt.

Poste bitte ein list von der Klima nach dem Neustart.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 02 Oktober 2022, 00:17:33
2022-10-02 00:04:38,319 - ERROR    - Klima_21320014a4cf12eb2408: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 424, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 341, in _create_cloudmapping_dev
    await self.retrieve_tuya_specs()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 319, in retrieve_tuya_specs
    self._convert_values_to_json()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 266, in _convert_values_to_json
    spec["values"] = json.loads(spec["values"])
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


ist aus opt/fhem/log $ sudo nano fhempy-2022-10-02.log

hoffe es ist der richtige oder wo kann ich sonst noch schauen
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 Oktober 2022, 00:27:35
Das sieht ja schon besser aus, bitte jetzt noch ein list vom Klima Device.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 02 Oktober 2022, 00:29:49
Zitat von: dominik am 02 Oktober 2022, 00:27:35
Das sieht ja schon besser aus, bitte jetzt noch ein list vom Klima Device.
wo is die
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 Oktober 2022, 00:30:56
list Klima_21320014a4cf12eb2408
in FHEMWEB eingeben.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 02 Oktober 2022, 00:32:27
ok

Internals:
   DEF        .28 91114d8dc415311f 3.3 uwwmgv3hb4d7dph9b2un
   FHEMPYTYPE tuya
   FUUID      6337fe37-f33f-c95d-bf78-efee064b421eb33b
   IODev      pyBinding
   NAME       Klima_21320014a4cf12eb2408
   NR         387
   PYTHONTYPE tuya
   STATE      Initializing...
   TYPE       fhempy
   eventCount 1
   READINGS:
     2022-10-01 10:45:43   online          0
     2022-10-02 00:04:37   state           Initializing...
   args:
     Klima_21320014a4cf12eb2408
     fhempy
     tuya
   
     3.3
     uwwmgv3hb4d7dph9b2un
     c345434e6b984aadaf56ed6880cd1eb8
   argsh:
Attributes:
   IODev      pyBinding
   group      tuya
   room       fhempy
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 Oktober 2022, 00:58:44
Perfekt, jetzt sollte das Problem in der Version 0.1.491 behoben sein.

Bitte lösche in deinem Post noch API_KEY/SECRET im DEF und unter args.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 02 Oktober 2022, 07:46:59
ZitatUnd es hat sicher schon mal funktioniert?
Die Kamera zeigte bereits ein state an und der wurde auch aktualisiert.
Internals:
   .AttrList  tuya_spec_functions tuya_spec_status IODev:local_pybinding event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading
   CFGFN     
   DEF        tuya 35twetlejkkllta0 bf905cb6a14a43dbf9hhfu 192.168.178.98 f9ea8d1efc541ead 3.3 1234.... 1234......
   DEVICEID   bf905cb6a14a43dbf9hhfu
   FHEMPYTYPE tuya
   FUUID      63388082-f33f-3b5c-6817-fe667177dcd35be6
   IODev      local_pybinding
   NAME       Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
   NR         18168
   PYTHONTYPE tuya
   STATE      Initializing...
   TYPE       fhempy
   eventCount 81
   .attraggr:
   .attrminint:
   READINGS:
     2022-10-01 20:03:12   IODev           local_pybinding
     2022-10-01 20:01:42   active_time     1644234172
     2022-10-01 20:01:42   biz_type        0
     2022-10-01 20:01:42   category        sp
     2022-10-01 20:01:42   create_time     1644234172
     2022-10-01 20:01:42   icon            smart/icon/ay1525342462043yjwZs/e9af8e6817e79859b119a322895ffc0b.png
     2022-10-01 20:01:42   id              bf905cb6a14a43dbf9hhfu
     2022-10-01 20:01:42   ip              93.203.85.174
     2022-10-01 20:01:42   lat             52.8048
     2022-10-01 20:01:42   local_key       f9ea8d1efc541ead
     2022-10-01 20:01:42   lon             13.0448
     2022-10-01 20:01:42   model           Überwachungskamera
     2022-10-01 20:01:42   name            Wohnzimmerkamera
     2022-10-02 07:40:43   online          0
     2022-10-01 20:01:42   owner_id        15487476
     2022-10-01 20:01:42   product_id      35twetlejkkllta0
     2022-10-01 20:01:42   product_name    ZX-5110
     2022-10-01 20:03:12   state           Initializing...
     2022-10-01 20:01:42   sub             0
     2022-10-01 20:01:42   time_zone       +01:00
     2022-10-01 20:01:42   uid             eu1598817427882BAzmt
     2022-10-01 20:01:42   update_time     1644242210
     2022-10-01 20:01:42   uuid            tuyab725045bfe14986f
   args:
     Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
     fhempy
     tuya
     35twetlejkkllta0
     bf905cb6a14a43dbf9hhfu
     192.168.178.98
     f9ea8d1efc541ead
     3.3
     fq83awrvav6glwxl28ed
     59327720c0834b8d8d4bc010f9b9a072
   argsh:
   helper:
     bm:
       fhempy_Attr:
         cnt        14
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        01.10. 20:01:40
         max        0.01173996925354
         tot        0.0837311744689941
         mAr:
           set
           Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
           tuya_spec_functions
           [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': {}, 'desc': 'basic indicator'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': {}, 'desc': 'basic flip'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': {}, 'desc': 'basic osd'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': {'range': ['0', '1', '2']}, 'desc': 'motion sensitivity'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': {'range': ['0', '1', '2']}, 'desc': 'basic nightvision'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': {}, 'desc': 'sd format'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': {}, 'desc': 'ptz stop'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': {'range': ['1', '2', '3', '4', '5', '6', '7', '0']}, 'desc': 'ptz control'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': {}, 'desc': 'motion switch'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': {}, 'desc': 'decibel switch'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': {'range': ['0', '1']}, 'desc': 'decibel sensitivity'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': {}, 'desc': 'record switch'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': {'range': ['1', '2']}, 'desc': 'record mode'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': {}, 'desc': 'motion tracking'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': {}, 'desc': 'motion area switch'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': {'maxlen': 255}, 'desc': 'motion area'}]
       fhempy_Define:
         cnt        1
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        01.10. 20:01:38
         max        0.0212669372558594
         tot        0.0212669372558594
         mAr:
           HASH(0x55ee744fe890)
           ARRAY(0x55ee72763fd8)
           HASH(0x55ee747268e0)
       fhempy_Get:
         cnt        2
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        02.10. 07:42:24
         max        0.00397086143493652
         tot        0.00753879547119141
         mAr:
           HASH(0x55ee744fe890)
           ARRAY(0x55ee7abf3be8)
           HASH(0x55ee7a099920)
       fhempy_Set:
         cnt        221
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        01.10. 20:33:58
         max        0.088547945022583
         tot        1.79667472839355
         mAr:
           HASH(0x55ee744fe890)
           ARRAY(0x55ee7168a180)
           HASH(0x55ee72b00b30)
   hmccu:
Attributes:
   IODev      local_pybinding
   alias      Wohnzimmerkamera
   devStateIcon online:it_wifi@green offline:it_wifi@red
   group      tuya
   icon       it_camera@red
   room       02_0_EG->02_4_EG_Wohnzimmer,Tuya
   tuya_spec_functions [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': '{}', 'desc': 'basic indicator'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': '{}', 'desc': 'basic flip'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': '{}', 'desc': 'basic osd'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': '{"range":["0","1","2"]}', 'desc': 'motion sensitivity'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': '{"range":["0","1","2"]}', 'desc': 'basic nightvision'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': '{}', 'desc': 'sd format'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': '{}', 'desc': 'ptz stop'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': '{"range":["1","2","3","4","5","6","7","0"]}', 'desc': 'ptz control'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': '{}', 'desc': 'motion switch'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': '{}', 'desc': 'decibel switch'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': '{"range":["0","1"]}', 'desc': 'decibel sensitivity'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': '{}', 'desc': 'record switch'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': '{"range":["1","2"]}', 'desc': 'record mode'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': '{}', 'desc': 'motion tracking'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': '{}', 'desc': 'motion area switch'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': '{"maxlen":255}', 'desc': 'motion area'}]
   tuya_spec_status [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'sd_storge', 'dp_id': 109, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'sd_status', 'dp_id': 110, 'type': 'Integer', 'values': '{"unit":"","min":1,"max":5,"scale":1,"step":1}'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': '{}'}, {'code': 'movement_detect_pic', 'dp_id': 115, 'type': 'Raw', 'values': '{}'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': '{}'}, {'code': 'sd_format_state', 'dp_id': 117, 'type': 'Integer', 'values': '{"unit":"","min":-20000,"max":20000,"scale":1,"step":1}'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': '{"range":["1","2","3","4","5","6","7","0"]}'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': '{"range":["0","1"]}'}, {'code': 'decibel_upload', 'dp_id': 141, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': '{}'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': '{"range":["1","2"]}'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'alarm_message', 'dp_id': 185, 'type': 'String', 'values': '{}'}]
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 02 Oktober 2022, 10:22:39
Zitat von: dominik am 02 Oktober 2022, 00:58:44
Perfekt, jetzt sollte das Problem in der Version 0.1.491 behoben sein.

Bitte lösche in deinem Post noch API_KEY/SECRET im DEF und unter args.

Nach neuem definieren der klima funkt es

was jetzt auch nicht geht ein blindsdriver

Internals:
   CFGFN     
   DEF        tuya   192.168.1.149 27a8388484e1eb41 3.3
   DEVICEID   00408365e868e7894c32
   FHEMPYTYPE tuya
   FUUID      633947e3-f33f-c95d-206b-31ee30d54ec7db9e
   IODev      pyBinding
   NAME       Blinds_Controller_00408365e868e7894c32
   NR         877
   PYTHONTYPE tuya
   STATE      Initializing...
   TYPE       fhempy
   eventCount 17
   READINGS:
     2022-10-02 10:12:22   active_time     1637828406
     2022-10-02 10:12:22   biz_type        18
     2022-10-02 10:12:22   category        cl
     2022-10-02 10:12:22   create_time     1619464496
     2022-10-02 10:12:22   icon            smart/program_category_icon/cl.png
     2022-10-02 10:12:22   id              00408365e868e7894c32
     2022-10-02 10:12:22   ip              92.248.3.214
     2022-10-02 10:12:22   lat             48.6951
     2022-10-02 10:12:22   local_key     
     2022-10-02 10:12:22   lon             15.9707
     2022-10-02 10:12:22   name            Blinds Controller
     2022-10-02 10:13:12   online          1
     2022-10-02 10:12:22   owner_id        9189095
     2022-10-02 10:14:32   percent_state   24.0
     2022-10-02 10:12:22   product_id      3r8gc33pnqsxfe1g
     2022-10-02 10:12:22   product_name    Blinds Controller
     2022-10-02 10:12:20   state           Initializing...
     2022-10-02 10:12:22   sub             0
     2022-10-02 10:12:22   time_zone       +01:00
     2022-10-02 10:12:22   uid             eu1577993184739WO7bA
     2022-10-02 10:12:22   update_time     1639073311
     2022-10-02 10:12:22   uuid            00408365e868e7894c32
     2022-10-02 10:14:24   work_state      closing
   args:
     Blinds_Controller_00408365e868e7894c32
     fhempy
     tuya
   
     192.168.1.149
     27a8388484e1eb41
     3.3
     
   argsh:
   hmccu:
Attributes:
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'control', 'dp_id': 1, 'type': 'Enum', 'values': {'range': ['open', 'stop', 'close']}, 'desc': 'control'}, {'code': 'percent_control', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '%', 'min': 0, 'max': 100, 'scale': 0, 'step': 1}, 'desc': 'percent control'}, {'code': 'control_back', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'control back'}, {'code': 'countdown', 'dp_id': 8, 'type': 'Enum', 'values': {'range': ['cancel', '1', '2', '3', '4']}, 'desc': 'countdown'}]
   tuya_spec_status [{'code': 'control', 'dp_id': 1, 'type': 'Enum', 'values': {'range': ['open', 'stop', 'close']}}, {'code': 'percent_control', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '%', 'min': 0, 'max': 100, 'scale': 0, 'step': 1}}, {'code': 'percent_state', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '%', 'min': 0, 'max': 100, 'scale': 0, 'step': 1}}, {'code': 'control_back', 'dp_id': 5, 'type': 'Boolean', 'values': {}}, {'code': 'work_state', 'dp_id': 7, 'type': 'Enum', 'values': {'range': ['opening', 'closing']}}, {'code': 'countdown', 'dp_id': 8, 'type': 'Enum', 'values': {'range': ['cancel', '1', '2', '3', '4']}}, {'code': 'countdown_left', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'time_total', 'dp_id': 11, 'type': 'Integer', 'values': {'unit': 'ms', 'min': 0, 'max': 120000, 'scale': 0, 'step': 1}}]


Eine Kamera
und kann man mit der auch was anfangen?

Internals:
   CFGFN     
   DEF        tuya fvjbqt0r3 192.168.1.43 287f5e721ff7d3e0 3.3
   DEVICEID   bf60f994ba65089eea3k2g
   FHEMPYTYPE tuya
   FUUID      6339402f-f33f-c95d-d375-bed3d083901ab2d7
   IODev      pyBinding
   NAME       LSC_Smart_Indoor_Camera_bf60f994ba65089eea3k2g
   NR         596
   PYTHONTYPE tuya
   STATE      Initializing...
   TYPE       fhempy
   eventCount 3
   READINGS:
     2022-10-02 09:39:29   active_time     1664444679
     2022-10-02 09:39:29   biz_type        18
     2022-10-02 09:39:29   category        sp
     2022-10-02 09:39:29   create_time     1664444679
     2022-10-02 09:39:29   icon            smart/icon/bay16279833154642Sqp/1654860913bd19a90faf9.png
     2022-10-02 09:39:29   id              bf60f994ba65089eea3k2g
     2022-10-02 09:39:29   ip              92.248.15.174
     2022-10-02 09:39:29   lat             48.6951
     2022-10-02 09:39:29   local_key     
     2022-10-02 09:39:29   lon             15.9708
     2022-10-02 09:39:29   model           5525000300
     2022-10-02 09:39:29   name            LSC Smart Indoor Camera
     2022-10-02 09:39:29   online          1
     2022-10-02 09:39:29   owner_id        9189095
     2022-10-02 09:39:29   product_id      fvjbqt0r31vaxaf4
     2022-10-02 09:39:29   product_name    LSC Smart Indoor Camera
     2022-10-02 09:39:28   state           Initializing...
     2022-10-02 09:39:29   sub             0
     2022-10-02 09:39:29   time_zone       +02:00
     2022-10-02 09:39:29   uid             eu1577993184739WO7bA
     2022-10-02 09:39:29   update_time     1664444682
     2022-10-02 09:39:29   uuid            calef55ad20954da82e6
   args:
     LSC_Smart_Indoor_Camera_bf60f994ba65089eea3k2g
     fhempy
     tuya
     
     192.168.1.43
     287f5e721ff7d3e0
     3.3
   
   argsh:
   hmccu:
Attributes:
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': {}, 'desc': 'basic indicator'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': {}, 'desc': 'basic flip'}, {'code': 'basic_private', 'dp_id': 105, 'type': 'Boolean', 'values': {}, 'desc': 'basic private'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': {'range': ['0', '1', '2']}, 'desc': 'motion sensitivity'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': {'range': ['0', '1', '2']}, 'desc': 'basic nightvision'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': {}, 'desc': 'sd format'}, {'code': 'motion_record', 'dp_id': 113, 'type': 'Boolean', 'values': {}, 'desc': 'motion record'}, {'code': 'motion_interval', 'dp_id': 133, 'type': 'Enum', 'values': {'range': ['1', '3', '5']}, 'desc': 'motion interval'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': {}, 'desc': 'motion switch'}, {'code': 'record_switch1', 'dp_id': 137, 'type': 'Boolean', 'values': {}, 'desc': 'record switch1'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': {}, 'desc': 'decibel switch'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': {'range': ['0', '1']}, 'desc': 'decibel sensitivity'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': {}, 'desc': 'record switch'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': {'range': ['1', '2']}, 'desc': 'record mode'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': {}, 'desc': 'motion area switch'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': {'maxlen': 255}, 'desc': 'motion area'}, {'code': 'humanoid_filter', 'dp_id': 170, 'type': 'Boolean', 'values': {}, 'desc': 'humanoid filter'}, {'code': 'ipc_mute_record', 'dp_id': 197, 'type': 'Boolean', 'values': {}, 'desc': 'ipc mute record'}]
   tuya_spec_status [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': {}}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': {}}, {'code': 'basic_private', 'dp_id': 105, 'type': 'Boolean', 'values': {}}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': {'range': ['0', '1', '2']}}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': {'range': ['0', '1', '2']}}, {'code': 'sd_storge', 'dp_id': 109, 'type': 'String', 'values': {'maxlen': 255}}, {'code': 'sd_status', 'dp_id': 110, 'type': 'Integer', 'values': {'unit': '', 'min': 1, 'max': 5, 'scale': 1, 'step': 1}}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': {}}, {'code': 'motion_record', 'dp_id': 113, 'type': 'Boolean', 'values': {}}, {'code': 'movement_detect_pic', 'dp_id': 115, 'type': 'Raw', 'values': {}}, {'code': 'sd_format_state', 'dp_id': 117, 'type': 'Integer', 'values': {'unit': '', 'min': -20000, 'max': 20000, 'scale': 1, 'step': 1}}, {'code': 'motion_interval', 'dp_id': 133, 'type': 'Enum', 'values': {'range': ['1', '3', '5']}}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': {}}, {'code': 'record_switch1', 'dp_id': 137, 'type': 'Boolean', 'values': {}}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': {}}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': {'range': ['0', '1']}}, {'code': 'decibel_upload', 'dp_id': 141, 'type': 'String', 'values': {'maxlen': 255}}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': {}}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': {'range': ['1', '2']}}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': {}}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': {'maxlen': 255}}, {'code': 'humanoid_filter', 'dp_id': 170, 'type': 'Boolean', 'values': {}}, {'code': 'alarm_message', 'dp_id': 185, 'type': 'String', 'values': {}}, {'code': 'ipc_mute_record', 'dp_id': 197, 'type': 'Boolean', 'values': {}}]
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 02 Oktober 2022, 10:44:33
Jetzt stehen ALLE GERÄTE auf Initilizing... >:(
bzw manchmal auf ERROR
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 Oktober 2022, 11:08:08
Zitat von: Sommerfeld am 02 Oktober 2022, 07:46:59
Die Kamera zeigte bereits ein state an und der wurde auch aktualisiert.
Internals:
   .AttrList  tuya_spec_functions tuya_spec_status IODev:local_pybinding event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading
   CFGFN     
   DEF        tuya 35twetlejkkllta0 bf905cb6a14a43dbf9hhfu 192.168.178.98 f9ea8d1efc541ead 3.3 1234.... 1234......
   DEVICEID   bf905cb6a14a43dbf9hhfu
   FHEMPYTYPE tuya
   FUUID      63388082-f33f-3b5c-6817-fe667177dcd35be6
   IODev      local_pybinding
   NAME       Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
   NR         18168
   PYTHONTYPE tuya
   STATE      Initializing...
   TYPE       fhempy
   eventCount 81
   .attraggr:
   .attrminint:
   READINGS:
     2022-10-01 20:03:12   IODev           local_pybinding
     2022-10-01 20:01:42   active_time     1644234172
     2022-10-01 20:01:42   biz_type        0
     2022-10-01 20:01:42   category        sp
     2022-10-01 20:01:42   create_time     1644234172
     2022-10-01 20:01:42   icon            smart/icon/ay1525342462043yjwZs/e9af8e6817e79859b119a322895ffc0b.png
     2022-10-01 20:01:42   id              bf905cb6a14a43dbf9hhfu
     2022-10-01 20:01:42   ip              93.203.85.174
     2022-10-01 20:01:42   lat             52.8048
     2022-10-01 20:01:42   local_key       f9ea8d1efc541ead
     2022-10-01 20:01:42   lon             13.0448
     2022-10-01 20:01:42   model           Überwachungskamera
     2022-10-01 20:01:42   name            Wohnzimmerkamera
     2022-10-02 07:40:43   online          0
     2022-10-01 20:01:42   owner_id        15487476
     2022-10-01 20:01:42   product_id      35twetlejkkllta0
     2022-10-01 20:01:42   product_name    ZX-5110
     2022-10-01 20:03:12   state           Initializing...
     2022-10-01 20:01:42   sub             0
     2022-10-01 20:01:42   time_zone       +01:00
     2022-10-01 20:01:42   uid             eu1598817427882BAzmt
     2022-10-01 20:01:42   update_time     1644242210
     2022-10-01 20:01:42   uuid            tuyab725045bfe14986f
   args:
     Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
     fhempy
     tuya
     35twetlejkkllta0
     bf905cb6a14a43dbf9hhfu
     192.168.178.98
     f9ea8d1efc541ead
     3.3
     fq83awrvav6glwxl28ed
     59327720c0834b8d8d4bc010f9b9a072
   argsh:
   helper:
     bm:
       fhempy_Attr:
         cnt        14
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        01.10. 20:01:40
         max        0.01173996925354
         tot        0.0837311744689941
         mAr:
           set
           Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
           tuya_spec_functions
           [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': {}, 'desc': 'basic indicator'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': {}, 'desc': 'basic flip'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': {}, 'desc': 'basic osd'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': {'range': ['0', '1', '2']}, 'desc': 'motion sensitivity'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': {'range': ['0', '1', '2']}, 'desc': 'basic nightvision'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': {}, 'desc': 'sd format'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': {}, 'desc': 'ptz stop'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': {'range': ['1', '2', '3', '4', '5', '6', '7', '0']}, 'desc': 'ptz control'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': {}, 'desc': 'motion switch'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': {}, 'desc': 'decibel switch'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': {'range': ['0', '1']}, 'desc': 'decibel sensitivity'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': {}, 'desc': 'record switch'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': {'range': ['1', '2']}, 'desc': 'record mode'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': {}, 'desc': 'motion tracking'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': {}, 'desc': 'motion area switch'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': {'maxlen': 255}, 'desc': 'motion area'}]
       fhempy_Define:
         cnt        1
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        01.10. 20:01:38
         max        0.0212669372558594
         tot        0.0212669372558594
         mAr:
           HASH(0x55ee744fe890)
           ARRAY(0x55ee72763fd8)
           HASH(0x55ee747268e0)
       fhempy_Get:
         cnt        2
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        02.10. 07:42:24
         max        0.00397086143493652
         tot        0.00753879547119141
         mAr:
           HASH(0x55ee744fe890)
           ARRAY(0x55ee7abf3be8)
           HASH(0x55ee7a099920)
       fhempy_Set:
         cnt        221
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        01.10. 20:33:58
         max        0.088547945022583
         tot        1.79667472839355
         mAr:
           HASH(0x55ee744fe890)
           ARRAY(0x55ee7168a180)
           HASH(0x55ee72b00b30)
   hmccu:
Attributes:
   IODev      local_pybinding
   alias      Wohnzimmerkamera
   devStateIcon online:it_wifi@green offline:it_wifi@red
   group      tuya
   icon       it_camera@red
   room       02_0_EG->02_4_EG_Wohnzimmer,Tuya
   tuya_spec_functions [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': '{}', 'desc': 'basic indicator'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': '{}', 'desc': 'basic flip'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': '{}', 'desc': 'basic osd'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': '{"range":["0","1","2"]}', 'desc': 'motion sensitivity'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': '{"range":["0","1","2"]}', 'desc': 'basic nightvision'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': '{}', 'desc': 'sd format'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': '{}', 'desc': 'ptz stop'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': '{"range":["1","2","3","4","5","6","7","0"]}', 'desc': 'ptz control'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': '{}', 'desc': 'motion switch'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': '{}', 'desc': 'decibel switch'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': '{"range":["0","1"]}', 'desc': 'decibel sensitivity'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': '{}', 'desc': 'record switch'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': '{"range":["1","2"]}', 'desc': 'record mode'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': '{}', 'desc': 'motion tracking'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': '{}', 'desc': 'motion area switch'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': '{"maxlen":255}', 'desc': 'motion area'}]
   tuya_spec_status [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'sd_storge', 'dp_id': 109, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'sd_status', 'dp_id': 110, 'type': 'Integer', 'values': '{"unit":"","min":1,"max":5,"scale":1,"step":1}'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': '{}'}, {'code': 'movement_detect_pic', 'dp_id': 115, 'type': 'Raw', 'values': '{}'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': '{}'}, {'code': 'sd_format_state', 'dp_id': 117, 'type': 'Integer', 'values': '{"unit":"","min":-20000,"max":20000,"scale":1,"step":1}'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': '{"range":["1","2","3","4","5","6","7","0"]}'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': '{"range":["0","1"]}'}, {'code': 'decibel_upload', 'dp_id': 141, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': '{}'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': '{"range":["1","2"]}'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'alarm_message', 'dp_id': 185, 'type': 'String', 'values': '{}'}]


Mach bitte mal:
sudo -u fhem bash
pip3 install fhempy==0.1.472

Danach nur einen fhempyServer_15733 restart machen und lass mich dann wissen ob die Kamera funktioniert bzw. welche Fehler im Log auftauchen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 Oktober 2022, 11:11:41
Zitat von: ChrisA4 am 02 Oktober 2022, 10:44:33
Jetzt stehen ALLE GERÄTE auf Initilizing... >:(
bzw manchmal auf ERROR

Bitte um Details wie das passiert ist und bitte auch unbedingt immer Logs in solchen Fällen (fhem und fhempy Log).

Nachdem es ja heute schon mal funktioniert hat, mach bitte auch noch einen fhempyServer_15733 restart und lass mich dann wissen was der Status der Klima ist.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 02 Oktober 2022, 11:32:26
Zitat von: dominik am 02 Oktober 2022, 11:11:41
Bitte um Details wie das passiert ist und bitte auch unbedingt immer Logs in solchen Fällen (fhem und fhempy Log).

Nachdem es ja heute schon mal funktioniert hat, mach bitte auch noch einen fhempyServer_15733 restart und lass mich dann wissen was der Status der Klima ist.

Hab eigentlich nur die Räume verändert als plötzlich bei einem Gerät bei attr setzen der fehler ERROR kam seitdem geht nichts mehr

fhempy log

2022-10-02 11:19:20,055 - INFO     - fhempy.lib.fhem_pythonbinding: Shutdown initiated...
2022-10-02 11:19:20,120 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2022-10-02 11:19:20,122 - INFO     - websockets.server: server closing
2022-10-02 11:19:26,068 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.491...
2022-10-02 11:19:26,072 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-10-02 11:19:26,112 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-10-02 11:19:35,141 - INFO     - websockets.server: connection open
2022-10-02 11:19:35,145 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-10-02 11:19:39,966 - ERROR    - Vitrine_Keller_bf4ff99fe700de582025jo: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 426, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 341, in _create_cloudmapping_dev
    await self.check_tuya_attributes()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in check_tuya_attributes
    self._convert_values_to_json()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 268, in _convert_values_to_json
    spec["values"] = json.loads(spec["values"])
  File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
2022-10-02 11:19:39,972 - ERROR    - Springbrunnen_OG_bf2c81700c9d962d96bxsj: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 426, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 341, in _create_cloudmapping_dev
    await self.check_tuya_attributes()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in check_tuya_attributes
    self._convert_values_to_json()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 268, in _convert_values_to_json
    spec["values"] = json.loads(spec["values"])
  File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
2022-10-02 11:19:39,982 - ERROR    - Nous5_bffd0c7e5b7aea4199jaaz: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 426, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 341, in _create_cloudmapping_dev
    await self.check_tuya_attributes()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in check_tuya_attributes
    self._convert_values_to_json()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 268, in _convert_values_to_json
    spec["values"] = json.loads(spec["values"])
  File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
2022-10-02 11:19:39,988 - ERROR    - Cam_Nord_bfeb362a7007656081x09j: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 426, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 341, in _create_cloudmapping_dev
    await self.check_tuya_attributes()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in check_tuya_attributes
    self._convert_values_to_json()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 268, in _convert_values_to_json
    spec["values"] = json.loads(spec["values"])
  File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
2022-10-02 11:19:39,993 - ERROR    - Klima_21320014a4cf12eb2408: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 426, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 341, in _create_cloudmapping_dev
    await self.check_tuya_attributes()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in check_tuya_attributes
    self._convert_values_to_json()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 268, in _convert_values_to_json
    spec["values"] = json.loads(spec["values"])
  File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
2022-10-02 11:19:39,997 - ERROR    - Gartenhaus_Stecker_bf8a37bcac0c0dfb68e0zd: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 426, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 341, in _create_cloudmapping_dev
    await self.check_tuya_attributes()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in check_tuya_attributes
    self._convert_values_to_json()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 268, in _convert_values_to_json
    spec["values"] = json.loads(spec["values"])
  File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
2022-10-02 11:19:40,000 - ERROR    - Dartlicht_bfaace0990fdcdadebpxnf: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 426, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 341, in _create_cloudmapping_dev
    await self.check_tuya_attributes()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in check_tuya_attributes
    self._convert_values_to_json()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 268, in _convert_values_to_json
    spec["values"] = json.loads(spec["values"])
  File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
2022-10-02 11:19:40,003 - ERROR    - Dartscheibe_bf4264b6f6b3c5fa8fztz6: Failed create_device
2022-10-02 11:19:40,003 - ERROR    - Dartscheibe_bf4264b6f6b3c5fa8fztz6: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 426, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 341, in _create_cloudmapping_dev
    await self.check_tuya_attributes()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in check_tuya_attributes
    self._convert_values_to_json()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 268, in _convert_values_to_json
    spec["values"] = json.loads(spec["values"])
  File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
2022-10-02 11:19:40,052 - ERROR    - LED_TV_Buero_bfd6f8368a299a33c66ziz: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 426, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 341, in _create_cloudmapping_dev
    await self.check_tuya_attributes()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in check_tuya_attributes
    self._convert_values_to_json()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 268, in _convert_values_to_json
    spec["values"] = json.loads(spec["values"])
  File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
2022-10-02 11:19:40,055 - ERROR    - Fernsehlicht_bf4a23f4f8a190e7cb8ytf: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 426, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 341, in _create_cloudmapping_dev
    await self.check_tuya_attributes()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in check_tuya_attributes
    self._convert_values_to_json()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 268, in _convert_values_to_json
    spec["values"] = json.loads(spec["values"])
  File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
2022-10-02 11:19:40,061 - ERROR    - LSC_Smart_Indoor_Camera_bf60f994ba65089eea3k2g: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 426, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 341, in _create_cloudmapping_dev
    await self.check_tuya_attributes()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in check_tuya_attributes
    self._convert_values_to_json()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 268, in _convert_values_to_json
    spec["values"] = json.loads(spec["values"])
  File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
2022-10-02 11:19:40,065 - ERROR    - Couchlicht_bfe8664488739843aaiudq: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 426, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 341, in _create_cloudmapping_dev
    await self.check_tuya_attributes()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in check_tuya_attributes
    self._convert_values_to_json()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 268, in _convert_values_to_json
    spec["values"] = json.loads(spec["values"])
  File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
2022-10-02 11:19:40,068 - ERROR    - Blinds_Controller_00408365e868e7894c32: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 426, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 341, in _create_cloudmapping_dev
    await self.check_tuya_attributes()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in check_tuya_attributes
    self._convert_values_to_json()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 268, in _convert_values_to_json
    spec["values"] = json.loads(spec["values"])
  File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
2022-10-02 11:19:40,091 - ERROR    - Werkbank_Licht_bf5249863250b4bdd3jpx8: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 426, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 341, in _create_cloudmapping_dev
    await self.check_tuya_attributes()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in check_tuya_attributes
    self._convert_values_to_json()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 268, in _convert_values_to_json
    spec["values"] = json.loads(spec["values"])
  File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict


Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 02 Oktober 2022, 11:34:53
fhem log hab ich die per pm geschickt
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 02 Oktober 2022, 11:59:14
gerade entdeckt

127.0.0.1: Verbindungsaufbau abgelehnt (111)

Internals:
   BindingType fhempy
   DEF        fhempy
   DeviceName ws:127.0.0.1:15733
   FD         99
   FUUID      627d1469-f33f-c95d-383f-64875f4db38e21c5
   IP         127.0.0.1
   NAME       pyBinding
   NR         300
   NTFY_ORDER 50-pyBinding
   PARTIAL   
   PORT       15733
   STATE      opened
   TYPE       BindingsIo
   WEBSOCKET  1
   binary     1
   devioLoglevel 0
   eventCount 23
   installing 0
   localBinding 1
   nextOpenDelay 10
   prev_error 127.0.0.1: Verbindungsaufbau abgelehnt (111)
   READINGS:
     2022-10-02 11:19:35   hostname        fhem
     2022-10-02 11:19:35   os              posix
     2022-10-02 11:19:35   python          3.9.2
     2022-10-02 11:19:35   release         5.15.61-v7l+
     2022-10-02 11:56:00   state           opened
     2022-10-02 11:19:35   system          Linux
     2022-10-02 11:19:35   version         0.1.491
     2022-10-02 11:19:35   version_available 0.1.492
     2022-10-02 11:19:35   version_release_notes <html><a href="https://github.com/fhempy/fhempy/releases" target="_blank">Release Notes</a></html>
   args:
     pyBinding
     BindingsIo
     fhempy
   argsh:
Attributes:
   devStateIcon {      my $status_img = "10px-kreis-gruen";;      my $status_txt = "connected";;      if (ReadingsVal($name, "state", "disconnected") eq "disconnected") {        $status_img = "10px-kreis-rot";;        $status_txt = "disconnected";;      }      my $ver = ReadingsVal($name, "version", "-");;      "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a> ".$ver." </a><a  href=\"/fhem?cmd.dummy=set $name update&XHR=1\" title=\"Start update\">".FW_makeImage("refresh")."</a></div>"    }
   group      fhempy
   icon       file_json-ld2
   room       System->fhempy
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 Oktober 2022, 12:44:27
Bitte mit 0.1.493 testen.

Der Fehler "Verbindungsaufbau abgelehnt" ist ok, da es prev_error (previous error) ist und der Status aktuell bereits opened.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 02 Oktober 2022, 14:23:25
einige geräte sind wieder da
sobald ich aber ein gerät manuel hinzufüge kommt die initialsierung dannch error
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 02 Oktober 2022, 14:37:05
nochmal das log

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 Oktober 2022, 14:51:22
Zitat von: ChrisA4 am 02 Oktober 2022, 14:23:25
einige geräte sind wieder da
sobald ich aber ein gerät manuel hinzufüge kommt die initialsierung dannch error

Wie fügst du ein Gerät manuell hinzu?
Bitte das Log in code Quotes.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 02 Oktober 2022, 15:37:38
Zitat von: dominik am 02 Oktober 2022, 14:51:22

Bitte das Log in code Quotes.
der letzte teil will einfach nicht

ZitatWie fügst du ein Gerät manuell hinzu?

wenn das gerät gefunden worden ist mit offline die ip ersetzen das hat bis lang geklappt
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 Oktober 2022, 16:19:33
Mach bitte nochmals einen restart von fhempyServer_15733 und drück bitte 5min nix in FHEMWEB. Poste danach nochmals das fhem Log.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 Oktober 2022, 16:46:50
@Chris, nur zur Sicherheit, du testest eh mit der letzten fhempy Version und hast nicht (wie ich für Sommerfeld geschrieben habe) downgegraded, oder? 0.1.494 sollte beim BindingsIo Device stehen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 02 Oktober 2022, 17:08:25
2022.10.02 16:58:43 1: BindingsIo (pyBinding): received JSON was: up', '')"}�~�{"awaitId": 65587723, "NAME": "Dartscheibe_bf4264b6f6b3c5fa8fztz6", "msgtype": "command", "comman: "AttrVal('Dartscheibe_bf4264b6f6c5fa8fztz6', 'group', '')"}�~�{"awaitId": 8939608890e7cb8ytf", "msgtype": "command", "command": "AtVal('Fernsehlicht_bf4a23f4f8a190e7cb8ytf', 'group', '')"}�~�{"awaitId": 56005865, "NAME": "Gartenhaus_Stecker_bf87bcac0c0dfb68e0zd", "msgtype": "command", "command"7bcac0c0dfb68e0zd', 'group', '')"}�~�{"awaitId": 695433, "NAME": "Gartenhaus_Tuere_13600724840d8ea44d", "msgtype": "command", "command": "AttrVal('Gartenhaus_Tuere_13600724840d8ea4ae4d', 'group', '')"itId": 28499555, "NAME": "Dartlicht_bfaace0990fdcdadebpxnf", "msgtype": "command", "command": "AtVal('Dartlicht_bfaace0990fdcdadebpxnf', 'group', '')"}�~�{"awaitId": 16045938, "NAME": "LED_TV_Buero_bfd6f8368a29, '')"}�~�{"awaitId": 22041703, "NAME"type": "command", "command": "AttrVal('Klima_21320014a4cf12eb2408', 'group', '')"}�~�{"awaitId": 676826, "NAME": "Licht_Buero_Tisch_bf2deed618aaf0834bpl", "msgtype": "command", "command": "AttrVal('Licht_Buero_Tisch_bf2deed618aaf0834bplav', 'group', '')"}�~�{"awaitId":8155649, "NAME": "Melanie_TV_bf6e5a59121f96620evj4a", "NAME": "Nous5_bffd0c7e5b7aea4199ja", "msgtype": "command", "command": "AttrVal('Nous5_bffd0c7e5b7aea4199jaaz', 'group', '')"}�~�{"awaitId": 43983881, "NAME "Schlafzimmer_Fenster_13600724840d8eaed81d", "msgtype": "mmand", "command": "AttrVal('Schlafzimmer_Fenster_13600724840d8eaed81d', 'group', '')"}�~�{"awaitId": 43656391('Magnet_Kontakt_13600724840d8ea4c361', 'group', '')"}�~�{"awaitId": 25983323, "NAME": "Terrassen_Tuere_136724a4cf12acfe09", "msgtype": "command", "command "AttrVal('Terrassen_Tuere_13600724a4cf12acfe09', 'group',')"}�~�{"awaitId": 14893132, "NAME": "ihnachtsbaum_bfd066a34e4774a1c0d8bx", "msgtype": "command", "command": "AttrVal('Weihnachtsbaum_bfd0634e4774a1c0d8bx', 'group', '')"}�~�{"awaitId": 69056291, "NAME": "Springbrunnen_OG_bf2c81700c9d9d96bxsj", "msgtype": "command", "command": "AttrVa 'group', '')"}�~�{"awaitId": 52904280, "NA_Controller_00408365e868e7894c32", "msgtype": "command", "command": "CommandAttr(undef, \"Blinds_Controller_0040836868e7894c32 group tuya\")"}�~�{"awaitId": 32559528, "NAME": "Bad_Fenster_OG_136007242cf432041fd4", ": 47331686, "NAME": "Couchlicht_bf664488739843aaiudq", "msgtype": "command", "command": "Cer_Buero_13600724840d8ea4bdcb", "msgtype": "command", "command": "CommandAttr(undef, \"Dachfenster_Buero_13600724840ea4bdcb group tuya\")"}�~�{"awaitId": 78788890, "NAME":Dachfenster_Gang_OG_13600724840d8ea73b", "msgtype": "command", "command": "CommandAttr(undef, \"Dachfenster_Gang_OG_13600724840d8eaea73group tuya\")"}�~�{"awaitId": 606221, "NAME": "Cam_Nord_bfeb362a7007656081x09j", "msgpe": "command", "command": "CommandAttr(undef, \"Cam_Nord_bfeb362a7007656081x09j group tuya\")"}�~�{"awaitId": 84573239,NAME": "Dartscheibe_bf4264b6f6b3c58fztz6", "msgtype": "command", "command": "CommandAttr(undef, \"Dartscheibe_bf4264b6f6b3c5fa8fztzgroup tuya\")"}�~�{"awaitId": 421526, "NAME": "Fernsehlicht_bf4a23f4f8a190e7cb8ytf", ": 81166116, "NAME": "Gartenhaus_Stker_bf8a37bcac0c0dfb68e0zd", "msgtype": "command", "command": "CommandAttr(undef, \"Gartenhaus_Stecd8ea4ae4d", "msgtype": "command", "command": "Codadebpxnf group tuya\")"}�~�{"awaitId": 95182951, "NAME": "LED_TV_Buero_bfd6f8368a299a33c66ziz", ": 58351628, "NAME": "Klima_21320014cf12eb2408", "msgtype": "command", "command": "CommandAttr(undef, \"Klima_21320014a4cf12eb2408 gup tuya\")"}�~�{"awaitId": 51457944, "NAME": "Licht_Buero_Tisch_bf2deed618aaf0834bplav", "msgtype": "command",command": "CommandAttr(undef, \"Lit_Buero_Tisch_bf2deed618aaf0834bplav group tuya\")"}�~�{"awaitId": 42882445, "NAME": "Melanie_TV_bf6e5a121f96620evj4a", "msgtype": "command", "command": "Commanttr(undef, \"Melanie_TV_bf6e5a59121f96620evj4a group tuya\")"}�~"awaitId": 31921582, "NAME": "Nous5_bffd0c7e5b7aea4199jaaz", "msgtype": "command", "command": "CommandAttr(undef, \"Nous5_b
2022.10.02 16:58:43 1: BindingsIo (pyBinding): ERROR JSON: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "a4c361 group tuya\\"...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:58:43 1: BindingsIo (pyBinding): received JSON was: a4c361 group tuya\")"}�~�{"awaitId": 13701007, "NAME": "Terrassen_Tuere_13600724a4cf12acfe09", "msgt
2022.10.02 16:58:43 1: BindingsIo (pyBinding): ERROR JSON: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "e": "command", "comm...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:58:43 1: BindingsIo (pyBinding): received JSON was: e": "command", "command": "CommandAttr(undef, \"Terrassen_Tuere_13600724a4cf12acfe09 group tuya\")"}�~�{"awaitI
2022.10.02 16:58:43 1: BindingsIo (pyBinding): ERROR JSON: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "bfd066a34e4774a1c0d8...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:58:43 1: BindingsIo (pyBinding): received JSON was: bfd066a34e4774a1c0d8bx", "msgtype": "command", "command": "CommandAttr(undef, \"Weihnachtsbaum_
2022.10.02 16:58:43 1: BindingsIo (pyBinding): ERROR JSON: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "j group tuya\\")"}\x{ef}...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:58:43 1: BindingsIo (pyBinding): received JSON was: j group tuya\")"}�~�{"awaitId": 91260411, "NAME": "Vitrine_Keller_bf4ff99fe700de582025jo", "msgtype": "command", "
2022.10.02 16:58:43 1: MapleCUL_1_433: UNDEFINED Sensor SD_WS07_TH detected, code SD_WS07_TH_2
2022.10.02 16:58:43 1: BindingsIo (pyBinding): ERROR JSON: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "x8", "msgtype": "com...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:58:43 1: BindingsIo (pyBinding): received JSON was: x8", "msgtype": "command", "command": "CommandAttr(undef, \"Werkbank_Licht_bf5249863250b4bdd3jpx8 room fhempy\")
2022.10.02 16:58:43 1: MapleCUL_1_433: UNDEFINED Sensor SD_WS07_TH detected, code SD_WS07_TH_2
2022.10.02 16:59:43 1: BindingsIo (pyBinding): ERROR JSON: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "}\x{ef}\x{bf}\x{bd}~...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:59:43 1: BindingsIo (pyBinding): received JSON was: }�~�{"awaitId": 76234303, "NAME":
2022.10.02 16:59:43 1: BindingsIo (pyBinding): ERROR JSON: garbage after JSON object, at character offset 9 (before ": "command", "comman...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:59:43 1: BindingsIo (pyBinding): received JSON was: "msgtype": "command", "command":
2022.10.02 16:59:43 1: BindingsIo (pyBinding): ERROR JSON: garbage after JSON object, at character offset 4 (before "setDevAttrList('Dach...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:59:43 1: BindingsIo (pyBinding): received JSON was: ": "setDevAttrList('Dachfenster_Gang_OG_13600724840d8eaea73b', ' IODev '.$readingFnAttributes)"}�~�
2022.10.02 16:59:43 1: BindingsIo (pyBinding): ERROR JSON: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "awaitId": 65099306, ...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:59:43 1: BindingsIo (pyBinding): received JSON was: awaitId": 65099306, "NAME": "Darts
2022.10.02 16:59:43 1: BindingsIo (pyBinding): ERROR JSON: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "Id": 39531217, "NAME...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:59:43 1: BindingsIo (pyBinding): received JSON was: Id": 39531217, "NAME": "Cam_Nord_bfeb362a7007656081x09j", "msgtype": "command", "command": "setDevAttrList('Cam_Nord
2022.10.02 16:59:43 1: BindingsIo (pyBinding): ERROR JSON: 'false' expected, at character offset 0 (before "feb362a7007656081x09...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:59:43 1: BindingsIo (pyBinding): received JSON was: feb362a7007656081x09j', ' IODev '.$readingFnAttributes)"}�~�{"awaitId": 23271608, "NAME": "Fernse
2022.10.02 16:59:43 1: BindingsIo (pyBinding): ERROR JSON: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "icht_bf4a23f4f8a190e...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:59:43 1: BindingsIo (pyBinding): received JSON was: icht_bf4a23f4f8a190e7cb8ytf", "msgtype": "command", "command": "setDevAttrList('Fernsehlicht_bf4a23f4f8a190e
2022.10.02 16:59:43 1: BindingsIo (pyBinding): ERROR JSON: 'false' expected, at character offset 0 (before "fdcdadebpxnf", "msgt...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:59:43 1: BindingsIo (pyBinding): received JSON was: fdcdadebpxnf", "msgtype": "command", "command":
2022.10.02 16:59:44 1: BindingsIo (pyBinding): ERROR JSON: unexpected end of string while parsing JSON string, at character offset 32 (before "(end of string)") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:59:44 1: BindingsIo (pyBinding): received JSON was: "Licht_Buero_Tisch_bf2deed618aaf
2022.10.02 16:59:44 1: BindingsIo (pyBinding): ERROR JSON: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "_21320014a4cf12eb240...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:59:44 1: BindingsIo (pyBinding): received JSON was: _21320014a4cf12eb2408", "msgtype": "command", "command": "setDevAttrList('Klima_21320014a4cf12eb2
2022.10.02 16:59:44 1: BindingsIo (pyBinding): ERROR JSON: garbage after JSON object, at character offset 14 (before "NAME": "Schlafzimmer...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:59:44 1: BindingsIo (pyBinding): received JSON was: ": 44584045, "NAME": "Schlafzimmer_Fenster_13600724840d8eaed81d", "msgtype": "command", "command": "
2022.10.02 16:59:44 1: BindingsIo (pyBinding): ERROR JSON: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "and", "command": "se...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:59:44 1: BindingsIo (pyBinding): received JSON was: and", "command": "setDevAttrList('Melanie_TV_bf6e5a59121f96620evj4a', ' IODev '.$readingFnAttributes)"}�~�{"
2022.10.02 16:59:44 1: BindingsIo (pyBinding): ERROR JSON: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "awaitId": 62267542, ...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:59:44 1: BindingsIo (pyBinding): received JSON was: awaitId": 62267542, "NAME": "Terra
2022.10.02 16:59:44 1: BindingsIo (pyBinding): ERROR JSON: garbage after JSON object, at character offset 14 (before "NAME": "Magnet_Konta...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:59:44 1: BindingsIo (pyBinding): received JSON was: ": 44102151, "NAME": "Magnet_Kontakt_13600724840d8ea4c361", "msgtype": "command", "command": "setDev
2022.10.02 16:59:44 1: BindingsIo (pyBinding): ERROR JSON: 'null' expected, at character offset 0 (before "nachtsbaum_bfd066a34...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 16:59:44 1: BindingsIo (pyBinding): received JSON was: nachtsbaum_bfd066a34e4774a1c0d8bx", "msgtype": "command", "command": "setDevAttrList('Weihnachtsbaum_bfd
2022.10.02 16:59:50 1: MapleCUL_1_433: UNDEFINED Sensor SD_WS07_TH detected, code SD_WS07_TH_2
2022.10.02 16:59:50 1: MapleCUL_1_433: UNDEFINED Sensor SD_WS07_TH detected, code SD_WS07_TH_2
2022.10.02 17:00:24 3: myBroker: myBroker_192.168.1.150_51940/sonoff150 left us (keepalive check)
2022.10.02 17:00:43 1: BindingsIo (pyBinding): ERROR JSON: garbage after JSON object, at character offset 9 (before ": 56851808, "NAME": ...") at /usr/share/perl5/JSON.pm line 190.

2022.10.02 17:00:43 1: BindingsIo (pyBinding): received JSON was: "awaitId": 56851808, "NAME": "Weihnachtsbeleuchtung_Auffahrt_bf640e1557ed200343ez1r", "msgtype": "command", "command": "Att
2022.10.02 17:00:43 1: BindingsIo (pyBinding): ERROR JSON: garbage after JSON object, at character offset 4 (before "tuya_system", "msgty...") at /usr/share/perl5/JSON.pm line 190.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 Oktober 2022, 17:09:37
Schick mir bitte per Mail die Datei, Mail schick ich dir per PN.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 02 Oktober 2022, 17:11:23
Zitat von: dominik am 02 Oktober 2022, 17:09:37
Schick mir bitte per Mail die Datei, Mail schick ich dir per PN.
mach ich denke sie ist zu gross
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 02 Oktober 2022, 17:22:35
ZitatMach bitte mal:
sudo -u fhem bash
pip3 install fhempy==0.1.472

Danach nur einen fhempyServer_15733 restart machen und lass mich dann wissen ob die Kamera funktioniert bzw. welche Fehler im Log auftauchen.
Die Kamera zeigt jetzt ein state an. Andere Readings werden nicht aktualisiert.
Internals:
   .AttrList  tuya_spec_functions tuya_spec_status IODev:local_pybinding event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading
   CFGFN     
   DEF        tuya 35twetlejkkllta0 bf905cb6a14a43dbf9hhfu 192.168.178.98 f9ea8d1efc541ead 3.3 1234... 1234....
   DEVICEID   bf905cb6a14a43dbf9hhfu
   FHEMPYTYPE tuya
   FUUID      6339a9ff-f33f-3b5c-2493-0969c4972d88bd7a
   IODev      local_pybinding
   NAME       Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
   NR         9391
   PYTHONTYPE tuya
   STATE      online
   TYPE       fhempy
   eventCount 4
   .attraggr:
   .attrminint:
   READINGS:
     2022-10-02 17:10:59   active_time     1644234172
     2022-10-02 17:10:59   biz_type        0
     2022-10-02 17:10:59   category        sp
     2022-10-02 17:10:59   create_time     1644234172
     2022-10-02 17:10:59   icon            smart/icon/ay1525342462043yjwZs/e9af8e6817e79859b119a322895ffc0b.png
     2022-10-02 17:10:59   id              bf905cb6a14a43dbf9hhfu
     2022-10-02 17:10:59   ip              93.203.85.174
     2022-10-02 17:10:59   lat             52.8048
     2022-10-02 17:10:59   local_key       f9ea8d1efc541ead
     2022-10-02 17:10:59   lon             13.0448
     2022-10-02 17:10:59   model           Überwachungskamera
     2022-10-02 17:10:59   name            Wohnzimmerkamera
     2022-10-02 17:10:59   online          1
     2022-10-02 17:10:59   owner_id        15487476
     2022-10-02 17:10:59   product_id      35twetlejkkllta0
     2022-10-02 17:10:59   product_name    ZX-5110
     2022-10-02 17:11:00   state           online
     2022-10-02 17:10:59   sub             0
     2022-10-02 17:10:59   time_zone       +01:00
     2022-10-02 17:10:59   uid             eu1598817427882BAzmt
     2022-10-02 17:10:59   update_time     1644242210
     2022-10-02 17:10:59   uuid            tuyab725045bfe14986f
   args:
     Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
     fhempy
     tuya
     35twetlejkkllta0
     bf905cb6a14a43dbf9hhfu
     192.168.178.98
     f9ea8d1efc541ead
     3.3
     fq83awrvav6glwxl28ed
     59327720c0834b8d8d4bc010f9b9a072
   argsh:
   helper:
     bm:
       fhempy_Attr:
         cnt        9
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        02.10. 17:10:58
         max        0.0073850154876709
         tot        0.0489940643310547
         mAr:
           set
           Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
           tuya_spec_status
           [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'sd_storge', 'dp_id': 109, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'sd_status', 'dp_id': 110, 'type': 'Integer', 'values': '{"unit":"","min":1,"max":5,"scale":1,"step":1}'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': '{}'}, {'code': 'movement_detect_pic', 'dp_id': 115, 'type': 'Raw', 'values': '{}'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': '{}'}, {'code': 'sd_format_state', 'dp_id': 117, 'type': 'Integer', 'values': '{"unit":"","min":-20000,"max":20000,"scale":1,"step":1}'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': '{"range":["1","2","3","4","5","6","7","0"]}'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': '{"range":["0","1"]}'}, {'code': 'decibel_upload', 'dp_id': 141, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': '{}'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': '{"range":["1","2"]}'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'alarm_message', 'dp_id': 185, 'type': 'String', 'values': '{}'}]
       fhempy_Define:
         cnt        1
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        02.10. 17:10:55
         max        0.0194201469421387
         tot        0.0194201469421387
         mAr:
           HASH(0x5630703f97c8)
           ARRAY(0x563074975c10)
           HASH(0x56306c6a4010)
       fhempy_Get:
         cnt        3
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        02.10. 17:18:54
         max        0.00734090805053711
         tot        0.0173659324645996
         mAr:
           HASH(0x5630703f97c8)
           ARRAY(0x56307418c228)
           HASH(0x5630727564f0)
       fhempy_Set:
         cnt        61
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        02.10. 17:10:57
         max        0.0463900566101074
         tot        0.744508743286133
         mAr:
           HASH(0x5630703f97c8)
           ARRAY(0x563073864538)
           HASH(0x5630739a1228)
   hmccu:
Attributes:
   alias      Wohnzimmerkamera
   devStateIcon online:it_wifi@green offline:it_wifi@red
   group      tuya
   icon       it_camera@red
   room       02_0_EG->02_4_EG_Wohnzimmer,Tuya
   tuya_spec_functions [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': '{}', 'desc': 'basic indicator'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': '{}', 'desc': 'basic flip'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': '{}', 'desc': 'basic osd'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': '{"range":["0","1","2"]}', 'desc': 'motion sensitivity'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': '{"range":["0","1","2"]}', 'desc': 'basic nightvision'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': '{}', 'desc': 'sd format'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': '{}', 'desc': 'ptz stop'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': '{"range":["1","2","3","4","5","6","7","0"]}', 'desc': 'ptz control'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': '{}', 'desc': 'motion switch'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': '{}', 'desc': 'decibel switch'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': '{"range":["0","1"]}', 'desc': 'decibel sensitivity'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': '{}', 'desc': 'record switch'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': '{"range":["1","2"]}', 'desc': 'record mode'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': '{}', 'desc': 'motion tracking'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': '{}', 'desc': 'motion area switch'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': '{"maxlen":255}', 'desc': 'motion area'}]
   tuya_spec_status [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'sd_storge', 'dp_id': 109, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'sd_status', 'dp_id': 110, 'type': 'Integer', 'values': '{"unit":"","min":1,"max":5,"scale":1,"step":1}'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': '{}'}, {'code': 'movement_detect_pic', 'dp_id': 115, 'type': 'Raw', 'values': '{}'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': '{}'}, {'code': 'sd_format_state', 'dp_id': 117, 'type': 'Integer', 'values': '{"unit":"","min":-20000,"max":20000,"scale":1,"step":1}'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': '{"range":["1","2","3","4","5","6","7","0"]}'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': '{"range":["0","1"]}'}, {'code': 'decibel_upload', 'dp_id': 141, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': '{}'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': '{"range":["1","2"]}'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'alarm_message', 'dp_id': 185, 'type': 'String', 'values': '{}'}
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 02 Oktober 2022, 18:23:57
Internals:
   CFGFN     
   DEF        tuya njrz3aijxnshpwtc bf56d0d8d205a1455f5qar 192.168.1.200 1e120c2b1ce5ecfc 3.3
   DEVICEID   bf56d0d8d205a1455f5qar
   FHEMPYTYPE tuya
   FUUID      6339b88c-f33f-c95d-54be-90853b39f44ff9c0
   IODev      pyBinding
   NAME       Terrassen_Licht_Indirekt_bf56d0d8d205a1455f5qar
   NR         584
   PYTHONTYPE tuya
   STATE      Initializing...
   TYPE       fhempy
   eventCount 3
   READINGS:
     2022-10-02 18:13:03   active_time     1619276278
     2022-10-02 18:13:03   biz_type        18
     2022-10-02 18:13:03   category        dd
     2022-10-02 18:13:03   create_time     1619276278
     2022-10-02 18:13:03   icon            smart/icon/001460162698766TR4v1/c315bf9c1c94c65ec62fdbfac1812c6e.png
     2022-10-02 18:13:03   id              bf56d0d8d205a1455f5qar
     2022-10-02 18:13:03   ip              92.248.14.132
     2022-10-02 18:13:03   lat             48.6950
     2022-10-02 18:13:03   local_key       1e120c2b1ce5ecfc
     2022-10-02 18:13:03   lon             15.9707
     2022-10-02 18:13:03   name            Terrassen Licht Indirekt
     2022-10-02 18:13:03   online          1
     2022-10-02 18:13:03   owner_id        9189095
     2022-10-02 18:13:03   product_id      njrz3aijxnshpwtc
     2022-10-02 18:13:03   product_name    Smart led Strip
     2022-10-02 18:13:01   state           Initializing...
     2022-10-02 18:13:03   sub             0
     2022-10-02 18:13:03   time_zone       +02:00
     2022-10-02 18:13:03   uid             eu1577993184739WO7bA
     2022-10-02 18:13:03   update_time     1640030715
     2022-10-02 18:13:03   uuid            17052001286dcd58c13b
   args:
     Terrassen_Licht_Indirekt_bf56d0d8d205a1455f5qar
     fhempy
     tuya
     njrz3aijxnshpwtc
     bf56d0d8d205a1455f5qar
     192.168.1.200
     1e120c2b1ce5ecfc
     3.3

   argsh:
   hmccu:
Attributes:
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}, 'desc': 'switch led'}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}, 'desc': 'work mode'}, {'code': 'colour_data', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}, 'desc': 'colour data'}, {'code': 'scene_data', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, 'desc': 'scene data'}, {'code': 'countdown', 'dp_id': 26, 'type': 'Integer', 'values': {'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown'}, {'code': 'music_data', 'dp_id': 27, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}, 'desc': 'music data'}, {'code': 'control_data', 'dp_id': 28, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}, 'desc': 'control data'}]
   tuya_spec_status [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}}, {'code': 'colour_data', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, {'code': 'scene_data', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}}, {'code': 'countdown', 'dp_id': 26, 'type': 'Integer', 'values': {'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}]


hab noch etwas herrausgefunden

das ist ein tuya led treiber (funktionierte schon mit fhem auch die farben konnte ich ändern) wenn ich diesen neu als dev anlege geht alles auf error
sobalb ich lösche und pybinding restarte sind die anderen wieder da

genau so auch mit den nous steckdosen die mit 3.4 sind
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 Oktober 2022, 20:19:12
Zitat von: Sommerfeld am 02 Oktober 2022, 17:22:35
Die Kamera zeigt jetzt ein state an. Andere Readings werden nicht aktualisiert.
Internals:
   .AttrList  tuya_spec_functions tuya_spec_status IODev:local_pybinding event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading
   CFGFN     
   DEF        tuya 35twetlejkkllta0 bf905cb6a14a43dbf9hhfu 192.168.178.98 f9ea8d1efc541ead 3.3 1234... 1234....
   DEVICEID   bf905cb6a14a43dbf9hhfu
   FHEMPYTYPE tuya
   FUUID      6339a9ff-f33f-3b5c-2493-0969c4972d88bd7a
   IODev      local_pybinding
   NAME       Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
   NR         9391
   PYTHONTYPE tuya
   STATE      online
   TYPE       fhempy
   eventCount 4
   .attraggr:
   .attrminint:
   READINGS:
     2022-10-02 17:10:59   active_time     1644234172
     2022-10-02 17:10:59   biz_type        0
     2022-10-02 17:10:59   category        sp
     2022-10-02 17:10:59   create_time     1644234172
     2022-10-02 17:10:59   icon            smart/icon/ay1525342462043yjwZs/e9af8e6817e79859b119a322895ffc0b.png
     2022-10-02 17:10:59   id              bf905cb6a14a43dbf9hhfu
     2022-10-02 17:10:59   ip              93.203.85.174
     2022-10-02 17:10:59   lat             52.8048
     2022-10-02 17:10:59   local_key       f9ea8d1efc541ead
     2022-10-02 17:10:59   lon             13.0448
     2022-10-02 17:10:59   model           Überwachungskamera
     2022-10-02 17:10:59   name            Wohnzimmerkamera
     2022-10-02 17:10:59   online          1
     2022-10-02 17:10:59   owner_id        15487476
     2022-10-02 17:10:59   product_id      35twetlejkkllta0
     2022-10-02 17:10:59   product_name    ZX-5110
     2022-10-02 17:11:00   state           online
     2022-10-02 17:10:59   sub             0
     2022-10-02 17:10:59   time_zone       +01:00
     2022-10-02 17:10:59   uid             eu1598817427882BAzmt
     2022-10-02 17:10:59   update_time     1644242210
     2022-10-02 17:10:59   uuid            tuyab725045bfe14986f
   args:
     Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
     fhempy
     tuya
     35twetlejkkllta0
     bf905cb6a14a43dbf9hhfu
     192.168.178.98
     f9ea8d1efc541ead
     3.3
     fq83awrvav6glwxl28ed
     59327720c0834b8d8d4bc010f9b9a072
   argsh:
   helper:
     bm:
       fhempy_Attr:
         cnt        9
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        02.10. 17:10:58
         max        0.0073850154876709
         tot        0.0489940643310547
         mAr:
           set
           Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
           tuya_spec_status
           [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'sd_storge', 'dp_id': 109, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'sd_status', 'dp_id': 110, 'type': 'Integer', 'values': '{"unit":"","min":1,"max":5,"scale":1,"step":1}'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': '{}'}, {'code': 'movement_detect_pic', 'dp_id': 115, 'type': 'Raw', 'values': '{}'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': '{}'}, {'code': 'sd_format_state', 'dp_id': 117, 'type': 'Integer', 'values': '{"unit":"","min":-20000,"max":20000,"scale":1,"step":1}'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': '{"range":["1","2","3","4","5","6","7","0"]}'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': '{"range":["0","1"]}'}, {'code': 'decibel_upload', 'dp_id': 141, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': '{}'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': '{"range":["1","2"]}'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'alarm_message', 'dp_id': 185, 'type': 'String', 'values': '{}'}]
       fhempy_Define:
         cnt        1
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        02.10. 17:10:55
         max        0.0194201469421387
         tot        0.0194201469421387
         mAr:
           HASH(0x5630703f97c8)
           ARRAY(0x563074975c10)
           HASH(0x56306c6a4010)
       fhempy_Get:
         cnt        3
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        02.10. 17:18:54
         max        0.00734090805053711
         tot        0.0173659324645996
         mAr:
           HASH(0x5630703f97c8)
           ARRAY(0x56307418c228)
           HASH(0x5630727564f0)
       fhempy_Set:
         cnt        61
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        02.10. 17:10:57
         max        0.0463900566101074
         tot        0.744508743286133
         mAr:
           HASH(0x5630703f97c8)
           ARRAY(0x563073864538)
           HASH(0x5630739a1228)
   hmccu:
Attributes:
   alias      Wohnzimmerkamera
   devStateIcon online:it_wifi@green offline:it_wifi@red
   group      tuya
   icon       it_camera@red
   room       02_0_EG->02_4_EG_Wohnzimmer,Tuya
   tuya_spec_functions [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': '{}', 'desc': 'basic indicator'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': '{}', 'desc': 'basic flip'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': '{}', 'desc': 'basic osd'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': '{"range":["0","1","2"]}', 'desc': 'motion sensitivity'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': '{"range":["0","1","2"]}', 'desc': 'basic nightvision'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': '{}', 'desc': 'sd format'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': '{}', 'desc': 'ptz stop'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': '{"range":["1","2","3","4","5","6","7","0"]}', 'desc': 'ptz control'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': '{}', 'desc': 'motion switch'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': '{}', 'desc': 'decibel switch'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': '{"range":["0","1"]}', 'desc': 'decibel sensitivity'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': '{}', 'desc': 'record switch'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': '{"range":["1","2"]}', 'desc': 'record mode'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': '{}', 'desc': 'motion tracking'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': '{}', 'desc': 'motion area switch'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': '{"maxlen":255}', 'desc': 'motion area'}]
   tuya_spec_status [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'sd_storge', 'dp_id': 109, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'sd_status', 'dp_id': 110, 'type': 'Integer', 'values': '{"unit":"","min":1,"max":5,"scale":1,"step":1}'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': '{}'}, {'code': 'movement_detect_pic', 'dp_id': 115, 'type': 'Raw', 'values': '{}'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': '{}'}, {'code': 'sd_format_state', 'dp_id': 117, 'type': 'Integer', 'values': '{"unit":"","min":-20000,"max":20000,"scale":1,"step":1}'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': '{"range":["1","2","3","4","5","6","7","0"]}'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': '{"range":["0","1"]}'}, {'code': 'decibel_upload', 'dp_id': 141, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': '{}'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': '{"range":["1","2"]}'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'alarm_message', 'dp_id': 185, 'type': 'String', 'values': '{}'}


Ok, der state online sagt nur wenig aus. Bist du sicher, dass du über fhempy die Kamera schon mal geschalten hast? Was passiert jetzt wenn du einen der set Befehle ausführst?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 02 Oktober 2022, 20:59:00
Im Fhem werden keine set-Befehle angeboten.
Als ich über die App die Kamera bedient habe, sind Readings gekommen.
Internals:
   .AttrList  tuya_spec_functions tuya_spec_status IODev:local_pybinding event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading
   CFGFN     
   DEF        tuya 35twetlejkkllta0 bf905cb6a14a43dbf9hhfu 192.168.178.98 f9ea8d1efc541ead 3.3 1234.... 1234....
   FHEMPYTYPE tuya
   FUUID      6339dc78-f33f-3b5c-6f69-e6c00678653a84c2
   IODev      local_pybinding
   NAME       Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
   NR         14072
   PYTHONTYPE tuya
   STATE      online
   TYPE       fhempy
   eventCount 15
   .attraggr:
   .attrminint:
   READINGS:
     2022-10-02 20:46:57   IODev           local_pybinding
     2022-10-02 20:46:20   active_time     1644234172
     2022-10-02 20:51:11   basic_flip      off
     2022-10-02 20:51:11   basic_indicator on
     2022-10-02 20:51:11   basic_nightvision 0
     2022-10-02 20:51:11   basic_osd       on
     2022-10-02 20:46:20   biz_type        0
     2022-10-02 20:46:20   category        sp
     2022-10-02 20:46:20   create_time     1644234172
     2022-10-02 20:46:20   icon            smart/icon/ay1525342462043yjwZs/e9af8e6817e79859b119a322895ffc0b.png
     2022-10-02 20:46:20   id              bf905cb6a14a43dbf9hhfu
     2022-10-02 20:46:20   ip              93.203.85.174
     2022-10-02 20:46:20   lat             52.8048
     2022-10-02 20:46:20   local_key       f9ea8d1efc541ead
     2022-10-02 20:46:20   lon             13.0448
     2022-10-02 20:46:20   model           Überwachungskamera
     2022-10-02 20:51:11   motion_sensitivity 1
     2022-10-02 20:51:11   movement_detect_pic eyJidWNrZXQiOiJ0eS1ldS1zdG9yYWdlMzAiLCJmaWxlcyI6W1siLzZjOTJkNS0xNTQ4NzQ3Ni10dXlhYjcyNTA0NWJmZTE0OTg2Zi9kZXRlY3QvMTY0NDI1ODQxMC5qcGVnP3BhcmFtPWlvYW5KV3p3T3ovKzF1QzFDMTBYMFZYdjcwdHZXNTlZYXpobmtZSmdMNUE9IiwiIl1dLCJ2IjoiMy4wIn0=
     2022-10-02 20:46:20   name            Wohnzimmerkamera
     2022-10-02 20:46:20   online          1
     2022-10-02 20:46:20   owner_id        15487476
     2022-10-02 20:46:20   product_id      35twetlejkkllta0
     2022-10-02 20:46:20   product_name    ZX-5110
     2022-10-02 20:51:10   ptz_control     4
     2022-10-02 20:51:11   ptz_stop        on
     2022-10-02 20:51:11   sd_format       false
     2022-10-02 20:51:11   sd_status       0.5
     2022-10-02 20:51:11   sd_storge       0|0|0
     2022-10-02 20:51:10   state           online
     2022-10-02 20:46:20   sub             0
     2022-10-02 20:46:20   time_zone       +01:00
     2022-10-02 20:46:20   uid             eu1598817427882BAzmt
     2022-10-02 20:46:20   update_time     1644242210
     2022-10-02 20:46:20   uuid            tuyab725045bfe14986f
   args:
     Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
     fhempy
     tuya
     35twetlejkkllta0
     bf905cb6a14a43dbf9hhfu
     192.168.178.98
     f9ea8d1efc541ead
     3.3
     fq83awrvav6glwxl28ed
     59327720c0834b8d8d4bc010f9b9a072
   argsh:
   helper:
     bm:
       fhempy_Attr:
         cnt        10
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        02.10. 20:46:17
         max        0.0418059825897217
         tot        0.0999505519866943
         mAr:
           set
           Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
           room
           fhempy
       fhempy_Define:
         cnt        1
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        02.10. 20:46:16
         max        0.0194549560546875
         tot        0.0194549560546875
         mAr:
           HASH(0x563077fcefe8)
           ARRAY(0x563072920fb0)
           HASH(0x5630770f9810)
       fhempy_Get:
         cnt        4
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        02.10. 20:48:11
         max        0.00657796859741211
         tot        0.0164661407470703
         mAr:
           HASH(0x563077fcefe8)
           ARRAY(0x563077831210)
           HASH(0x563077449f08)
       fhempy_Set:
         cnt        85
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        02.10. 20:46:57
         max        0.144542932510376
         tot        1.23940968513489
         mAr:
           HASH(0x563077fcefe8)
           ARRAY(0x563077fccab0)
           HASH(0x563077fec950)
   hmccu:
Attributes:
   IODev      local_pybinding
   alias      Wohnzimmerkamera
   devStateIcon online:it_wifi@green offline:it_wifi@red
   group      tuya
   icon       it_camera@red
   room       02_0_EG->02_4_EG_Wohnzimmer,Tuya
   tuya_spec_functions [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': '{}', 'desc': 'basic indicator'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': '{}', 'desc': 'basic flip'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': '{}', 'desc': 'basic osd'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': '{"range":["0","1","2"]}', 'desc': 'motion sensitivity'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': '{"range":["0","1","2"]}', 'desc': 'basic nightvision'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': '{}', 'desc': 'sd format'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': '{}', 'desc': 'ptz stop'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': '{"range":["1","2","3","4","5","6","7","0"]}', 'desc': 'ptz control'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': '{}', 'desc': 'motion switch'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': '{}', 'desc': 'decibel switch'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': '{"range":["0","1"]}', 'desc': 'decibel sensitivity'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': '{}', 'desc': 'record switch'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': '{"range":["1","2"]}', 'desc': 'record mode'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': '{}', 'desc': 'motion tracking'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': '{}', 'desc': 'motion area switch'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': '{"maxlen":255}', 'desc': 'motion area'}]
   tuya_spec_status [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'sd_storge', 'dp_id': 109, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'sd_status', 'dp_id': 110, 'type': 'Integer', 'values': '{"unit":"","min":1,"max":5,"scale":1,"step":1}'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': '{}'}, {'code': 'movement_detect_pic', 'dp_id': 115, 'type': 'Raw', 'values': '{}'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': '{}'}, {'code': 'sd_format_state', 'dp_id': 117, 'type': 'Integer', 'values': '{"unit":"","min":-20000,"max":20000,"scale":1,"step":1}'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': '{"range":["1","2","3","4","5","6","7","0"]}'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': '{"range":["0","1"]}'}, {'code': 'decibel_upload', 'dp_id': 141, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': '{}'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': '{"range":["1","2"]}'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'alarm_message', 'dp_id': 185, 'type': 'String', 'values': '{}'}]

ZitatOk, der state online sagt nur wenig aus. Bist du sicher, dass du über fhempy die Kamera schon mal geschalten hast?
Ich hatte nur auf state geachtet, geschaltet noch nicht.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 04 Oktober 2022, 14:27:07
Hallo Dominik,
soll ich auf der 0.1.472 Version bleiben oder kann ich auf 0.1.497 updaten?
V G
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 04 Oktober 2022, 19:59:26
Bitte auf die letzte Version aktualisieren und dort testen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 04 Oktober 2022, 21:26:26
ZitatBitte auf die letzte Version aktualisieren und dort testen.

Update auf 0.1.498 durchgeführt.
Einige Device sind jetzt auf ready. Einige andere sind auf Initializing... geblieben.
Ein Muster kann ich leider nicht erkennen.
Von der Kamera füge ich ein List an.
Internals:
   .AttrList  tuya_spec_functions tuya_spec_status IODev:local_pybinding event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading
   .FhemMetaInternals 1
   DEF        tuya 35twetlejkkllta0 bf905cb6a14a43dbf9hhfu 192.168.178.98 f9ea8d1efc541ead 3.3 1234... 1234...
   DEVICEID   bf905cb6a14a43dbf9hhfu
   FHEMPYTYPE tuya
   FUUID      6339dc78-f33f-3b5c-6f69-e6c00678653a84c2
   FVERSION   10_fhempy.pm:0.182830/2019-01-16
   IODev      local_pybinding
   NAME       Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
   NR         1267
   PYTHONTYPE tuya
   STATE      ready
   TYPE       fhempy
   eventCount 12
   .attraggr:
   .attrminint:
   READINGS:
     2022-10-02 20:46:20   active_time     1644234172
     2022-10-03 08:22:30   basic_flip      off
     2022-10-03 08:22:30   basic_indicator on
     2022-10-03 08:22:30   basic_nightvision 0
     2022-10-03 08:22:30   basic_osd       on
     2022-10-02 20:46:20   biz_type        0
     2022-10-02 20:46:20   category        sp
     2022-10-02 20:46:20   create_time     1644234172
     2022-10-02 20:46:20   icon            smart/icon/ay1525342462043yjwZs/e9af8e6817e79859b119a322895ffc0b.png
     2022-10-02 20:46:20   id              bf905cb6a14a43dbf9hhfu
     2022-10-02 20:46:20   ip              93.203.85.174
     2022-10-02 20:46:20   lat             52.8048
     2022-10-02 20:46:20   local_key       f9ea8d1efc541ead
     2022-10-02 20:46:20   lon             13.0448
     2022-10-02 20:46:20   model           Überwachungskamera
     2022-10-03 08:22:30   motion_sensitivity 1
     2022-10-03 08:22:30   movement_detect_pic eyJidWNrZXQiOiJ0eS1ldS1zdG9yYWdlMzAiLCJmaWxlcyI6W1siLzZjOTJkNS0xNTQ4NzQ3Ni10dXlhYjcyNTA0NWJmZTE0OTg2Zi9kZXRlY3QvMTY0NDI1ODQxMC5qcGVnP3BhcmFtPWlvYW5KV3p3T3ovKzF1QzFDMTBYMFZYdjcwdHZXNTlZYXpobmtZSmdMNUE9IiwiIl1dLCJ2IjoiMy4wIn0=
     2022-10-02 20:46:20   name            Wohnzimmerkamera
     2022-10-04 21:09:07   online          1
     2022-10-02 20:46:20   owner_id        15487476
     2022-10-02 20:46:20   product_id      35twetlejkkllta0
     2022-10-04 20:22:07   product_name    ZX-5110
     2022-10-04 21:06:06   ptz_control     6
     2022-10-03 08:22:30   ptz_stop        on
     2022-10-03 08:22:30   sd_format       false
     2022-10-03 08:22:30   sd_status       0.5
     2022-10-03 08:22:30   sd_storge       0|0|0
     2022-10-04 21:10:14   state           ready
     2022-10-02 20:46:20   sub             0
     2022-10-02 20:46:20   time_zone       +01:00
     2022-10-02 20:46:20   uid             eu1598817427882BAzmt
     2022-10-02 20:46:20   update_time     1644242210
     2022-10-02 20:46:20   uuid            tuyab725045bfe14986f
   args:
     Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
     fhempy
     tuya
     35twetlejkkllta0
     bf905cb6a14a43dbf9hhfu
     192.168.178.98
     f9ea8d1efc541ead
     3.3
     fq83awrvav6glwxl28ed
     59327720c0834b8d8d4bc010f9b9a072
   argsh:
   helper:
     bm:
       fhempy_Attr:
         cnt        3
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        04.10. 20:23:26
         max        0.00779104232788086
         tot        0.017035961151123
         mAr:
           set
           Wohnzimmerkamera_bf905cb6a14a43dbf9hhfu
           alias
           Wohnzimmerkamera
       fhempy_Get:
         cnt        7
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        04.10. 21:20:02
         max        0.0869488716125488
         tot        0.106245279312134
         mAr:
           HASH(0x5639a1182a90)
           ARRAY(0x5639a458a4e8)
           HASH(0x5639a15da888)
       fhempy_Set:
         cnt        79
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        04.10. 20:31:33
         max        3.53080010414124
         tot        5.04773449897766
         mAr:
           HASH(0x5639a1182a90)
           ARRAY(0x5639a53ae940)
           HASH(0x5639a4236a98)
   hmccu:
Attributes:
   IODev      local_pybinding
   alias      Wohnzimmerkamera
   devStateIcon online:it_wifi@green offline:it_wifi@red
   group      tuya
   icon       it_camera@red
   room       02_0_EG->02_4_EG_Wohnzimmer,Tuya
   tuya_spec_functions [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': '{}', 'desc': 'basic indicator'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': '{}', 'desc': 'basic flip'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': '{}', 'desc': 'basic osd'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': '{"range":["0","1","2"]}', 'desc': 'motion sensitivity'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': '{"range":["0","1","2"]}', 'desc': 'basic nightvision'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': '{}', 'desc': 'sd format'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': '{}', 'desc': 'ptz stop'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': '{"range":["1","2","3","4","5","6","7","0"]}', 'desc': 'ptz control'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': '{}', 'desc': 'motion switch'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': '{}', 'desc': 'decibel switch'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': '{"range":["0","1"]}', 'desc': 'decibel sensitivity'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': '{}', 'desc': 'record switch'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': '{"range":["1","2"]}', 'desc': 'record mode'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': '{}', 'desc': 'motion tracking'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': '{}', 'desc': 'motion area switch'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': '{"maxlen":255}', 'desc': 'motion area'}]
   tuya_spec_status [{'code': 'basic_indicator', 'dp_id': 101, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_flip', 'dp_id': 103, 'type': 'Boolean', 'values': '{}'}, {'code': 'basic_osd', 'dp_id': 104, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_sensitivity', 'dp_id': 106, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'basic_nightvision', 'dp_id': 108, 'type': 'Enum', 'values': '{"range":["0","1","2"]}'}, {'code': 'sd_storge', 'dp_id': 109, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'sd_status', 'dp_id': 110, 'type': 'Integer', 'values': '{"unit":"","min":1,"max":5,"scale":1,"step":1}'}, {'code': 'sd_format', 'dp_id': 111, 'type': 'Boolean', 'values': '{}'}, {'code': 'movement_detect_pic', 'dp_id': 115, 'type': 'Raw', 'values': '{}'}, {'code': 'ptz_stop', 'dp_id': 116, 'type': 'Boolean', 'values': '{}'}, {'code': 'sd_format_state', 'dp_id': 117, 'type': 'Integer', 'values': '{"unit":"","min":-20000,"max":20000,"scale":1,"step":1}'}, {'code': 'ptz_control', 'dp_id': 119, 'type': 'Enum', 'values': '{"range":["1","2","3","4","5","6","7","0"]}'}, {'code': 'motion_switch', 'dp_id': 134, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_switch', 'dp_id': 139, 'type': 'Boolean', 'values': '{}'}, {'code': 'decibel_sensitivity', 'dp_id': 140, 'type': 'Enum', 'values': '{"range":["0","1"]}'}, {'code': 'decibel_upload', 'dp_id': 141, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'record_switch', 'dp_id': 150, 'type': 'Boolean', 'values': '{}'}, {'code': 'record_mode', 'dp_id': 151, 'type': 'Enum', 'values': '{"range":["1","2"]}'}, {'code': 'motion_tracking', 'dp_id': 161, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area_switch', 'dp_id': 168, 'type': 'Boolean', 'values': '{}'}, {'code': 'motion_area', 'dp_id': 169, 'type': 'String', 'values': '{"maxlen":255}'}, {'code': 'alarm_message', 'dp_id': 185, 'type': 'String', 'values': '{}'}]
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 04 Oktober 2022, 21:45:04
Steht was im fhempy Log dazu?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Sommerfeld am 04 Oktober 2022, 21:50:32
Hilft dies weiter?
2022-10-04 21:43:07,922 - ERROR    - Stecker_SilverCrest_Hub_Ueberwachung_bf7a36070c5531b25aubiy: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.10/site-packages/fhempy/lib/tuya/tuya.py", line 405, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.10/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 676, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('192.168.178.99', 6668)
2022-10-04 21:44:07,236 - WARNING  - asyncio: Executing <Task pending name='Task-36789' coro=<FhemModule._run_coro() running at /opt/fhem/.local/lib/python3.10/site-packages/fhempy/lib/generic.py:185> wait_for=<Future pending cb=[Task.task_wakeup()] created at /usr/lib/python3.10/asyncio/base_events.py:429> cb=[FhemModule._handle_task_result()] created at /usr/lib/python3.10/asyncio/tasks.py:337> took 0.118 seconds
2022-10-04 21:44:23,699 - ERROR    - Motorrad_Ladestation_Carport_bf99d29dcdc176fbecfx9m: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.10/site-packages/fhempy/lib/tuya/tuya.py", line 405, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.10/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 676, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('192.168.178.76', 6668)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: stefanru am 08 Oktober 2022, 16:15:32
Hi Dominik,

ich habe auch das Problem das lokal Devices in "Initializing..." bleiben.
Im fhempy.log sehe ich:
2022-10-08 16:11:15,320 - ERROR    - Computer_bf881b7977c814af88jmrc: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 424, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 339, in _create_cloudmapping_dev
    await self.check_tuya_attributes()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in check_tuya_attributes
    self._convert_values_to_json()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 266, in _convert_values_to_json
    spec["values"] = json.loads(spec["values"])
  File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict


Hast du eine Idee?

Gruß und Danke,
Stefan
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 09 Oktober 2022, 20:51:19
Bitte mit der letzten Version testen, da sollte das nicht mehr passieren.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: stefanru am 10 Oktober 2022, 20:09:04
Ah ja jetzt tut's.

Danke dir!

Gruß,
Stefan
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: torsten12 am 14 Oktober 2022, 10:44:16
Hallo,

ich habe das Problem, dass die set Auswahl /  das set Menü nicht mehr angezeigt wird. Im Logfile wird beim Starten Fehler angezeigt:

2022-10-14 10:32:55,738 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2022-10-14 10:32:55,749 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2022-10-14 10:32:55,751 - INFO     - websockets.server: server closing
2022-10-14 10:33:05,794 - INFO     - websockets.server: connection closed
2022-10-14 10:33:05,797 - INFO     - websockets.server: server closed
2022-10-14 10:33:05,802 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2022-10-14 10:33:07,670 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.506...
2022-10-14 10:33:07,682 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-10-14 10:33:07,743 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-10-14 10:33:15,825 - INFO     - websockets.server: connection open
2022-10-14 10:33:15,829 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-10-14 10:33:17,603 - ERROR    - Infrarotheizung_bf4da370f137b68a78iwb0: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/tuya/tuya.py", line 466, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/tuya/tuya.py", line 390, in _create_cloudmapping_dev
    info = await self.get_tuya_dev_info()
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/tuya/tuya.py", line 323, in get_tuya_dev_info
    for dev in resp["result"]:
KeyError: 'result'

Das ganze ist nach dem Update auf die Version 0.1.506 (fhempy_local) passiert.

Hat hier jemand eine Idee? Vielen Dank.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 15 Oktober 2022, 21:53:59
Das sieht nach einem Problem mit der Abfrage bei der Tuya IoT Cloud aus. Das Device gibt es sicher noch in der iot Cloud? Schau mal bitte dort nach.

Hast du das Problem nur mit diesem Device oder mit allen tuya Devices?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: torsten12 am 16 Oktober 2022, 14:32:15
Hallo,
danke erst einmal für deine Unterstützung.
Ja das Device, eine Infrarotheizung, ist noch in der Cloud vorhanden.

Ich habe die Dienste in der Tuya-Cloud geprüft. Sind alle aktiv.

Ich schaue mal, ob ich das Device lösche und noch mal neu anlege.

vielen Dank

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Rossi am 23 Oktober 2022, 18:03:30
Hi, ich habe mein erstes Geräte eine Lytmi Ambientenbeleuchtung in Fhem eingebunden.

Leider bleibt es, nachdem alle Readings und Attribute angelegt wurden auf "Initializing..." stehen und wird auch nicht mehr upgedated.
Das einzige, das funktioniert ist ON/OFF. Das kann ich an der HW und im Tuya IoT Platform Debuging sehen.
"set Lytmi switch_led on"

Kann mir hier evtl. jemand weiter helfen?

Im fhempy.log Log steht beim Pi Neustart folgendes:

2022-10-23 17:25:41,631 - INFO     - fhempy.lib.fhem_pythonbinding: Shutdown initiated...
2022-10-23 17:25:41,662 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2022-10-23 17:25:41,663 - INFO     - websockets.server: server closing
2022-10-23 17:26:28,106 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.508...
2022-10-23 17:26:28,112 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-10-23 17:26:28,185 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-10-23 17:26:31,929 - INFO     - websockets.server: connection open
2022-10-23 17:26:31,931 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-10-23 17:27:10,429 - WARNING  - Lytmi: dp_27 in spec but not found locally. This should be reported to TuYa
2022-10-23 17:27:10,436 - WARNING  - Lytmi: dp_28 in spec but not found locally. This should be reported to TuYa


Das define des Device sah so aus, da es mit dem create des "fhem_system" auch das selbe Verhalten zeigte, habe ich es so versucht.
"define Lytmi fhempy tuya api bf9a9e37947cxxxxxxxxxx 192.168.7.25 163f6951axxxxxxx 3.3 qfmjwvrtr5adxxxxxxxx 4edce9e221334841axxxxxxxxxxxxxx"

Das List des Device:

Internals:
   DEF        tuya api bf9a9e37947cxxxxxxxxxx 192.168.7.25 163f6951axxxxxxx 3.3 qfmjwvrtxxxxxxxxxxxx 4edce9e221334841axxxxxxxxxxxxxx
   DEVICEID   bf9a9e37947cxxxxxxxxxx
   FHEMPYTYPE tuya
   FUUID      635556ba-f33f-c387-7c3c-44e75b2d5e647ebd
   IODev      fhempy_local
   NAME       Lytmi
   NR         991
   PYTHONTYPE tuya
   STATE      Initializing...
   TYPE       fhempy
   eventCount 2
   CHANGED:
     switch_led: on
   READINGS:
     2022-10-23 16:59:08   active_time     1666454491
     2022-10-23 16:59:08   biz_type        18
     2022-10-23 16:59:09   bright_value    1000.0
     2022-10-23 16:59:08   category        dd
     2022-10-23 16:59:09   countdown       0.0
     2022-10-23 16:59:08   create_time     1641649822
     2022-10-23 16:59:08   icon            smart/icon/bay1615980634491NPlo/f297207c1591b5eaca2b2a93fd2e3452.png
     2022-10-23 16:59:08   id              bf9a9e37947cxxxxxxxxxx
     2022-10-23 16:59:08   ip              188.210.xx.xxx
     2022-10-23 16:59:08   lat             48.xx68
     2022-10-23 16:59:08   local_key       163f6951axxxxxxx
     2022-10-23 16:59:08   lon             10.xx38
     2022-10-23 16:59:08   name            AmbiLight
     2022-10-23 17:26:37   online          1
     2022-10-23 16:59:08   owner_id        50339907
     2022-10-23 16:59:08   product_id      qedtadbae1wfzkru
     2022-10-23 16:59:08   product_name    Screen sync smart light
     2022-10-23 17:26:36   state           Initializing...
     2022-10-23 16:59:08   sub             0
     2022-10-23 17:27:10   switch_led      on
     2022-10-23 16:59:08   time_zone       +02:00
     2022-10-23 16:59:08   uid             eu1644001821005bfIcL
     2022-10-23 16:59:08   update_time     1666454491
     2022-10-23 16:59:08   uuid            9a7c673fd543a119
     2022-10-23 16:59:09   work_mode       scene
   args:
     Lytmi
     fhempy
     tuya
     api
     bf9a9e37947cxxxxxxxxxx
     192.168.7.25
     163f6951axxxxxxx
     3.3
     qfmjwvrtxxxxxxxxxxxx
     4edce9e221334841axxxxxxxxxxxxxx
   argsh:
Attributes:
   DbLogExclude .*
   dp_20      switch_led
   dp_21      work_mode
   dp_22      bright_value
   dp_24      colour_data
   dp_25      scene_data
   dp_26      countdown
   event-on-change-reading .*
   group      tuya
   room       Zimmer -> Wohnzimmer,fhempy
   tuya_spec_functions [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}, 'desc': 'switch led'}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}, 'desc': 'work mode'}, {'code': 'bright_value', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'bright value'}, {'code': 'colour_data', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}, 'desc': 'colour data'}, {'code': 'scene_data', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, 'desc': 'scene data'}, {'code': 'countdown', 'dp_id': 26, 'type': 'Integer', 'values': {'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown'}, {'code': 'music_data', 'dp_id': 27, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}, 'desc': 'music data'}, {'code': 'control_data', 'dp_id': 28, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}, 'desc': 'control data'}]
   tuya_spec_status [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}}, {'code': 'bright_value', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'colour_data', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, {'code': 'scene_data', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}}, {'code': 'countdown', 'dp_id': 26, 'type': 'Integer', 'values': {'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}]


Hier das list des fhem_system devices:

Internals:
   API_KEY    qfmjwvrtr5adxxxxxxxx
   API_SECRET 4edce9e221334841axxxxxxxxxxxxxx
   DEF        tuya setup qfmjwvrtr5adxxxxxxxx 4edce9e221334841axxxxxxxxxxxxxx bf9a9e37947cxxxxxxx
   DEVICEID   0
   FHEMPYTYPE tuya
   FUUID      6353d59b-f33f-c387-41d7-a1df682ce1b98fe2
   IODev      fhempy_local
   NAME       tuya_system
   NR         990
   PYTHONTYPE tuya
   REGION     eu
   STATE      ready
   TYPE       fhempy
   READINGS:
     2022-10-22 18:07:09   bf9a9e37947cxxxxxxx_icon https://images.tuyaeu.com/smart/icon/bay1615980634491NPlo/f297207c1591b5eaca2b2a93fd2e3452.png
     2022-10-22 18:07:09   bf9a9e37947cxxxxxxx_id bf9a9e37947cxxxxxxx
     2022-10-22 18:07:59   bf9a9e37947cxxxxxxx_ip 192.168.7.25
     2022-10-22 18:07:09   bf9a9e37947cxxxxxxx_localkey 163f6951axxxxxxx
     2022-10-22 18:07:09   bf9a9e37947cxxxxxxx_name AmbiLight
     2022-10-22 18:07:09   bf9a9e37947cxxxxxxx_productid qedtadbae1wfzkru
     2022-10-22 18:07:59   bf9a9e37947cxxxxxxx_version 3.3
     2022-10-23 17:26:34   state           ready
   args:
     tuya_system
     fhempy
     tuya
     setup
     qfmjwvrtr5adxxxxxxxx
     4edce9e221334841axxxxxxxxxxxxxx
     bf9a9e37947cxxxxxxx
   argsh:
Attributes:
   DbLogExclude .*
   IODev      fhempy_local
   event-on-change-reading .*
   group      tuya
   room       Interfaces,fhempy


Gruß
CRo
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ahermann86 am 02 November 2022, 12:34:31
Hallo,

ich versuche gerade ein Tuya Device in mein neu aufgesetztes System einzubinden.
Nach dem Scan und anlegen bleibt der Status des Devices auf "Initializing..."

Ich habe dann nochmal alles gelöscht und nur Mal den Server gestartet. Im Log erscheint schon nach dem Neustart folgendes:


2022-11-02 12:24:25,711 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.508...
2022-11-02 12:24:25,719 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-11-02 12:24:25,826 - WARNING  - asyncio: Executing <Task pending name='Task-1' coro=<async_main() running at /usr/local/lib/python3.10/dist-packages/fhempy/lib/fhem_pythonbinding.py:616> wait_for=<_GatheringFuture pending cb=[Task.task_wakeup()] created at /usr/lib/python3.10/asyncio/tasks.py:665> cb=[_run_until_complete_cb() at /usr/lib/python3.10/asyncio/base_events.py:184] created at /usr/lib/python3.10/asyncio/tasks.py:636> took 0.116 seconds
2022-11-02 12:24:25,831 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-11-02 12:24:31,330 - INFO     - websockets.server: connection open
2022-11-02 12:24:31,336 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-11-02 12:24:31,478 - ERROR    - fhempy.lib.core.discover_fhempy.discover_fhempy: async_get_service_info failed for _http._tcp.local. - pvserver._wr_http._tcp.local.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/fhempy/lib/core/discover_fhempy/discover_fhempy.py", line 32, in foundDevice
    info = await self.zeroconf.async_get_service_info(type, name)
  File "/usr/local/lib/python3.10/dist-packages/zeroconf/asyncio.py", line 233, in async_get_service_info
    info = AsyncServiceInfo(type_, name)
  File "/usr/local/lib/python3.10/dist-packages/zeroconf/_services/info.py", line 124, in __init__
    raise BadTypeInNameException
zeroconf._exceptions.BadTypeInNameException
2022-11-02 12:24:31,680 - WARNING  - asyncio: Executing <Handle _SelectorSocketTransport._read_ready() created at /usr/lib/python3.10/asyncio/selector_events.py:254> took 0.106 seconds


Definiere ich in FHEM "fhempy tuya setup.." und scanne und lege den gefunden Sensor an, steht das im Log:


2022-11-02 12:28:46,492 - ERROR    - fhempy.lib.core.discover_fhempy.discover_fhempy: async_get_service_info failed for _http._tcp.local. - pvserver._wr_http._tcp.local.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/fhempy/lib/core/discover_fhempy/discover_fhempy.py", line 32, in foundDevice
    info = await self.zeroconf.async_get_service_info(type, name)
  File "/usr/local/lib/python3.10/dist-packages/zeroconf/asyncio.py", line 233, in async_get_service_info
    info = AsyncServiceInfo(type_, name)
  File "/usr/local/lib/python3.10/dist-packages/zeroconf/_services/info.py", line 124, in __init__
    raise BadTypeInNameException
zeroconf._exceptions.BadTypeInNameException
2022-11-02 12:29:09,238 - ERROR    - tuya_local_bf2e048397c21cbf7d1zq1: Failed to connect to device
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/fhempy/lib/tuya/tuya.py", line 444, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/usr/local/lib/python3.10/dist-packages/fhempy/lib/tuya/pytuya/__init__.py", line 676, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.2.84', 6668)


Was mache ich falsch bzw. was fehlt?

Gruß
Axel (..der mit dem Orange Pi One)

Edit:

Ich habe das ganze noch auf einem "Debian GNU/Linux 11 (bullseye)" Server ausprobiert. Da passiert das gleiche:


2022-11-03 09:31:34,786 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.508...
2022-11-03 09:31:34,797 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-11-03 09:31:34,906 - WARNING  - asyncio: Executing <Task pending name='Task-1' coro=<async_main() running at /opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py:616> wait_for=<_GatheringFuture pending cb=[<TaskWakeupMethWrapper object at 0x7f2fb73efdf0>()] created at /usr/lib/python3.9/asyncio/tasks.py:704> cb=[_run_until_complete_cb() at /usr/lib/python3.9/asyncio/base_events.py:184] created at /usr/lib/python3.9/asyncio/base_events.py:621> took 0.120 seconds
2022-11-03 09:31:34,908 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-11-03 09:31:36,145 - INFO     - websockets.server: connection open
2022-11-03 09:31:36,151 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-11-03 09:31:36,321 - ERROR    - fhempy.lib.core.discover_fhempy.discover_fhempy: async_get_service_info failed for _http._tcp.local. - pvserver._wr_http._tcp.local.
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/core/discover_fhempy/discover_fhempy.py", line 32, in foundDevice
    info = await self.zeroconf.async_get_service_info(type, name)
  File "/opt/fhem/.local/lib/python3.9/site-packages/zeroconf/asyncio.py", line 233, in async_get_service_info
    info = AsyncServiceInfo(type_, name)
  File "/opt/fhem/.local/lib/python3.9/site-packages/zeroconf/_services/info.py", line 124, in __init__
    raise BadTypeInNameException
zeroconf._exceptions.BadTypeInNameException
2022-11-03 09:36:41,537 - ERROR    - tuya_local_bf2e048397c21cbf7d1zq1: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 444, in setup_connection
    self._connected_device = await pytuya.connect(
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 676, in connect
    _, protocol = await loop.create_connection(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
    return await fut
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.2.84', 6668)
2022-11-03 09:37:13,747 - WARNING  - asyncio: Executing <Task pending name='Task-71' coro=<FhemModule._run_coro() running at /opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py:185> wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_write_done(14, handle=<Handle BaseS...events.py:296>)(), <TaskWakeupMethWrapper object at 0x7f2fae945550>()] created at /usr/lib/python3.9/asyncio/base_events.py:424> cb=[FhemModule._handle_task_result()] created at /usr/lib/python3.9/asyncio/tasks.py:361> took 0.123 seconds
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 03 November 2022, 20:28:30
Ich bekomme beim Anklicken der Devices, die mit fhempy angelegt worden sind ein Popup mit folgender Meldung:

fhem?detail=og_jannik.heizung2 line 428:
TypeError: helpLink[0] is undefined

Was kann das sein?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 05 November 2022, 18:59:35
Leider funktioniert irgendwie der Peer nicht mehr. Es wird kein eq3bt Thermostat mehr korrekt angesteuert :-(

Wenn ich fhempy (0.1.508 ) in der Konsole auf dem Peer laufen lasse (user pi) wird Folgendes ausgegeben:

2022-11-05 18:49:05,544 - ERROR    - og_tarik.heizung: Exception raised by task: <Task finished name='Task-219' coro=<FhemModule._run_coro() done, defined at /usr/local/lib/python3.9/dist-packages/fhempy/lib/generic.py:183> exception=AttributeError("'NoneType' object has no attribute 'MANUAL'") created at /usr/lib/python3.9/asyncio/tasks.py:361>
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/fhempy/lib/generic.py", line 191, in _handle_task_result
    task.result()
  File "/usr/local/lib/python3.9/dist-packages/fhempy/lib/generic.py", line 185, in _run_coro
    await coro
  File "/usr/local/lib/python3.9/dist-packages/fhempy/lib/eq3bt/eq3bt.py", line 365, in set_and_update
    await self.update_readings()
  File "/usr/local/lib/python3.9/dist-packages/fhempy/lib/eq3bt/eq3bt.py", line 266, in update_readings
    self.hash, "completeState", self.thermostat.mode_readable
  File "/usr/local/lib/python3.9/dist-packages/fhempy/lib/eq3bt/eq3btsmart.py", line 330, in mode_readable
    if mode.MANUAL:
AttributeError: 'NoneType' object has no attribute 'MANUAL'
2022-11-05 18:50:22,969 - ERROR    - eg_schlafzimmer.heizung: Failed to update, retry in 60s
2022-11-05 18:50:27,874 - ERROR    - og_bad.heizung: Failed to update, retry in 60s
2022-11-05 18:51:29,701 - ERROR    - eg_schlafzimmer.heizung: Failed to update, retry in 60s
2022-11-05 18:52:32,452 - ERROR    - eg_schlafzimmer.heizung: Failed to update, retry in 60s
2022-11-05 18:52:48,878 - ERROR    - og_bad.heizung: Failed to update, retry in 60s
2022-11-05 18:53:35,180 - ERROR    - eg_schlafzimmer.heizung: Failed to update, retry in 60s
2022-11-05 18:54:37,935 - ERROR    - eg_schlafzimmer.heizung: Failed to update, retry in 60s
2022-11-05 18:55:09,677 - ERROR    - og_bad.heizung: Failed to update, retry in 60s
2022-11-05 18:55:40,760 - ERROR    - eg_schlafzimmer.heizung: Failed to update, retry in 60s
2022-11-05 18:56:42,575 - ERROR    - eg_schlafzimmer.heizung: Failed to update, retry in 60s
2022-11-05 18:57:30,477 - ERROR    - og_bad.heizung: Failed to update, retry in 60s
2022-11-05 18:57:44,341 - ERROR    - eg_schlafzimmer.heizung: Failed to update, retry in 60s
2022-11-05 18:58:49,085 - ERROR    - eg_schlafzimmer.heizung: Failed to update, retry in 60s


Auf dem lokalen fhempy läuft noch ein Tuya Thermostat und der bleibt leider nur im Status Initializing...stehen. Aber dafür werden die Thermostate korrekt angesteuert.

Ich habe schon alle Devices noch einmal neu angelegt. Irgendwie ist der Wurm drinn.
Gibt's irgend weche Hinweise um das Problem zu lösen?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: kleinerDrache am 06 November 2022, 11:37:57
Ich hab ein ähnliches Problem, die Devices bleiben oft auf "initialize" stehen, das wandert sporadisch durch meine Devices. Version 0.1.508

Werte werden aber trotzdem in die Readings geschrieben, wenn ich aber ein Device anklicke bekomme ich ein Popup mit folgendem Inhalt:

fhem?detail=tuya_local_21307601e868e746ccf9 line 144:
Uncaught TypeError: Cannot set properties of undefined (setting 'innerHTML')

Das Fhem Log ist unauffällig.

Das Fhempy Log hänge ich an.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: JF Mennedy am 08 November 2022, 08:14:33
Zitat von: kleinerDrache am 06 November 2022, 11:37:57
Ich hab ein ähnliches Problem, die Devices bleiben oft auf "initialize" stehen, das wandert sporadisch durch meine Devices. Version 0.1.508

Werte werden aber trotzdem in die Readings geschrieben, wenn ich aber ein Device anklicke bekomme ich ein Popup mit folgendem Inhalt:

fhem?detail=tuya_local_21307601e868e746ccf9 line 144:
Uncaught TypeError: Cannot set properties of undefined (setting 'innerHTML')

Das Fhem Log ist unauffällig.

Das Fhempy Log hänge ich an.

Kann ich bestätigen.. Selber Fehler auch bei mir.. Tuya Geräte funktionieren sporadisch nach einem Restart von fhempy...

Gruss Jan
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: foxjr am 12 November 2022, 08:49:24
Ich habe das gleich Problem. Ich weiß nicht genau seit welchem Update die Problematik existiert.
Im Sommer ging es ohne Probleme über Wochen.

Fehlermeldung beim Aufruf des Gerätes:

fhem?detail=Klimaanlage line 261:
Uncaught TypeError: Cannot set properties of undefined (setting 'innerHTML')

Nach Neustart des Servers (FHEM reicht nicht) funktioniert es ein paar Minuten.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 12 November 2022, 11:44:28
Heute wurde die Version 0.1.509 veröffentlicht. Der HTML Fehler ist weg.
Vielen Dank.

Leider bleibt mein Thermostat immer noch auf initializing...  stehen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ahermann86 am 14 November 2022, 16:49:21
Hallo,

das Problem, dass meine "Temperatur und Feuchtigkeits Sensoren" auf "Initializing..." stehenbleiben, habe ich mit der neuen Version auch noch immer.
Ich habe allerdings festgestellt, dass die Version 0.1.504 noch funktioniert - ab Version 0.1.505 tritt das  "Initializing..." Problem auf ... vielleicht hilft dir das temporär bzw. auch dem fhempy Entwickler.

Was auch nicht funktioniert, ist die Anbindung des Sensors, wenn nach der Einrichtung der Internetzugriff (also der Tuya Cloudzugriff) des Sensors blockiert wird. ... ist das ein Tuya Problem oder sollte das auch so funktionieren?

https://de.aliexpress.com/item/1005003718187629.html?spm=a2g0o.order_list.0.0.713d5c5fEQR0jt&gatewayAdapt=glo2deu (https://de.aliexpress.com/item/1005003718187629.html?spm=a2g0o.order_list.0.0.713d5c5fEQR0jt&gatewayAdapt=glo2deu)

Gruß
Axel
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 19 November 2022, 12:30:09
Hallo Axel,

danke Dir für die Versionsinfo. Ich kann das bestätigen, ein Downgrade auf die 0.1.504 bingt die tuya devices zurück aber der HTML Fehler ist wieder da.

@Dominik vielleicht könntest Du bitte noch einmal schauen, wo es da klemmt... Macht es Sinn hier die Fehlermeldungen abzuladen oder eher auf dem Git Repo?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Paul_M am 19 November 2022, 12:53:15
Folgendes Problem: Mein fhempyserver startet und stoppt regelmäßig, alle paar Sekunden.
Im Logfile sieht das folgendermaßen aus:
2022.11.19 12:49:55 3: fhempyserver_15733: starting
2022.11.19 12:49:55 3: fhempyserver_15733: using logfile: ./log/fhempy-2022-11-19.log
2022.11.19 12:49:57 3: fhempyserver_15733: read: end of file reached while sysread
2022.11.19 12:49:57 3: fhempyserver_15733: stopped
2022.11.19 12:50:17 3: fhempyserver_15733: starting
2022.11.19 12:50:17 3: fhempyserver_15733: using logfile: ./log/fhempy-2022-11-19.log
2022.11.19 12:50:19 3: fhempyserver_15733: read: end of file reached while sysread
2022.11.19 12:50:19 3: fhempyserver_15733: stopped

usw...

Hat jemand einen Tipp??
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Mazz78 am 19 November 2022, 16:56:50
Hallo zusammen,

sorry dass ich hier dazwischen grätschen muss...

Ich hänge irgendwo bei der Ersteinrichtung...  :-[

Was hab ich bisher...:

Frage...
In dem Tuya Developer Accout hab ich...

Die Fhem Device Definition sagt...
define tuya_system fhempy tuya setup API_KEY API_SECRET DEVICE_ID

Was entspricht was ?
API_KEY = Access ID ???
API_SECRET = Access Secret ???

Die Device_ID soll man aus der App nehmen... Woher ? Ist das die "Virtuelle ID" ?
Muss ich in der Tuya App mit einem Account angemeldet sein ?

Grüße
Sven
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 20 November 2022, 01:18:07
Zitat von: Mazz78 am 19 November 2022, 16:56:50
Hallo zusammen,

sorry dass ich hier dazwischen grätschen muss...

Ich hänge irgendwo bei der Ersteinrichtung...  :-[

Was hab ich bisher...:

  • Tuya Smart App auf dem Andriod Handy (GastZugang ohne Login)
  • Device (RGB WLAN Lampe) funktioniert über App

  • fhempy ist eingerichtet und sieht für mich bisher plausibel aus

  • Tuya Installation Guide hab ich auch durch

Frage...
In dem Tuya Developer Accout hab ich...

  • Access ID/Client ID
  • Access Secret/Client Secret:
  • Project Code:

Die Fhem Device Definition sagt...
define tuya_system fhempy tuya setup API_KEY API_SECRET DEVICE_ID

Was entspricht was ?
API_KEY = Access ID ???
API_SECRET = Access Secret ???
Korrekt

Zitat
Die Device_ID soll man aus der App nehmen... Woher ? Ist das die "Virtuelle ID" ?
Muss ich in der Tuya App mit einem Account angemeldet sein ?

Grüße
Sven
Genau, das ist die virtuelle ID. Du kannst auch einfach mit dem setup arbeiten, dann brauchst du nur eine Device ID einmalig kopieren:
https://github.com/fhempy/fhempy/blob/master/FHEM/bindings/python/fhempy/lib/tuya/README.md#automatic-setup
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 20 November 2022, 01:18:40
Zitat von: Paul_M am 19 November 2022, 12:53:15
Folgendes Problem: Mein fhempyserver startet und stoppt regelmäßig, alle paar Sekunden.
Im Logfile sieht das folgendermaßen aus:
2022.11.19 12:49:55 3: fhempyserver_15733: starting
2022.11.19 12:49:55 3: fhempyserver_15733: using logfile: ./log/fhempy-2022-11-19.log
2022.11.19 12:49:57 3: fhempyserver_15733: read: end of file reached while sysread
2022.11.19 12:49:57 3: fhempyserver_15733: stopped
2022.11.19 12:50:17 3: fhempyserver_15733: starting
2022.11.19 12:50:17 3: fhempyserver_15733: using logfile: ./log/fhempy-2022-11-19.log
2022.11.19 12:50:19 3: fhempyserver_15733: read: end of file reached while sysread
2022.11.19 12:50:19 3: fhempyserver_15733: stopped

usw...

Hat jemand einen Tipp??

Bitte fhempy Log posten (/opt/fhem/log/fhempy.....log)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 20 November 2022, 01:21:56
Zitat von: ahermann86 am 14 November 2022, 16:49:21
Hallo,

das Problem, dass meine "Temperatur und Feuchtigkeits Sensoren" auf "Initializing..." stehenbleiben, habe ich mit der neuen Version auch noch immer.
Ich habe allerdings festgestellt, dass die Version 0.1.504 noch funktioniert - ab Version 0.1.505 tritt das  "Initializing..." Problem auf ... vielleicht hilft dir das temporär bzw. auch dem fhempy Entwickler.

Was auch nicht funktioniert, ist die Anbindung des Sensors, wenn nach der Einrichtung der Internetzugriff (also der Tuya Cloudzugriff) des Sensors blockiert wird. ... ist das ein Tuya Problem oder sollte das auch so funktionieren?

https://de.aliexpress.com/item/1005003718187629.html?spm=a2g0o.order_list.0.0.713d5c5fEQR0jt&gatewayAdapt=glo2deu (https://de.aliexpress.com/item/1005003718187629.html?spm=a2g0o.order_list.0.0.713d5c5fEQR0jt&gatewayAdapt=glo2deu)

Gruß
Axel

Verstehe ich es richtig, dass aber trotz "Initializing..." die Werte aktualisiert werden?

Ja, du brauchst danach auch noch Zugriff auf die Cloud. Dort werden bei jedem Start die Infos geladen. Das könnte ich durchaus entfernen wenn die Readings einmalig geladen wurden.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 20 November 2022, 01:28:22
Zitat von: denis.robel am 05 November 2022, 18:59:35
Leider funktioniert irgendwie der Peer nicht mehr. Es wird kein eq3bt Thermostat mehr korrekt angesteuert :-(
Bitte einen eq3bt Thread dazu aufmachen - schick mir dann gerne eine PN zu den Thread, da ich den sonst nicht finde  ::). Auf den ersten Blick sieht es nach Bluetooth Connection Fehler aus.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Mazz78 am 20 November 2022, 11:23:29
Zitat
Genau, das ist die virtuelle ID. Du kannst auch einfach mit dem setup arbeiten, dann brauchst du nur eine Device ID einmalig kopieren:
https://github.com/fhempy/fhempy/blob/master/FHEM/bindings/python/fhempy/lib/tuya/README.md#automatic-setup

ok, "Automatic Setup" sieht jetzt so aus.
Aber nach "scan_devices" passiert nichts


Internals:
   API_KEY    kyq3smxxxxxxxxxxxxxx
   API_SECRET 1a0f8459904a4yyyyyyyyyyyyyyyyyyy
   CFGFN     
   DEF        tuya setup kyq3smxxxxxxxxxx 1a0f8459904a4a3yyyyyyyyyyyy bfb7dd2zzzzzzzzzzzzz
   DEVICEID   0
   FHEMPYTYPE tuya
   FUUID      6379fb3d-f33f-f943-7b02-95d7c821262e3806
   IODev      fhempy_local
   NAME       tuya_system
   NR         13268
   PYTHONTYPE tuya
   REGION     eu
   STATE      ready
   TYPE       fhempy
   eventCount 22
   READINGS:
     2022-11-20 11:09:04   state           ready
   args:
     tuya_system
     fhempy
     tuya
     setup
     kyq3smxxxxxxxxxxxx
     1a0f845990yyyyyyyyyyyyyyyyy
     bfb7dd2zzzzzzzzzzzzzzz
   argsh:
Attributes:
   group      tuya
   room       fhempy


Mit dem Punkt "Individual Setup" komm ich nicht so ganz klar...

Zitat
Individual Device
If a device couldn't be setup properly or you know your local keys and don't need setup, you can define it on your own

define wifi_plug fhempy tuya PRODUCT_ID DEVICE_ID IP LOCAL_KEY [VERSION] [API_KEY] [API_SECRET]
PRODUCT_ID: Set to "api" if API_KEY and API_SECRET are provided, otherwise use the proper product id
DEVICE_ID: Take that one from the tuya_system device you created
IP: Check for the IP in your tuya_system device or on your router
LOCAL_KEY: Take that one from the tuya_system device you created
VERSION: Take that one from the tuya_system device you created (default 3.3)
API_KEY: If the product ID couldn't be found in the standard mappings, the possible functions will be retrieved from tuya cloud
API_SECRET: If the product ID couldn't be found in the standard mappings, the possible functions will be retrieved from tuya cloud

PRODUCT_ID    -> Wo find ich die ?
DEVICE_ID       -> Ist das in meinem Fall (siehe List oben) die DEVICE_ID 0 ?
IP                     -> Ist klar
LOCAL_KEY       -> Wo find ich die ?

Der Rest ist ja optional ?!

Sorry   :-\
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 20 November 2022, 12:27:29
Schau mal im fhempy Log (/opt/fhem/log/fhempy....log) was dort drin steht. Nach scan_devices solltest du alle Infos in den Readings erhalten. Sobald die da sind, kannst du im setup Device ein create machen und damit die Devices selbst anlegen. Das Setup Device ist nur ein Management Device mit dem man die Devices erstellt.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Mazz78 am 20 November 2022, 18:44:36
Ok, das fhempy Logfile sagt folgendes...

Kann damit leider nicht so viel anfangen  :-[
Die Error-Meldung am Ende wiederholt sich dann im Logfile ca. 30x

Was ist der "KeyError - result" ?


2022-11-20 10:59:58,895 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2022-11-20 10:59:58,896 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2022-11-20 11:00:12,147 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2022-11-20 11:00:12,163 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2022-11-20 11:00:12,164 - INFO     - websockets.server: server closing
2022-11-20 11:00:22,191 - INFO     - websockets.server: connection closed
2022-11-20 11:00:22,193 - INFO     - websockets.server: server closed
2022-11-20 11:00:22,197 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2022-11-20 11:00:23,308 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.520...
2022-11-20 11:00:23,316 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-11-20 11:00:23,351 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-11-20 11:00:32,967 - INFO     - websockets.server: connection open
2022-11-20 11:00:32,971 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-11-20 11:02:37,960 - INFO     - fhempy.lib.pkg_installer: Attempting install of tinytuya==1.7.1
2022-11-20 11:02:37,969 - WARNING  - asyncio: Executing <Handle <TaskWakeupMethWrapper object at 0xb5154250>(<Future finis...events.py:396>) created at /usr/lib/python3.7/asyncio/tasks.py:368> took 0.242 seconds
2022-11-20 11:02:47,075 - INFO     - fhempy.lib.pkg_installer: Successfully installed tinytuya==1.7.1 update!

2022-11-20 11:03:36,180 - ERROR    - tuya_system: Exception raised by task: <Task finished coro=<FhemModule._run_coro() done, defined at /opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/generic.py:194> exception=KeyError('result') created at /usr/lib/python3.7/asyncio/tasks.py:325>
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/generic.py", line 202, in _handle_task_result
    task.result()
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/generic.py", line 196, in _run_coro
    await coro
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/tuya/tuya.py", line 617, in _scan_devices
    for i in json_data["result"]:
KeyError: 'result'
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 20 November 2022, 19:30:42
Dein Scan dürfte gar keine Ergebnisse liefern. Teste mal folgendes:

sudo -u fhem bash
python3 -m tinytuya scan

Poste dann das Ergebnis.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Mazz78 am 21 November 2022, 07:27:17
Ja richtig, der scan_devices liefert gar nichts (hatte ich ja schon geschrieben)
Hier das Ergebnis von...
Zitat
python3 -m tinytuya scan

Zitat
fhem@FHEM:/root$ python3 -m tinytuya scan

TinyTuya (Tuya device scanner) [1.7.1]

Scanning on UDP ports 6666 and 6667 for devices (15 retries)...

Unknown v3.3 Device   Product ID = key8u54q9dtru5jw  [Valid payload]:
    Address = 192.168.178.20,  Device ID = bfb7dd28425a8ede0078z3, Local Key = ,  Version = 3.3, MAC =
    No Stats for 192.168.178.20: DEVICE KEY required to poll for status

Scan Complete!  Found 1 devices.

>> Saving device snapshot data to snapshot.json

Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/fhem/.local/lib/python3.7/site-packages/tinytuya/__main__.py", line 57, in <module>
    scanner.scan(color=color, forcescan=force)
  File "/opt/fhem/.local/lib/python3.7/site-packages/tinytuya/scanner.py", line 81, in scan
    devices(verbose=True, maxretry=maxretry, color=color, poll=True, forcescan=forcescan)
  File "/opt/fhem/.local/lib/python3.7/site-packages/tinytuya/scanner.py", line 431, in devices
    with open(SNAPSHOTFILE, "w") as outfile:
PermissionError: [Errno 13] Permission denied: 'snapshot.json'

In welchem Ordner sollte die Snapshot.json abgelegt sein ?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ahermann86 am 21 November 2022, 09:43:30
ZitatVerstehe ich es richtig, dass aber trotz "Initializing..." die Werte aktualisiert werden?

Ja, du brauchst danach auch noch Zugriff auf die Cloud. Dort werden bei jedem Start die Infos geladen. Das könnte ich durchaus entfernen wenn die Readings einmalig geladen wurden.

@dominik:
Nein, der state springt irgendwann (vermutlich, sobald der Sensor einmal online gegangen ist) auf ready. Das geht aber nur bis zu der Version 0.1.504. Mit einer neueren, wird der state nie ready und es kommen damit auch keine Readings bzw. werden nie aktualisiert.

Mit tuya (lokal) hatte ich es so verstanden, dass die Sensoren komplett offline funktionieren
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 21 November 2022, 16:55:07
Zitat von: Mazz78 am 21 November 2022, 07:27:17
Ja richtig, der scan_devices liefert gar nichts (hatte ich ja schon geschrieben)
Hier das Ergebnis von...
In welchem Ordner sollte die Snapshot.json abgelegt sein ?

Dein Login für die Cloud ist sicher korrekt und du hast auch die Verknüpfung deines Kontos in der App mit der Cloud gemacht?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 21 November 2022, 16:56:10
Zitat von: ahermann86 am 21 November 2022, 09:43:30
@dominik:
Nein, der state springt irgendwann (vermutlich, sobald der Sensor einmal online gegangen ist) auf ready. Das geht aber nur bis zu der Version 0.1.504. Mit einer neueren, wird der state nie ready und es kommen damit auch keine Readings bzw. werden nie aktualisiert.

Mit tuya (lokal) hatte ich es so verstanden, dass die Sensoren komplett offline funktionieren

Kommt bei dir in den neueren Version eine Fehlermeldung im Log dazu?
Z.B. sowas wie bei jfmennedy hier: https://github.com/fhempy/fhempy/issues/106
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 21 November 2022, 17:21:57
bei meinem Tuya Thermostat kommt folgendes im Log:


2022.11.21 17:19:23 4: BindingsIo (fhempy_local): <<< WS: {"result":"tuya_spec_functions tuya_spec_status dp_01:switch,temp_set,temp_current,mode,child_lock dp_02:switch,temp_set,temp_current,mode,child_lock dp_03:switch,temp_set,temp_current,mode,child_lock dp_04:switch,temp_set,temp_current,mode,child_lock dp_08:switch,temp_set,temp_current,mode,child_lock dp_05:switch,temp_set,temp_current,mode,child_lock dp_13:switch,temp_set,temp_current,mode,child_lock dp_16:switch,temp_set,temp_current,mode,child_lock dp_20:switch,temp_set,temp_current,mode,child_lock dp_21:switch,temp_set,temp_current,mode,child_lock dp_25:switch,temp_set,temp_current,mode,child_lock dp_26:switch,temp_set,temp_current,mode,child_lock dp_31:switch,temp_set,temp_current,mode,child_lock dp_41:switch,temp_set,temp_current,mode,child_lock dp_42:switch,temp_set,temp_current,mode,child_lock dp_101:switch,temp_set,temp_current,mode,child_lock dp_105:switch,temp_set,temp_current,mode,child_lock dp_107:switch,temp_set,temp_current,mode,child_lock IODev:fhempy_local,fhempy_peer_192_168_179_32 event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading","error":0,"awaitId":66269478}
2022.11.21 17:19:23 4: BindingsIo (fhempy_local): <<< WS: {"awaitId":18010712,"error":0,"result":"[{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 700, 'scale': 1, 'step': 1}, 'desc': 'temp set'}, {'code': 'mode', 'dp_id': 4, 'type': 'Enum', 'values': {'range': ['cold', 'hot', 'wind', 'comfortable', 'energy', 'auto', 'holiday', 'eco', 'manual', 'sleep', 'dry', 'program', 'floor_heat', 'auxiliary_heat']}, 'desc': 'mode'}, {'code': 'child_lock', 'dp_id': 8, 'type': 'Boolean', 'values': {}, 'desc': 'child lock'}]"}
2022.11.21 17:19:23 4: BindingsIo (fhempy_local): <<< WS: {"result":"[{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 700, 'scale': 1, 'step': 1}}, {'code': 'temp_current', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 999, 'scale': 1, 'step': 1}}, {'code': 'mode', 'dp_id': 4, 'type': 'Enum', 'values': {'range': ['cold', 'hot', 'wind', 'comfortable', 'energy', 'auto', 'holiday', 'eco', 'manual', 'sleep', 'dry', 'program', 'floor_heat', 'auxiliary_heat']}}, {'code': 'child_lock', 'dp_id': 8, 'type': 'Boolean', 'values': {}}]","awaitId":86853090,"error":0}

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Paul_M am 21 November 2022, 21:31:10
Zitat von: dominik am 20 November 2022, 12:27:29
Schau mal im fhempy Log (/opt/fhem/log/fhempy....log) was dort drin steht. Nach scan_devices solltest du alle Infos in den Readings erhalten. Sobald die da sind, kannst du im setup Device ein create machen und damit die Devices selbst anlegen. Das Setup Device ist nur ein Management Device mit dem man die Devices erstellt.

Alsoo, leider kann ich mit dem Log nicht so viel anfangen und bin wieder auf dich, Dominik angewiesen.

2022-11-21 20:44:34,868 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.508...
2022-11-21 20:44:34,875 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
Traceback (most recent call last):
  File "/opt/fhem/FHEM/bindings/python/bin/fhempy", line 155, in <module>
    fpb.run()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 708, in run
    loop.run_until_complete(async_main())
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 616, in async_main
    async with websockets.serve(
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/server.py", line 1070, in __aenter__
    return await self
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/server.py", line 1088, in __await_impl__
    server = await self._create_server()
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1494, in create_server
    raise OSError(err.errno, 'error while attempting '
OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 15733): address already in use


Vielleicht sagt dir das ja was.
VIELEN DANK für deine Mühe!!! Das weiß ich, und sicherlich auch viele andere hier sehr zu schätzen  ;)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 21 November 2022, 23:22:13
Zitat von: denis.robel am 21 November 2022, 17:21:57
bei meinem Tuya Thermostat kommt folgendes im Log:


2022.11.21 17:19:23 4: BindingsIo (fhempy_local): <<< WS: {"result":"tuya_spec_functions tuya_spec_status dp_01:switch,temp_set,temp_current,mode,child_lock dp_02:switch,temp_set,temp_current,mode,child_lock dp_03:switch,temp_set,temp_current,mode,child_lock dp_04:switch,temp_set,temp_current,mode,child_lock dp_08:switch,temp_set,temp_current,mode,child_lock dp_05:switch,temp_set,temp_current,mode,child_lock dp_13:switch,temp_set,temp_current,mode,child_lock dp_16:switch,temp_set,temp_current,mode,child_lock dp_20:switch,temp_set,temp_current,mode,child_lock dp_21:switch,temp_set,temp_current,mode,child_lock dp_25:switch,temp_set,temp_current,mode,child_lock dp_26:switch,temp_set,temp_current,mode,child_lock dp_31:switch,temp_set,temp_current,mode,child_lock dp_41:switch,temp_set,temp_current,mode,child_lock dp_42:switch,temp_set,temp_current,mode,child_lock dp_101:switch,temp_set,temp_current,mode,child_lock dp_105:switch,temp_set,temp_current,mode,child_lock dp_107:switch,temp_set,temp_current,mode,child_lock IODev:fhempy_local,fhempy_peer_192_168_179_32 event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading","error":0,"awaitId":66269478}
2022.11.21 17:19:23 4: BindingsIo (fhempy_local): <<< WS: {"awaitId":18010712,"error":0,"result":"[{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 700, 'scale': 1, 'step': 1}, 'desc': 'temp set'}, {'code': 'mode', 'dp_id': 4, 'type': 'Enum', 'values': {'range': ['cold', 'hot', 'wind', 'comfortable', 'energy', 'auto', 'holiday', 'eco', 'manual', 'sleep', 'dry', 'program', 'floor_heat', 'auxiliary_heat']}, 'desc': 'mode'}, {'code': 'child_lock', 'dp_id': 8, 'type': 'Boolean', 'values': {}, 'desc': 'child lock'}]"}
2022.11.21 17:19:23 4: BindingsIo (fhempy_local): <<< WS: {"result":"[{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 700, 'scale': 1, 'step': 1}}, {'code': 'temp_current', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 999, 'scale': 1, 'step': 1}}, {'code': 'mode', 'dp_id': 4, 'type': 'Enum', 'values': {'range': ['cold', 'hot', 'wind', 'comfortable', 'energy', 'auto', 'holiday', 'eco', 'manual', 'sleep', 'dry', 'program', 'floor_heat', 'auxiliary_heat']}}, {'code': 'child_lock', 'dp_id': 8, 'type': 'Boolean', 'values': {}}]","awaitId":86853090,"error":0}



Poste bitte ein List vom Device (Keys entfernen).
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 21 November 2022, 23:22:32
Zitat von: Paul_M am 21 November 2022, 21:31:10
Alsoo, leider kann ich mit dem Log nicht so viel anfangen und bin wieder auf dich, Dominik angewiesen.

2022-11-21 20:44:34,868 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.508...
2022-11-21 20:44:34,875 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
Traceback (most recent call last):
  File "/opt/fhem/FHEM/bindings/python/bin/fhempy", line 155, in <module>
    fpb.run()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 708, in run
    loop.run_until_complete(async_main())
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 616, in async_main
    async with websockets.serve(
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/server.py", line 1070, in __aenter__
    return await self
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/server.py", line 1088, in __await_impl__
    server = await self._create_server()
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1494, in create_server
    raise OSError(err.errno, 'error while attempting '
OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 15733): address already in use


Vielleicht sagt dir das ja was.
VIELEN DANK für deine Mühe!!! Das weiß ich, und sicherlich auch viele andere hier sehr zu schätzen  ;)

Dafür muss ich echt mal eine schönere Fehlermeldung bauen ;)

Es läuft bereits ein fhempy welches den Port 15733 nutzt und daher kann fhempy nicht starten. Einfach die andere Instanz stoppen oder mit kill -9 killen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Paul_M am 22 November 2022, 18:14:38
Zitat von: dominik am 21 November 2022, 23:22:32
Dafür muss ich echt mal eine schönere Fehlermeldung bauen ;)

Es läuft bereits ein fhempy welches den Port 15733 nutzt und daher kann fhempy nicht starten. Einfach die andere Instanz stoppen oder mit kill -9 killen.

Alles klar, hat geklappt, es läuft jetzt normal ohne die ganze Zeit start-stop...

AAAABER folgendes...

Module failed to load: tuya Maybe you need to update fhempy on this or remote peer. Stacktrace: Traceback (most recent call last): File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 320, in handle_function module_object = await self.import_module(hash) File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 527, in import_module module_object = await utils.run_blocking( File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 35, in run_blocking return await asyncio.get_event_loop().run_in_executor(pool, function) File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 7, in from tinytuya import BulbDevice, Cloud, deviceScan File "/opt/fhem/.local/lib/python3.9/site-packages/tinytuya/__init__.py", line 92, in from .core import * File "/opt/fhem/.local/lib/python3.9/site-packages/tinytuya/core.py", line 66, in from colorama import init ModuleNotFoundError: No module named 'colorama

Das wird mir jetzt beim tuya_system angezeigt. fhempy_local und fhempyserver_15733 sind beide grün... Haste noch eine Idee?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 24 November 2022, 19:00:13
Hallo Dominik,

hier das device list von dem Thermostat: EDIT: also dem Tuya Raumthermostat für die Fussbodenheizung, kein eq3bt.


Internals:
   DEF        tuya gw173aldekvpzalg bfe1335a2d7c86bc93xitg 192.168.179.239 6baa6d3c25995f4a 3.3 [API_KEY] [API_SECRET]
   DEVICEID   bfe1335a2d7c86bc93xitg
   FHEMPYTYPE tuya
   FUUID      6378b20b-f33f-3305-ca0b-5454a756c99c18a1
   IODev      fhempy_local
   NAME       tuya_local_bfe1335a2d7c86bc93xitg
   NR         788
   PYTHONTYPE tuya
   STATE      Initializing...
   TYPE       fhempy
   eventCount 3
   CHANGED:
   READINGS:
     2022-11-19 11:38:05   active_time     1657354229
     2022-11-19 11:38:05   biz_type        0
     2022-11-19 11:38:05   category        wk
     2022-11-19 11:38:05   child_lock      off
     2022-11-19 11:38:05   create_time     1657354229
     2022-11-21 17:23:57   dp_05           0
     2022-11-19 11:38:05   dp_101          0
     2022-11-19 11:38:05   dp_105          10
     2022-11-19 11:38:05   dp_107          35
     2022-11-19 11:38:05   dp_13           1
     2022-11-19 11:38:05   dp_16           0
     2022-11-19 11:38:05   dp_20           -20
     2022-11-19 11:38:05   dp_21           30
     2022-11-19 11:38:05   dp_25           2
     2022-11-19 11:38:05   dp_26           0
     2022-11-19 11:38:05   dp_31           0
     2022-11-19 11:38:05   dp_41           1
     2022-11-19 11:38:05   dp_42           1
     2022-11-19 11:38:05   icon            smart/program_category_icon/wk.png
     2022-11-19 11:38:05   id              bfe1335a2d7c86bc93xitg
     2022-11-19 11:38:05   ip              79.246.120.203
     2022-11-19 11:38:05   lat             0.0000
     2022-11-19 11:38:05   local_key       [API_KEY] [API_SECRET]
     2022-11-19 11:38:05   lon             0.0000
     2022-11-19 11:38:05   mode            cold
     2022-11-19 11:38:05   model           Temp
     2022-11-19 11:38:05   name            Temp
     2022-11-22 14:03:26   online          1
     2022-11-19 11:38:05   owner_id        60699953
     2022-11-19 11:38:05   product_id      gw173aldekvpzalg
     2022-11-19 11:38:05   product_name    Temp
     2022-11-22 14:03:25   state           Initializing...
     2022-11-19 11:38:05   sub             0
     2022-11-21 23:10:00   switch          off
     2022-11-21 23:10:00   temp_current    19.6
     2022-11-19 11:38:05   temp_set        20.4
     2022-11-19 11:38:05   time_zone       +02:00
     2022-11-19 11:38:05   uid             eu1657214536858UvzcG
     2022-11-19 11:38:05   update_time     1657354232
     2022-11-19 11:38:05   uuid            31a10241444d8401
   args:
     tuya_local_bfe1335a2d7c86bc93xitg
     fhempy
     tuya
     gw173aldekvpzalg
     bfe1335a2d7c86bc93xitg
     192.168.179.239
     6baa6d3c25995f4a
     3.3
     mrhacrhhkjayq4gjhf7y
     3ea6d5f6213e4bcfa3d4a51e51d8d35a
   argsh:
Attributes:
   alias      Temp
   dp_01      switch
   dp_02      temp_set
   dp_03      temp_current
   dp_04      mode
   dp_08      child_lock
   group      Fussbodenheizung,fhempy,tuya
   room       Heizung,Kinderzimmer Jannik,Rhasspy,fhempy
   tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 700, 'scale': 1, 'step': 1}, 'desc': 'temp set'}, {'code': 'mode', 'dp_id': 4, 'type': 'Enum', 'values': {'range': ['cold', 'hot', 'wind', 'comfortable', 'energy', 'auto', 'holiday', 'eco', 'manual', 'sleep', 'dry', 'program', 'floor_heat', 'auxiliary_heat']}, 'desc': 'mode'}, {'code': 'child_lock', 'dp_id': 8, 'type': 'Boolean', 'values': {}, 'desc': 'child lock'}]
   tuya_spec_status [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 700, 'scale': 1, 'step': 1}}, {'code': 'temp_current', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 999, 'scale': 1, 'step': 1}}, {'code': 'mode', 'dp_id': 4, 'type': 'Enum', 'values': {'range': ['cold', 'hot', 'wind', 'comfortable', 'energy', 'auto', 'holiday', 'eco', 'manual', 'sleep', 'dry', 'program', 'floor_heat', 'auxiliary_heat']}}, {'code': 'child_lock', 'dp_id': 8, 'type': 'Boolean', 'values': {}}]

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 24 November 2022, 19:47:24
Zitat von: Paul_M am 22 November 2022, 18:14:38
Alles klar, hat geklappt, es läuft jetzt normal ohne die ganze Zeit start-stop...

AAAABER folgendes...

Module failed to load: tuya Maybe you need to update fhempy on this or remote peer. Stacktrace: Traceback (most recent call last): File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 320, in handle_function module_object = await self.import_module(hash) File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 527, in import_module module_object = await utils.run_blocking( File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 35, in run_blocking return await asyncio.get_event_loop().run_in_executor(pool, function) File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 7, in from tinytuya import BulbDevice, Cloud, deviceScan File "/opt/fhem/.local/lib/python3.9/site-packages/tinytuya/__init__.py", line 92, in from .core import * File "/opt/fhem/.local/lib/python3.9/site-packages/tinytuya/core.py", line 66, in from colorama import init ModuleNotFoundError: No module named 'colorama

Das wird mir jetzt beim tuya_system angezeigt. fhempy_local und fhempyserver_15733 sind beide grün... Haste noch eine Idee?

Spannend, das Modul sollte automatisch installiert werden.
Probier mal:

sudo -u fhem bash
pip3 install colorama
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ahermann86 am 25 November 2022, 09:43:20
ZitatKommt bei dir in den neueren Version eine Fehlermeldung im Log dazu?
Z.B. sowas wie bei jfmennedy hier: https://github.com/fhempy/fhempy/issues/106

Hallo Dominik,

Ich habe gestern mein Testsystem um ~20:48 von der Version 0.1.504 auf die Version 0.1.522 geupdatet. Seitdem steht der Temperatursensor dauerhaft auf "Initialzing...!

Ich habe hierzu die fhemy Logdatei angehängt.

Was ich auch nicht verstehe, bei der fhempy Definition muss ich zwingend  [VERSION] [API_KEY] [API_SECRET] angeben. Warum geht das nicht ohne? Hängt das damit zusammen, dass das ganze nur online mit der tuya Cloud funktioniert (was ich ja eigentlich vermeiden wollte...)?

Gruß Axel
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 26 November 2022, 09:43:19
Background API_KEY, API_SECRET
VERSION API_KEY API_SECRET werden benötigt, damit die Mappings der DPs (Data Points) auf einen Namen stattfinden. Ansonsten hättest du nur
dp_1
dp_20
dp_24
als Reading, so hast du
state
current
colour
als Beispiel. Genauso kann die Umrechnung eines DP Wertes nur erfolgen, wenn bekannt ist was für ein Wert es ist. dp_24 Colour ist ein Hexstring und muss umgerechnet werden. Es ist aber nicht bei jedem Device dp_24 Colour. Jeder Hersteller macht da sein eigenes Ding.

Nachdem man das Mapping hat, werden die Command NUR lokale gesendet. Nur bei einem Neustart von fhempy werden die Mappings nochmals aus der Cloud gezogen.

Es gibt nur eine Möglichkeit komplett ohne Cloud auszukommen:
1. Man muss den local key wissen (ohne dem geht garnix!)
2. Das Device muss in den Mappings hinterlegt sein (https://raw.githubusercontent.com/fhempy/fhempy/master/FHEM/bindings/python/fhempy/lib/tuya/mappings.py).
In so einem Fall werden die Mappings aus den hinterlegten Mappings genommen.

Nun zum Thema "Initializing..."
Seite Version 505 wird das state erst auf ready gesetzt wenn es Werte vom Device erhält. Daher kann es vorkommen, dass es länger auf "Initializing..." steht. Dein Thermostat hat aber bisher auch laufend Werte geschickt, daher wundert es mich, dass es so lange dauert.
Teste es bitte nochmals mit fhempy 504 (sudo -u fhem pip3 install fhempy==0.1.504).
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: ahermann86 am 27 November 2022, 23:37:40
Hallo dominik,

danke für die die ausführliche Erklärung.  8)

Für mich wäre es akzeptabel, wenn ich nach dem Laden der Mapping die Cloudverbindung deaktivieren könnte.
Der JSON Mapping Inhalt für die mappings.py, müsste ja über die Tuya Cloud zu bekommen sein? das könnte ich dir zum einpflegen geben...

Zum Thema "Initializing..." - wenn ich wieder auf die Version 504 zurück gehe und der Sensor etwas meldet, sprint der State wieder auf ready.
Ich habe das heute um 12:06 wieder downgegraded - was man auch schön in der Grafik sehen kann.

Außerdem ist wieder das fhempy Log angehängt.

Gruß
Axel
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 28 November 2022, 17:41:43
Hallo Dominik,

momentan ist das Verhalten so, dass die readings nur bei der Erkennung des Sensors, also beim Anlegen des Devices genau 1x an FHEM übertragen werden und dann nicht mehr.
Interessanter Weise kann ich aber den Thermostat der Fußbodenheizung  via Fhem an und aus schalten und auch die Soll Temperatur kann ich setzten.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: fretti am 06 Dezember 2022, 23:22:18
Hallo,

ich habe auch das Problem , dass meine beiden Tuya-Devices (Lampe und ein Plug) im Status  "Initializing" stehen bleiben.
Habe den fhempy-Server noch mal gestoppt und  beide Devices gelöscht und nach einem Neustart des fhempy-Servers nur den Plug neu anlegen lassen.
Gleicher Status - "Initializing"
Dabei erhalte im im Log folgende Meldungen:

2022-12-06 23:10:09,861 - ERROR    - tuya_local_63554574c4dd57244455: Failed create_device
Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/locks.py", line 413, in acquire
    await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
    fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 473, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 395, in _create_cloudmapping_dev
    status = await self._connected_device.status()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 484, in status
    status = await self.exchange(STATUS)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 463, in exchange
    msg = await self.dispatcher.wait_for(seqno)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/pytuya/__init__.py", line 250, in wait_for
    await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError



Ich hatte auch mal die Version 504 downgegraded, da funktionierte es und der Status wurde ready, aber da gab es Probleme mit Fehlermeldung im fhemweb, bei der Bedienung.
Diese Fehlermeldung trat nur im Zusammenhang mit dem fhempy-Devices auf. Alle anderen fhemweb-Elemente funktionierten.
Gruß Thomas
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: klausw am 09 Dezember 2022, 13:05:25
Hi Dominik,

ich habe mit zum testen ein Tuya Leuchtmittel angeschafft, Leuchtmittel in Smartlife eingebunden, fhempy und tuya nach Deiner Anleitung installiert.
Das Leuchtmittel ließ sich dann auch über scan_devices finden und mit create_device anlegen.
Leider bleibt es auf Initializing... stehen.
Ich habe es paarmal vom Netzgetrennt und über die Smartlife App bedient, aber es tut sich nix. Im Log ist auch nichts zu finden.

Kannst du mir da nen Tip geben?

Lists von..
fhempy:
Internals:
   BindingType fhempy
   DEF        fhempy
   DeviceName ws:localhost:15733
   FD         13
   IP         127.0.0.1
   NAME       fhempy_local
   NR         23
   NTFY_ORDER 50-fhempy_local
   PARTIAL   
   PORT       15733
   STATE      opened
   TYPE       BindingsIo
   WEBSOCKET  1
   binary     1
   connecttime 1670585350.28102
   devioLoglevel 0
   eventCount 50
   installing 0
   localBinding 1
   nextOpenDelay 10
   prev_error localhost: Verbindungsaufbau abgelehnt (111)
   READINGS:
     2022-12-09 12:29:10   hostname        pi4
     2022-12-09 12:29:10   os              posix
     2022-12-09 12:29:10   python          3.9.2
     2022-12-09 12:29:10   release         5.15.76-v8+
     2022-12-09 12:29:10   state           opened
     2022-12-09 12:29:10   system          Linux
     2022-12-09 12:29:10   version         0.1.526
     2022-12-09 12:29:11   version_available 0.1.526
     2022-12-09 12:29:11   version_release_notes <html><a href="https://github.com/fhempy/fhempy/releases" target="_blank">Release Notes</a></html>
   args:
     fhempy_local
     BindingsIo
     fhempy
Attributes:
   devStateIcon {        my $status_img = "10px-kreis-gruen";;        my $status_txt = "connected";;        my $ver = ReadingsVal($name, "version", "-");;        my $ver_available = ReadingsVal($name, "version_available", $ver);;        my $update_icon = "";;        if ($ver_available ne $ver) {          $status_img = "10px-kreis-gelb";;          $status_txt = "Version ".$ver_available." available for update";;        }        if (ReadingsVal($name, "state", "disconnected") eq "disconnected") {          $status_img = "10px-kreis-rot";;          $status_txt = "disconnected";;        }        $update_icon = "<a  href=\"/fhem?cmd.dummy=set $name update&XHR=1\" title=\"Start ".$ver_available." update\">".FW_makeImage("refresh")."</a>";;        "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a> ".$ver." </a>".$update_icon."</div>"      }
   group      fhempy
   icon       file_json-ld2
   room       fhempy


tuya:
Internals:
   API_KEY    APIKEY
   API_SECRET APISECRET
   DEF        tuya setup APIKEY APISECRET DEVID
   DEVICEID   0
   FHEMPYTYPE tuya

   IODev      fhempy_local
   NAME       tuya_system
   NR         25
   PYTHONTYPE tuya
   REGION     eu
   STATE      1 devices found localy
   TYPE       fhempy
   eventCount 7
   READINGS:
     2022-12-04 23:58:36   DEVID_icon https://images.tuyaeu.com/smart/icon/ay1525830333575gYi61/d9a5f9bcc5fa2d6c047b8a56b2e691b0.png
     2022-12-04 23:58:36   DEVID_id DEVID
     2022-12-04 23:59:26   DEVID_ip 192.168.178.47
     2022-12-04 23:58:36   DEVID_localkey locKey
     2022-12-04 23:58:36   DEVID_name M-TCV1
     2022-12-04 23:58:36   DEVID_productid zhuhhc9hdwibjz6v
     2022-12-04 23:59:26   DEVID_version 3.4
     2022-12-09 12:37:02   state           1 devices found localy
   args:
     tuya_system
     fhempy
     tuya
     setup
     APIKEY
     APISECRET
     DEVID
   argsh:
Attributes:
   group      tuya
   room       fhempy


Leuchtmittel:
   Internals:
   DEF        tuya zhuhhc9hdwibjz6v DEVID 192.168.178.47 locKey 3.4 APIKEY APISECRET
   DEVICEID   DEVID
   FHEMPYTYPE tuya

   IODev      fhempy_local
   NAME       tuya_local_DEVID
   NR         26
   PYTHONTYPE tuya
   STATE      Initializing...
   TYPE       fhempy
   eventCount 82079
   READINGS:
     2022-12-05 00:18:52   active_time     1670189824
     2022-12-05 00:18:52   biz_type        18
     2022-12-05 00:18:52   category        dj
     2022-12-05 00:18:52   create_time     1670189824
     2022-12-05 00:18:52   icon            smart/icon/ay1525830333575gYi61/d9a5f9bcc5fa2d6c047b8a56b2e691b0.png
     2022-12-05 00:18:52   id              DEVID
     2022-12-05 00:18:52   ip              62.143.15.132
     2022-12-06 23:10:08   lat             50.1441
     2022-12-05 00:18:52   local_key       locKey
     2022-12-08 18:43:39   lon             8.6033
     2022-12-05 00:18:52   name            M-TCV1
     2022-12-09 12:38:40   online          0
     2022-12-05 00:18:52   owner_id        72805765
     2022-12-05 00:18:52   product_id      zhuhhc9hdwibjz6v
     2022-12-05 00:18:52   product_name    M-TCV1
     2022-12-09 12:29:11   state           Initializing...
     2022-12-05 00:18:52   sub             0
     2022-12-05 00:18:52   time_zone       +01:00
     2022-12-05 00:18:52   uid             eu1669756723579ISkWj
     2022-12-08 18:43:39   update_time     1670440222
     2022-12-05 00:18:52   uuid            8243228dfa810dd7
   args:
     tuya_local_DEVID
     fhempy
     tuya
     zhuhhc9hdwibjz6v
     DEVID
     192.168.178.47
     locKey
     3.4
     APIKEY
     APISECRET
   argsh:
Attributes:
   alias      M-TCV1
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}, 'desc': 'switch led'}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}, 'desc': 'work mode'}, {'code': 'bright_value_v2', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'bright value v2'}, {'code': 'temp_value_v2', 'dp_id': 23, 'type': 'Integer', 'values': {'min': 0, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'temp value v2'}, {'code': 'colour_data_v2', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}, 'desc': 'colour data v2'}, {'code': 'scene_data_v2', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, 'desc': 'scene data v2'}, {'code': 'countdown_1', 'dp_id': 26, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}, {'code': 'music_data', 'dp_id': 27, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}, 'desc': 'music data'}, {'code': 'control_data', 'dp_id': 28, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}, 'desc': 'control data'}, {'code': 'rhythm_mode', 'dp_id': 30, 'type': 'Raw', 'values': {'maxlen': 255}, 'desc': 'rhythm mode'}, {'code': 'sleep_mode', 'dp_id': 31, 'type': 'Raw', 'values': {'maxlen': 255}, 'desc': 'sleep mode'}, {'code': 'wakeup_mode', 'dp_id': 32, 'type': 'Raw', 'values': {'maxlen': 255}, 'desc': 'wakeup mode'}, {'code': 'power_memory', 'dp_id': 33, 'type': 'Raw', 'values': {}, 'desc': 'power memory'}, {'code': 'do_not_disturb', 'dp_id': 34, 'type': 'Boolean', 'values': {}, 'desc': 'do not disturb'}, {'code': 'cycle_timing', 'dp_id': 209, 'type': 'Raw', 'values': {}, 'desc': 'cycle timing'}, {'code': 'random_timing', 'dp_id': 210, 'type': 'Raw', 'values': {}, 'desc': 'random timing'}]
   tuya_spec_status [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}}, {'code': 'bright_value_v2', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'temp_value_v2', 'dp_id': 23, 'type': 'Integer', 'values': {'min': 0, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'colour_data_v2', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, {'code': 'scene_data_v2', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}}, {'code': 'countdown_1', 'dp_id': 26, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'music_data', 'dp_id': 27, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}}, {'code': 'control_data', 'dp_id': 28, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}}, {'code': 'rhythm_mode', 'dp_id': 30, 'type': 'Raw', 'values': {'maxlen': '255'}}, {'code': 'sleep_mode', 'dp_id': 31, 'type': 'Raw', 'values': {'maxlen': '255'}}, {'code': 'wakeup_mode', 'dp_id': 32, 'type': 'Raw', 'values': {'maxlen': '255'}}, {'code': 'power_memory', 'dp_id': 33, 'type': 'Raw', 'values': {}}, {'code': 'do_not_disturb', 'dp_id': 34, 'type': 'Boolean', 'values': {}}, {'code': 'cycle_timing', 'dp_id': 209, 'type': 'Raw', 'values': {}}, {'code': 'random_timing', 'dp_id': 210, 'type': 'Raw', 'values': {}}]
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 09 Dezember 2022, 13:25:45
was ist für Euch das Motiv, Tuya Geräte über FHem zu steuern?

das klappt doch perfekt über SmartLife mit allen Timern, Verbrauchsabfragen und Regeln..

und sogar über ALEXA

bg

Thomas
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 09 Dezember 2022, 17:10:35
die readings auswerten und dementsprechend verwerten?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: JF Mennedy am 09 Dezember 2022, 17:41:54
Zitat von: thburkhart am 09 Dezember 2022, 13:25:45
was ist für Euch das Motiv, Tuya Geräte über FHem zu steuern?

das klappt doch perfekt über SmartLife mit allen Timern, Verbrauchsabfragen und Regeln..

und sogar über ALEXA

bg

Thomas

Hi Thomas,

ganz einfach, keine Cloud, läuft lokal im eigenen Netz auch ohne Internet... Wer die vorgefertigten Cloud-Lösungen der Hersteller bevorzugt braucht kein FHEM ;-)

Nur 1 Fall-Beispiel für die Ansteuerung eines Heizkonvektores:

Im Schminkzimmer meiner Frau hängt ein Heizkonvektor. Das Zimmer ist unbeheizt. Wenn nun mein Haus im Wintermodus ist (3 Tages Außentemperatur Durchschnitt < 14.0°C) und die Außentemperatur kleiner 12°C ist und der Wecker meiner Frau um 5.30 klingelt, wird ab 5.45 der Konvektor eingeschaltet, damit das Zimmer pünktlich um 6.00 warm ist, wenn meine Frau es betritt, um ihre Kriegsbemalung aufzulegen... FHEM weiß übrigens immer, wann der Wecker klingelt, da FHEM der Wecker ist, so dass da nichts manuell umgestellt werden muss, außer die Weckzeit eben, die in der Wochenplanung im Kalender eingetragen ist...

Das ist halt neben der Unabhängigkeit von dem Clouddienst eines Anbieters nur 1 Beispiel, weshalb man keine Smartlife App benutzen möchte ;-)

Gruss Jan
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: JF Mennedy am 09 Dezember 2022, 17:47:02
Zitat von: klausw am 09 Dezember 2022, 13:05:25
Hi Dominik,

ich habe mit zum testen ein Tuya Leuchtmittel angeschafft, Leuchtmittel in Smartlife eingebunden, fhempy und tuya nach Deiner Anleitung installiert.
Das Leuchtmittel ließ sich dann auch über scan_devices finden und mit create_device anlegen.
Leider bleibt es auf Initializing... stehen.
Ich habe es paarmal vom Netzgetrennt und über die Smartlife App bedient, aber es tut sich nix. Im Log ist auch nichts zu finden.

Kannst du mir da nen Tip geben?

Lists von..
fhempy:
Internals:
   BindingType fhempy
   DEF        fhempy
   DeviceName ws:localhost:15733
   FD         13
   IP         127.0.0.1
   NAME       fhempy_local
   NR         23
   NTFY_ORDER 50-fhempy_local
   PARTIAL   
   PORT       15733
   STATE      opened
   TYPE       BindingsIo
   WEBSOCKET  1
   binary     1
   connecttime 1670585350.28102
   devioLoglevel 0
   eventCount 50
   installing 0
   localBinding 1
   nextOpenDelay 10
   prev_error localhost: Verbindungsaufbau abgelehnt (111)
   READINGS:
     2022-12-09 12:29:10   hostname        pi4
     2022-12-09 12:29:10   os              posix
     2022-12-09 12:29:10   python          3.9.2
     2022-12-09 12:29:10   release         5.15.76-v8+
     2022-12-09 12:29:10   state           opened
     2022-12-09 12:29:10   system          Linux
     2022-12-09 12:29:10   version         0.1.526
     2022-12-09 12:29:11   version_available 0.1.526
     2022-12-09 12:29:11   version_release_notes <html><a href="https://github.com/fhempy/fhempy/releases" target="_blank">Release Notes</a></html>
   args:
     fhempy_local
     BindingsIo
     fhempy
Attributes:
   devStateIcon {        my $status_img = "10px-kreis-gruen";;        my $status_txt = "connected";;        my $ver = ReadingsVal($name, "version", "-");;        my $ver_available = ReadingsVal($name, "version_available", $ver);;        my $update_icon = "";;        if ($ver_available ne $ver) {          $status_img = "10px-kreis-gelb";;          $status_txt = "Version ".$ver_available." available for update";;        }        if (ReadingsVal($name, "state", "disconnected") eq "disconnected") {          $status_img = "10px-kreis-rot";;          $status_txt = "disconnected";;        }        $update_icon = "<a  href=\"/fhem?cmd.dummy=set $name update&XHR=1\" title=\"Start ".$ver_available." update\">".FW_makeImage("refresh")."</a>";;        "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a> ".$ver." </a>".$update_icon."</div>"      }
   group      fhempy
   icon       file_json-ld2
   room       fhempy


tuya:
Internals:
   API_KEY    APIKEY
   API_SECRET APISECRET
   DEF        tuya setup APIKEY APISECRET DEVID
   DEVICEID   0
   FHEMPYTYPE tuya

   IODev      fhempy_local
   NAME       tuya_system
   NR         25
   PYTHONTYPE tuya
   REGION     eu
   STATE      1 devices found localy
   TYPE       fhempy
   eventCount 7
   READINGS:
     2022-12-04 23:58:36   DEVID_icon https://images.tuyaeu.com/smart/icon/ay1525830333575gYi61/d9a5f9bcc5fa2d6c047b8a56b2e691b0.png
     2022-12-04 23:58:36   DEVID_id DEVID
     2022-12-04 23:59:26   DEVID_ip 192.168.178.47
     2022-12-04 23:58:36   DEVID_localkey locKey
     2022-12-04 23:58:36   DEVID_name M-TCV1
     2022-12-04 23:58:36   DEVID_productid zhuhhc9hdwibjz6v
     2022-12-04 23:59:26   DEVID_version 3.4
     2022-12-09 12:37:02   state           1 devices found localy
   args:
     tuya_system
     fhempy
     tuya
     setup
     APIKEY
     APISECRET
     DEVID
   argsh:
Attributes:
   group      tuya
   room       fhempy


Leuchtmittel:
   Internals:
   DEF        tuya zhuhhc9hdwibjz6v DEVID 192.168.178.47 locKey 3.4 APIKEY APISECRET
   DEVICEID   DEVID
   FHEMPYTYPE tuya

   IODev      fhempy_local
   NAME       tuya_local_DEVID
   NR         26
   PYTHONTYPE tuya
   STATE      Initializing...
   TYPE       fhempy
   eventCount 82079
   READINGS:
     2022-12-05 00:18:52   active_time     1670189824
     2022-12-05 00:18:52   biz_type        18
     2022-12-05 00:18:52   category        dj
     2022-12-05 00:18:52   create_time     1670189824
     2022-12-05 00:18:52   icon            smart/icon/ay1525830333575gYi61/d9a5f9bcc5fa2d6c047b8a56b2e691b0.png
     2022-12-05 00:18:52   id              DEVID
     2022-12-05 00:18:52   ip              62.143.15.132
     2022-12-06 23:10:08   lat             50.1441
     2022-12-05 00:18:52   local_key       locKey
     2022-12-08 18:43:39   lon             8.6033
     2022-12-05 00:18:52   name            M-TCV1
     2022-12-09 12:38:40   online          0
     2022-12-05 00:18:52   owner_id        72805765
     2022-12-05 00:18:52   product_id      zhuhhc9hdwibjz6v
     2022-12-05 00:18:52   product_name    M-TCV1
     2022-12-09 12:29:11   state           Initializing...
     2022-12-05 00:18:52   sub             0
     2022-12-05 00:18:52   time_zone       +01:00
     2022-12-05 00:18:52   uid             eu1669756723579ISkWj
     2022-12-08 18:43:39   update_time     1670440222
     2022-12-05 00:18:52   uuid            8243228dfa810dd7
   args:
     tuya_local_DEVID
     fhempy
     tuya
     zhuhhc9hdwibjz6v
     DEVID
     192.168.178.47
     locKey
     3.4
     APIKEY
     APISECRET
   argsh:
Attributes:
   alias      M-TCV1
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}, 'desc': 'switch led'}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}, 'desc': 'work mode'}, {'code': 'bright_value_v2', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'bright value v2'}, {'code': 'temp_value_v2', 'dp_id': 23, 'type': 'Integer', 'values': {'min': 0, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'temp value v2'}, {'code': 'colour_data_v2', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}, 'desc': 'colour data v2'}, {'code': 'scene_data_v2', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, 'desc': 'scene data v2'}, {'code': 'countdown_1', 'dp_id': 26, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}, {'code': 'music_data', 'dp_id': 27, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}, 'desc': 'music data'}, {'code': 'control_data', 'dp_id': 28, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}, 'desc': 'control data'}, {'code': 'rhythm_mode', 'dp_id': 30, 'type': 'Raw', 'values': {'maxlen': 255}, 'desc': 'rhythm mode'}, {'code': 'sleep_mode', 'dp_id': 31, 'type': 'Raw', 'values': {'maxlen': 255}, 'desc': 'sleep mode'}, {'code': 'wakeup_mode', 'dp_id': 32, 'type': 'Raw', 'values': {'maxlen': 255}, 'desc': 'wakeup mode'}, {'code': 'power_memory', 'dp_id': 33, 'type': 'Raw', 'values': {}, 'desc': 'power memory'}, {'code': 'do_not_disturb', 'dp_id': 34, 'type': 'Boolean', 'values': {}, 'desc': 'do not disturb'}, {'code': 'cycle_timing', 'dp_id': 209, 'type': 'Raw', 'values': {}, 'desc': 'cycle timing'}, {'code': 'random_timing', 'dp_id': 210, 'type': 'Raw', 'values': {}, 'desc': 'random timing'}]
   tuya_spec_status [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}}, {'code': 'bright_value_v2', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'temp_value_v2', 'dp_id': 23, 'type': 'Integer', 'values': {'min': 0, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'colour_data_v2', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, {'code': 'scene_data_v2', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}}, {'code': 'countdown_1', 'dp_id': 26, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'music_data', 'dp_id': 27, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}}, {'code': 'control_data', 'dp_id': 28, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}}, {'code': 'rhythm_mode', 'dp_id': 30, 'type': 'Raw', 'values': {'maxlen': '255'}}, {'code': 'sleep_mode', 'dp_id': 31, 'type': 'Raw', 'values': {'maxlen': '255'}}, {'code': 'wakeup_mode', 'dp_id': 32, 'type': 'Raw', 'values': {'maxlen': '255'}}, {'code': 'power_memory', 'dp_id': 33, 'type': 'Raw', 'values': {}}, {'code': 'do_not_disturb', 'dp_id': 34, 'type': 'Boolean', 'values': {}}, {'code': 'cycle_timing', 'dp_id': 209, 'type': 'Raw', 'values': {}}, {'code': 'random_timing', 'dp_id': 210, 'type': 'Raw', 'values': {}}]


Hi Klaus,

Dominik arbeitet derweil an einem Fix.. Ich habe die Version 504 für eine Weile getestet, in der dieser Bug noch nicht enthalten ist, aber leider ein anderer ;-) (https://github.com/fhempy/fhempy/issues/106)

Gruss Jan
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 09 Dezember 2022, 19:19:27
Zitat von: satprofi am 09 Dezember 2022, 17:10:35
die readings auswerten und dementsprechend verwerten?

oh ja!! deshalb habe ich es auch seit einigen Monaten installiert, um vor allem den Stromverbrauch auszuwerten. Dazu betreibe ich ca. 35 Gosund Steckdosen und habe 16 JCA301 rausgeschmissen. Dies in der Hoffnung, dass TUYA die Verbrauchswerte auch teges- und monats-kumuliert liefert. Diese hat Tuya ja; gibt sie aber nur über SmartLife preis :-(

Aber Tuya liefert ja immer noch aus der Cloud nur die aktuellen Werte.
Ich schreibe diese auch in meine extra auf SSD aufgerüstete DbLog. Mir fehlen die Kenntnisse, um diese readings dann in Tages-Werte in kWh zu kumulieren.
Hat jemand sowas gemacht und könnte die entsprechen Skripte mitteilen?
Dann ware ich super happy.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: sash.sc am 10 Dezember 2022, 17:32:41
Schaue die mal das statistic Modul an
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 10 Dezember 2022, 18:00:19
Zitat von: sash.sc am 10 Dezember 2022, 17:32:41
Schaue die mal das statistic Modul an
Min|Avg|Max Minimum, average and maximum of instantaneous values:
over a period of day, month and year:
current, energy_current, humidity, luminosity, temperature, voltage
over a period of hour, day, month and year:
brightness, wind, wind_speed, windSpeed

Tendency over 1h, 2h, 3h und 6h: pressure

Delta between start and end values - over a period of hour, day, month and year:
count, energy, energy_total, power, total, rain, rain_rate, rain_total

Duration (and counter) of the states (on, off, open, closed...) over a period of day, month and year:
lightsensor, lock, motion, Window, window, state (if no other reading is recognized)


da gibt es aber wohl keine Summierung ?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 10 Dezember 2022, 19:09:16
ich meine eine solche Darstellung wie in der App

Das könnte man mit GPLOT darstellen ,wenn man die die entsprechenden readings hätte ..

@dominik
Wäre das sehr schwierig/aufwändig, die Aufsummierung in deinem Modul vorzunehmen und die entsprechenden readings power_cum-YYYY-MM, hinzuzuerzeugen?

Du kriegst doch ca. alle Sekunde mit, welche cur_power anliegt und könntest z.B. bei jedem neuen Auslesen dies in power_cum-2022-12 mit x*cur-power einfach aufsummieren [Watt], wenn x das Delta zum letzten Lesevorgang [sec] ist.

Ich vermute mal, dass das über Userreadings oder so auch geht; in deinem Modul ginge es ja sozusagen "in einem Rutsch" und würde die dbLog entlasten, da man nur noch die Summenwerte monatlich in die Datenbank schreiben müsste.
Und wir wären von der Cloud noch unabhängiger ;-)
Mir wäre es eine anständige Spende wert ;-)


Momentan notiere ich mir die Monatswerte von ca. 30 Geräten händisch in einer EXCEL-Tabelle.
Den Gesamtstromverbrauch hole ich mir über PowerFox.
Einige Stromverbräuche hole ich mir über SmarteStromesser durch monatliches Ablesen. Dafür habe ich rund 200€ investiert.
Bei einem Invert von rund 750€ könnte ich auf TuYa WIfi Strommesser umstellen, wes mir zu teuer ist.

beste Grüße
Thomas


Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Mazz78 am 10 Dezember 2022, 19:55:07
Ich hab mein Problem/Fehler gefunden !

In der Tuya Handy App war als Zeitzone BERLIN eingetragen.

In der Tuya App unter https://iot.tuya.com/cloud/ -> Development -> <Projekt> hatte ich bei Data Center intuitiv West Europe ausgewählt.

Bei der Fehlersuche hab ich dann auf der Seite https://developer.tuya.com/en/docs/iot/Data_Center_Introduction?id=Kav2hlac2ppnw gesehen, dass Berlin (-> Germany) aber auf dem Data Center Central Europe läuft.

Nach der Änderung auf Central Europe konnte ich die Handy App erfolgreich koppeln/einscannen (Pkt. 9 in der Anleitung)


Zitat von: Mazz78 am 19 November 2022, 16:56:50
Hallo zusammen,

Ich hänge irgendwo bei der Ersteinrichtung...  :-\

....

Titel: Antw:fhempy: tuya (lokal) Umstellung von Cloud
Beitrag von: thburkhart am 10 Dezember 2022, 20:44:30
auf jeden Fall möchte nun von tuya_cloud auf tuya_lokal umsteigen.

fhempy  ist ja identisch ?

also nur noch wie in der Install-Anleitung :
FHEM
update add https://raw.githubusercontent.com/fhempy/fhempy/master/controls_pythonbinding.txt
update
shutdown restart
define fhempy_local BindingsIo fhempy

?
wie müsste ich meine bisherige DEF

# TUYA Cloud ####################################################################################

## TUYAFHEM
## Integration in FHEM
## https://iot.tuya.com/cloud/basic?id=p16199838266334apucq&region=AY&toptab=related&deviceTab=all&sourceType=4&sourceId=eu1548823829280mLHX1
## Project Type: Smart HomeIndustry: Smart HomeCreate Time : 2021-05-02 21:30:63
## Authorization Key
## Access ID/Client ID: qcephkpvajw1rn0qzrij    ea8453wdazquzfl08l0e
## Access Secret/Client Secret: c975081e74f34b2fbafcad20058c7488     8a4b27dd759d4c6a9456aa8155d2a0ea

##define TUYA fhempy tuya_cloud setup <CLIENT_ID>         <CLIENT_SECRET>                  <USERNAME> <PASSWORD> <APPTYPE> <REGION>
define TUYA fhempy tuya_cloud setup yyyyyyyyyyyy xxxxxxxxxxxxxxxxxxxxxxxxxxxxx xx@gmx.net xxxxxxxx smartlife Europe
setuuid TUYA 6160933e-f33f-21fb-4a78-6f28e312ea5b9f44
attr TUYA group TUYA
attr TUYA room TUYA
attr TUYA verbose 1


umstellen verändern, damit meine bisherigen Devices erhalten bleiben können:

define JL08 fhempy tuya_cloud TUYA 22230808807d3a231039
setuuid JL08 616325a2-f33f-21fb-f48e-f87abe3628a251bd
attr JL08 alias PC Schreibtisch NAS
attr JL08 group Schalter NAS
attr JL08 room THOMAS,TUYA,Thomas Schreibtisch



kann ich die erste DEFine  einfach "fhempy tuya_cloud" auf lokal umdefinieren

also so beginnnend:
define TUYA fhempy tuya_cloud setup ..
mit welchen Argumenten/ Syntax?

Dominik hatte das schon mal geschrieben... finde es allerdings nicht mehl


ich danke euch sehr

Thomas
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 10 Dezember 2022, 21:06:08
Zitat von: dominik am 30 April 2022, 20:38:47
Der Cloud Zugang bei diesem Plugin dient nur dafür, dass man die Spezifikation der einzelnen Datenpunkte (DPs) erhält.

Du kannst deine tuya_cloud Devices sogar parallel dazu nutzen. Daher einfach das hier anlegen:

define tuya_system fhempy tuya setup API_KEY API_SECRET DEVICE_ID
set tuya_system start_scan


Du kannst dann die einzelnen Devices über das set create_device Command anlegen.
Wenn dann alles funktioniert, kannst du die tuya_cloud Devices löschen.

habe es also doch gefunden...

nur woher bekomme ich:
API_KEY
API_SECRET ??

DEVICE_ID ist ja je Device

im Tuya-Konto habe ich ja folgendes:
Authorization Key
Access ID/Client ID: ****************************
Access Secret/Client Secret: ********************************
Project Code: ************
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: klausw am 11 Dezember 2022, 11:26:28
Zitat von: JF Mennedy am 09 Dezember 2022, 17:47:02
Hi Klaus,

Dominik arbeitet derweil an einem Fix.. Ich habe die Version 504 für eine Weile getestet, in der dieser Bug noch nicht enthalten ist, aber leider ein anderer ;-) (https://github.com/fhempy/fhempy/issues/106)

Gruss Jan

Hi Jan,

danke für den Hinweis. Ich habe ein Downgrade auf die 504 durchgeführt. Leider brachte das bei mir nicht die Lösung.  Die Lampe steht noch immer auf Initializing...
Ich hatte sie auch gelöscht und neu anlegen lassen. Leider ohne Erfolg.
Muss ich bei der 504 noch etwas besonderes beachten?

Grüße
Klaus
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: fretti am 14 Dezember 2022, 23:23:50
nach Update auf 527 kommt beim starten:
2022-12-14 23:00:08,907 - INFO     - fhempy.lib.fhem_pythonbinding: Shutdown initiated...
2022-12-14 23:00:08,911 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2022-12-14 23:00:08,912 - INFO     - websockets.server: server closing
2022-12-14 23:12:23,394 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.527...
2022-12-14 23:12:23,396 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2022-12-14 23:12:23,411 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2022-12-14 23:12:30,915 - INFO     - websockets.server: connection open
2022-12-14 23:12:30,915 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2022-12-14 23:12:31,547 - ERROR    - tuya_local_63554574c4dd57244455: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 473, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 390, in _create_cloudmapping_dev
    info = await self.get_tuya_dev_info()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 323, in get_tuya_dev_info
    for dev in resp["result"]:
KeyError: 'result'


Auch ist das "initializing"-Problem nicht behoben.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 15 Dezember 2022, 00:08:12
bei mir läuft alles prima...
fhempy hatte mir zuletzt beide dblog mit ein paar Milliarden Einträgen geflutet, die dann ganz FHEM blockierte

Ich habe Sie mit etwas Mühe neu aufgesetzt.
Die Datenflut grenze ich inzwischen so ein:

define Temp1 fhempy tuya_lokal TUYA bf4ae6b15fe239b42bxvpl
setuuid Temp1 625f01ef-f33f-fd5f-eb72-266acf996be40377
attr Temp1 alias Temp1 TUYA Temperatur Terrasse
attr Temp1 doAverage 1
[color=yellow]attr Temp1 event-min-interval va_temperature:7200,humidity_value:7200[/color]
attr Temp1 genericDeviceType thermometer
attr Temp1 group TempHumAussen
attr Temp1 room TUYA,TUYA TempHum,Temperaturen Aussen,Terrasse
attr Temp1 userReadings Temp: temperature [C] Hum: humidity [%]



wichtig ist auch, dass man fleissig "shutdown restart" macht
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: kleinerDrache am 16 Dezember 2022, 21:47:07
hatte ich auch erst und hab das per DBlogInclude und DBlogExlude eingedämmt (ich logge nur was ich auch haben will), zusätzlich reduziere ich die Einträge per event-min-interval auf einen Eintrag pro Minute. Die Tuya Geräte sind das echt extrem gesprächig, hab da aber noch ein paar Geräte die mir sonst alle 5sek. einen neuen Eintrag erstellen. Könnte man noch weiter reduzieren indem man den minimalen Änderungswert z.B. bei den Temperaturen festlegt.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 17 Dezember 2022, 11:41:22
Hallo zusammen,

ich glaube ich hab den Fehler nun endlich gefunden wieso die Devices manchmal keine Updates liefern. Ebenso habe ich auf Basis der asynchronen Implementierung (https://github.com/willemwouters/tinytuya) Version 3.4 Support mit aufgenommen.

Ich warte noch auf die beiden Pull Requests (https://github.com/willemwouters/tinytuya/pulls) und sobald die aufgenommen wurden, kann ich fhempy aktualisieren.

@thburkhart
Wegen der Aufsummierung habe ich mir auch schon überlegt wie sich das machen lässt. Eine Möglichkeit wäre natürlich cur_power einfach mit der Zeit zu multiplizieren und somit errechnen. Eine andere Möglichkeit sollte sein den add_ele Wert zu verwenden. Der sollte nämlich die Leistung in kWh beinhalten. Nur weiß ich noch nicht in welchen Zeitabständen der aktualisiert wird. Manchmal geht er auch nicht auf 0.
Sobald die oben erwähnte Version sauber läuft, kann ich mir das genauer anschauen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 17 Dezember 2022, 11:58:30
super !!!

Ist der Fehler mit den 10fachen-Werten mit der neuen Version auch behoben

Herzliche Grüße

Thomas
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 17 Dezember 2022, 13:11:26
Bei welchen Readings hast du noch 10-fach Werte? Solange die richtige Spec von der Tuya IoT Cloud kommt, sollten die richtig berechnet werden.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 17 Dezember 2022, 15:28:31
Zitat von: dominik am 17 Dezember 2022, 13:11:26
Bei welchen Readings hast du noch 10-fach Werte? Solange die richtige Spec von der Tuya IoT Cloud kommt, sollten die richtig berechnet werden.

Readings
active_time
1592500296
2022-12-16 19:40:35
biz_type
18
2022-12-16 19:40:35
category
cz
2022-12-16 19:40:35
countdown_1
0.0
2022-12-17 15:25:16
create_time
1575043848
2022-12-16 19:40:35
cur_current
21.0
2022-12-17 15:25:16
cur_power
50.0
2022-12-17 15:25:16
cur_voltage
[color=yellow]2266.0[/color]
2022-12-17 15:25:16
icon
https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/104380002462ab2f8ac0163417849807563.png
2022-12-16 19:40:35
id
104380002462ab2f8ac0
2022-12-16 19:40:35
ip
46.5.205.243
2022-12-16 11:40:49
lat
48.5585
2022-12-16 19:40:35
local_key
a6015a85cfa6f812
2022-12-16 19:40:35
lon
9.2025
2022-12-16 19:40:35
model
SP111,15A,带计电量,中性
2022-12-16 19:40:35
name
Dunstabzug
2022-12-16 19:40:35
online
on
2022-12-16 19:40:35
owner_id
3389434
2022-12-16 19:40:35
product_id
37mnhia3pojleqfh
2022-12-16 19:40:35
product_name
Smart Socket
2022-12-16 19:40:35
state
on
2022-12-17 15:25:16
sub
off
2022-12-16 19:40:35
switch
on
2022-12-14 19:02:02
time_zone
+01:00
2022-12-16 19:40:35
uid
eu1548823829280mLHX1
2022-12-16 19:40:35
update_time
1669504400
2022-12-16 19:40:35
uuid
104380002462ab2f8ac0


und noch 5 weitere SP111

kommen wohl so aus der Cloud
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 17 Dezember 2022, 15:31:40
Poste mal die Inhalte vom Attribut tuya_spec_status
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 17 Dezember 2022, 16:13:52
Bitte Version 0.1.528 testen.

- Version 3.4 sollte funktionieren (untested!)
- Keine Reading Updates nach paar Tagen fixed
- Power, voltage, current werden nun forced alle 5s aktualisiert, da es ohne force sonst teilweis 30s oder länger dauert (damit geht es gleich schnell wie in der SmartLife App)

Bitte um Feedback ob es bei euch nun stabil funktioniert.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 17 Dezember 2022, 19:12:36
Zitat von: dominik am 17 Dezember 2022, 15:31:40
Poste mal die Inhalte vom Attribut tuya_spec_status

habe nur:
product_id
37mnhia3pojleqfh und wifvoilfrqeo6hvu
diese beiden IDs liefert 10 fache Volt-Werte (12 Geräte bei mir)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 17 Dezember 2022, 19:29:43
Ok, hab es für alle lokalen Mappings korrigiert. Sollte nun mit 0.1.530 richtig sein.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 17 Dezember 2022, 19:33:52
update gefahren  ..

keine Auffälligkeiten bzgl. des ReadingsUpdate

die Geräte IDs

37mnhia3pojleqfh und wifvoilfrqeo6hvu  liefern noch immer 10 fache Werte

kommen aber aus tuya_cloud

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 17 Dezember 2022, 19:44:19
habe mir übrigen damit:

define TUYAreadingsGroup readingsGroup <Device>,<TimeStamp>,<Produktname>,<ProduktID>,<State>,<online>,<CreateTime>,<cur_current>,<cur_power>,<cur_voltage>,<Countdown>,<Temperatur>,<Humidity> \
TYPE=fhempy:<{ReadingsTimestamp($DEVICE,"state","")}>,product_name,product_id,state,online,create_time,cur_current,cur_power,cur_voltage,countdown_1,temperature,va_temperature,va_humidity,humidity_value
setuuid TUYAreadingsGroup 639b00ce-f33f-fd5f-e7b3-eda5026cfd4e0185
attr TUYAreadingsGroup headerRows xxxx xxxx
attr TUYAreadingsGroup room ! TUYA
attr TUYAreadingsGroup valueFormat {produkt_name => 3},{va_temperature => 10}
attr TUYAreadingsGroup valueIcon {'battery.ok' => 'batterie@lightgreen', 'battery.low' => 'batterie@red', 'window.closed' => 'fts_window_1w@lightgreen', 'window.open' => 'fts_window_1w_open@red'}
attr TUYAreadingsGroup valueStyle { if($READING eq "temperature" && $VALUE > 20){ 'style="color:green;;font-weight:bold"' }elsif( $READING eq "temperature" && $VALUE <= 20 ){ 'style="color:blue"' }elsif( $READING eq "temperature" && $VALUE > 23 ){ 'style="color:red"' }else{ 'style="color:gray"' } }

ein kleines Cockpit gebaut, um alle Werte auf eine Blick zu haben
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 17 Dezember 2022, 19:53:22
Zitat von: thburkhart am 17 Dezember 2022, 19:33:52
update gefahren  ..

keine Auffälligkeiten bzgl. des ReadingsUpdate

die Geräte IDs

37mnhia3pojleqfh und wifvoilfrqeo6hvu  liefern noch immer 10 fache Werte

kommen aber aus tuya_cloud

Jetzt bin ich etwas verwirrt, tuya_cloud oder tuya? Wenn tuya_cloud, dann kann man da nix machen, das kommt dann so (falsch) von tuya.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 17 Dezember 2022, 20:18:04
ZitatJetzt bin ich etwas verwirrt, tuya_cloud oder tuya? Wenn tuya_cloud, dann kann man da nix machen, das kommt dann so (falsch) von tuya.

Asche auf mein Haupt ..
ich verwende noch tuya_cloud

ist ja ne Frechheit von TUYA ...

den Umstieg von _cloud auf tuya habe ich immer noch nicht kapiert

ich habe als DEF:

##define TUYA fhempy tuya_cloud setup <CLIENT_ID>         <CLIENT_SECRET>                  <USERNAME> <PASSWORD> <APPTYPE> <REGION>
define TUYA fhempy tuya_cloud setup ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2xxxxxxxxxx xxx@gmx.net thbbkt25 smartlife Europe
setuuid TUYA 6160933e-f33f-21fb-4a78-6f28e312ea5b9f44
attr TUYA group TUYA
attr TUYA room TUYA
attr TUYA verbose 1

und zig Devices
define EMYLO2 fhempy tuya_cloud TUYA 30180616dc4f22fc986a
setuuid EMYLO2 6161eac5-f33f-21fb-42ad-09c6b5745a4ecc49
attr EMYLO2 alias EM02 Springbrunnen
attr EMYLO2 group Schalter (T)
attr EMYLO2 room Garten,TUYA


wie müsste mein DEF für lokal aus obingem sein? Die Syntax ist ja etwas anders..



Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 17 Dezember 2022, 20:23:32
Hallo,

habe auch das Problem der falschen Werte in der Antwort für ein Thermostat.
Übergeben wird 30° (daraus wird dann 3.0) im JSON und am Thermostat steht dann 15°C.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 17 Dezember 2022, 20:37:01
Zitat von: thburkhart am 17 Dezember 2022, 20:18:04
Asche auf mein Haupt ..
ich verwende noch tuya_cloud

ist ja ne Frechheit von TUYA ...

den Umstieg von _cloud auf tuya habe ich immer noch nicht kapiert

ich habe als DEF:

##define TUYA fhempy tuya_cloud setup <CLIENT_ID>         <CLIENT_SECRET>                  <USERNAME> <PASSWORD> <APPTYPE> <REGION>
define TUYA fhempy tuya_cloud setup ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2xxxxxxxxxx xxx@gmx.net thbbkt25 smartlife Europe
setuuid TUYA 6160933e-f33f-21fb-4a78-6f28e312ea5b9f44
attr TUYA group TUYA
attr TUYA room TUYA
attr TUYA verbose 1

und zig Devices
define EMYLO2 fhempy tuya_cloud TUYA 30180616dc4f22fc986a
setuuid EMYLO2 6161eac5-f33f-21fb-42ad-09c6b5745a4ecc49
attr EMYLO2 alias EM02 Springbrunnen
attr EMYLO2 group Schalter (T)
attr EMYLO2 room Garten,TUYA


wie müsste mein DEF für lokal aus obingem sein? Die Syntax ist ja etwas anders..

Am einfachsten machst du den Umstieg mit dem setup Device, das hier anlegen:
define tuya_system fhempy tuya setup API_KEY API_SECRET DEVICE_ID
dann
set tuya_system scan_devices
nach paar Minuten die einzelnen Devices anlegen
set tuya_system create_device ......
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 17 Dezember 2022, 20:37:41
Zitat von: Christian83 am 17 Dezember 2022, 20:23:32
Hallo,

habe auch das Problem der falschen Werte in der Antwort für ein Thermostat.
Übergeben wird 30° (daraus wird dann 3.0) im JSON und am Thermostat steht dann 15°C.

Poste mal einen Screenshot von der Device Seite (inkl. Attributes).
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 17 Dezember 2022, 20:51:14
Internals:
   CFGFN     
   DEF        tuya IAYz2WK1th0cMLmL 30000443e8db84b97ec6 192.168.0.150 87a027dd28cf507b 3.3 key secret
   DEVICEID   30000443e8db84b97ec6
   FHEMPYTYPE tuya
   FUUID      639c6473-f33f-d2f0-ded7-c57f83f01d793ae9
   IODev      fhempy_local
   NAME       tuya_local_30000443e8db84b97ec6
   NR         443
   PYTHONTYPE tuya
   STATE      ready
   TYPE       fhempy
   eventCount 88
   Helper:
     DBLOG:
       temperature:
         logdb:
           TIME       1671306293.59278
           VALUE      19
   READINGS:
     2022-12-16 13:28:36   active_time     1670674063
     2022-12-16 13:28:36   biz_type        0
     2022-12-16 13:28:36   category        wk
     2022-12-16 13:28:37   child_lock      off
     2022-12-16 13:28:36   create_time     1670669996
     2022-12-16 13:28:37   dp_04           1
     2022-12-17 20:15:58   dp_101          AAYoAAgeHgseHg0eABEsABYeAAYoAAgoHgsoHg0oABEoABYeAAYoAAgoHgsoHg0oABEoABYe
     2022-12-16 13:28:37   dp_102          0
     2022-12-16 13:28:37   dp_104          1
     2022-12-16 13:28:37   eco             off
     2022-12-16 13:28:36   icon            smart/icon/15264583415nnlzwfs1qd2wqz6i937op3nmi_0.png
     2022-12-16 13:28:36   id              30000443e8db84b97ec6
     2022-12-16 13:28:36   ip              93.199.164.114
     2022-12-16 13:28:36   lat             48.4231
     2022-12-16 13:28:36   local_key       87a027dd28cf507b
     2022-12-16 13:28:36   lon             11.0790
     2022-12-16 13:28:36   name            thermostat
     2022-12-17 20:15:52   online          1
     2022-12-16 13:28:36   owner_id        74123069
     2022-12-16 13:28:36   product_id      IAYz2WK1th0cMLmL
     2022-12-16 13:28:36   product_name    thermostat
     2022-12-17 20:15:59   state           ready
     2022-12-16 13:28:36   sub             0
     2022-12-16 14:27:53   switch          on
     2022-12-17 20:44:58   temp_set        5.0
     2022-12-17 20:44:53   temperature     19
     2022-12-16 13:28:36   time_zone       +01:00
     2022-12-16 13:28:36   uid             eu1670673972921RSqe1
     2022-12-16 13:28:36   update_time     1670674065
     2022-12-17 20:44:53   upper_temp      38.0
     2022-12-16 13:28:36   uuid            30000443e8db84b97ec6
   args:
     tuya_local_30000443e8db84b97ec6
     fhempy
     tuya
     IAYz2WK1th0cMLmL
     30000443e8db84b97ec6
     192.168.0.150
     87a027dd28cf507b
     3.3
     urm38hmp7t3smmqqh8mj
     c4138d197ec14365b1affaeae303eea7
   argsh:
Attributes:
   DbLogInclude temperature
   alias      thermostat
   dp_01      switch
   dp_02      temp_set
   dp_03      upper_temp
   dp_05      eco
   dp_06      child_lock
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'child_lock', 'dp_id': 6, 'type': 'Boolean', 'values': {}, 'desc': 'child lock'}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 10, 'max': 70, 'scale': 1, 'step': 5}, 'desc': 'temp set'}, {'code': 'eco', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'eco'}, {'code': 'upper_temp', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 100, 'scale': 0, 'step': 5}, 'desc': 'upper temp'}]
   tuya_spec_status [{'code': 'eco', 'dp_id': 5, 'type': 'Boolean', 'values': {}}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 10, 'max': 70, 'scale': 1, 'step': 5}}, {'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'child_lock', 'dp_id': 6, 'type': 'Boolean', 'values': {}}, {'code': 'upper_temp', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 100, 'scale': 0, 'step': 5}}]
   userReadings temperature:upper_temp.* {ReadingsVal("tuya_local_30000443e8db84b97ec6","upper_temp",0)/2}


Wie gesagt, wenn ich über die Tuya-Api das JSON per Postman schicke, dann macht er auch son Murks.
Habs jetzt quasi über das UserReading gelöst. Also das Auslesen. Beim Setzen ist das gleiche Problem mit der Umrechnung...
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 17 Dezember 2022, 21:36:42
Zitat
Am einfachsten machst du den Umstieg mit dem setup Device, das hier anlegen:
define tuya_system fhempy tuya setup API_KEY API_SECRET DEVICE_ID
dann
set tuya_system scan_devices
nach paar Minuten die einzelnen Devices anlegen
set tuya_system create_device ......

jetzt weiß ich wieder worüber ich strauchelte...
1)
API_KEY
API_SECRET
DEVICE_ID

woher bekomme ich die?
ich hatte ja vorher nur:
<CLIENT_ID>
<CLIENT_SECRET>                 
<USERNAME>
<PASSWORD>
<APPTYPE>
<REGION>


2) meine alten (ca. 75) Device attribute und SVGs sind dann weg?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 17 Dezember 2022, 21:48:33
Zitat von: Christian83 am 17 Dezember 2022, 20:51:14
Internals:[/color]
   CFGFN     
   DEF        tuya IAYz2WK1th0cMLmL 30000443e8db84b97ec6 192.168.0.150 87a027dd28cf507b 3.3 key secret
   DEVICEID   30000443e8db84b97ec6
   FHEMPYTYPE tuya
   FUUID      639c6473-f33f-d2f0-ded7-c57f83f01d793ae9
   IODev      fhempy_local
   NAME       tuya_local_30000443e8db84b97ec6
   NR         443
   PYTHONTYPE tuya
   STATE      ready
   TYPE       fhempy
   eventCount 88
   Helper:
     DBLOG:
       temperature:
         logdb:
           TIME       1671306293.59278
           VALUE      19
   READINGS:
     2022-12-16 13:28:36   active_time     1670674063
     2022-12-16 13:28:36   biz_type        0
     2022-12-16 13:28:36   category        wk
     2022-12-16 13:28:37   child_lock      off
     2022-12-16 13:28:36   create_time     1670669996
     2022-12-16 13:28:37   dp_04           1
     2022-12-17 20:15:58   dp_101          AAYoAAgeHgseHg0eABEsABYeAAYoAAgoHgsoHg0oABEoABYeAAYoAAgoHgsoHg0oABEoABYe
     2022-12-16 13:28:37   dp_102          0
     2022-12-16 13:28:37   dp_104          1
     2022-12-16 13:28:37   eco             off
     2022-12-16 13:28:36   icon            smart/icon/15264583415nnlzwfs1qd2wqz6i937op3nmi_0.png
     2022-12-16 13:28:36   id              30000443e8db84b97ec6
     2022-12-16 13:28:36   ip              93.199.164.114
     2022-12-16 13:28:36   lat             48.4231
     2022-12-16 13:28:36   local_key       87a027dd28cf507b
     2022-12-16 13:28:36   lon             11.0790
     2022-12-16 13:28:36   name            thermostat
     2022-12-17 20:15:52   online          1
     2022-12-16 13:28:36   owner_id        74123069
     2022-12-16 13:28:36   product_id      IAYz2WK1th0cMLmL
     2022-12-16 13:28:36   product_name    thermostat
     2022-12-17 20:15:59   state           ready
     2022-12-16 13:28:36   sub             0
     2022-12-16 14:27:53   switch          on
     2022-12-17 20:44:58   temp_set        5.0
     2022-12-17 20:44:53   temperature     19
     2022-12-16 13:28:36   time_zone       +01:00
     2022-12-16 13:28:36   uid             eu1670673972921RSqe1
     2022-12-16 13:28:36   update_time     1670674065
     2022-12-17 20:44:53   upper_temp      38.0
     2022-12-16 13:28:36   uuid            30000443e8db84b97ec6
   args:
     tuya_local_30000443e8db84b97ec6
     fhempy
     tuya
     IAYz2WK1th0cMLmL
     30000443e8db84b97ec6
     192.168.0.150
     87a027dd28cf507b
     3.3
     urm38hmp7t3smmqqh8mj
     c4138d197ec14365b1affaeae303eea7
   argsh:
Attributes:
   DbLogInclude temperature
   alias      thermostat
   dp_01      switch
   dp_02      temp_set
   dp_03      upper_temp
   dp_05      eco
   dp_06      child_lock
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'child_lock', 'dp_id': 6, 'type': 'Boolean', 'values': {}, 'desc': 'child lock'}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 10, 'max': 70, 'scale': 1, 'step': 5}, 'desc': 'temp set'}, {'code': 'eco', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'eco'}, {'code': 'upper_temp', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 100, 'scale': 0, 'step': 5}, 'desc': 'upper temp'}]
   tuya_spec_status [{'code': 'eco', 'dp_id': 5, 'type': 'Boolean', 'values': {}}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 10, 'max': 70, 'scale': 1, 'step': 5}}, {'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'child_lock', 'dp_id': 6, 'type': 'Boolean', 'values': {}}, {'code': 'upper_temp', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 100, 'scale': 0, 'step': 5}}]
   userReadings temperature:upper_temp.* {ReadingsVal("tuya_local_30000443e8db84b97ec6","upper_temp",0)/2}


.
ich habe mal wieder ne blöde Frage?
wie schafft Ihr das, die der Internals-Kopie aus dem Browser 1:1 und ohne Formatverlust zu in Code reinzukopieren?

bei mir sieht das ja so aus:

Internals
DEF
tuya_cloud TUYA bf4ae6b15fe239b42bxvpl
DEVICEID
bf4ae6b15fe239b42bxvpl
FHEMPYTYPE
tuya_cloud
FUUID
625f01ef-f33f-fd5f-eb72-266acf996be40377
IODev
local_pybinding
NAME
Temp1
NR
1840
PYTHONTYPE
tuya_cloud
STATE
ready
TYPE
fhempy
eventCount
215
Readings
active_time
1644673048
2022-12-17 19:54:35
biz_type
18
2022-12-17 19:54:35
category
wsdcg
2022-12-17 19:54:35
create_time
1644673048
2022-12-17 19:54:35
humidity_value
90.0
2022-12-17 21:47:35
icon
https://images.tuyaeu.com/smart/icon/ay1525749833414yotNt/60d869bb20b0e1b0f0347a9fd8781a3c.png
2022-12-17 19:54:35
id
bf4ae6b15fe239b42bxvpl
2022-12-17 19:54:35
ip
78.43.113.55
2022-12-17 19:54:35
lat
48.5585
2022-12-17 19:54:35
local_key
d7e7d21944d8c91f
2022-12-17 19:54:35
lon
9.2025
2022-12-17 19:54:35
model
TH06WB3S
2022-12-17 19:54:35
name
Temperatur Terrasse
2022-12-17 19:54:35
online
on
2022-12-17 19:54:35
owner_id
3389434
2022-12-17 19:54:35
product_id
7akwzwfwhukkdsib
2022-12-17 19:54:35
product_name
T & H Sensor
2022-12-17 19:54:35
state
ready
2022-12-17 19:54:21
sub
off
2022-12-17 19:54:35
temp_unit_convert
c
2022-12-17 21:47:35
time_zone
+01:00
2022-12-17 19:54:35
uid
eu1548823829280mLHX1
2022-12-17 19:54:35
update_time
1669504397
2022-12-17 19:54:35
uuid
d24c953f87bd7f05
2022-12-17 19:54:35
va_temperature
0.0
2022-12-17 21:47:35

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 17 Dezember 2022, 22:04:20
"list device" und da dann copy-paste.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 17 Dezember 2022, 22:04:40
CLIENT_ID = API_KEY
CLIENT_SECRET = API_SECRET

Tuya hatte das mal umbenannt  8)

Das Kopieren ohne Formatverlust kannst du mit der neuen Copy Funktion in FHEMWeb machen. Musst wahrscheinlich noch ein "update" machen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 17 Dezember 2022, 22:05:38
Zitat von: Christian83 am 17 Dezember 2022, 20:51:14
Internals:
   CFGFN     
   DEF        tuya IAYz2WK1th0cMLmL 30000443e8db84b97ec6 192.168.0.150 87a027dd28cf507b 3.3 key secret
   DEVICEID   30000443e8db84b97ec6
   FHEMPYTYPE tuya
   FUUID      639c6473-f33f-d2f0-ded7-c57f83f01d793ae9
   IODev      fhempy_local
   NAME       tuya_local_30000443e8db84b97ec6
   NR         443
   PYTHONTYPE tuya
   STATE      ready
   TYPE       fhempy
   eventCount 88
   Helper:
     DBLOG:
       temperature:
         logdb:
           TIME       1671306293.59278
           VALUE      19
   READINGS:
     2022-12-16 13:28:36   active_time     1670674063
     2022-12-16 13:28:36   biz_type        0
     2022-12-16 13:28:36   category        wk
     2022-12-16 13:28:37   child_lock      off
     2022-12-16 13:28:36   create_time     1670669996
     2022-12-16 13:28:37   dp_04           1
     2022-12-17 20:15:58   dp_101          AAYoAAgeHgseHg0eABEsABYeAAYoAAgoHgsoHg0oABEoABYeAAYoAAgoHgsoHg0oABEoABYe
     2022-12-16 13:28:37   dp_102          0
     2022-12-16 13:28:37   dp_104          1
     2022-12-16 13:28:37   eco             off
     2022-12-16 13:28:36   icon            smart/icon/15264583415nnlzwfs1qd2wqz6i937op3nmi_0.png
     2022-12-16 13:28:36   id              30000443e8db84b97ec6
     2022-12-16 13:28:36   ip              93.199.164.114
     2022-12-16 13:28:36   lat             48.4231
     2022-12-16 13:28:36   local_key       87a027dd28cf507b
     2022-12-16 13:28:36   lon             11.0790
     2022-12-16 13:28:36   name            thermostat
     2022-12-17 20:15:52   online          1
     2022-12-16 13:28:36   owner_id        74123069
     2022-12-16 13:28:36   product_id      IAYz2WK1th0cMLmL
     2022-12-16 13:28:36   product_name    thermostat
     2022-12-17 20:15:59   state           ready
     2022-12-16 13:28:36   sub             0
     2022-12-16 14:27:53   switch          on
     2022-12-17 20:44:58   temp_set        5.0
     2022-12-17 20:44:53   temperature     19
     2022-12-16 13:28:36   time_zone       +01:00
     2022-12-16 13:28:36   uid             eu1670673972921RSqe1
     2022-12-16 13:28:36   update_time     1670674065
     2022-12-17 20:44:53   upper_temp      38.0
     2022-12-16 13:28:36   uuid            30000443e8db84b97ec6
   args:
     tuya_local_30000443e8db84b97ec6
     fhempy
     tuya
     IAYz2WK1th0cMLmL
     30000443e8db84b97ec6
     192.168.0.150
     87a027dd28cf507b
     3.3
     urm38hmp7t3smmqqh8mj
     c4138d197ec14365b1affaeae303eea7
   argsh:
Attributes:
   DbLogInclude temperature
   alias      thermostat
   dp_01      switch
   dp_02      temp_set
   dp_03      upper_temp
   dp_05      eco
   dp_06      child_lock
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'child_lock', 'dp_id': 6, 'type': 'Boolean', 'values': {}, 'desc': 'child lock'}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 10, 'max': 70, 'scale': 1, 'step': 5}, 'desc': 'temp set'}, {'code': 'eco', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'eco'}, {'code': 'upper_temp', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 100, 'scale': 0, 'step': 5}, 'desc': 'upper temp'}]
   tuya_spec_status [{'code': 'eco', 'dp_id': 5, 'type': 'Boolean', 'values': {}}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 10, 'max': 70, 'scale': 1, 'step': 5}}, {'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'child_lock', 'dp_id': 6, 'type': 'Boolean', 'values': {}}, {'code': 'upper_temp', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 100, 'scale': 0, 'step': 5}}]
   userReadings temperature:upper_temp.* {ReadingsVal("tuya_local_30000443e8db84b97ec6","upper_temp",0)/2}


Wie gesagt, wenn ich über die Tuya-Api das JSON per Postman schicke, dann macht er auch son Murks.
Habs jetzt quasi über das UserReading gelöst. Also das Auslesen. Beim Setzen ist das gleiche Problem mit der Umrechnung...

Jetzt sollte auch das funktionieren :) Bitte mit Version 0.1.531 probieren.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 17 Dezember 2022, 22:16:02
Naja. Jetzt zeigt er mir bei 19.5 => 195 an. Also Wert mal 10. (upper_wert. Ist der aktuelle Wert).
Und bei temp_set kommt jetzt am Thermostat immer 0 an. (Wohl, weil der Wert zu hoch wird.)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 17 Dezember 2022, 22:59:14
Bitte mit 0.1.532 testen, ist in ein paar Minuten online.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 17 Dezember 2022, 23:47:34
Hi,

das Auslesen von upper_temp funktioneirt jetzt.
Nur das Setzen über temp_set nicht. Da wird immer 0 Grad gesetzt auf dem Thermostat.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 18 Dezember 2022, 08:37:41
So, ich hab es jetzt abhängig von der ProductID IAYz2WK1th0cMLmL gemacht. Weil das dürfte vom Hersteller nicht nach dem Standards implementiert worden sein.

Bitte mit 0.1.533 testen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 18 Dezember 2022, 10:01:21
Am einfachsten machst du den Umstieg mit dem setup Device, das hier anlegen:
define tuya_system fhempy tuya setup API_KEY API_SECRET DEVICE_ID
dann
set tuya_system scan_devices
nach paar Minuten die einzelnen Devices anlegen
set tuya_system create_device .....


und woher bekomme ich <DEVBICE_ID> ?

irgend
ein erstes beliebiges? oder brauche ich das für alle meine 80?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 18 Dezember 2022, 10:02:32
Einfach irgendeine, kannst von einem Device aus der SmartLife App nehmen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 18 Dezember 2022, 10:19:21
[code]define tuya_system fhempy tuya setup xxxxxxxxxxx yyyyyyyyyy 10438000d8f15ba4ccd3
attr tuya_system group tuya
attr tuya_system room fhempy
attr tuya_system verbose 1

#   DEF        tuya setup ea8453wdazquzfl08l0e
   FHEMPYTYPE tuya
#   FUUID      639ed8a0-f33f-fd5f-bc8d-574b61340728759d
#   IODev      local_pybinding
#   NAME       tuya_system
#   NR         266
#   PYTHONTYPE tuya
#   REGION     eu
#   STATE      64 devices found localy
#   TYPE       fhempy
#   eventCount 318
#   Helper:
#     DBLOG:
#       state:
#         dblog_THB:
#           TIME       1671355034.86231
#           VALUE      64 devices found localy
#   READINGS:
#     2022-12-18 10:16:54   00673231e09806cb0add_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   00673231e09806cb0add_id 00673231e09806cb0add
#     2022-12-18 10:17:10   00673231e09806cb0add_ip 192.168.9.50
#     2022-12-18 10:16:54   00673231e09806cb0add_localkey 4af4edc4dd1f69ec
#     2022-12-18 10:16:54   00673231e09806cb0add_name SP08 Peugeot208
#     2022-12-18 10:16:54   00673231e09806cb0add_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   00673231e09806cb0add_version 3.3
#     2022-12-18 10:16:54   00673231e09806cb13b0_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   00673231e09806cb13b0_id 00673231e09806cb13b0
#     2022-12-18 10:17:10   00673231e09806cb13b0_ip 192.168.9.57
#     2022-12-18 10:16:54   00673231e09806cb13b0_localkey b5614e736a41adec
#     2022-12-18 10:16:54   00673231e09806cb13b0_name SP12 THOMAS Süd1
#     2022-12-18 10:16:54   00673231e09806cb13b0_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   00673231e09806cb13b0_version 3.3
#     2022-12-18 10:16:55   00673231e09806cb188e_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:55   00673231e09806cb188e_id 00673231e09806cb188e
#     2022-12-18 10:17:10   00673231e09806cb188e_ip 192.168.9.86
#     2022-12-18 10:16:55   00673231e09806cb188e_localkey 8f3e601297671704
#     2022-12-18 10:16:55   00673231e09806cb188e_name SP15 PETRA Bett
#     2022-12-18 10:16:55   00673231e09806cb188e_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   00673231e09806cb188e_version 3.3
#     2022-12-18 10:16:56   00673231e09806cb6fa5_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:56   00673231e09806cb6fa5_id 00673231e09806cb6fa5
#     2022-12-18 10:17:11   00673231e09806cb6fa5_ip 192.168.9.96
#     2022-12-18 10:16:56   00673231e09806cb6fa5_localkey 34828e037a9ce2fd
#     2022-12-18 10:16:56   00673231e09806cb6fa5_name SP14 PETRA SüdOst
#     2022-12-18 10:16:56   00673231e09806cb6fa5_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   00673231e09806cb6fa5_version 3.3
#     2022-12-18 10:16:56   00673231e09806cbeaa2_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:56   00673231e09806cbeaa2_id 00673231e09806cbeaa2
#     2022-12-18 10:17:11   00673231e09806cbeaa2_ip 192.168.9.91
#     2022-12-18 10:16:56   00673231e09806cbeaa2_localkey a3417522ec6a8e3c
#     2022-12-18 10:16:56   00673231e09806cbeaa2_name SP16 THOMAS West
#     2022-12-18 10:16:56   00673231e09806cbeaa2_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   00673231e09806cbeaa2_version 3.3
#     2022-12-18 10:16:59   00715387f4cfa2092c01_icon https://images.tuyaeu.com/smart/icon/ay1545812972898u8wAi/156396102696401859600.jpg
#     2022-12-18 10:16:59   00715387f4cfa2092c01_id 00715387f4cfa2092c01
#     2022-12-18 10:17:13   00715387f4cfa2092c01_ip 192.168.9.60
#     2022-12-18 10:16:59   00715387f4cfa2092c01_localkey 03c41b994a0ce655
#     2022-12-18 10:16:59   00715387f4cfa2092c01_name PETRA Nacht 1
#     2022-12-18 10:16:59   00715387f4cfa2092c01_productid h19lwmmcfp2tw5nl
#     2022-12-18 10:17:13   00715387f4cfa2092c01_version 3.3
#     2022-12-18 10:16:59   00715387f4cfa209ab1e_icon https://images.tuyaeu.com/smart/icon/ay1545812972898u8wAi/156396102696401859600.jpg
#     2022-12-18 10:16:59   00715387f4cfa209ab1e_id 00715387f4cfa209ab1e
#     2022-12-18 10:17:13   00715387f4cfa209ab1e_ip 192.168.9.61
#     2022-12-18 10:16:59   00715387f4cfa209ab1e_localkey 537e63946514289e
#     2022-12-18 10:16:59   00715387f4cfa209ab1e_name Globus
#     2022-12-18 10:16:59   00715387f4cfa209ab1e_productid h19lwmmcfp2tw5nl
#     2022-12-18 10:17:13   00715387f4cfa209ab1e_version 3.3
#     2022-12-18 10:17:01   0120018760019453b4b1_icon https://images.tuyaeu.com/smart/icon/1557225289t1u97cwpyd_0.jpg
#     2022-12-18 10:17:01   0120018760019453b4b1_id 0120018760019453b4b1
#     2022-12-18 10:17:14   0120018760019453b4b1_ip offline
#     2022-12-18 10:17:01   0120018760019453b4b1_localkey b3d70fb59b4b829b
#     2022-12-18 10:17:01   0120018760019453b4b1_name Schalter Doppel SW101E-2
#     2022-12-18 10:17:01   0120018760019453b4b1_productid At6C3S6JYzp4ez1T
#     2022-12-18 10:17:14   0120018760019453b4b1_version 3.3
#     2022-12-18 10:16:54   03132278a4cf12a5e7b0_icon https://images.tuyaeu.com/smart/icon/152956414744qw5qx565_0.jpg
#     2022-12-18 10:16:54   03132278a4cf12a5e7b0_id 03132278a4cf12a5e7b0
#     2022-12-18 10:17:09   03132278a4cf12a5e7b0_ip offline
#     2022-12-18 10:16:54   03132278a4cf12a5e7b0_localkey 71553cd705d0784b
#     2022-12-18 10:16:54   03132278a4cf12a5e7b0_name JL12Z Reserve
#     2022-12-18 10:16:54   03132278a4cf12a5e7b0_productid r15JnoGqWPM4PPtl
#     2022-12-18 10:17:10   03132278a4cf12a5e7b0_version 3.3
#     2022-12-18 10:16:58   03132278b4e62d74ab52_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/03132278b4e62d74ab52163417818099867.png
#     2022-12-18 10:16:58   03132278b4e62d74ab52_id 03132278b4e62d74ab52
#     2022-12-18 10:17:12   03132278b4e62d74ab52_ip 192.168.9.77
#     2022-12-18 10:16:58   03132278b4e62d74ab52_localkey 0b845fe9d56d2e03
#     2022-12-18 10:16:58   03132278b4e62d74ab52_name Leselampe 1
#     2022-12-18 10:16:58   03132278b4e62d74ab52_productid r15JnoGqWPM4PPtl
#     2022-12-18 10:17:12   03132278b4e62d74ab52_version 3.3
#     2022-12-18 10:16:58   03132278b4e62d74ab8f_icon https://images.tuyaeu.com/smart/icon/152956414744qw5qx565_0.jpg
#     2022-12-18 10:16:58   03132278b4e62d74ab8f_id 03132278b4e62d74ab8f
#     2022-12-18 10:17:13   03132278b4e62d74ab8f_ip offline
#     2022-12-18 10:16:58   03132278b4e62d74ab8f_localkey 61876a0d33922021
#     2022-12-18 10:16:58   03132278b4e62d74ab8f_name ZOO JL10
#     2022-12-18 10:16:58   03132278b4e62d74ab8f_productid r15JnoGqWPM4PPtl
#     2022-12-18 10:17:13   03132278b4e62d74ab8f_version 3.3
#     2022-12-18 10:16:59   03132278b4e62d74b293_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/03132278b4e62d74b293163417905557436.png
#     2022-12-18 10:16:59   03132278b4e62d74b293_id 03132278b4e62d74b293
#     2022-12-18 10:17:13   03132278b4e62d74b293_ip offline
#     2022-12-18 10:16:59   03132278b4e62d74b293_localkey 0a1f804404f7ac0c
#     2022-12-18 10:16:59   03132278b4e62d74b293_name UV Pflanzenlampe
#     2022-12-18 10:16:59   03132278b4e62d74b293_productid r15JnoGqWPM4PPtl
#     2022-12-18 10:17:13   03132278b4e62d74b293_version 3.3
#     2022-12-18 10:16:57   04086463840d8e50124b_icon https://images.tuyaeu.com/smart/icon/1504185916_0.png
#     2022-12-18 10:16:57   04086463840d8e50124b_id 04086463840d8e50124b
#     2022-12-18 10:17:12   04086463840d8e50124b_ip 192.168.9.79
#     2022-12-18 10:16:57   04086463840d8e50124b_localkey 3c8b3f7c92b627e5
#     2022-12-18 10:16:57   04086463840d8e50124b_name PS3 Wohnen 1
#     2022-12-18 10:16:57   04086463840d8e50124b_productid D7Hl3AxFbHDS98iO
#     2022-12-18 10:17:12   04086463840d8e50124b_version 3.1
#     2022-12-18 10:16:54   045074212462ab24e988_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   045074212462ab24e988_id 045074212462ab24e988
#     2022-12-18 10:17:10   045074212462ab24e988_ip 192.168.9.34
#     2022-12-18 10:16:54   045074212462ab24e988_localkey 6e637c2cfed441d8
#     2022-12-18 10:16:54   045074212462ab24e988_name SP04 Spülmaschine
#     2022-12-18 10:16:54   045074212462ab24e988_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   045074212462ab24e988_version 3.3
#     2022-12-18 10:16:55   045074212cf432ca0721_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:55   045074212cf432ca0721_id 045074212cf432ca0721
#     2022-12-18 10:17:11   045074212cf432ca0721_ip 192.168.9.32
#     2022-12-18 10:16:55   045074212cf432ca0721_localkey b43e3e9db35e85e8
#     2022-12-18 10:16:55   045074212cf432ca0721_name SP2 Kühlschrank HWR
#     2022-12-18 10:16:55   045074212cf432ca0721_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   045074212cf432ca0721_version 3.3
#     2022-12-18 10:16:55   06515140cc50e3d62490_icon https://images.tuyaeu.com/smart/icon/1528364694thahb9sok2l_0.png
#     2022-12-18 10:16:55   06515140cc50e3d62490_id 06515140cc50e3d62490
#     2022-12-18 10:17:10   06515140cc50e3d62490_ip 192.168.9.53
#     2022-12-18 10:16:55   06515140cc50e3d62490_localkey 0aa2002f6c628d34
#     2022-12-18 10:16:55   06515140cc50e3d62490_name Sirene 3
#     2022-12-18 10:16:55   06515140cc50e3d62490_productid DYgId0sz6zWlmmYu
#     2022-12-18 10:17:10   06515140cc50e3d62490_version 3.1
#     2022-12-18 10:16:58   067327848cce4ec3fe13_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/067327848cce4ec3fe1316341794790321.png
#     2022-12-18 10:16:58   067327848cce4ec3fe13_id 067327848cce4ec3fe13
#     2022-12-18 10:17:12   067327848cce4ec3fe13_ip 192.168.9.24
#     2022-12-18 10:16:58   067327848cce4ec3fe13_localkey 2d968ccae1083e52
#     2022-12-18 10:16:58   067327848cce4ec3fe13_name Toilette
#     2022-12-18 10:16:58   067327848cce4ec3fe13_productid fcLzUB4zWk95xYdk
#     2022-12-18 10:17:12   067327848cce4ec3fe13_version 3.3
#     2022-12-18 10:16:55   074124042cf4326f08c2_icon https://images.tuyaeu.com/smart/product_icon2/kg_1.png
#     2022-12-18 10:16:55   074124042cf4326f08c2_id 074124042cf4326f08c2
#     2022-12-18 10:17:10   074124042cf4326f08c2_ip 192.168.9.21
#     2022-12-18 10:16:55   074124042cf4326f08c2_localkey 4d150c756e7224e0
#     2022-12-18 10:16:55   074124042cf4326f08c2_name Küche oben
#     2022-12-18 10:16:55   074124042cf4326f08c2_productid mPRaDY6QmEFXOTYm
#     2022-12-18 10:17:10   074124042cf4326f08c2_version 3.3
#     2022-12-18 10:16:55   07412404cc50e3746c29_icon https://images.tuyaeu.com/smart/product_icon2/kg_1.png
#     2022-12-18 10:16:55   07412404cc50e3746c29_id 07412404cc50e3746c29
#     2022-12-18 10:17:11   07412404cc50e3746c29_ip 192.168.9.78
#     2022-12-18 10:16:55   07412404cc50e3746c29_localkey 802f4b27a1ebbdea
#     2022-12-18 10:16:55   07412404cc50e3746c29_name Bad 2
#     2022-12-18 10:16:55   07412404cc50e3746c29_productid mPRaDY6QmEFXOTYm
#     2022-12-18 10:17:11   07412404cc50e3746c29_version 3.3
#     2022-12-18 10:16:55   07847240bcddc29b03e9_icon https://images.tuyaeu.com/smart/icon/1534401999ezpgt19rc8l_0.png
#     2022-12-18 10:16:55   07847240bcddc29b03e9_id 07847240bcddc29b03e9
#     2022-12-18 10:17:10   07847240bcddc29b03e9_ip 192.168.9.98
#     2022-12-18 10:16:55   07847240bcddc29b03e9_localkey f98896e0ad1caba6
#     2022-12-18 10:16:55   07847240bcddc29b03e9_name Sirene 2 Temp
#     2022-12-18 10:16:55   07847240bcddc29b03e9_productid eISESdwVoVIV3axj
#     2022-12-18 10:17:10   07847240bcddc29b03e9_version 3.3
#     2022-12-18 10:16:55   07847240dc4f225fdda0_icon https://images.tuyaeu.com/smart/icon/1534401999ezpgt19rc8l_0.png
#     2022-12-18 10:16:55   07847240dc4f225fdda0_id 07847240dc4f225fdda0
#     2022-12-18 10:17:10   07847240dc4f225fdda0_ip 192.168.9.83
#     2022-12-18 10:16:55   07847240dc4f225fdda0_localkey adfdd8975615519e
#     2022-12-18 10:16:55   07847240dc4f225fdda0_name Sirene 1 Temp
#     2022-12-18 10:16:55   07847240dc4f225fdda0_productid eISESdwVoVIV3axj
#     2022-12-18 10:17:10   07847240dc4f225fdda0_version 3.3
#     2022-12-18 10:16:56   104380002462ab2f8ac0_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/104380002462ab2f8ac0163417849807563.png
#     2022-12-18 10:16:56   104380002462ab2f8ac0_id 104380002462ab2f8ac0
#     2022-12-18 10:17:11   104380002462ab2f8ac0_ip 192.168.9.49
#     2022-12-18 10:16:56   104380002462ab2f8ac0_localkey a6015a85cfa6f812
#     2022-12-18 10:16:56   104380002462ab2f8ac0_name Dunstabzug
#     2022-12-18 10:16:56   104380002462ab2f8ac0_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:11   104380002462ab2f8ac0_version 3.3
#     2022-12-18 10:16:55   104380002462ab301b83_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/104380002462ab301b83163417879515259.png
#     2022-12-18 10:16:55   104380002462ab301b83_id 104380002462ab301b83
#     2022-12-18 10:17:11   104380002462ab301b83_ip 192.168.9.76
#     2022-12-18 10:16:55   104380002462ab301b83_localkey 5bf8e554de9b7777
#     2022-12-18 10:16:55   104380002462ab301b83_name Router EAP225
#     2022-12-18 10:16:55   104380002462ab301b83_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:11   104380002462ab301b83_version 3.3
#     2022-12-18 10:17:01   104380002462ab30258d_icon https://images.tuyaeu.com/smart/icon/1541647698myzx2yx1yk_0.jpg
#     2022-12-18 10:17:01   104380002462ab30258d_id 104380002462ab30258d
#     2022-12-18 10:17:14   104380002462ab30258d_ip offline
#     2022-12-18 10:17:01   104380002462ab30258d_localkey 494dc6017b06a443
#     2022-12-18 10:17:01   104380002462ab30258d_name Heizdecke 3
#     2022-12-18 10:17:01   104380002462ab30258d_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:14   104380002462ab30258d_version 3.3
#     2022-12-18 10:16:58   10438000d8f15ba4ccd3_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/10438000d8f15ba4ccd3163417799266254.png
#     2022-12-18 10:16:58   10438000d8f15ba4ccd3_id 10438000d8f15ba4ccd3
#     2022-12-18 10:17:12   10438000d8f15ba4ccd3_ip 192.168.9.44
#     2022-12-18 10:16:58   10438000d8f15ba4ccd3_localkey 8ef2d52a326d2259
#     2022-12-18 10:16:58   10438000d8f15ba4ccd3_name Medien Schlafzimmer
#     2022-12-18 10:16:58   10438000d8f15ba4ccd3_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:12   10438000d8f15ba4ccd3_version 3.3
#     2022-12-18 10:17:00   12280017d8f15bdedda5_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:17:00   12280017d8f15bdedda5_id 12280017d8f15bdedda5
#     2022-12-18 10:17:14   12280017d8f15bdedda5_ip offline
#     2022-12-18 10:17:00   12280017d8f15bdedda5_localkey f5e3dac18c0aa670
#     2022-12-18 10:17:00   12280017d8f15bdedda5_name Gartengrill
#     2022-12-18 10:17:00   12280017d8f15bdedda5_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:14   12280017d8f15bdedda5_version 3.3
#     2022-12-18 10:16:56   17710212600194dba99d_icon https://images.tuyaeu.com/smart/program_category_icon/cz.png
#     2022-12-18 10:16:56   17710212600194dba99d_id 17710212600194dba99d
#     2022-12-18 10:17:11   17710212600194dba99d_ip 192.168.9.45
#     2022-12-18 10:16:56   17710212600194dba99d_localkey 9a0dadfb74c3a46f
#     2022-12-18 10:16:56   17710212600194dba99d_name Steckdose THOMAS Türe
#     2022-12-18 10:16:56   17710212600194dba99d_productid namu1lshm4jrx1td
#     2022-12-18 10:17:11   17710212600194dba99d_version 3.3
#     2022-12-18 10:16:58   17710212600194dbaba8_icon https://images.tuyaeu.com/smart/program_category_icon/cz.png
#     2022-12-18 10:16:58   17710212600194dbaba8_id 17710212600194dbaba8
#     2022-12-18 10:17:12   17710212600194dbaba8_ip 192.168.9.46
#     2022-12-18 10:16:58   17710212600194dbaba8_localkey e57c01322fc2deec
#     2022-12-18 10:16:58   17710212600194dbaba8_name Steckdose PETRA 1
#     2022-12-18 10:16:58   17710212600194dbaba8_productid namu1lshm4jrx1td
#     2022-12-18 10:17:12   17710212600194dbaba8_version 3.3
#     2022-12-18 10:16:59   180025363c6105dcdcaf_icon https://images.tuyaeu.com/smart/icon/1544066741n1omnq1w67_0.jpg
#     2022-12-18 10:16:59   180025363c6105dcdcaf_id 180025363c6105dcdcaf
#     2022-12-18 10:17:13   180025363c6105dcdcaf_ip offline
#     2022-12-18 10:16:59   180025363c6105dcdcaf_localkey cc76fb631ac08b09
#     2022-12-18 10:16:59   180025363c6105dcdcaf_name Wassermelder
#     2022-12-18 10:16:59   180025363c6105dcdcaf_productid KoAUR5fdtDso34VM
#     2022-12-18 10:17:13   180025363c6105dcdcaf_version 3.3
#     2022-12-18 10:16:55   2053863070039f16cebe_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/d6d1396a4acbafed7c7542c7bddc2fff.png
#     2022-12-18 10:16:55   2053863070039f16cebe_id 2053863070039f16cebe
#     2022-12-18 10:17:10   2053863070039f16cebe_ip 192.168.9.85
#     2022-12-18 10:16:55   2053863070039f16cebe_localkey 3abc6eb9eff1cf8e
#     2022-12-18 10:16:55   2053863070039f16cebe_name Leselampe 2
#     2022-12-18 10:16:55   2053863070039f16cebe_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:11   2053863070039f16cebe_version 3.3
#     2022-12-18 10:16:59   2053863070039f16cef8_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/d6d1396a4acbafed7c7542c7bddc2fff.png
#     2022-12-18 10:16:59   2053863070039f16cef8_id 2053863070039f16cef8
#     2022-12-18 10:17:13   2053863070039f16cef8_ip offline
#     2022-12-18 10:16:59   2053863070039f16cef8_localkey eaa0119565b42c6c
#     2022-12-18 10:16:59   2053863070039f16cef8_name Soundbar Wohnzimmer
#     2022-12-18 10:16:59   2053863070039f16cef8_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:13   2053863070039f16cef8_version 3.3
#     2022-12-18 10:16:57   2053863070039f179683_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/d6d1396a4acbafed7c7542c7bddc2fff.png
#     2022-12-18 10:16:57   2053863070039f179683_id 2053863070039f179683
#     2022-12-18 10:17:12   2053863070039f179683_ip 192.168.9.59
#     2022-12-18 10:16:57   2053863070039f179683_localkey 8c15546d598a51f9
#     2022-12-18 10:16:57   2053863070039f179683_name Medien Wohnzimmer
#     2022-12-18 10:16:57   2053863070039f179683_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:12   2053863070039f179683_version 3.3
#     2022-12-18 10:16:58   20538630c44f33f7b2b6_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/d6d1396a4acbafed7c7542c7bddc2fff.png
#     2022-12-18 10:16:58   20538630c44f33f7b2b6_id 20538630c44f33f7b2b6
#     2022-12-18 10:17:13   20538630c44f33f7b2b6_ip offline
#     2022-12-18 10:16:58   20538630c44f33f7b2b6_localkey b2b021b05d25903e
#     2022-12-18 10:16:58   20538630c44f33f7b2b6_name Kaffeemaschine Thomas
#     2022-12-18 10:16:58   20538630c44f33f7b2b6_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:13   20538630c44f33f7b2b6_version 3.3
#     2022-12-18 10:17:01   21410806cc50e37bdb15_icon https://images.tuyaeu.com/smart/icon/dj.png
#     2022-12-18 10:17:01   21410806cc50e37bdb15_id 21410806cc50e37bdb15
#     2022-12-18 10:17:14   21410806cc50e37bdb15_ip offline
#     2022-12-18 10:17:01   21410806cc50e37bdb15_localkey b2caca9dc178ec87
#     2022-12-18 10:17:01   21410806cc50e37bdb15_name Dimmer 2
#     2022-12-18 10:17:01   21410806cc50e37bdb15_productid bSXSSFArVKtc4DyC
#     2022-12-18 10:17:14   21410806cc50e37bdb15_version 3.3
#     2022-12-18 10:16:54   22230808807d3a231039_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808807d3a231039163415814096745.png
#     2022-12-18 10:16:54   22230808807d3a231039_id 22230808807d3a231039
#     2022-12-18 10:17:10   22230808807d3a231039_ip 192.168.9.68
#     2022-12-18 10:16:54   22230808807d3a231039_localkey fbcb762730c39536
#     2022-12-18 10:16:54   22230808807d3a231039_name NAS Schreibtisch
#     2022-12-18 10:16:54   22230808807d3a231039_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:10   22230808807d3a231039_version 3.1
#     2022-12-18 10:16:56   22230808807d3a23186b_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808807d3a23186b163415762424492.png
#     2022-12-18 10:16:56   22230808807d3a23186b_id 22230808807d3a23186b
#     2022-12-18 10:17:11   22230808807d3a23186b_ip 192.168.9.87
#     2022-12-18 10:16:56   22230808807d3a23186b_localkey a2693a5844ce166d
#     2022-12-18 10:16:56   22230808807d3a23186b_name JL04 BKT3
#     2022-12-18 10:16:56   22230808807d3a23186b_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:11   22230808807d3a23186b_version 3.1
#     2022-12-18 10:16:56   2223080884f3eb466414_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/2223080884f3eb466414163417857767272.png
#     2022-12-18 10:16:56   2223080884f3eb466414_id 2223080884f3eb466414
#     2022-12-18 10:17:11   2223080884f3eb466414_ip 192.168.9.75
#     2022-12-18 10:16:56   2223080884f3eb466414_localkey 824ea2c9d41a3ec1
#     2022-12-18 10:16:56   2223080884f3eb466414_name Kaffeemaschine Küche
#     2022-12-18 10:16:56   2223080884f3eb466414_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:11   2223080884f3eb466414_version 3.1
#     2022-12-18 10:16:59   22230808bcddc2135068_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808bcddc2135068163417805835187.png
#     2022-12-18 10:16:59   22230808bcddc2135068_id 22230808bcddc2135068
#     2022-12-18 10:17:13   22230808bcddc2135068_ip offline
#     2022-12-18 10:16:59   22230808bcddc2135068_localkey c0aa3a00c215aa39
#     2022-12-18 10:16:59   22230808bcddc2135068_name Fernseher Wohnzimmer
#     2022-12-18 10:16:59   22230808bcddc2135068_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:13   22230808bcddc2135068_version 3.3
#     2022-12-18 10:16:58   22230808bcddc2135132_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808bcddc2135132163415768180381.png
#     2022-12-18 10:16:58   22230808bcddc2135132_id 22230808bcddc2135132
#     2022-12-18 10:17:13   22230808bcddc2135132_ip 192.168.9.99
#     2022-12-18 10:16:58   22230808bcddc2135132_localkey b7b7f3b3a75bce96
#     2022-12-18 10:16:58   22230808bcddc2135132_name Schreibtisch Petra
#     2022-12-18 10:16:58   22230808bcddc2135132_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:13   22230808bcddc2135132_version 3.1
#     2022-12-18 10:16:54   22230808bcddc2135137_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808bcddc2135137163415758338185.png
#     2022-12-18 10:16:54   22230808bcddc2135137_id 22230808bcddc2135137
#     2022-12-18 10:17:10   22230808bcddc2135137_ip 192.168.9.84
#     2022-12-18 10:16:54   22230808bcddc2135137_localkey 5b9b6cd11ad3eab4
#     2022-12-18 10:16:54   22230808bcddc2135137_name JL07 BKT2
#     2022-12-18 10:16:54   22230808bcddc2135137_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:10   22230808bcddc2135137_version 3.1
#     2022-12-18 10:16:54   22230808bcddc213f838_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808bcddc213f83816341577256478.png
#     2022-12-18 10:16:54   22230808bcddc213f838_id 22230808bcddc213f838
#     2022-12-18 10:17:10   22230808bcddc213f838_ip 192.168.9.66
#     2022-12-18 10:16:54   22230808bcddc213f838_localkey f4a3b7649a5e4fd8
#     2022-12-18 10:16:54   22230808bcddc213f838_name JL06 frei
#     2022-12-18 10:16:54   22230808bcddc213f838_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:10   22230808bcddc213f838_version 3.1
#     2022-12-18 10:16:55   260064612462ab24f164_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:55   260064612462ab24f164_id 260064612462ab24f164
#     2022-12-18 10:17:10   260064612462ab24f164_ip 192.168.9.33
#     2022-12-18 10:16:55   260064612462ab24f164_localkey b37a96597e2837b4
#     2022-12-18 10:16:55   260064612462ab24f164_name SP3 Kühlschrank Küche
#     2022-12-18 10:16:55   260064612462ab24f164_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   260064612462ab24f164_version 3.3
#     2022-12-18 10:16:55   260064612cf432ca55d8_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:55   260064612cf432ca55d8_id 260064612cf432ca55d8
#     2022-12-18 10:17:10   260064612cf432ca55d8_ip 192.168.9.31
#     2022-12-18 10:16:55   260064612cf432ca55d8_localkey 52a00c366067a6f7
#     2022-12-18 10:16:55   260064612cf432ca55d8_name SP1 Waschmaschine
#     2022-12-18 10:16:55   260064612cf432ca55d8_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   260064612cf432ca55d8_version 3.3
#     2022-12-18 10:16:56   30180616dc4f22fc97ae_icon https://images.tuyaeu.com/smart/icon/1553220447w51qc6eyig_0.jpg
#     2022-12-18 10:16:56   30180616dc4f22fc97ae_id 30180616dc4f22fc97ae
#     2022-12-18 10:17:11   30180616dc4f22fc97ae_ip 192.168.9.28
#     2022-12-18 10:16:56   30180616dc4f22fc97ae_localkey 146b39d4a5992d2f
#     2022-12-18 10:16:56   30180616dc4f22fc97ae_name Kleiderschrank 1
#     2022-12-18 10:16:56   30180616dc4f22fc97ae_productid ON0fHlAaAf7Pt7ja
#     2022-12-18 10:17:11   30180616dc4f22fc97ae_version 3.1
#     2022-12-18 10:16:54   30180616dc4f22fc986a_icon https://images.tuyaeu.com/smart/icon/1553220447w51qc6eyig_0.jpg
#     2022-12-18 10:16:54   30180616dc4f22fc986a_id 30180616dc4f22fc986a
#     2022-12-18 10:17:10   30180616dc4f22fc986a_ip 192.168.9.42
#     2022-12-18 10:16:54   30180616dc4f22fc986a_localkey fe51534f379b27c0
#     2022-12-18 10:16:54   30180616dc4f22fc986a_name Springbrunnen
#     2022-12-18 10:16:54   30180616dc4f22fc986a_productid ON0fHlAaAf7Pt7ja
#     2022-12-18 10:17:10   30180616dc4f22fc986a_version 3.1
#     2022-12-18 10:16:57   30180616dc4f22fc9a71_icon https://images.tuyaeu.com/smart/icon/1553220447w51qc6eyig_0.jpg
#     2022-12-18 10:16:57   30180616dc4f22fc9a71_id 30180616dc4f22fc9a71
#     2022-12-18 10:17:12   30180616dc4f22fc9a71_ip 192.168.9.41
#     2022-12-18 10:16:57   30180616dc4f22fc9a71_localkey 3fd05440412ec1f5
#     2022-12-18 10:16:57   30180616dc4f22fc9a71_name Küche Herd
#     2022-12-18 10:16:57   30180616dc4f22fc9a71_productid ON0fHlAaAf7Pt7ja
#     2022-12-18 10:17:12   30180616dc4f22fc9a71_version 3.1
#     2022-12-18 10:16:57   30510063d8bfc00b396b_icon https://images.tuyaeu.com/smart/icon/ay1530852819489IlyEr/2095506b84aecb16a843c2d04b4ccd61.png
#     2022-12-18 10:16:57   30510063d8bfc00b396b_id 30510063d8bfc00b396b
#     2022-12-18 10:17:12   30510063d8bfc00b396b_ip 192.168.9.40
#     2022-12-18 10:16:57   30510063d8bfc00b396b_localkey d559d18f36e9d325
#     2022-12-18 10:16:57   30510063d8bfc00b396b_name Schlafzimmer oben
#     2022-12-18 10:16:57   30510063d8bfc00b396b_productid 6agmomauevaw5zav
#     2022-12-18 10:17:12   30510063d8bfc00b396b_version 3.3
#     2022-12-18 10:16:57   3367036770039f60c576_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/3367036770039f60c576163417966053451.png
#     2022-12-18 10:16:57   3367036770039f60c576_id 3367036770039f60c576
#     2022-12-18 10:17:12   3367036770039f60c576_ip 192.168.9.27
#     2022-12-18 10:16:57   3367036770039f60c576_localkey 628b38730b4c06e3
#     2022-12-18 10:16:57   3367036770039f60c576_name Steckdose Garage 1
#     2022-12-18 10:16:57   3367036770039f60c576_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   3367036770039f60c576_version 3.3
#     2022-12-18 10:16:57   3367036770039f60ce2b_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:57   3367036770039f60ce2b_id 3367036770039f60ce2b
#     2022-12-18 10:17:12   3367036770039f60ce2b_ip 192.168.9.62
#     2022-12-18 10:16:57   3367036770039f60ce2b_localkey 7322892db7dfa5bd
#     2022-12-18 10:16:57   3367036770039f60ce2b_name USB Lader 1 Thomas
#     2022-12-18 10:16:57   3367036770039f60ce2b_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   3367036770039f60ce2b_version 3.3
#     2022-12-18 10:16:57   3367036770039f613620_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:57   3367036770039f613620_id 3367036770039f613620
#     2022-12-18 10:17:12   3367036770039f613620_ip 192.168.9.81
#     2022-12-18 10:16:57   3367036770039f613620_localkey 9ef95a16eea43688
#     2022-12-18 10:16:57   3367036770039f613620_name USB Lader 2 Thomas
#     2022-12-18 10:16:57   3367036770039f613620_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   3367036770039f613620_version 3.3
#     2022-12-18 10:16:57   33670367c4dd573813d8_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:57   33670367c4dd573813d8_id 33670367c4dd573813d8
#     2022-12-18 10:17:12   33670367c4dd573813d8_ip 192.168.9.38
#     2022-12-18 10:16:57   33670367c4dd573813d8_localkey 89b8de9eed9ef579
#     2022-12-18 10:16:57   33670367c4dd573813d8_name USB Lader 3 Thomas
#     2022-12-18 10:16:57   33670367c4dd573813d8_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   33670367c4dd573813d8_version 3.3
#     2022-12-18 10:16:59   34602852ecfabc47cbe1_icon https://images.tuyaeu.com/smart/product_icon/qt.png
#     2022-12-18 10:16:59   34602852ecfabc47cbe1_id 34602852ecfabc47cbe1
#     2022-12-18 10:17:13   34602852ecfabc47cbe1_ip offline
#     2022-12-18 10:16:59   34602852ecfabc47cbe1_localkey d06e40ee498060c8
#     2022-12-18 10:16:59   34602852ecfabc47cbe1_name Rolltor
#     2022-12-18 10:16:59   34602852ecfabc47cbe1_productid 7by9ERqg60JA8wxA
#     2022-12-18 10:17:13   34602852ecfabc47cbe1_version 3.3
#     2022-12-18 10:16:54   41888155dc4f229d95af_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   41888155dc4f229d95af_id 41888155dc4f229d95af
#     2022-12-18 10:17:10   41888155dc4f229d95af_ip 192.168.9.36
#     2022-12-18 10:16:54   41888155dc4f229d95af_localkey b54391dbd2d9f161
#     2022-12-18 10:16:54   41888155dc4f229d95af_name SP06 EX18
#     2022-12-18 10:16:54   41888155dc4f229d95af_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   41888155dc4f229d95af_version 3.3
#     2022-12-18 10:16:56   44277377840d8e5e47c8_icon https://images.tuyaeu.com/smart/icon/1504185916_0.png
#     2022-12-18 10:16:56   44277377840d8e5e47c8_id 44277377840d8e5e47c8
#     2022-12-18 10:17:11   44277377840d8e5e47c8_ip offline
#     2022-12-18 10:16:56   44277377840d8e5e47c8_localkey 5cdad42a6c79ca1f
#     2022-12-18 10:16:56   44277377840d8e5e47c8_name PS5 Garage
#     2022-12-18 10:16:56   44277377840d8e5e47c8_productid D7Hl3AxFbHDS98iO
#     2022-12-18 10:17:11   44277377840d8e5e47c8_version 3.3
#     2022-12-18 10:16:59   453005615002911dfe06_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/453005615002911dfe06163417957708355.png
#     2022-12-18 10:16:59   453005615002911dfe06_id 453005615002911dfe06
#     2022-12-18 10:17:13   453005615002911dfe06_ip 192.168.9.54
#     2022-12-18 10:16:59   453005615002911dfe06_localkey db41567569a265b4
#     2022-12-18 10:16:59   453005615002911dfe06_name Heizkissen 2
#     2022-12-18 10:16:59   453005615002911dfe06_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   453005615002911dfe06_version 3.3
#     2022-12-18 10:16:55   453005615002911e00b4_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:55   453005615002911e00b4_id 453005615002911e00b4
#     2022-12-18 10:17:11   453005615002911e00b4_ip 192.168.9.73
#     2022-12-18 10:16:55   453005615002911e00b4_localkey 82a5beef86e160cd
#     2022-12-18 10:16:55   453005615002911e00b4_name USB Lader 5 Bett
#     2022-12-18 10:16:55   453005615002911e00b4_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:11   453005615002911e00b4_version 3.3
#     2022-12-18 10:16:59   4530056170039f4a808b_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/4530056170039f4a808b163417934465521.png
#     2022-12-18 10:16:59   4530056170039f4a808b_id 4530056170039f4a808b
#     2022-12-18 10:17:13   4530056170039f4a808b_ip offline
#     2022-12-18 10:16:59   4530056170039f4a808b_localkey 35a617145fa97b06
#     2022-12-18 10:16:59   4530056170039f4a808b_name Leselampe 4
#     2022-12-18 10:16:59   4530056170039f4a808b_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   4530056170039f4a808b_version 3.3
#     2022-12-18 10:16:59   4530056170039f4a87e5_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:59   4530056170039f4a87e5_id 4530056170039f4a87e5
#     2022-12-18 10:17:13   4530056170039f4a87e5_ip offline
#     2022-12-18 10:16:59   4530056170039f4a87e5_localkey 2204c23a9c30d10b
#     2022-12-18 10:16:59   4530056170039f4a87e5_name Heizdecke 1
#     2022-12-18 10:16:59   4530056170039f4a87e5_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   4530056170039f4a87e5_version 3.3
#     2022-12-18 10:16:57   47104178dc4f2236e437_icon https://images.tuyaeu.com/smart/icon/1526403552c7uw51lvs7lmwf8ljr2qllq5mi_0.png
#     2022-12-18 10:16:57   47104178dc4f2236e437_id 47104178dc4f2236e437
#     2022-12-18 10:17:12   47104178dc4f2236e437_ip 192.168.9.51
#     2022-12-18 10:16:57   47104178dc4f2236e437_localkey bc16d1d29f2b2c9e
#     2022-12-18 10:16:57   47104178dc4f2236e437_name Garagentor
#     2022-12-18 10:16:57   47104178dc4f2236e437_productid ld4GRDxQZZ2NAnk6
#     2022-12-18 10:17:12   47104178dc4f2236e437_version 3.1
#     2022-12-18 10:16:55   50134218c4dd571b3390_icon https://images.tuyaeu.com/smart/icon/1555585425a1oqvs7elur_0.jpg
#     2022-12-18 10:16:55   50134218c4dd571b3390_id 50134218c4dd571b3390
#     2022-12-18 10:17:10   50134218c4dd571b3390_ip offline
#     2022-12-18 10:16:55   50134218c4dd571b3390_localkey fce75597b4421601
#     2022-12-18 10:16:55   50134218c4dd571b3390_name PS7 zbV
#     2022-12-18 10:16:55   50134218c4dd571b3390_productid gl5fdiv1tc9mkvlp
#     2022-12-18 10:17:10   50134218c4dd571b3390_version 3.3
#     2022-12-18 10:16:59   5062137624a1600b6d62_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:59   5062137624a1600b6d62_id 5062137624a1600b6d62
#     2022-12-18 10:17:13   5062137624a1600b6d62_ip offline
#     2022-12-18 10:16:59   5062137624a1600b6d62_localkey d029f7f52f9fbec5
#     2022-12-18 10:16:59   5062137624a1600b6d62_name Heizdecke 2
#     2022-12-18 10:16:59   5062137624a1600b6d62_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   5062137624a1600b6d62_version 3.3
#     2022-12-18 10:16:57   5062137624a1600b9479_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/5062137624a1600b9479163417873444451.png
#     2022-12-18 10:16:57   5062137624a1600b9479_id 5062137624a1600b9479
#     2022-12-18 10:17:12   5062137624a1600b9479_ip 192.168.9.26
#     2022-12-18 10:16:57   5062137624a1600b9479_localkey 6e11e14987828d1c
#     2022-12-18 10:16:57   5062137624a1600b9479_name Duravit Bidet
#     2022-12-18 10:16:57   5062137624a1600b9479_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   5062137624a1600b9479_version 3.3
#     2022-12-18 10:16:59   50621376c4dd57125717_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/50621376c4dd5712571716341794176501.png
#     2022-12-18 10:16:59   50621376c4dd57125717_id 50621376c4dd57125717
#     2022-12-18 10:17:13   50621376c4dd57125717_ip offline
#     2022-12-18 10:16:59   50621376c4dd57125717_localkey e61c8eb5d24cf300
#     2022-12-18 10:16:59   50621376c4dd57125717_name Leselampe 5
#     2022-12-18 10:16:59   50621376c4dd57125717_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   50621376c4dd57125717_version 3.3
#     2022-12-18 10:16:59   50621376c4dd57131135_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/50621376c4dd57131135163417952893779.png
#     2022-12-18 10:16:59   50621376c4dd57131135_id 50621376c4dd57131135
#     2022-12-18 10:17:13   50621376c4dd57131135_ip 192.168.9.92
#     2022-12-18 10:16:59   50621376c4dd57131135_localkey f215d22a78c5f9ba
#     2022-12-18 10:16:59   50621376c4dd57131135_name Heizkissen 1
#     2022-12-18 10:16:59   50621376c4dd57131135_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   50621376c4dd57131135_version 3.3
#     2022-12-18 10:17:01   50880180840d8e87664b_icon https://images.tuyaeu.com/smart/icon/1528364839bqwi2byfbhv_0.png
#     2022-12-18 10:17:01   50880180840d8e87664b_id 50880180840d8e87664b
#     2022-12-18 10:17:14   50880180840d8e87664b_ip offline
#     2022-12-18 10:17:01   50880180840d8e87664b_localkey fec41c3edc0c787d
#     2022-12-18 10:17:01   50880180840d8e87664b_name Wassersensor 2 Heizraum
#     2022-12-18 10:17:01   50880180840d8e87664b_productid SmFKLTOcGHbPQvmh
#     2022-12-18 10:17:14   50880180840d8e87664b_version 3.3
#     2022-12-18 10:17:01   50880180cc50e30c4c90_icon https://images.tuyaeu.com/smart/icon/1528364839bqwi2byfbhv_0.png
#     2022-12-18 10:17:01   50880180cc50e30c4c90_id 50880180cc50e30c4c90
#     2022-12-18 10:17:14   50880180cc50e30c4c90_ip offline
#     2022-12-18 10:17:01   50880180cc50e30c4c90_localkey 9b7df3fc66763e8b
#     2022-12-18 10:17:01   50880180cc50e30c4c90_name Wassersensor 3 Waschmaschine
#     2022-12-18 10:17:01   50880180cc50e30c4c90_productid SmFKLTOcGHbPQvmh
#     2022-12-18 10:17:14   50880180cc50e30c4c90_version 3.3
#     2022-12-18 10:17:00   50880180cc50e30cbe91_icon https://images.tuyaeu.com/smart/icon/1528364839bqwi2byfbhv_0.png
#     2022-12-18 10:17:00   50880180cc50e30cbe91_id 50880180cc50e30cbe91
#     2022-12-18 10:17:14   50880180cc50e30cbe91_ip offline
#     2022-12-18 10:17:00   50880180cc50e30cbe91_localkey 7db73073d587d531
#     2022-12-18 10:17:00   50880180cc50e30cbe91_name Wassersensor 1 Küche
#     2022-12-18 10:17:00   50880180cc50e30cbe91_productid SmFKLTOcGHbPQvmh
#     2022-12-18 10:17:14   50880180cc50e30cbe91_version 3.3
#     2022-12-18 10:16:56   52470320e09806c9a53f_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:56   52470320e09806c9a53f_id 52470320e09806c9a53f
#     2022-12-18 10:17:11   52470320e09806c9a53f_ip 192.168.9.70
#     2022-12-18 10:16:56   52470320e09806c9a53f_localkey b3ec7f7a682799d4
#     2022-12-18 10:16:56   52470320e09806c9a53f_name SP13 THOMAS Süd2 Schreibtisch
#     2022-12-18 10:16:56   52470320e09806c9a53f_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   52470320e09806c9a53f_version 3.3
#     2022-12-18 10:16:54   60020372840d8e6f937a_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   60020372840d8e6f937a_id 60020372840d8e6f937a
#     2022-12-18 10:17:10   60020372840d8e6f937a_ip 192.168.9.47
#     2022-12-18 10:16:54   60020372840d8e6f937a_localkey 026c4f068bfdc97f
#     2022-12-18 10:16:54   60020372840d8e6f937a_name SP05 EX17
#     2022-12-18 10:16:54   60020372840d8e6f937a_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   60020372840d8e6f937a_version 3.3
#     2022-12-18 10:16:59   60381718500291bade80_icon https://images.tuyaeu.com/smart/icon/1528364671b3tgndtkqr_0.png
#     2022-12-18 10:16:59   60381718500291bade80_id 60381718500291bade80
#     2022-12-18 10:17:13   60381718500291bade80_ip offline
#     2022-12-18 10:16:59   60381718500291bade80_localkey 8c17a8415057e4a7
#     2022-12-18 10:16:59   60381718500291bade80_name Haustüre
#     2022-12-18 10:16:59   60381718500291bade80_productid 6l4vhjl3gttstgxj
#     2022-12-18 10:17:13   60381718500291bade80_version 3.3
#     2022-12-18 10:16:54   60381718807d3a01eb63_icon https://images.tuyaeu.com/smart/icon/1528364671b3tgndtkqr_0.png
#     2022-12-18 10:16:54   60381718807d3a01eb63_id 60381718807d3a01eb63
#     2022-12-18 10:17:09   60381718807d3a01eb63_ip offline
#     2022-12-18 10:16:54   60381718807d3a01eb63_localkey 60d7c07cc350d317
#     2022-12-18 10:16:54   60381718807d3a01eb63_name Türsensor 3
#     2022-12-18 10:16:54   60381718807d3a01eb63_productid 6l4vhjl3gttstgxj
#     2022-12-18 10:17:09   60381718807d3a01eb63_version 3.3
#     2022-12-18 10:17:00   60381718807d3a04bbb4_icon https://images.tuyaeu.com/smart/icon/1528364671b3tgndtkqr_0.png
#     2022-12-18 10:17:00   60381718807d3a04bbb4_id 60381718807d3a04bbb4
#     2022-12-18 10:17:14   60381718807d3a04bbb4_ip offline
#     2022-12-18 10:17:00   60381718807d3a04bbb4_localkey 0b6ade2172baef93
#     2022-12-18 10:17:00   60381718807d3a04bbb4_name Türsensor 2
#     2022-12-18 10:17:00   60381718807d3a04bbb4_productid 6l4vhjl3gttstgxj
#     2022-12-18 10:17:14   60381718807d3a04bbb4_version 3.3
#     2022-12-18 10:16:55   620661512462ab30ddbd_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:55   620661512462ab30ddbd_id 620661512462ab30ddbd
#     2022-12-18 10:17:11   620661512462ab30ddbd_ip 192.168.9.35
#     2022-12-18 10:16:55   620661512462ab30ddbd_localkey 9faac636188ff4ef
#     2022-12-18 10:16:55   620661512462ab30ddbd_name Medien Petra
#     2022-12-18 10:16:55   620661512462ab30ddbd_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   620661512462ab30ddbd_version 3.3
#     2022-12-18 10:16:56   62066151d8f15bb08810_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:56   62066151d8f15bb08810_id 62066151d8f15bb08810
#     2022-12-18 10:17:11   62066151d8f15bb08810_ip 192.168.9.72
#     2022-12-18 10:16:56   62066151d8f15bb08810_localkey 0f67904fe7677fb8
#     2022-12-18 10:16:56   62066151d8f15bb08810_name SP11 THOMAS Ost
#     2022-12-18 10:16:56   62066151d8f15bb08810_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   62066151d8f15bb08810_version 3.3
#     2022-12-18 10:16:54   62066151d8f15bdec539_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   62066151d8f15bdec539_id 62066151d8f15bdec539
#     2022-12-18 10:17:10   62066151d8f15bdec539_ip 192.168.9.29
#     2022-12-18 10:16:54   62066151d8f15bdec539_localkey 6bd97fc327e7f057
#     2022-12-18 10:16:54   62066151d8f15bdec539_name SP07 Garagenkeller
#     2022-12-18 10:16:54   62066151d8f15bdec539_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   62066151d8f15bdec539_version 3.3
#     2022-12-18 10:17:00   627425735002915f502b_icon https://images.tuyaeu.com/smart/icon/ay1524194438166Zg2hZ/c3db264e1bc8e6ab11cf88171e87dc39.jpg
#     2022-12-18 10:17:00   627425735002915f502b_id 627425735002915f502b
#     2022-12-18 10:17:14   627425735002915f502b_ip offline
#     2022-12-18 10:17:00   627425735002915f502b_localkey 6b53e2230bf927f2
#     2022-12-18 10:17:00   627425735002915f502b_name PIR Sensor 2
#     2022-12-18 10:17:00   627425735002915f502b_productid XFD2nSDKxFlGV5sV
#     2022-12-18 10:17:14   627425735002915f502b_version 3.3
#     2022-12-18 10:16:58   63667231840d8e501cab_icon https://images.tuyaeu.com/smart/icon/1504185916_0.png
#     2022-12-18 10:16:58   63667231840d8e501cab_id 63667231840d8e501cab
#     2022-12-18 10:17:13   63667231840d8e501cab_ip offline
#     2022-12-18 10:16:58   63667231840d8e501cab_localkey a801e4c40666c1e8
#     2022-12-18 10:16:58   63667231840d8e501cab_name PS4 Schreibtisch Petra
#     2022-12-18 10:16:58   63667231840d8e501cab_productid D7Hl3AxFbHDS98iO
#     2022-12-18 10:17:13   63667231840d8e501cab_version 3.3
#     2022-12-18 10:16:54   63667231dc4f22f329f1_icon https://images.tuyaeu.com/smart/icon/1504185916_0.png
#     2022-12-18 10:16:54   63667231dc4f22f329f1_id 63667231dc4f22f329f1
#     2022-12-18 10:17:10   63667231dc4f22f329f1_ip 192.168.9.89
#     2022-12-18 10:16:54   63667231dc4f22f329f1_localkey dd15e495a74e7d69
#     2022-12-18 10:16:54   63667231dc4f22f329f1_name PS2 ESSEN
#     2022-12-18 10:16:54   63667231dc4f22f329f1_productid D7Hl3AxFbHDS98iO
#     2022-12-18 10:17:10   63667231dc4f22f329f1_version 3.1
#     2022-12-18 10:16:58   63667231dc4f22f32f01_icon https://images.tuyaeu.com/smart/icon/1504185916_0.png
#     2022-12-18 10:16:58   63667231dc4f22f32f01_id 63667231dc4f22f32f01
#     2022-12-18 10:17:13   63667231dc4f22f32f01_ip offline
#     2022-12-18 10:16:58   63667231dc4f22f32f01_localkey 565c70fe237fc932
#     2022-12-18 10:16:58   63667231dc4f22f32f01_name PS1 Thomas Media
#     2022-12-18 10:16:58   63667231dc4f22f32f01_productid D7Hl3AxFbHDS98iO
#     2022-12-18 10:17:13   63667231dc4f22f32f01_version 3.3
#     2022-12-18 10:16:54   67242256f4cfa2ce1662_icon https://images.tuyaeu.com/smart/icon/1551969519maq7h6mi1l_0.jpg
#     2022-12-18 10:16:54   67242256f4cfa2ce1662_id 67242256f4cfa2ce1662
#     2022-12-18 10:17:09   67242256f4cfa2ce1662_ip offline
#     2022-12-18 10:16:54   67242256f4cfa2ce1662_localkey 20a826d3c4d36122
#     2022-12-18 10:16:54   67242256f4cfa2ce1662_name TürSensor 4
#     2022-12-18 10:16:54   67242256f4cfa2ce1662_productid hx5ztlztij4yxxvg
#     2022-12-18 10:17:09   67242256f4cfa2ce1662_version 3.3
#     2022-12-18 10:16:59   720570712462ab27e625_icon https://images.tuyaeu.com/smart/program_category_icon/cz.png
#     2022-12-18 10:16:59   720570712462ab27e625_id 720570712462ab27e625
#     2022-12-18 10:17:13   720570712462ab27e625_ip offline
#     2022-12-18 10:16:59   720570712462ab27e625_localkey 61a68dcc87fc6592
#     2022-12-18 10:16:59   720570712462ab27e625_name Steckdose 4
#     2022-12-18 10:16:59   720570712462ab27e625_productid namu1lshm4jrx1td
#     2022-12-18 10:17:13   720570712462ab27e625_version 3.3
#     2022-12-18 10:17:00   720570712462ab280270_icon https://images.tuyaeu.com/smart/program_category_icon/cz.png
#     2022-12-18 10:17:00   720570712462ab280270_id 720570712462ab280270
#     2022-12-18 10:17:14   720570712462ab280270_ip offline
#     2022-12-18 10:17:00   720570712462ab280270_localkey 4dd2676f4fa16db6
#     2022-12-18 10:17:00   720570712462ab280270_name Steckdose 3
#     2022-12-18 10:17:00   720570712462ab280270_productid namu1lshm4jrx1td
#     2022-12-18 10:17:14   720570712462ab280270_version 3.3
#     2022-12-18 10:17:00   743066432cf43267661d_icon https://images.tuyaeu.com/smart/icon/ay1524194438166Zg2hZ/c3db264e1bc8e6ab11cf88171e87dc39.jpg
#     2022-12-18 10:17:00   743066432cf43267661d_id 743066432cf43267661d
#     2022-12-18 10:17:14   743066432cf43267661d_ip offline
#     2022-12-18 10:17:00   743066432cf43267661d_localkey a4d341ce9f636bf9
#     2022-12-18 10:17:00   743066432cf43267661d_name PIR Sensor 3
#     2022-12-18 10:17:00   743066432cf43267661d_productid XFD2nSDKxFlGV5sV
#     2022-12-18 10:17:14   743066432cf43267661d_version 3.3
#     2022-12-18 10:16:57   8513738324a1601779dd_icon https://images.tuyaeu.com/smart/icon/1553220447w51qc6eyig_0.jpg
#     2022-12-18 10:16:57   8513738324a1601779dd_id 8513738324a1601779dd
#     2022-12-18 10:17:12   8513738324a1601779dd_ip 192.168.9.20
#     2022-12-18 10:16:57   8513738324a1601779dd_localkey 108105c3b1a447be
#     2022-12-18 10:16:57   8513738324a1601779dd_name Kleiderschrank 2
#     2022-12-18 10:16:57   8513738324a1601779dd_productid ON0fHlAaAf7Pt7ja
#     2022-12-18 10:17:12   8513738324a1601779dd_version 3.3
#     2022-12-18 10:17:00   853556472cf4326e60da_icon https://images.tuyaeu.com/smart/icon/ay1524194438166Zg2hZ/c3db264e1bc8e6ab11cf88171e87dc39.jpg
#     2022-12-18 10:17:00   853556472cf4326e60da_id 853556472cf4326e60da
#     2022-12-18 10:17:14   853556472cf4326e60da_ip offline
#     2022-12-18 10:17:00   853556472cf4326e60da_localkey 9623196e257884f7
#     2022-12-18 10:17:00   853556472cf4326e60da_name PIR Sensor 1
#     2022-12-18 10:17:00   853556472cf4326e60da_productid XFD2nSDKxFlGV5sV
#     2022-12-18 10:17:14   853556472cf4326e60da_version 3.3
#     2022-12-18 10:16:58   8877821724a16014a898_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2022-12-18 10:16:58   8877821724a16014a898_id 8877821724a16014a898
#     2022-12-18 10:17:12   8877821724a16014a898_ip 192.168.9.65
#     2022-12-18 10:16:58   8877821724a16014a898_localkey 1eb1f8bf71957568
#     2022-12-18 10:16:58   8877821724a16014a898_name Medien THOMAS
#     2022-12-18 10:16:58   8877821724a16014a898_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   8877821724a16014a898_version 3.3
#     2022-12-18 10:16:57   8877821724a16014ef14_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2022-12-18 10:16:57   8877821724a16014ef14_id 8877821724a16014ef14
#     2022-12-18 10:17:12   8877821724a16014ef14_ip 192.168.9.93
#     2022-12-18 10:16:57   8877821724a16014ef14_localkey f3ac3693f76b2a96
#     2022-12-18 10:16:57   8877821724a16014ef14_name GL AXT1800 JL35
#     2022-12-18 10:16:57   8877821724a16014ef14_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   8877821724a16014ef14_version 3.3
#     2022-12-18 10:16:54   8877821724a160150bef_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2022-12-18 10:16:54   8877821724a160150bef_id 8877821724a160150bef
#     2022-12-18 10:17:10   8877821724a160150bef_ip 192.168.9.112
#     2022-12-18 10:16:54   8877821724a160150bef_localkey 76bba760eda63914
#     2022-12-18 10:16:54   8877821724a160150bef_name JL36 EX15 Fritzbox
#     2022-12-18 10:16:54   8877821724a160150bef_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:10   8877821724a160150bef_version 3.3
#     2022-12-18 10:16:55   8877821724a160151069_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2022-12-18 10:16:55   8877821724a160151069_id 8877821724a160151069
#     2022-12-18 10:17:11   8877821724a160151069_ip 192.168.9.63
#     2022-12-18 10:16:55   8877821724a160151069_localkey c57e219a20d5e0bf
#     2022-12-18 10:16:55   8877821724a160151069_name Schreibtisch Thomas
#     2022-12-18 10:16:55   8877821724a160151069_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:11   8877821724a160151069_version 3.3
#     2022-12-18 10:17:00   887800042cf4325f15ef_icon https://images.tuyaeu.com/smart/icon/dj.png
#     2022-12-18 10:17:00   887800042cf4325f15ef_id 887800042cf4325f15ef
#     2022-12-18 10:17:14   887800042cf4325f15ef_ip offl
# ... truncated to 50k, original length 125242
[/code]


das sieht schon mal gut aus ...
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 18 Dezember 2022, 11:08:27
Bitte noch api Key/secret in Post löschen. ;)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 18 Dezember 2022, 11:11:59
2 Temperaturdevices wurden nicht gefunden

product_id
7akwzwfwhukkdsib
2022-12-18 10:16:13
product_name
T & H Sensor

product_id
jy3ue7qz0zcmmizf
2022-12-18 10:16:13
product_name
Diivoo WiFi Thermometer Hygrometer

und nun passe ich mal fleißig meine SVGS, rooms, gruppen und readinintervals an  ..... ist ja einmalig?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 18 Dezember 2022, 11:16:19
Die 2 Devices verbinden sich wahrscheinlich nicht dauernd mit dem WiFi. Die musst du dann mit statischer IP definieren und diese im Define hinterlegen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 18 Dezember 2022, 11:43:43
ok .. mache ich

was ist das im Log :

2022.12.18 11:21:56 1: PERL WARNING: Deep recursion on subroutine "main::CallFn" at fhem.pl line 3888.
2022.12.18 11:21:57 1: PERL WARNING: Deep recursion on subroutine "main::BindingsIo_readWebsocketMessage" at ./FHEM/10_BindingsIo.pm line 409.
2022.12.18 11:21:57 1: PERL WARNING: Deep recursion on subroutine "main::BindingsIo_processMessage" at ./FHEM/10_BindingsIo.pm line 676.
2022.12.18 11:21:57 1: PERL WARNING: Deep recursion on subroutine "main::BindingsIo_readWebsocketMessage" at ./FHEM/10_BindingsIo.pm line 425.
2022.12.18 11:21:57 1: PERL WARNING: Deep recursion on subroutine "main::readingsEndUpdate" at (eval 3507) line 1.
2022.12.18 11:21:57 1: PERL WARNING: Deep recursion on subroutine "main::DoTrigger" at fhem.pl line 4995.
2022.12.18 11:21:57 1: PERL WARNING: Deep recursion on subroutine "main::FW_Notify" at fhem.pl line 3976.
2022.12.18 11:21:57 1: PERL WARNING: Deep recursion on subroutine "main::FW_devState" at ./FHEM/01_FHEMWEB.pm line 3219.
2022.12.18 11:21:57 1: PERL WARNING: Deep recursion on subroutine "main::getAllSets" at ./FHEM/01_FHEMWEB.pm line 3326.
2022.12.18 11:21:57 1: PERL WARNING: Deep recursion on subroutine "main::CommandSet" at fhem.pl line 2904.
2022.12.18 11:21:57 1: PERL WARNING: Deep recursion on subroutine "main::DoSet" at fhem.pl line 1996.
2022.12.18 11:21:57 1: PERL WARNING: Deep recursion on subroutine "main::fhempy_Set" at fhem.pl line 3976.
2022.12.18 11:21:57 1: PERL WARNING: Deep recursion on subroutine "main::IOWrite" at ./FHEM/10_fhempy.pm line 91.
2022.12.18 11:21:57 1: PERL WARNING: Deep recursion on subroutine "main::BindingsIo_Write" at fhem.pl line 1064.
2022.12.18 11:21:58 1: PERL WARNING: Use of uninitialized value in string eq at (eval 3514) line 1.
2022.12.18 11:22:04 1: PERL WARNING: Use of uninitialized value in string eq at (eval 4435) line 1.
2022.12.18 11:22:04 1: PERL WARNING: Use of uninitialized value in string eq at (eval 4508) line 1.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 18 Dezember 2022, 11:52:33
hmm .. wo ist nun der CreateDevice Button geblieben?

[code]define tuya_system fhempy tuya setup ea8453
attr tuya_system group tuya
attr tuya_system room fhempy
attr tuya_system verbose 1

#   DEF        tuya setup ea8453wdazquzfl08l0e . ..
#   DEVICEID   0
#   FHEMPYTYPE tuya
#   FUUID      639ed8a0-f33f-fd5f-bc8d-574b61340728759d
#   IODev      local_pybinding
#   NAME       tuya_system
#   NR         266
#   PYTHONTYPE tuya
#   REGION     eu
#   STATE      63 devices found localy
#   TYPE       fhempy
#   eventCount 10
#   Helper:
#     DBLOG:
#       state:
#         dblog_THB:
#           TIME       1671360546.74945
#           VALUE      63 devices found localy
#   READINGS:
#     2022-12-18 10:16:54   00673231e09806cb0add_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   00673231e09806cb0add_id 00673231e09806cb0add
#     2022-12-18 11:48:57   00673231e09806cb0add_ip offline
#     2022-12-18 10:16:54   00673231e09806cb0add_localkey 4af4edc4dd1f69ec
#     2022-12-18 10:16:54   00673231e09806cb0add_name SP08 Peugeot208
#     2022-12-18 10:16:54   00673231e09806cb0add_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   00673231e09806cb0add_version 3.3
#     2022-12-18 10:16:54   00673231e09806cb13b0_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   00673231e09806cb13b0_id 00673231e09806cb13b0
#     2022-12-18 10:17:10   00673231e09806cb13b0_ip 192.168.9.57
#     2022-12-18 10:16:54   00673231e09806cb13b0_localkey b5614e736a41adec
#     2022-12-18 10:16:54   00673231e09806cb13b0_name SP12 THOMAS Süd1
#     2022-12-18 10:16:54   00673231e09806cb13b0_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   00673231e09806cb13b0_version 3.3
#     2022-12-18 10:16:55   00673231e09806cb188e_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:55   00673231e09806cb188e_id 00673231e09806cb188e
#     2022-12-18 10:17:10   00673231e09806cb188e_ip 192.168.9.86
#     2022-12-18 10:16:55   00673231e09806cb188e_localkey 8f3e601297671704
#     2022-12-18 10:16:55   00673231e09806cb188e_name SP15 PETRA Bett
#     2022-12-18 10:16:55   00673231e09806cb188e_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   00673231e09806cb188e_version 3.3
#     2022-12-18 10:16:56   00673231e09806cb6fa5_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:56   00673231e09806cb6fa5_id 00673231e09806cb6fa5
#     2022-12-18 10:17:11   00673231e09806cb6fa5_ip 192.168.9.96
#     2022-12-18 10:16:56   00673231e09806cb6fa5_localkey 34828e037a9ce2fd
#     2022-12-18 10:16:56   00673231e09806cb6fa5_name SP14 PETRA SüdOst
#     2022-12-18 10:16:56   00673231e09806cb6fa5_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   00673231e09806cb6fa5_version 3.3
#     2022-12-18 10:16:56   00673231e09806cbeaa2_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:56   00673231e09806cbeaa2_id 00673231e09806cbeaa2
#     2022-12-18 10:17:11   00673231e09806cbeaa2_ip 192.168.9.91
#     2022-12-18 10:16:56   00673231e09806cbeaa2_localkey a3417522ec6a8e3c
#     2022-12-18 10:16:56   00673231e09806cbeaa2_name SP16 THOMAS West
#     2022-12-18 10:16:56   00673231e09806cbeaa2_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   00673231e09806cbeaa2_version 3.3
#     2022-12-18 10:16:59   00715387f4cfa2092c01_icon https://images.tuyaeu.com/smart/icon/ay1545812972898u8wAi/156396102696401859600.jpg
#     2022-12-18 10:16:59   00715387f4cfa2092c01_id 00715387f4cfa2092c01
#     2022-12-18 10:17:13   00715387f4cfa2092c01_ip 192.168.9.60
#     2022-12-18 10:16:59   00715387f4cfa2092c01_localkey 03c41b994a0ce655
#     2022-12-18 10:16:59   00715387f4cfa2092c01_name PETRA Nacht 1
#     2022-12-18 10:16:59   00715387f4cfa2092c01_productid h19lwmmcfp2tw5nl
#     2022-12-18 10:17:13   00715387f4cfa2092c01_version 3.3
#     2022-12-18 10:16:59   00715387f4cfa209ab1e_icon https://images.tuyaeu.com/smart/icon/ay1545812972898u8wAi/156396102696401859600.jpg
#     2022-12-18 10:16:59   00715387f4cfa209ab1e_id 00715387f4cfa209ab1e
#     2022-12-18 10:17:13   00715387f4cfa209ab1e_ip 192.168.9.61
#     2022-12-18 10:16:59   00715387f4cfa209ab1e_localkey 537e63946514289e
#     2022-12-18 10:16:59   00715387f4cfa209ab1e_name Globus
#     2022-12-18 10:16:59   00715387f4cfa209ab1e_productid h19lwmmcfp2tw5nl
#     2022-12-18 10:17:13   00715387f4cfa209ab1e_version 3.3
#     2022-12-18 10:17:01   0120018760019453b4b1_icon https://images.tuyaeu.com/smart/icon/1557225289t1u97cwpyd_0.jpg
#     2022-12-18 10:17:01   0120018760019453b4b1_id 0120018760019453b4b1
#     2022-12-18 10:17:14   0120018760019453b4b1_ip offline
#     2022-12-18 10:17:01   0120018760019453b4b1_localkey b3d70fb59b4b829b
#     2022-12-18 10:17:01   0120018760019453b4b1_name Schalter Doppel SW101E-2
#     2022-12-18 10:17:01   0120018760019453b4b1_productid At6C3S6JYzp4ez1T
#     2022-12-18 10:17:14   0120018760019453b4b1_version 3.3
#     2022-12-18 10:16:54   03132278a4cf12a5e7b0_icon https://images.tuyaeu.com/smart/icon/152956414744qw5qx565_0.jpg
#     2022-12-18 10:16:54   03132278a4cf12a5e7b0_id 03132278a4cf12a5e7b0
#     2022-12-18 10:17:09   03132278a4cf12a5e7b0_ip offline
#     2022-12-18 10:16:54   03132278a4cf12a5e7b0_localkey 71553cd705d0784b
#     2022-12-18 10:16:54   03132278a4cf12a5e7b0_name JL12Z Reserve
#     2022-12-18 10:16:54   03132278a4cf12a5e7b0_productid r15JnoGqWPM4PPtl
#     2022-12-18 10:17:10   03132278a4cf12a5e7b0_version 3.3
#     2022-12-18 10:16:58   03132278b4e62d74ab52_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/03132278b4e62d74ab52163417818099867.png
#     2022-12-18 10:16:58   03132278b4e62d74ab52_id 03132278b4e62d74ab52
#     2022-12-18 10:17:12   03132278b4e62d74ab52_ip 192.168.9.77
#     2022-12-18 10:16:58   03132278b4e62d74ab52_localkey 0b845fe9d56d2e03
#     2022-12-18 10:16:58   03132278b4e62d74ab52_name Leselampe 1
#     2022-12-18 10:16:58   03132278b4e62d74ab52_productid r15JnoGqWPM4PPtl
#     2022-12-18 10:17:12   03132278b4e62d74ab52_version 3.3
#     2022-12-18 10:16:58   03132278b4e62d74ab8f_icon https://images.tuyaeu.com/smart/icon/152956414744qw5qx565_0.jpg
#     2022-12-18 10:16:58   03132278b4e62d74ab8f_id 03132278b4e62d74ab8f
#     2022-12-18 10:17:13   03132278b4e62d74ab8f_ip offline
#     2022-12-18 10:16:58   03132278b4e62d74ab8f_localkey 61876a0d33922021
#     2022-12-18 10:16:58   03132278b4e62d74ab8f_name ZOO JL10
#     2022-12-18 10:16:58   03132278b4e62d74ab8f_productid r15JnoGqWPM4PPtl
#     2022-12-18 10:17:13   03132278b4e62d74ab8f_version 3.3
#     2022-12-18 10:16:59   03132278b4e62d74b293_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/03132278b4e62d74b293163417905557436.png
#     2022-12-18 10:16:59   03132278b4e62d74b293_id 03132278b4e62d74b293
#     2022-12-18 10:17:13   03132278b4e62d74b293_ip offline
#     2022-12-18 10:16:59   03132278b4e62d74b293_localkey 0a1f804404f7ac0c
#     2022-12-18 10:16:59   03132278b4e62d74b293_name UV Pflanzenlampe
#     2022-12-18 10:16:59   03132278b4e62d74b293_productid r15JnoGqWPM4PPtl
#     2022-12-18 10:17:13   03132278b4e62d74b293_version 3.3
#     2022-12-18 10:16:57   04086463840d8e50124b_icon https://images.tuyaeu.com/smart/icon/1504185916_0.png
#     2022-12-18 10:16:57   04086463840d8e50124b_id 04086463840d8e50124b
#     2022-12-18 10:17:12   04086463840d8e50124b_ip 192.168.9.79
#     2022-12-18 10:16:57   04086463840d8e50124b_localkey 3c8b3f7c92b627e5
#     2022-12-18 10:16:57   04086463840d8e50124b_name PS3 Wohnen 1
#     2022-12-18 10:16:57   04086463840d8e50124b_productid D7Hl3AxFbHDS98iO
#     2022-12-18 10:17:12   04086463840d8e50124b_version 3.1
#     2022-12-18 10:16:54   045074212462ab24e988_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   045074212462ab24e988_id 045074212462ab24e988
#     2022-12-18 10:17:10   045074212462ab24e988_ip 192.168.9.34
#     2022-12-18 10:16:54   045074212462ab24e988_localkey 6e637c2cfed441d8
#     2022-12-18 10:16:54   045074212462ab24e988_name SP04 Spülmaschine
#     2022-12-18 10:16:54   045074212462ab24e988_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   045074212462ab24e988_version 3.3
#     2022-12-18 10:16:55   045074212cf432ca0721_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:55   045074212cf432ca0721_id 045074212cf432ca0721
#     2022-12-18 10:17:11   045074212cf432ca0721_ip 192.168.9.32
#     2022-12-18 10:16:55   045074212cf432ca0721_localkey b43e3e9db35e85e8
#     2022-12-18 10:16:55   045074212cf432ca0721_name SP2 Kühlschrank HWR
#     2022-12-18 10:16:55   045074212cf432ca0721_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   045074212cf432ca0721_version 3.3
#     2022-12-18 10:16:55   06515140cc50e3d62490_icon https://images.tuyaeu.com/smart/icon/1528364694thahb9sok2l_0.png
#     2022-12-18 10:16:55   06515140cc50e3d62490_id 06515140cc50e3d62490
#     2022-12-18 10:17:10   06515140cc50e3d62490_ip 192.168.9.53
#     2022-12-18 10:16:55   06515140cc50e3d62490_localkey 0aa2002f6c628d34
#     2022-12-18 10:16:55   06515140cc50e3d62490_name Sirene 3
#     2022-12-18 10:16:55   06515140cc50e3d62490_productid DYgId0sz6zWlmmYu
#     2022-12-18 10:17:10   06515140cc50e3d62490_version 3.1
#     2022-12-18 10:16:58   067327848cce4ec3fe13_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/067327848cce4ec3fe1316341794790321.png
#     2022-12-18 10:16:58   067327848cce4ec3fe13_id 067327848cce4ec3fe13
#     2022-12-18 10:17:12   067327848cce4ec3fe13_ip 192.168.9.24
#     2022-12-18 10:16:58   067327848cce4ec3fe13_localkey 2d968ccae1083e52
#     2022-12-18 10:16:58   067327848cce4ec3fe13_name Toilette
#     2022-12-18 10:16:58   067327848cce4ec3fe13_productid fcLzUB4zWk95xYdk
#     2022-12-18 10:17:12   067327848cce4ec3fe13_version 3.3
#     2022-12-18 10:16:55   074124042cf4326f08c2_icon https://images.tuyaeu.com/smart/product_icon2/kg_1.png
#     2022-12-18 10:16:55   074124042cf4326f08c2_id 074124042cf4326f08c2
#     2022-12-18 10:17:10   074124042cf4326f08c2_ip 192.168.9.21
#     2022-12-18 10:16:55   074124042cf4326f08c2_localkey 4d150c756e7224e0
#     2022-12-18 10:16:55   074124042cf4326f08c2_name Küche oben
#     2022-12-18 10:16:55   074124042cf4326f08c2_productid mPRaDY6QmEFXOTYm
#     2022-12-18 10:17:10   074124042cf4326f08c2_version 3.3
#     2022-12-18 10:16:55   07412404cc50e3746c29_icon https://images.tuyaeu.com/smart/product_icon2/kg_1.png
#     2022-12-18 10:16:55   07412404cc50e3746c29_id 07412404cc50e3746c29
#     2022-12-18 10:17:11   07412404cc50e3746c29_ip 192.168.9.78
#     2022-12-18 10:16:55   07412404cc50e3746c29_localkey 802f4b27a1ebbdea
#     2022-12-18 10:16:55   07412404cc50e3746c29_name Bad 2
#     2022-12-18 10:16:55   07412404cc50e3746c29_productid mPRaDY6QmEFXOTYm
#     2022-12-18 10:17:11   07412404cc50e3746c29_version 3.3
#     2022-12-18 10:16:55   07847240bcddc29b03e9_icon https://images.tuyaeu.com/smart/icon/1534401999ezpgt19rc8l_0.png
#     2022-12-18 10:16:55   07847240bcddc29b03e9_id 07847240bcddc29b03e9
#     2022-12-18 10:17:10   07847240bcddc29b03e9_ip 192.168.9.98
#     2022-12-18 10:16:55   07847240bcddc29b03e9_localkey f98896e0ad1caba6
#     2022-12-18 10:16:55   07847240bcddc29b03e9_name Sirene 2 Temp
#     2022-12-18 10:16:55   07847240bcddc29b03e9_productid eISESdwVoVIV3axj
#     2022-12-18 10:17:10   07847240bcddc29b03e9_version 3.3
#     2022-12-18 10:16:55   07847240dc4f225fdda0_icon https://images.tuyaeu.com/smart/icon/1534401999ezpgt19rc8l_0.png
#     2022-12-18 10:16:55   07847240dc4f225fdda0_id 07847240dc4f225fdda0
#     2022-12-18 10:17:10   07847240dc4f225fdda0_ip 192.168.9.83
#     2022-12-18 10:16:55   07847240dc4f225fdda0_localkey adfdd8975615519e
#     2022-12-18 10:16:55   07847240dc4f225fdda0_name Sirene 1 Temp
#     2022-12-18 10:16:55   07847240dc4f225fdda0_productid eISESdwVoVIV3axj
#     2022-12-18 10:17:10   07847240dc4f225fdda0_version 3.3
#     2022-12-18 10:16:56   104380002462ab2f8ac0_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/104380002462ab2f8ac0163417849807563.png
#     2022-12-18 10:16:56   104380002462ab2f8ac0_id 104380002462ab2f8ac0
#     2022-12-18 10:17:11   104380002462ab2f8ac0_ip 192.168.9.49
#     2022-12-18 10:16:56   104380002462ab2f8ac0_localkey a6015a85cfa6f812
#     2022-12-18 10:16:56   104380002462ab2f8ac0_name Dunstabzug
#     2022-12-18 10:16:56   104380002462ab2f8ac0_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:11   104380002462ab2f8ac0_version 3.3
#     2022-12-18 10:16:55   104380002462ab301b83_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/104380002462ab301b83163417879515259.png
#     2022-12-18 10:16:55   104380002462ab301b83_id 104380002462ab301b83
#     2022-12-18 10:17:11   104380002462ab301b83_ip 192.168.9.76
#     2022-12-18 10:16:55   104380002462ab301b83_localkey 5bf8e554de9b7777
#     2022-12-18 10:16:55   104380002462ab301b83_name Router EAP225
#     2022-12-18 10:16:55   104380002462ab301b83_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:11   104380002462ab301b83_version 3.3
#     2022-12-18 10:17:01   104380002462ab30258d_icon https://images.tuyaeu.com/smart/icon/1541647698myzx2yx1yk_0.jpg
#     2022-12-18 10:17:01   104380002462ab30258d_id 104380002462ab30258d
#     2022-12-18 10:17:14   104380002462ab30258d_ip offline
#     2022-12-18 10:17:01   104380002462ab30258d_localkey 494dc6017b06a443
#     2022-12-18 10:17:01   104380002462ab30258d_name Heizdecke 3
#     2022-12-18 10:17:01   104380002462ab30258d_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:14   104380002462ab30258d_version 3.3
#     2022-12-18 10:16:58   10438000d8f15ba4ccd3_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/10438000d8f15ba4ccd3163417799266254.png
#     2022-12-18 10:16:58   10438000d8f15ba4ccd3_id 10438000d8f15ba4ccd3
#     2022-12-18 10:17:12   10438000d8f15ba4ccd3_ip 192.168.9.44
#     2022-12-18 10:16:58   10438000d8f15ba4ccd3_localkey 8ef2d52a326d2259
#     2022-12-18 10:16:58   10438000d8f15ba4ccd3_name Medien Schlafzimmer
#     2022-12-18 10:16:58   10438000d8f15ba4ccd3_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:12   10438000d8f15ba4ccd3_version 3.3
#     2022-12-18 10:17:00   12280017d8f15bdedda5_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:17:00   12280017d8f15bdedda5_id 12280017d8f15bdedda5
#     2022-12-18 10:17:14   12280017d8f15bdedda5_ip offline
#     2022-12-18 10:17:00   12280017d8f15bdedda5_localkey f5e3dac18c0aa670
#     2022-12-18 10:17:00   12280017d8f15bdedda5_name Gartengrill
#     2022-12-18 10:17:00   12280017d8f15bdedda5_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:14   12280017d8f15bdedda5_version 3.3
#     2022-12-18 10:16:56   17710212600194dba99d_icon https://images.tuyaeu.com/smart/program_category_icon/cz.png
#     2022-12-18 10:16:56   17710212600194dba99d_id 17710212600194dba99d
#     2022-12-18 10:17:11   17710212600194dba99d_ip 192.168.9.45
#     2022-12-18 10:16:56   17710212600194dba99d_localkey 9a0dadfb74c3a46f
#     2022-12-18 10:16:56   17710212600194dba99d_name Steckdose THOMAS Türe
#     2022-12-18 10:16:56   17710212600194dba99d_productid namu1lshm4jrx1td
#     2022-12-18 10:17:11   17710212600194dba99d_version 3.3
#     2022-12-18 10:16:58   17710212600194dbaba8_icon https://images.tuyaeu.com/smart/program_category_icon/cz.png
#     2022-12-18 10:16:58   17710212600194dbaba8_id 17710212600194dbaba8
#     2022-12-18 10:17:12   17710212600194dbaba8_ip 192.168.9.46
#     2022-12-18 10:16:58   17710212600194dbaba8_localkey e57c01322fc2deec
#     2022-12-18 10:16:58   17710212600194dbaba8_name Steckdose PETRA 1
#     2022-12-18 10:16:58   17710212600194dbaba8_productid namu1lshm4jrx1td
#     2022-12-18 10:17:12   17710212600194dbaba8_version 3.3
#     2022-12-18 10:16:59   180025363c6105dcdcaf_icon https://images.tuyaeu.com/smart/icon/1544066741n1omnq1w67_0.jpg
#     2022-12-18 10:16:59   180025363c6105dcdcaf_id 180025363c6105dcdcaf
#     2022-12-18 10:17:13   180025363c6105dcdcaf_ip offline
#     2022-12-18 10:16:59   180025363c6105dcdcaf_localkey cc76fb631ac08b09
#     2022-12-18 10:16:59   180025363c6105dcdcaf_name Wassermelder
#     2022-12-18 10:16:59   180025363c6105dcdcaf_productid KoAUR5fdtDso34VM
#     2022-12-18 10:17:13   180025363c6105dcdcaf_version 3.3
#     2022-12-18 10:16:55   2053863070039f16cebe_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/d6d1396a4acbafed7c7542c7bddc2fff.png
#     2022-12-18 10:16:55   2053863070039f16cebe_id 2053863070039f16cebe
#     2022-12-18 10:17:10   2053863070039f16cebe_ip 192.168.9.85
#     2022-12-18 10:16:55   2053863070039f16cebe_localkey 3abc6eb9eff1cf8e
#     2022-12-18 10:16:55   2053863070039f16cebe_name Leselampe 2
#     2022-12-18 10:16:55   2053863070039f16cebe_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:11   2053863070039f16cebe_version 3.3
#     2022-12-18 10:16:59   2053863070039f16cef8_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/d6d1396a4acbafed7c7542c7bddc2fff.png
#     2022-12-18 10:16:59   2053863070039f16cef8_id 2053863070039f16cef8
#     2022-12-18 10:17:13   2053863070039f16cef8_ip offline
#     2022-12-18 10:16:59   2053863070039f16cef8_localkey eaa0119565b42c6c
#     2022-12-18 10:16:59   2053863070039f16cef8_name Soundbar Wohnzimmer
#     2022-12-18 10:16:59   2053863070039f16cef8_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:13   2053863070039f16cef8_version 3.3
#     2022-12-18 10:16:57   2053863070039f179683_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/d6d1396a4acbafed7c7542c7bddc2fff.png
#     2022-12-18 10:16:57   2053863070039f179683_id 2053863070039f179683
#     2022-12-18 10:17:12   2053863070039f179683_ip 192.168.9.59
#     2022-12-18 10:16:57   2053863070039f179683_localkey 8c15546d598a51f9
#     2022-12-18 10:16:57   2053863070039f179683_name Medien Wohnzimmer
#     2022-12-18 10:16:57   2053863070039f179683_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:12   2053863070039f179683_version 3.3
#     2022-12-18 10:16:58   20538630c44f33f7b2b6_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/d6d1396a4acbafed7c7542c7bddc2fff.png
#     2022-12-18 10:16:58   20538630c44f33f7b2b6_id 20538630c44f33f7b2b6
#     2022-12-18 10:17:13   20538630c44f33f7b2b6_ip offline
#     2022-12-18 10:16:58   20538630c44f33f7b2b6_localkey b2b021b05d25903e
#     2022-12-18 10:16:58   20538630c44f33f7b2b6_name Kaffeemaschine Thomas
#     2022-12-18 10:16:58   20538630c44f33f7b2b6_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:13   20538630c44f33f7b2b6_version 3.3
#     2022-12-18 10:17:01   21410806cc50e37bdb15_icon https://images.tuyaeu.com/smart/icon/dj.png
#     2022-12-18 10:17:01   21410806cc50e37bdb15_id 21410806cc50e37bdb15
#     2022-12-18 10:17:14   21410806cc50e37bdb15_ip offline
#     2022-12-18 10:17:01   21410806cc50e37bdb15_localkey b2caca9dc178ec87
#     2022-12-18 10:17:01   21410806cc50e37bdb15_name Dimmer 2
#     2022-12-18 10:17:01   21410806cc50e37bdb15_productid bSXSSFArVKtc4DyC
#     2022-12-18 10:17:14   21410806cc50e37bdb15_version 3.3
#     2022-12-18 10:16:54   22230808807d3a231039_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808807d3a231039163415814096745.png
#     2022-12-18 10:16:54   22230808807d3a231039_id 22230808807d3a231039
#     2022-12-18 10:17:10   22230808807d3a231039_ip 192.168.9.68
#     2022-12-18 10:16:54   22230808807d3a231039_localkey fbcb762730c39536
#     2022-12-18 10:16:54   22230808807d3a231039_name NAS Schreibtisch
#     2022-12-18 10:16:54   22230808807d3a231039_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:10   22230808807d3a231039_version 3.1
#     2022-12-18 10:16:56   22230808807d3a23186b_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808807d3a23186b163415762424492.png
#     2022-12-18 10:16:56   22230808807d3a23186b_id 22230808807d3a23186b
#     2022-12-18 10:17:11   22230808807d3a23186b_ip 192.168.9.87
#     2022-12-18 10:16:56   22230808807d3a23186b_localkey a2693a5844ce166d
#     2022-12-18 10:16:56   22230808807d3a23186b_name JL04 BKT3
#     2022-12-18 10:16:56   22230808807d3a23186b_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:11   22230808807d3a23186b_version 3.1
#     2022-12-18 10:16:56   2223080884f3eb466414_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/2223080884f3eb466414163417857767272.png
#     2022-12-18 10:16:56   2223080884f3eb466414_id 2223080884f3eb466414
#     2022-12-18 10:17:11   2223080884f3eb466414_ip 192.168.9.75
#     2022-12-18 10:16:56   2223080884f3eb466414_localkey 824ea2c9d41a3ec1
#     2022-12-18 10:16:56   2223080884f3eb466414_name Kaffeemaschine Küche
#     2022-12-18 10:16:56   2223080884f3eb466414_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:11   2223080884f3eb466414_version 3.1
#     2022-12-18 10:16:59   22230808bcddc2135068_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808bcddc2135068163417805835187.png
#     2022-12-18 10:16:59   22230808bcddc2135068_id 22230808bcddc2135068
#     2022-12-18 10:17:13   22230808bcddc2135068_ip offline
#     2022-12-18 10:16:59   22230808bcddc2135068_localkey c0aa3a00c215aa39
#     2022-12-18 10:16:59   22230808bcddc2135068_name Fernseher Wohnzimmer
#     2022-12-18 10:16:59   22230808bcddc2135068_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:13   22230808bcddc2135068_version 3.3
#     2022-12-18 10:16:58   22230808bcddc2135132_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808bcddc2135132163415768180381.png
#     2022-12-18 10:16:58   22230808bcddc2135132_id 22230808bcddc2135132
#     2022-12-18 10:17:13   22230808bcddc2135132_ip 192.168.9.99
#     2022-12-18 10:16:58   22230808bcddc2135132_localkey b7b7f3b3a75bce96
#     2022-12-18 10:16:58   22230808bcddc2135132_name Schreibtisch Petra
#     2022-12-18 10:16:58   22230808bcddc2135132_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:13   22230808bcddc2135132_version 3.1
#     2022-12-18 10:16:54   22230808bcddc2135137_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808bcddc2135137163415758338185.png
#     2022-12-18 10:16:54   22230808bcddc2135137_id 22230808bcddc2135137
#     2022-12-18 10:17:10   22230808bcddc2135137_ip 192.168.9.84
#     2022-12-18 10:16:54   22230808bcddc2135137_localkey 5b9b6cd11ad3eab4
#     2022-12-18 10:16:54   22230808bcddc2135137_name JL07 BKT2
#     2022-12-18 10:16:54   22230808bcddc2135137_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:10   22230808bcddc2135137_version 3.1
#     2022-12-18 10:16:54   22230808bcddc213f838_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808bcddc213f83816341577256478.png
#     2022-12-18 10:16:54   22230808bcddc213f838_id 22230808bcddc213f838
#     2022-12-18 10:17:10   22230808bcddc213f838_ip 192.168.9.66
#     2022-12-18 10:16:54   22230808bcddc213f838_localkey f4a3b7649a5e4fd8
#     2022-12-18 10:16:54   22230808bcddc213f838_name JL06 frei
#     2022-12-18 10:16:54   22230808bcddc213f838_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:10   22230808bcddc213f838_version 3.1
#     2022-12-18 10:16:55   260064612462ab24f164_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:55   260064612462ab24f164_id 260064612462ab24f164
#     2022-12-18 10:17:10   260064612462ab24f164_ip 192.168.9.33
#     2022-12-18 10:16:55   260064612462ab24f164_localkey b37a96597e2837b4
#     2022-12-18 10:16:55   260064612462ab24f164_name SP3 Kühlschrank Küche
#     2022-12-18 10:16:55   260064612462ab24f164_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   260064612462ab24f164_version 3.3
#     2022-12-18 10:16:55   260064612cf432ca55d8_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:55   260064612cf432ca55d8_id 260064612cf432ca55d8
#     2022-12-18 10:17:10   260064612cf432ca55d8_ip 192.168.9.31
#     2022-12-18 10:16:55   260064612cf432ca55d8_localkey 52a00c366067a6f7
#     2022-12-18 10:16:55   260064612cf432ca55d8_name SP1 Waschmaschine
#     2022-12-18 10:16:55   260064612cf432ca55d8_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   260064612cf432ca55d8_version 3.3
#     2022-12-18 10:16:56   30180616dc4f22fc97ae_icon https://images.tuyaeu.com/smart/icon/1553220447w51qc6eyig_0.jpg
#     2022-12-18 10:16:56   30180616dc4f22fc97ae_id 30180616dc4f22fc97ae
#     2022-12-18 10:17:11   30180616dc4f22fc97ae_ip 192.168.9.28
#     2022-12-18 10:16:56   30180616dc4f22fc97ae_localkey 146b39d4a5992d2f
#     2022-12-18 10:16:56   30180616dc4f22fc97ae_name Kleiderschrank 1
#     2022-12-18 10:16:56   30180616dc4f22fc97ae_productid ON0fHlAaAf7Pt7ja
#     2022-12-18 10:17:11   30180616dc4f22fc97ae_version 3.1
#     2022-12-18 10:16:54   30180616dc4f22fc986a_icon https://images.tuyaeu.com/smart/icon/1553220447w51qc6eyig_0.jpg
#     2022-12-18 10:16:54   30180616dc4f22fc986a_id 30180616dc4f22fc986a
#     2022-12-18 10:17:10   30180616dc4f22fc986a_ip 192.168.9.42
#     2022-12-18 10:16:54   30180616dc4f22fc986a_localkey fe51534f379b27c0
#     2022-12-18 10:16:54   30180616dc4f22fc986a_name Springbrunnen
#     2022-12-18 10:16:54   30180616dc4f22fc986a_productid ON0fHlAaAf7Pt7ja
#     2022-12-18 10:17:10   30180616dc4f22fc986a_version 3.1
#     2022-12-18 10:16:57   30180616dc4f22fc9a71_icon https://images.tuyaeu.com/smart/icon/1553220447w51qc6eyig_0.jpg
#     2022-12-18 10:16:57   30180616dc4f22fc9a71_id 30180616dc4f22fc9a71
#     2022-12-18 10:17:12   30180616dc4f22fc9a71_ip 192.168.9.41
#     2022-12-18 10:16:57   30180616dc4f22fc9a71_localkey 3fd05440412ec1f5
#     2022-12-18 10:16:57   30180616dc4f22fc9a71_name Küche Herd
#     2022-12-18 10:16:57   30180616dc4f22fc9a71_productid ON0fHlAaAf7Pt7ja
#     2022-12-18 10:17:12   30180616dc4f22fc9a71_version 3.1
#     2022-12-18 10:16:57   30510063d8bfc00b396b_icon https://images.tuyaeu.com/smart/icon/ay1530852819489IlyEr/2095506b84aecb16a843c2d04b4ccd61.png
#     2022-12-18 10:16:57   30510063d8bfc00b396b_id 30510063d8bfc00b396b
#     2022-12-18 10:17:12   30510063d8bfc00b396b_ip 192.168.9.40
#     2022-12-18 10:16:57   30510063d8bfc00b396b_localkey d559d18f36e9d325
#     2022-12-18 10:16:57   30510063d8bfc00b396b_name Schlafzimmer oben
#     2022-12-18 10:16:57   30510063d8bfc00b396b_productid 6agmomauevaw5zav
#     2022-12-18 10:17:12   30510063d8bfc00b396b_version 3.3
#     2022-12-18 10:16:57   3367036770039f60c576_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/3367036770039f60c576163417966053451.png
#     2022-12-18 10:16:57   3367036770039f60c576_id 3367036770039f60c576
#     2022-12-18 10:17:12   3367036770039f60c576_ip 192.168.9.27
#     2022-12-18 10:16:57   3367036770039f60c576_localkey 628b38730b4c06e3
#     2022-12-18 10:16:57   3367036770039f60c576_name Steckdose Garage 1
#     2022-12-18 10:16:57   3367036770039f60c576_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   3367036770039f60c576_version 3.3
#     2022-12-18 10:16:57   3367036770039f60ce2b_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:57   3367036770039f60ce2b_id 3367036770039f60ce2b
#     2022-12-18 10:17:12   3367036770039f60ce2b_ip 192.168.9.62
#     2022-12-18 10:16:57   3367036770039f60ce2b_localkey 7322892db7dfa5bd
#     2022-12-18 10:16:57   3367036770039f60ce2b_name USB Lader 1 Thomas
#     2022-12-18 10:16:57   3367036770039f60ce2b_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   3367036770039f60ce2b_version 3.3
#     2022-12-18 10:16:57   3367036770039f613620_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:57   3367036770039f613620_id 3367036770039f613620
#     2022-12-18 10:17:12   3367036770039f613620_ip 192.168.9.81
#     2022-12-18 10:16:57   3367036770039f613620_localkey 9ef95a16eea43688
#     2022-12-18 10:16:57   3367036770039f613620_name USB Lader 2 Thomas
#     2022-12-18 10:16:57   3367036770039f613620_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   3367036770039f613620_version 3.3
#     2022-12-18 10:16:57   33670367c4dd573813d8_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:57   33670367c4dd573813d8_id 33670367c4dd573813d8
#     2022-12-18 10:17:12   33670367c4dd573813d8_ip 192.168.9.38
#     2022-12-18 10:16:57   33670367c4dd573813d8_localkey 89b8de9eed9ef579
#     2022-12-18 10:16:57   33670367c4dd573813d8_name USB Lader 3 Thomas
#     2022-12-18 10:16:57   33670367c4dd573813d8_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   33670367c4dd573813d8_version 3.3
#     2022-12-18 10:16:59   34602852ecfabc47cbe1_icon https://images.tuyaeu.com/smart/product_icon/qt.png
#     2022-12-18 10:16:59   34602852ecfabc47cbe1_id 34602852ecfabc47cbe1
#     2022-12-18 10:17:13   34602852ecfabc47cbe1_ip offline
#     2022-12-18 10:16:59   34602852ecfabc47cbe1_localkey d06e40ee498060c8
#     2022-12-18 10:16:59   34602852ecfabc47cbe1_name Rolltor
#     2022-12-18 10:16:59   34602852ecfabc47cbe1_productid 7by9ERqg60JA8wxA
#     2022-12-18 10:17:13   34602852ecfabc47cbe1_version 3.3
#     2022-12-18 10:16:54   41888155dc4f229d95af_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   41888155dc4f229d95af_id 41888155dc4f229d95af
#     2022-12-18 10:17:10   41888155dc4f229d95af_ip 192.168.9.36
#     2022-12-18 10:16:54   41888155dc4f229d95af_localkey b54391dbd2d9f161
#     2022-12-18 10:16:54   41888155dc4f229d95af_name SP06 EX18
#     2022-12-18 10:16:54   41888155dc4f229d95af_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   41888155dc4f229d95af_version 3.3
#     2022-12-18 10:16:56   44277377840d8e5e47c8_icon https://images.tuyaeu.com/smart/icon/1504185916_0.png
#     2022-12-18 10:16:56   44277377840d8e5e47c8_id 44277377840d8e5e47c8
#     2022-12-18 10:17:11   44277377840d8e5e47c8_ip offline
#     2022-12-18 10:16:56   44277377840d8e5e47c8_localkey 5cdad42a6c79ca1f
#     2022-12-18 10:16:56   44277377840d8e5e47c8_name PS5 Garage
#     2022-12-18 10:16:56   44277377840d8e5e47c8_productid D7Hl3AxFbHDS98iO
#     2022-12-18 10:17:11   44277377840d8e5e47c8_version 3.3
#     2022-12-18 10:16:59   453005615002911dfe06_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/453005615002911dfe06163417957708355.png
#     2022-12-18 10:16:59   453005615002911dfe06_id 453005615002911dfe06
#     2022-12-18 10:17:13   453005615002911dfe06_ip 192.168.9.54
#     2022-12-18 10:16:59   453005615002911dfe06_localkey db41567569a265b4
#     2022-12-18 10:16:59   453005615002911dfe06_name Heizkissen 2
#     2022-12-18 10:16:59   453005615002911dfe06_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   453005615002911dfe06_version 3.3
#     2022-12-18 10:16:55   453005615002911e00b4_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:55   453005615002911e00b4_id 453005615002911e00b4
#     2022-12-18 10:17:11   453005615002911e00b4_ip 192.168.9.73
#     2022-12-18 10:16:55   453005615002911e00b4_localkey 82a5beef86e160cd
#     2022-12-18 10:16:55   453005615002911e00b4_name USB Lader 5 Bett
#     2022-12-18 10:16:55   453005615002911e00b4_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:11   453005615002911e00b4_version 3.3
#     2022-12-18 10:16:59   4530056170039f4a808b_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/4530056170039f4a808b163417934465521.png
#     2022-12-18 10:16:59   4530056170039f4a808b_id 4530056170039f4a808b
#     2022-12-18 10:17:13   4530056170039f4a808b_ip offline
#     2022-12-18 10:16:59   4530056170039f4a808b_localkey 35a617145fa97b06
#     2022-12-18 10:16:59   4530056170039f4a808b_name Leselampe 4
#     2022-12-18 10:16:59   4530056170039f4a808b_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   4530056170039f4a808b_version 3.3
#     2022-12-18 10:16:59   4530056170039f4a87e5_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:59   4530056170039f4a87e5_id 4530056170039f4a87e5
#     2022-12-18 10:17:13   4530056170039f4a87e5_ip offline
#     2022-12-18 10:16:59   4530056170039f4a87e5_localkey 2204c23a9c30d10b
#     2022-12-18 10:16:59   4530056170039f4a87e5_name Heizdecke 1
#     2022-12-18 10:16:59   4530056170039f4a87e5_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   4530056170039f4a87e5_version 3.3
#     2022-12-18 10:16:57   47104178dc4f2236e437_icon https://images.tuyaeu.com/smart/icon/1526403552c7uw51lvs7lmwf8ljr2qllq5mi_0.png
#     2022-12-18 10:16:57   47104178dc4f2236e437_id 47104178dc4f2236e437
#     2022-12-18 10:17:12   47104178dc4f2236e437_ip 192.168.9.51
#     2022-12-18 10:16:57   47104178dc4f2236e437_localkey bc16d1d29f2b2c9e
#     2022-12-18 10:16:57   47104178dc4f2236e437_name Garagentor
#     2022-12-18 10:16:57   47104178dc4f2236e437_productid ld4GRDxQZZ2NAnk6
#     2022-12-18 10:17:12   47104178dc4f2236e437_version 3.1
#     2022-12-18 10:16:55   50134218c4dd571b3390_icon https://images.tuyaeu.com/smart/icon/1555585425a1oqvs7elur_0.jpg
#     2022-12-18 10:16:55   50134218c4dd571b3390_id 50134218c4dd571b3390
#     2022-12-18 10:17:10   50134218c4dd571b3390_ip offline
#     2022-12-18 10:16:55   50134218c4dd571b3390_localkey fce75597b4421601
#     2022-12-18 10:16:55   50134218c4dd571b3390_name PS7 zbV
#     2022-12-18 10:16:55   50134218c4dd571b3390_productid gl5fdiv1tc9mkvlp
#     2022-12-18 10:17:10   50134218c4dd571b3390_version 3.3
#     2022-12-18 10:16:59   5062137624a1600b6d62_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:59   5062137624a1600b6d62_id 5062137624a1600b6d62
#     2022-12-18 10:17:13   5062137624a1600b6d62_ip offline
#     2022-12-18 10:16:59   5062137624a1600b6d62_localkey d029f7f52f9fbec5
#     2022-12-18 10:16:59   5062137624a1600b6d62_name Heizdecke 2
#     2022-12-18 10:16:59   5062137624a1600b6d62_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   5062137624a1600b6d62_version 3.3
#     2022-12-18 10:16:57   5062137624a1600b9479_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/5062137624a1600b9479163417873444451.png
#     2022-12-18 10:16:57   5062137624a1600b9479_id 5062137624a1600b9479
#     2022-12-18 10:17:12   5062137624a1600b9479_ip 192.168.9.26
#     2022-12-18 10:16:57   5062137624a1600b9479_localkey 6e11e14987828d1c
#     2022-12-18 10:16:57   5062137624a1600b9479_name Duravit Bidet
#     2022-12-18 10:16:57   5062137624a1600b9479_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   5062137624a1600b9479_version 3.3
#     2022-12-18 10:16:59   50621376c4dd57125717_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/50621376c4dd5712571716341794176501.png
#     2022-12-18 10:16:59   50621376c4dd57125717_id 50621376c4dd57125717
#     2022-12-18 10:17:13   50621376c4dd57125717_ip offline
#     2022-12-18 10:16:59   50621376c4dd57125717_localkey e61c8eb5d24cf300
#     2022-12-18 10:16:59   50621376c4dd57125717_name Leselampe 5
#     2022-12-18 10:16:59   50621376c4dd57125717_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   50621376c4dd57125717_version 3.3
#     2022-12-18 10:16:59   50621376c4dd57131135_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/50621376c4dd57131135163417952893779.png
#     2022-12-18 10:16:59   50621376c4dd57131135_id 50621376c4dd57131135
#     2022-12-18 10:17:13   50621376c4dd57131135_ip 192.168.9.92
#     2022-12-18 10:16:59   50621376c4dd57131135_localkey f215d22a78c5f9ba
#     2022-12-18 10:16:59   50621376c4dd57131135_name Heizkissen 1
#     2022-12-18 10:16:59   50621376c4dd57131135_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   50621376c4dd57131135_version 3.3
#     2022-12-18 10:17:01   50880180840d8e87664b_icon https://images.tuyaeu.com/smart/icon/1528364839bqwi2byfbhv_0.png
#     2022-12-18 10:17:01   50880180840d8e87664b_id 50880180840d8e87664b
#     2022-12-18 10:17:14   50880180840d8e87664b_ip offline
#     2022-12-18 10:17:01   50880180840d8e87664b_localkey fec41c3edc0c787d
#     2022-12-18 10:17:01   50880180840d8e87664b_name Wassersensor 2 Heizraum
#     2022-12-18 10:17:01   50880180840d8e87664b_productid SmFKLTOcGHbPQvmh
#     2022-12-18 10:17:14   50880180840d8e87664b_version 3.3
#     2022-12-18 10:17:01   50880180cc50e30c4c90_icon https://images.tuyaeu.com/smart/icon/1528364839bqwi2byfbhv_0.png
#     2022-12-18 10:17:01   50880180cc50e30c4c90_id 50880180cc50e30c4c90
#     2022-12-18 10:17:14   50880180cc50e30c4c90_ip offline
#     2022-12-18 10:17:01   50880180cc50e30c4c90_localkey 9b7df3fc66763e8b
#     2022-12-18 10:17:01   50880180cc50e30c4c90_name Wassersensor 3 Waschmaschine
#     2022-12-18 10:17:01   50880180cc50e30c4c90_productid SmFKLTOcGHbPQvmh
#     2022-12-18 10:17:14   50880180cc50e30c4c90_version 3.3
#     2022-12-18 10:17:00   50880180cc50e30cbe91_icon https://images.tuyaeu.com/smart/icon/1528364839bqwi2byfbhv_0.png
#     2022-12-18 10:17:00   50880180cc50e30cbe91_id 50880180cc50e30cbe91
#     2022-12-18 10:17:14   50880180cc50e30cbe91_ip offline
#     2022-12-18 10:17:00   50880180cc50e30cbe91_localkey 7db73073d587d531
#     2022-12-18 10:17:00   50880180cc50e30cbe91_name Wassersensor 1 Küche
#     2022-12-18 10:17:00   50880180cc50e30cbe91_productid SmFKLTOcGHbPQvmh
#     2022-12-18 10:17:14   50880180cc50e30cbe91_version 3.3
#     2022-12-18 10:16:56   52470320e09806c9a53f_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:56   52470320e09806c9a53f_id 52470320e09806c9a53f
#     2022-12-18 10:17:11   52470320e09806c9a53f_ip 192.168.9.70
#     2022-12-18 10:16:56   52470320e09806c9a53f_localkey b3ec7f7a682799d4
#     2022-12-18 10:16:56   52470320e09806c9a53f_name SP13 THOMAS Süd2 Schreibtisch
#     2022-12-18 10:16:56   52470320e09806c9a53f_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   52470320e09806c9a53f_version 3.3
#     2022-12-18 10:16:54   60020372840d8e6f937a_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   60020372840d8e6f937a_id 60020372840d8e6f937a
#     2022-12-18 10:17:10   60020372840d8e6f937a_ip 192.168.9.47
#     2022-12-18 10:16:54   60020372840d8e6f937a_localkey 026c4f068bfdc97f
#     2022-12-18 10:16:54   60020372840d8e6f937a_name SP05 EX17
#     2022-12-18 10:16:54   60020372840d8e6f937a_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   60020372840d8e6f937a_version 3.3
#     2022-12-18 10:16:59   60381718500291bade80_icon https://images.tuyaeu.com/smart/icon/1528364671b3tgndtkqr_0.png
#     2022-12-18 10:16:59   60381718500291bade80_id 60381718500291bade80
#     2022-12-18 10:17:13   60381718500291bade80_ip offline
#     2022-12-18 10:16:59   60381718500291bade80_localkey 8c17a8415057e4a7
#     2022-12-18 10:16:59   60381718500291bade80_name Haustüre
#     2022-12-18 10:16:59   60381718500291bade80_productid 6l4vhjl3gttstgxj
#     2022-12-18 10:17:13   60381718500291bade80_version 3.3
#     2022-12-18 10:16:54   60381718807d3a01eb63_icon https://images.tuyaeu.com/smart/icon/1528364671b3tgndtkqr_0.png
#     2022-12-18 10:16:54   60381718807d3a01eb63_id 60381718807d3a01eb63
#     2022-12-18 10:17:09   60381718807d3a01eb63_ip offline
#     2022-12-18 10:16:54   60381718807d3a01eb63_localkey 60d7c07cc350d317
#     2022-12-18 10:16:54   60381718807d3a01eb63_name Türsensor 3
#     2022-12-18 10:16:54   60381718807d3a01eb63_productid 6l4vhjl3gttstgxj
#     2022-12-18 10:17:09   60381718807d3a01eb63_version 3.3
#     2022-12-18 10:17:00   60381718807d3a04bbb4_icon https://images.tuyaeu.com/smart/icon/1528364671b3tgndtkqr_0.png
#     2022-12-18 10:17:00   60381718807d3a04bbb4_id 60381718807d3a04bbb4
#     2022-12-18 10:17:14   60381718807d3a04bbb4_ip offline
#     2022-12-18 10:17:00   60381718807d3a04bbb4_localkey 0b6ade2172baef93
#     2022-12-18 10:17:00   60381718807d3a04bbb4_name Türsensor 2
#     2022-12-18 10:17:00   60381718807d3a04bbb4_productid 6l4vhjl3gttstgxj
#     2022-12-18 10:17:14   60381718807d3a04bbb4_version 3.3
#     2022-12-18 10:16:55   620661512462ab30ddbd_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:55   620661512462ab30ddbd_id 620661512462ab30ddbd
#     2022-12-18 10:17:11   620661512462ab30ddbd_ip 192.168.9.35
#     2022-12-18 10:16:55   620661512462ab30ddbd_localkey 9faac636188ff4ef
#     2022-12-18 10:16:55   620661512462ab30ddbd_name Medien Petra
#     2022-12-18 10:16:55   620661512462ab30ddbd_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   620661512462ab30ddbd_version 3.3
#     2022-12-18 10:16:56   62066151d8f15bb08810_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:56   62066151d8f15bb08810_id 62066151d8f15bb08810
#     2022-12-18 10:17:11   62066151d8f15bb08810_ip 192.168.9.72
#     2022-12-18 10:16:56   62066151d8f15bb08810_localkey 0f67904fe7677fb8
#     2022-12-18 10:16:56   62066151d8f15bb08810_name SP11 THOMAS Ost
#     2022-12-18 10:16:56   62066151d8f15bb08810_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   62066151d8f15bb08810_version 3.3
#     2022-12-18 10:16:54   62066151d8f15bdec539_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   62066151d8f15bdec539_id 62066151d8f15bdec539
#     2022-12-18 10:17:10   62066151d8f15bdec539_ip 192.168.9.29
#     2022-12-18 10:16:54   62066151d8f15bdec539_localkey 6bd97fc327e7f057
#     2022-12-18 10:16:54   62066151d8f15bdec539_name SP07 Garagenkeller
#     2022-12-18 10:16:54   62066151d8f15bdec539_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   62066151d8f15bdec539_version 3.3
#     2022-12-18 10:17:00   627425735002915f502b_icon https://images.tuyaeu.com/smart/icon/ay1524194438166Zg2hZ/c3db264e1bc8e6ab11cf88171e87dc39.jpg
#     2022-12-18 10:17:00   627425735002915f502b_id 627425735002915f502b
#     2022-12-18 10:17:14   627425735002915f502b_ip offline
#     2022-12-18 10:17:00   627425735002915f502b_localkey 6b53e2230bf927f2
#     2022-12-18 10:17:00   627425735002915f502b_name PIR Sensor 2
#     2022-12-18 10:17:00   627425735002915f502b_productid XFD2nSDKxFlGV5sV
#     2022-12-18 10:17:14   627425735002915f502b_version 3.3
#     2022-12-18 10:16:58   63667231840d8e501cab_icon https://images.tuyaeu.com/smart/icon/1504185916_0.png
#     2022-12-18 10:16:58   63667231840d8e501cab_id 63667231840d8e501cab
#     2022-12-18 10:17:13   63667231840d8e501cab_ip offline
#     2022-12-18 10:16:58   63667231840d8e501cab_localkey a801e4c40666c1e8
#     2022-12-18 10:16:58   63667231840d8e501cab_name PS4 Schreibtisch Petra
#     2022-12-18 10:16:58   63667231840d8e501cab_productid D7Hl3AxFbHDS98iO
#     2022-12-18 10:17:13   63667231840d8e501cab_version 3.3
#     2022-12-18 10:16:54   63667231dc4f22f329f1_icon https://images.tuyaeu.com/smart/icon/1504185916_0.png
#     2022-12-18 10:16:54   63667231dc4f22f329f1_id 63667231dc4f22f329f1
#     2022-12-18 10:17:10   63667231dc4f22f329f1_ip 192.168.9.89
#     2022-12-18 10:16:54   63667231dc4f22f329f1_localkey dd15e495a74e7d69
#     2022-12-18 10:16:54   63667231dc4f22f329f1_name PS2 ESSEN
#     2022-12-18 10:16:54   63667231dc4f22f329f1_productid D7Hl3AxFbHDS98iO
#     2022-12-18 10:17:10   63667231dc4f22f329f1_version 3.1
#     2022-12-18 10:16:58   63667231dc4f22f32f01_icon https://images.tuyaeu.com/smart/icon/1504185916_0.png
#     2022-12-18 10:16:58   63667231dc4f22f32f01_id 63667231dc4f22f32f01
#     2022-12-18 10:17:13   63667231dc4f22f32f01_ip offline
#     2022-12-18 10:16:58   63667231dc4f22f32f01_localkey 565c70fe237fc932
#     2022-12-18 10:16:58   63667231dc4f22f32f01_name PS1 Thomas Media
#     2022-12-18 10:16:58   63667231dc4f22f32f01_productid D7Hl3AxFbHDS98iO
#     2022-12-18 10:17:13   63667231dc4f22f32f01_version 3.3
#     2022-12-18 10:16:54   67242256f4cfa2ce1662_icon https://images.tuyaeu.com/smart/icon/1551969519maq7h6mi1l_0.jpg
#     2022-12-18 10:16:54   67242256f4cfa2ce1662_id 67242256f4cfa2ce1662
#     2022-12-18 10:17:09   67242256f4cfa2ce1662_ip offline
#     2022-12-18 10:16:54   67242256f4cfa2ce1662_localkey 20a826d3c4d36122
#     2022-12-18 10:16:54   67242256f4cfa2ce1662_name TürSensor 4
#     2022-12-18 10:16:54   67242256f4cfa2ce1662_productid hx5ztlztij4yxxvg
#     2022-12-18 10:17:09   67242256f4cfa2ce1662_version 3.3
#     2022-12-18 10:16:59   720570712462ab27e625_icon https://images.tuyaeu.com/smart/program_category_icon/cz.png
#     2022-12-18 10:16:59   720570712462ab27e625_id 720570712462ab27e625
#     2022-12-18 10:17:13   720570712462ab27e625_ip offline
#     2022-12-18 10:16:59   720570712462ab27e625_localkey 61a68dcc87fc6592
#     2022-12-18 10:16:59   720570712462ab27e625_name Steckdose 4
#     2022-12-18 10:16:59   720570712462ab27e625_productid namu1lshm4jrx1td
#     2022-12-18 10:17:13   720570712462ab27e625_version 3.3
#     2022-12-18 10:17:00   720570712462ab280270_icon https://images.tuyaeu.com/smart/program_category_icon/cz.png
#     2022-12-18 10:17:00   720570712462ab280270_id 720570712462ab280270
#     2022-12-18 10:17:14   720570712462ab280270_ip offline
#     2022-12-18 10:17:00   720570712462ab280270_localkey 4dd2676f4fa16db6
#     2022-12-18 10:17:00   720570712462ab280270_name Steckdose 3
#     2022-12-18 10:17:00   720570712462ab280270_productid namu1lshm4jrx1td
#     2022-12-18 10:17:14   720570712462ab280270_version 3.3
#     2022-12-18 10:17:00   743066432cf43267661d_icon https://images.tuyaeu.com/smart/icon/ay1524194438166Zg2hZ/c3db264e1bc8e6ab11cf88171e87dc39.jpg
#     2022-12-18 10:17:00   743066432cf43267661d_id 743066432cf43267661d
#     2022-12-18 10:17:14   743066432cf43267661d_ip offline
#     2022-12-18 10:17:00   743066432cf43267661d_localkey a4d341ce9f636bf9
#     2022-12-18 10:17:00   743066432cf43267661d_name PIR Sensor 3
#     2022-12-18 10:17:00   743066432cf43267661d_productid XFD2nSDKxFlGV5sV
#     2022-12-18 10:17:14   743066432cf43267661d_version 3.3
#     2022-12-18 10:16:57   8513738324a1601779dd_icon https://images.tuyaeu.com/smart/icon/1553220447w51qc6eyig_0.jpg
#     2022-12-18 10:16:57   8513738324a1601779dd_id 8513738324a1601779dd
#     2022-12-18 10:17:12   8513738324a1601779dd_ip 192.168.9.20
#     2022-12-18 10:16:57   8513738324a1601779dd_localkey 108105c3b1a447be
#     2022-12-18 10:16:57   8513738324a1601779dd_name Kleiderschrank 2
#     2022-12-18 10:16:57   8513738324a1601779dd_productid ON0fHlAaAf7Pt7ja
#     2022-12-18 10:17:12   8513738324a1601779dd_version 3.3
#     2022-12-18 10:17:00   853556472cf4326e60da_icon https://images.tuyaeu.com/smart/icon/ay1524194438166Zg2hZ/c3db264e1bc8e6ab11cf88171e87dc39.jpg
#     2022-12-18 10:17:00   853556472cf4326e60da_id 853556472cf4326e60da
#     2022-12-18 10:17:14   853556472cf4326e60da_ip offline
#     2022-12-18 10:17:00   853556472cf4326e60da_localkey 9623196e257884f7
#     2022-12-18 10:17:00   853556472cf4326e60da_name PIR Sensor 1
#     2022-12-18 10:17:00   853556472cf4326e60da_productid XFD2nSDKxFlGV5sV
#     2022-12-18 10:17:14   853556472cf4326e60da_version 3.3
#     2022-12-18 10:16:58   8877821724a16014a898_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2022-12-18 10:16:58   8877821724a16014a898_id 8877821724a16014a898
#     2022-12-18 10:17:12   8877821724a16014a898_ip 192.168.9.65
#     2022-12-18 10:16:58   8877821724a16014a898_localkey 1eb1f8bf71957568
#     2022-12-18 10:16:58   8877821724a16014a898_name Medien THOMAS
#     2022-12-18 10:16:58   8877821724a16014a898_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   8877821724a16014a898_version 3.3
#     2022-12-18 10:16:57   8877821724a16014ef14_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2022-12-18 10:16:57   8877821724a16014ef14_id 8877821724a16014ef14
#     2022-12-18 10:17:12   8877821724a16014ef14_ip 192.168.9.93
#     2022-12-18 10:16:57   8877821724a16014ef14_localkey f3ac3693f76b2a96
#     2022-12-18 10:16:57   8877821724a16014ef14_name GL AXT1800 JL35
#     2022-12-18 10:16:57   8877821724a16014ef14_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   8877821724a16014ef14_version 3.3
#     2022-12-18 10:16:54   8877821724a160150bef_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2022-12-18 10:16:54   8877821724a160150bef_id 8877821724a160150bef
#     2022-12-18 10:17:10   8877821724a160150bef_ip 192.168.9.112
#     2022-12-18 10:16:54   8877821724a160150bef_localkey 76bba760eda63914
#     2022-12-18 10:16:54   8877821724a160150bef_name JL36 EX15 Fritzbox
#     2022-12-18 10:16:54   8877821724a160150bef_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:10   8877821724a160150bef_version 3.3
#     2022-12-18 10:16:55   8877821724a160151069_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2022-12-18 10:16:55   8877821724a160151069_id 8877821724a160151069
#     2022-12-18 10:17:11   8877821724a160151069_ip 192.168.9.63
#     2022-12-18 10:16:55   8877821724a160151069_localkey c57e219a20d5e0bf
#     2022-12-18 10:16:55   8877821724a160151069_name Schreibtisch Thomas
#     2022-12-18 10:16:55   8877821724a160151069_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:11   8877821724a160151069_version 3.3
#     2022-12-18 10:17:00   887800042cf4325f15ef_icon https://images.tuyaeu.com/smart/icon/dj.png
#     2022-12-18 10:17:00   887800042cf4325f15ef_id 887800042cf4325f15ef
#     2022-12-18 10:17:14   887800042cf4325f15ef_ip offline
#
# ... truncated to 50k, original length 125231
[/code]
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 18 Dezember 2022, 12:11:33



Mist: voltage aus meinen SP111 kommt auch lokal noch mit Faktor 10


[code]define tuya_local_8877821724a160150bef fhempy tuya wifvoilfrqeo6hvu 8--
attr tuya_local_8877821724a160150bef alias JL36 EX15 Fritzbox
attr tuya_local_8877821724a160150bef dp_01 switch_1
attr tuya_local_8877821724a160150bef dp_02 countdown_1
attr tuya_local_8877821724a160150bef dp_03 add_ele
attr tuya_local_8877821724a160150bef dp_04 cur_current
attr tuya_local_8877821724a160150bef dp_05 cur_power
attr tuya_local_8877821724a160150bef dp_06 cur_voltage
attr tuya_local_8877821724a160150bef group tuya
attr tuya_local_8877821724a160150bef room fhempy
attr tuya_local_8877821724a160150bef tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '秒', 'max': 86400, 'step': 1}, 'desc': 'countdown 1'}]
attr tuya_local_8877821724a160150bef tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '秒', 'max': 86400, 'step': 1}}, {'code': 'add_ele', 'dp_id': 3, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '度', 'max': 500000, 'step': 100}}, {'code': 'cur_current', 'dp_id': 4, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'mA', 'max': 30000, 'step': 1}}, {'code': 'cur_power', 'dp_id': 5, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'W', 'max': 50000, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 6, 'type': 'Integer', 'values': {'min': 0, 'unit': 'V', 'scale': 0, 'max': 2500, 'step': 1}}]
#   CFGFN     
#   DEF        tuya wifvoilfrqeo6hvu 8877821724a160150.
#   DEVICEID   8877821724a160150bef
#   FHEMPYTYPE tuya
#   FUUID      639ef43a-f33f-fd5f-6358-9ec526adcdcbcbc8
#   IODev      local_pybinding
#   NAME       tuya_local_8877821724a160150bef
#   NR         2006
#   PYTHONTYPE tuya
#   STATE      on
#   TYPE       fhempy
#   eventCount 9
#   READINGS:
#     2022-12-18 12:06:36   active_time     1639217675
#     2022-12-18 12:06:36   biz_type        18
#     2022-12-18 12:06:36   category        cz
#     2022-12-18 12:06:36   countdown_1     0.0
#     2022-12-18 12:06:36   create_time     1639217675
#     2022-12-18 12:06:36   cur_current     0.0
#     2022-12-18 12:06:36   cur_power       0.0
[color=red]#     2022-12-18 12:07:29   cur_voltage     2292.0[/color]
#     2022-12-18 12:06:36   dp_07           0
#     2022-12-18 12:06:42   dp_09           0
#     2022-12-18 12:06:42   dp_18           0
#     2022-12-18 12:06:42   dp_19           0
#     2022-12-18 12:06:42   dp_20           2404
#     2022-12-18 12:06:42   dp_21           1
#     2022-12-18 12:06:42   dp_22           775
#     2022-12-18 12:06:42   dp_23           33633
#     2022-12-18 12:06:42   dp_24           24228
#     2022-12-18 12:06:42   dp_25           860
#     2022-12-18 12:06:36   icon            smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2022-12-18 12:06:36   id              8877821724a160150bef
#     2022-12-18 12:06:36   ip              149.172.226.177
#     2022-12-18 12:06:36   lat             48.5585
#     2022-12-18 12:06:36   local_key       76bba760eda63914
#     2022-12-18 12:06:36   lon             9.2025
#     2022-12-18 12:06:36   model           欧规,10A,带计电量,支持酷客RF产测
#     2022-12-18 12:06:36   name            JL36 EX15 Fritzbox
#     2022-12-18 12:06:36   online          1
#     2022-12-18 12:06:36   owner_id        3389434
#     2022-12-18 12:06:36   product_id      wifvoilfrqeo6hvu
#     2022-12-18 12:06:36   product_name    Smart Socket
#     2022-12-18 12:06:36   state           on
#     2022-12-18 12:06:36   sub             0
#     2022-12-18 12:06:36   time_zone       +01:00
#     2022-12-18 12:06:36   uid             eu1548823829280mLHX1
#     2022-12-18 12:06:36   update_time     1671077227
#     2022-12-18 12:06:36   uuid            8877821724a160150bef
#   args:
#     tuya_local_8877821724a160150bef
#     fhempy
#     tuya
#     wifvoilfrqeo6hvu
#     8877821724a160150bef
#     192.168.9.112
#     76bba760eda63914
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate tuya_local_8877821724a160150bef on
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 active_time 1639217675
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 biz_type 18
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 category cz
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 countdown_1 0.0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 create_time 1639217675
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 cur_current 0.0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 cur_power 0.0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:07:29 cur_voltage 2292.0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 dp_07 0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_09 0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_18 0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_19 0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_20 2404
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_21 1
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_22 775
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_23 33633
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_24 24228
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_25 860
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 icon smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 id 8877821724a160150bef
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 ip 149.172.226.177
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 lat 48.5585
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 local_key 76bba760eda63914
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 lon 9.2025
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 model 欧规,10A,带计电量,支持酷客RF产测
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 name JL36 EX15 Fritzbox
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 online 1
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 owner_id 3389434
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 product_id wifvoilfrqeo6hvu
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 product_name Smart Socket
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 state on
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 sub 0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 time_zone +01:00
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 uid eu1548823829280mLHX1
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 update_time 1671077227
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 uuid 8877821724a160150bef

[/code]
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 18 Dezember 2022, 12:20:29
Zitat von: thburkhart am 18 Dezember 2022, 11:52:33
hmm .. wo ist nun der CreateDevice Button geblieben?

[code]define tuya_system fhempy tuya setup ea8453
attr tuya_system group tuya
attr tuya_system room fhempy
attr tuya_system verbose 1

#   DEF        tuya setup ea8453wdazquzfl08l0e . ..
#   DEVICEID   0
#   FHEMPYTYPE tuya
#   FUUID      639ed8a0-f33f-fd5f-bc8d-574b61340728759d
#   IODev      local_pybinding
#   NAME       tuya_system
#   NR         266
#   PYTHONTYPE tuya
#   REGION     eu
#   STATE      63 devices found localy
#   TYPE       fhempy
#   eventCount 10
#   Helper:
#     DBLOG:
#       state:
#         dblog_THB:
#           TIME       1671360546.74945
#           VALUE      63 devices found localy
#   READINGS:
#     2022-12-18 10:16:54   00673231e09806cb0add_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   00673231e09806cb0add_id 00673231e09806cb0add
#     2022-12-18 11:48:57   00673231e09806cb0add_ip offline
#     2022-12-18 10:16:54   00673231e09806cb0add_localkey 4af4edc4dd1f69ec
#     2022-12-18 10:16:54   00673231e09806cb0add_name SP08 Peugeot208
#     2022-12-18 10:16:54   00673231e09806cb0add_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   00673231e09806cb0add_version 3.3
#     2022-12-18 10:16:54   00673231e09806cb13b0_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   00673231e09806cb13b0_id 00673231e09806cb13b0
#     2022-12-18 10:17:10   00673231e09806cb13b0_ip 192.168.9.57
#     2022-12-18 10:16:54   00673231e09806cb13b0_localkey b5614e736a41adec
#     2022-12-18 10:16:54   00673231e09806cb13b0_name SP12 THOMAS Süd1
#     2022-12-18 10:16:54   00673231e09806cb13b0_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   00673231e09806cb13b0_version 3.3
#     2022-12-18 10:16:55   00673231e09806cb188e_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:55   00673231e09806cb188e_id 00673231e09806cb188e
#     2022-12-18 10:17:10   00673231e09806cb188e_ip 192.168.9.86
#     2022-12-18 10:16:55   00673231e09806cb188e_localkey 8f3e601297671704
#     2022-12-18 10:16:55   00673231e09806cb188e_name SP15 PETRA Bett
#     2022-12-18 10:16:55   00673231e09806cb188e_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   00673231e09806cb188e_version 3.3
#     2022-12-18 10:16:56   00673231e09806cb6fa5_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:56   00673231e09806cb6fa5_id 00673231e09806cb6fa5
#     2022-12-18 10:17:11   00673231e09806cb6fa5_ip 192.168.9.96
#     2022-12-18 10:16:56   00673231e09806cb6fa5_localkey 34828e037a9ce2fd
#     2022-12-18 10:16:56   00673231e09806cb6fa5_name SP14 PETRA SüdOst
#     2022-12-18 10:16:56   00673231e09806cb6fa5_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   00673231e09806cb6fa5_version 3.3
#     2022-12-18 10:16:56   00673231e09806cbeaa2_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:56   00673231e09806cbeaa2_id 00673231e09806cbeaa2
#     2022-12-18 10:17:11   00673231e09806cbeaa2_ip 192.168.9.91
#     2022-12-18 10:16:56   00673231e09806cbeaa2_localkey a3417522ec6a8e3c
#     2022-12-18 10:16:56   00673231e09806cbeaa2_name SP16 THOMAS West
#     2022-12-18 10:16:56   00673231e09806cbeaa2_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   00673231e09806cbeaa2_version 3.3
#     2022-12-18 10:16:59   00715387f4cfa2092c01_icon https://images.tuyaeu.com/smart/icon/ay1545812972898u8wAi/156396102696401859600.jpg
#     2022-12-18 10:16:59   00715387f4cfa2092c01_id 00715387f4cfa2092c01
#     2022-12-18 10:17:13   00715387f4cfa2092c01_ip 192.168.9.60
#     2022-12-18 10:16:59   00715387f4cfa2092c01_localkey 03c41b994a0ce655
#     2022-12-18 10:16:59   00715387f4cfa2092c01_name PETRA Nacht 1
#     2022-12-18 10:16:59   00715387f4cfa2092c01_productid h19lwmmcfp2tw5nl
#     2022-12-18 10:17:13   00715387f4cfa2092c01_version 3.3
#     2022-12-18 10:16:59   00715387f4cfa209ab1e_icon https://images.tuyaeu.com/smart/icon/ay1545812972898u8wAi/156396102696401859600.jpg
#     2022-12-18 10:16:59   00715387f4cfa209ab1e_id 00715387f4cfa209ab1e
#     2022-12-18 10:17:13   00715387f4cfa209ab1e_ip 192.168.9.61
#     2022-12-18 10:16:59   00715387f4cfa209ab1e_localkey 537e63946514289e
#     2022-12-18 10:16:59   00715387f4cfa209ab1e_name Globus
#     2022-12-18 10:16:59   00715387f4cfa209ab1e_productid h19lwmmcfp2tw5nl
#     2022-12-18 10:17:13   00715387f4cfa209ab1e_version 3.3
#     2022-12-18 10:17:01   0120018760019453b4b1_icon https://images.tuyaeu.com/smart/icon/1557225289t1u97cwpyd_0.jpg
#     2022-12-18 10:17:01   0120018760019453b4b1_id 0120018760019453b4b1
#     2022-12-18 10:17:14   0120018760019453b4b1_ip offline
#     2022-12-18 10:17:01   0120018760019453b4b1_localkey b3d70fb59b4b829b
#     2022-12-18 10:17:01   0120018760019453b4b1_name Schalter Doppel SW101E-2
#     2022-12-18 10:17:01   0120018760019453b4b1_productid At6C3S6JYzp4ez1T
#     2022-12-18 10:17:14   0120018760019453b4b1_version 3.3
#     2022-12-18 10:16:54   03132278a4cf12a5e7b0_icon https://images.tuyaeu.com/smart/icon/152956414744qw5qx565_0.jpg
#     2022-12-18 10:16:54   03132278a4cf12a5e7b0_id 03132278a4cf12a5e7b0
#     2022-12-18 10:17:09   03132278a4cf12a5e7b0_ip offline
#     2022-12-18 10:16:54   03132278a4cf12a5e7b0_localkey 71553cd705d0784b
#     2022-12-18 10:16:54   03132278a4cf12a5e7b0_name JL12Z Reserve
#     2022-12-18 10:16:54   03132278a4cf12a5e7b0_productid r15JnoGqWPM4PPtl
#     2022-12-18 10:17:10   03132278a4cf12a5e7b0_version 3.3
#     2022-12-18 10:16:58   03132278b4e62d74ab52_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/03132278b4e62d74ab52163417818099867.png
#     2022-12-18 10:16:58   03132278b4e62d74ab52_id 03132278b4e62d74ab52
#     2022-12-18 10:17:12   03132278b4e62d74ab52_ip 192.168.9.77
#     2022-12-18 10:16:58   03132278b4e62d74ab52_localkey 0b845fe9d56d2e03
#     2022-12-18 10:16:58   03132278b4e62d74ab52_name Leselampe 1
#     2022-12-18 10:16:58   03132278b4e62d74ab52_productid r15JnoGqWPM4PPtl
#     2022-12-18 10:17:12   03132278b4e62d74ab52_version 3.3
#     2022-12-18 10:16:58   03132278b4e62d74ab8f_icon https://images.tuyaeu.com/smart/icon/152956414744qw5qx565_0.jpg
#     2022-12-18 10:16:58   03132278b4e62d74ab8f_id 03132278b4e62d74ab8f
#     2022-12-18 10:17:13   03132278b4e62d74ab8f_ip offline
#     2022-12-18 10:16:58   03132278b4e62d74ab8f_localkey 61876a0d33922021
#     2022-12-18 10:16:58   03132278b4e62d74ab8f_name ZOO JL10
#     2022-12-18 10:16:58   03132278b4e62d74ab8f_productid r15JnoGqWPM4PPtl
#     2022-12-18 10:17:13   03132278b4e62d74ab8f_version 3.3
#     2022-12-18 10:16:59   03132278b4e62d74b293_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/03132278b4e62d74b293163417905557436.png
#     2022-12-18 10:16:59   03132278b4e62d74b293_id 03132278b4e62d74b293
#     2022-12-18 10:17:13   03132278b4e62d74b293_ip offline
#     2022-12-18 10:16:59   03132278b4e62d74b293_localkey 0a1f804404f7ac0c
#     2022-12-18 10:16:59   03132278b4e62d74b293_name UV Pflanzenlampe
#     2022-12-18 10:16:59   03132278b4e62d74b293_productid r15JnoGqWPM4PPtl
#     2022-12-18 10:17:13   03132278b4e62d74b293_version 3.3
#     2022-12-18 10:16:57   04086463840d8e50124b_icon https://images.tuyaeu.com/smart/icon/1504185916_0.png
#     2022-12-18 10:16:57   04086463840d8e50124b_id 04086463840d8e50124b
#     2022-12-18 10:17:12   04086463840d8e50124b_ip 192.168.9.79
#     2022-12-18 10:16:57   04086463840d8e50124b_localkey 3c8b3f7c92b627e5
#     2022-12-18 10:16:57   04086463840d8e50124b_name PS3 Wohnen 1
#     2022-12-18 10:16:57   04086463840d8e50124b_productid D7Hl3AxFbHDS98iO
#     2022-12-18 10:17:12   04086463840d8e50124b_version 3.1
#     2022-12-18 10:16:54   045074212462ab24e988_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   045074212462ab24e988_id 045074212462ab24e988
#     2022-12-18 10:17:10   045074212462ab24e988_ip 192.168.9.34
#     2022-12-18 10:16:54   045074212462ab24e988_localkey 6e637c2cfed441d8
#     2022-12-18 10:16:54   045074212462ab24e988_name SP04 Spülmaschine
#     2022-12-18 10:16:54   045074212462ab24e988_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   045074212462ab24e988_version 3.3
#     2022-12-18 10:16:55   045074212cf432ca0721_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:55   045074212cf432ca0721_id 045074212cf432ca0721
#     2022-12-18 10:17:11   045074212cf432ca0721_ip 192.168.9.32
#     2022-12-18 10:16:55   045074212cf432ca0721_localkey b43e3e9db35e85e8
#     2022-12-18 10:16:55   045074212cf432ca0721_name SP2 Kühlschrank HWR
#     2022-12-18 10:16:55   045074212cf432ca0721_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   045074212cf432ca0721_version 3.3
#     2022-12-18 10:16:55   06515140cc50e3d62490_icon https://images.tuyaeu.com/smart/icon/1528364694thahb9sok2l_0.png
#     2022-12-18 10:16:55   06515140cc50e3d62490_id 06515140cc50e3d62490
#     2022-12-18 10:17:10   06515140cc50e3d62490_ip 192.168.9.53
#     2022-12-18 10:16:55   06515140cc50e3d62490_localkey 0aa2002f6c628d34
#     2022-12-18 10:16:55   06515140cc50e3d62490_name Sirene 3
#     2022-12-18 10:16:55   06515140cc50e3d62490_productid DYgId0sz6zWlmmYu
#     2022-12-18 10:17:10   06515140cc50e3d62490_version 3.1
#     2022-12-18 10:16:58   067327848cce4ec3fe13_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/067327848cce4ec3fe1316341794790321.png
#     2022-12-18 10:16:58   067327848cce4ec3fe13_id 067327848cce4ec3fe13
#     2022-12-18 10:17:12   067327848cce4ec3fe13_ip 192.168.9.24
#     2022-12-18 10:16:58   067327848cce4ec3fe13_localkey 2d968ccae1083e52
#     2022-12-18 10:16:58   067327848cce4ec3fe13_name Toilette
#     2022-12-18 10:16:58   067327848cce4ec3fe13_productid fcLzUB4zWk95xYdk
#     2022-12-18 10:17:12   067327848cce4ec3fe13_version 3.3
#     2022-12-18 10:16:55   074124042cf4326f08c2_icon https://images.tuyaeu.com/smart/product_icon2/kg_1.png
#     2022-12-18 10:16:55   074124042cf4326f08c2_id 074124042cf4326f08c2
#     2022-12-18 10:17:10   074124042cf4326f08c2_ip 192.168.9.21
#     2022-12-18 10:16:55   074124042cf4326f08c2_localkey 4d150c756e7224e0
#     2022-12-18 10:16:55   074124042cf4326f08c2_name Küche oben
#     2022-12-18 10:16:55   074124042cf4326f08c2_productid mPRaDY6QmEFXOTYm
#     2022-12-18 10:17:10   074124042cf4326f08c2_version 3.3
#     2022-12-18 10:16:55   07412404cc50e3746c29_icon https://images.tuyaeu.com/smart/product_icon2/kg_1.png
#     2022-12-18 10:16:55   07412404cc50e3746c29_id 07412404cc50e3746c29
#     2022-12-18 10:17:11   07412404cc50e3746c29_ip 192.168.9.78
#     2022-12-18 10:16:55   07412404cc50e3746c29_localkey 802f4b27a1ebbdea
#     2022-12-18 10:16:55   07412404cc50e3746c29_name Bad 2
#     2022-12-18 10:16:55   07412404cc50e3746c29_productid mPRaDY6QmEFXOTYm
#     2022-12-18 10:17:11   07412404cc50e3746c29_version 3.3
#     2022-12-18 10:16:55   07847240bcddc29b03e9_icon https://images.tuyaeu.com/smart/icon/1534401999ezpgt19rc8l_0.png
#     2022-12-18 10:16:55   07847240bcddc29b03e9_id 07847240bcddc29b03e9
#     2022-12-18 10:17:10   07847240bcddc29b03e9_ip 192.168.9.98
#     2022-12-18 10:16:55   07847240bcddc29b03e9_localkey f98896e0ad1caba6
#     2022-12-18 10:16:55   07847240bcddc29b03e9_name Sirene 2 Temp
#     2022-12-18 10:16:55   07847240bcddc29b03e9_productid eISESdwVoVIV3axj
#     2022-12-18 10:17:10   07847240bcddc29b03e9_version 3.3
#     2022-12-18 10:16:55   07847240dc4f225fdda0_icon https://images.tuyaeu.com/smart/icon/1534401999ezpgt19rc8l_0.png
#     2022-12-18 10:16:55   07847240dc4f225fdda0_id 07847240dc4f225fdda0
#     2022-12-18 10:17:10   07847240dc4f225fdda0_ip 192.168.9.83
#     2022-12-18 10:16:55   07847240dc4f225fdda0_localkey adfdd8975615519e
#     2022-12-18 10:16:55   07847240dc4f225fdda0_name Sirene 1 Temp
#     2022-12-18 10:16:55   07847240dc4f225fdda0_productid eISESdwVoVIV3axj
#     2022-12-18 10:17:10   07847240dc4f225fdda0_version 3.3
#     2022-12-18 10:16:56   104380002462ab2f8ac0_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/104380002462ab2f8ac0163417849807563.png
#     2022-12-18 10:16:56   104380002462ab2f8ac0_id 104380002462ab2f8ac0
#     2022-12-18 10:17:11   104380002462ab2f8ac0_ip 192.168.9.49
#     2022-12-18 10:16:56   104380002462ab2f8ac0_localkey a6015a85cfa6f812
#     2022-12-18 10:16:56   104380002462ab2f8ac0_name Dunstabzug
#     2022-12-18 10:16:56   104380002462ab2f8ac0_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:11   104380002462ab2f8ac0_version 3.3
#     2022-12-18 10:16:55   104380002462ab301b83_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/104380002462ab301b83163417879515259.png
#     2022-12-18 10:16:55   104380002462ab301b83_id 104380002462ab301b83
#     2022-12-18 10:17:11   104380002462ab301b83_ip 192.168.9.76
#     2022-12-18 10:16:55   104380002462ab301b83_localkey 5bf8e554de9b7777
#     2022-12-18 10:16:55   104380002462ab301b83_name Router EAP225
#     2022-12-18 10:16:55   104380002462ab301b83_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:11   104380002462ab301b83_version 3.3
#     2022-12-18 10:17:01   104380002462ab30258d_icon https://images.tuyaeu.com/smart/icon/1541647698myzx2yx1yk_0.jpg
#     2022-12-18 10:17:01   104380002462ab30258d_id 104380002462ab30258d
#     2022-12-18 10:17:14   104380002462ab30258d_ip offline
#     2022-12-18 10:17:01   104380002462ab30258d_localkey 494dc6017b06a443
#     2022-12-18 10:17:01   104380002462ab30258d_name Heizdecke 3
#     2022-12-18 10:17:01   104380002462ab30258d_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:14   104380002462ab30258d_version 3.3
#     2022-12-18 10:16:58   10438000d8f15ba4ccd3_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/10438000d8f15ba4ccd3163417799266254.png
#     2022-12-18 10:16:58   10438000d8f15ba4ccd3_id 10438000d8f15ba4ccd3
#     2022-12-18 10:17:12   10438000d8f15ba4ccd3_ip 192.168.9.44
#     2022-12-18 10:16:58   10438000d8f15ba4ccd3_localkey 8ef2d52a326d2259
#     2022-12-18 10:16:58   10438000d8f15ba4ccd3_name Medien Schlafzimmer
#     2022-12-18 10:16:58   10438000d8f15ba4ccd3_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:12   10438000d8f15ba4ccd3_version 3.3
#     2022-12-18 10:17:00   12280017d8f15bdedda5_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:17:00   12280017d8f15bdedda5_id 12280017d8f15bdedda5
#     2022-12-18 10:17:14   12280017d8f15bdedda5_ip offline
#     2022-12-18 10:17:00   12280017d8f15bdedda5_localkey f5e3dac18c0aa670
#     2022-12-18 10:17:00   12280017d8f15bdedda5_name Gartengrill
#     2022-12-18 10:17:00   12280017d8f15bdedda5_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:14   12280017d8f15bdedda5_version 3.3
#     2022-12-18 10:16:56   17710212600194dba99d_icon https://images.tuyaeu.com/smart/program_category_icon/cz.png
#     2022-12-18 10:16:56   17710212600194dba99d_id 17710212600194dba99d
#     2022-12-18 10:17:11   17710212600194dba99d_ip 192.168.9.45
#     2022-12-18 10:16:56   17710212600194dba99d_localkey 9a0dadfb74c3a46f
#     2022-12-18 10:16:56   17710212600194dba99d_name Steckdose THOMAS Türe
#     2022-12-18 10:16:56   17710212600194dba99d_productid namu1lshm4jrx1td
#     2022-12-18 10:17:11   17710212600194dba99d_version 3.3
#     2022-12-18 10:16:58   17710212600194dbaba8_icon https://images.tuyaeu.com/smart/program_category_icon/cz.png
#     2022-12-18 10:16:58   17710212600194dbaba8_id 17710212600194dbaba8
#     2022-12-18 10:17:12   17710212600194dbaba8_ip 192.168.9.46
#     2022-12-18 10:16:58   17710212600194dbaba8_localkey e57c01322fc2deec
#     2022-12-18 10:16:58   17710212600194dbaba8_name Steckdose PETRA 1
#     2022-12-18 10:16:58   17710212600194dbaba8_productid namu1lshm4jrx1td
#     2022-12-18 10:17:12   17710212600194dbaba8_version 3.3
#     2022-12-18 10:16:59   180025363c6105dcdcaf_icon https://images.tuyaeu.com/smart/icon/1544066741n1omnq1w67_0.jpg
#     2022-12-18 10:16:59   180025363c6105dcdcaf_id 180025363c6105dcdcaf
#     2022-12-18 10:17:13   180025363c6105dcdcaf_ip offline
#     2022-12-18 10:16:59   180025363c6105dcdcaf_localkey cc76fb631ac08b09
#     2022-12-18 10:16:59   180025363c6105dcdcaf_name Wassermelder
#     2022-12-18 10:16:59   180025363c6105dcdcaf_productid KoAUR5fdtDso34VM
#     2022-12-18 10:17:13   180025363c6105dcdcaf_version 3.3
#     2022-12-18 10:16:55   2053863070039f16cebe_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/d6d1396a4acbafed7c7542c7bddc2fff.png
#     2022-12-18 10:16:55   2053863070039f16cebe_id 2053863070039f16cebe
#     2022-12-18 10:17:10   2053863070039f16cebe_ip 192.168.9.85
#     2022-12-18 10:16:55   2053863070039f16cebe_localkey 3abc6eb9eff1cf8e
#     2022-12-18 10:16:55   2053863070039f16cebe_name Leselampe 2
#     2022-12-18 10:16:55   2053863070039f16cebe_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:11   2053863070039f16cebe_version 3.3
#     2022-12-18 10:16:59   2053863070039f16cef8_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/d6d1396a4acbafed7c7542c7bddc2fff.png
#     2022-12-18 10:16:59   2053863070039f16cef8_id 2053863070039f16cef8
#     2022-12-18 10:17:13   2053863070039f16cef8_ip offline
#     2022-12-18 10:16:59   2053863070039f16cef8_localkey eaa0119565b42c6c
#     2022-12-18 10:16:59   2053863070039f16cef8_name Soundbar Wohnzimmer
#     2022-12-18 10:16:59   2053863070039f16cef8_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:13   2053863070039f16cef8_version 3.3
#     2022-12-18 10:16:57   2053863070039f179683_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/d6d1396a4acbafed7c7542c7bddc2fff.png
#     2022-12-18 10:16:57   2053863070039f179683_id 2053863070039f179683
#     2022-12-18 10:17:12   2053863070039f179683_ip 192.168.9.59
#     2022-12-18 10:16:57   2053863070039f179683_localkey 8c15546d598a51f9
#     2022-12-18 10:16:57   2053863070039f179683_name Medien Wohnzimmer
#     2022-12-18 10:16:57   2053863070039f179683_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:12   2053863070039f179683_version 3.3
#     2022-12-18 10:16:58   20538630c44f33f7b2b6_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/d6d1396a4acbafed7c7542c7bddc2fff.png
#     2022-12-18 10:16:58   20538630c44f33f7b2b6_id 20538630c44f33f7b2b6
#     2022-12-18 10:17:13   20538630c44f33f7b2b6_ip offline
#     2022-12-18 10:16:58   20538630c44f33f7b2b6_localkey b2b021b05d25903e
#     2022-12-18 10:16:58   20538630c44f33f7b2b6_name Kaffeemaschine Thomas
#     2022-12-18 10:16:58   20538630c44f33f7b2b6_productid 37mnhia3pojleqfh
#     2022-12-18 10:17:13   20538630c44f33f7b2b6_version 3.3
#     2022-12-18 10:17:01   21410806cc50e37bdb15_icon https://images.tuyaeu.com/smart/icon/dj.png
#     2022-12-18 10:17:01   21410806cc50e37bdb15_id 21410806cc50e37bdb15
#     2022-12-18 10:17:14   21410806cc50e37bdb15_ip offline
#     2022-12-18 10:17:01   21410806cc50e37bdb15_localkey b2caca9dc178ec87
#     2022-12-18 10:17:01   21410806cc50e37bdb15_name Dimmer 2
#     2022-12-18 10:17:01   21410806cc50e37bdb15_productid bSXSSFArVKtc4DyC
#     2022-12-18 10:17:14   21410806cc50e37bdb15_version 3.3
#     2022-12-18 10:16:54   22230808807d3a231039_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808807d3a231039163415814096745.png
#     2022-12-18 10:16:54   22230808807d3a231039_id 22230808807d3a231039
#     2022-12-18 10:17:10   22230808807d3a231039_ip 192.168.9.68
#     2022-12-18 10:16:54   22230808807d3a231039_localkey fbcb762730c39536
#     2022-12-18 10:16:54   22230808807d3a231039_name NAS Schreibtisch
#     2022-12-18 10:16:54   22230808807d3a231039_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:10   22230808807d3a231039_version 3.1
#     2022-12-18 10:16:56   22230808807d3a23186b_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808807d3a23186b163415762424492.png
#     2022-12-18 10:16:56   22230808807d3a23186b_id 22230808807d3a23186b
#     2022-12-18 10:17:11   22230808807d3a23186b_ip 192.168.9.87
#     2022-12-18 10:16:56   22230808807d3a23186b_localkey a2693a5844ce166d
#     2022-12-18 10:16:56   22230808807d3a23186b_name JL04 BKT3
#     2022-12-18 10:16:56   22230808807d3a23186b_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:11   22230808807d3a23186b_version 3.1
#     2022-12-18 10:16:56   2223080884f3eb466414_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/2223080884f3eb466414163417857767272.png
#     2022-12-18 10:16:56   2223080884f3eb466414_id 2223080884f3eb466414
#     2022-12-18 10:17:11   2223080884f3eb466414_ip 192.168.9.75
#     2022-12-18 10:16:56   2223080884f3eb466414_localkey 824ea2c9d41a3ec1
#     2022-12-18 10:16:56   2223080884f3eb466414_name Kaffeemaschine Küche
#     2022-12-18 10:16:56   2223080884f3eb466414_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:11   2223080884f3eb466414_version 3.1
#     2022-12-18 10:16:59   22230808bcddc2135068_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808bcddc2135068163417805835187.png
#     2022-12-18 10:16:59   22230808bcddc2135068_id 22230808bcddc2135068
#     2022-12-18 10:17:13   22230808bcddc2135068_ip offline
#     2022-12-18 10:16:59   22230808bcddc2135068_localkey c0aa3a00c215aa39
#     2022-12-18 10:16:59   22230808bcddc2135068_name Fernseher Wohnzimmer
#     2022-12-18 10:16:59   22230808bcddc2135068_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:13   22230808bcddc2135068_version 3.3
#     2022-12-18 10:16:58   22230808bcddc2135132_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808bcddc2135132163415768180381.png
#     2022-12-18 10:16:58   22230808bcddc2135132_id 22230808bcddc2135132
#     2022-12-18 10:17:13   22230808bcddc2135132_ip 192.168.9.99
#     2022-12-18 10:16:58   22230808bcddc2135132_localkey b7b7f3b3a75bce96
#     2022-12-18 10:16:58   22230808bcddc2135132_name Schreibtisch Petra
#     2022-12-18 10:16:58   22230808bcddc2135132_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:13   22230808bcddc2135132_version 3.1
#     2022-12-18 10:16:54   22230808bcddc2135137_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808bcddc2135137163415758338185.png
#     2022-12-18 10:16:54   22230808bcddc2135137_id 22230808bcddc2135137
#     2022-12-18 10:17:10   22230808bcddc2135137_ip 192.168.9.84
#     2022-12-18 10:16:54   22230808bcddc2135137_localkey 5b9b6cd11ad3eab4
#     2022-12-18 10:16:54   22230808bcddc2135137_name JL07 BKT2
#     2022-12-18 10:16:54   22230808bcddc2135137_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:10   22230808bcddc2135137_version 3.1
#     2022-12-18 10:16:54   22230808bcddc213f838_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/22230808bcddc213f83816341577256478.png
#     2022-12-18 10:16:54   22230808bcddc213f838_id 22230808bcddc213f838
#     2022-12-18 10:17:10   22230808bcddc213f838_ip 192.168.9.66
#     2022-12-18 10:16:54   22230808bcddc213f838_localkey f4a3b7649a5e4fd8
#     2022-12-18 10:16:54   22230808bcddc213f838_name JL06 frei
#     2022-12-18 10:16:54   22230808bcddc213f838_productid 1hxNMF9lRQL2xpEA
#     2022-12-18 10:17:10   22230808bcddc213f838_version 3.1
#     2022-12-18 10:16:55   260064612462ab24f164_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:55   260064612462ab24f164_id 260064612462ab24f164
#     2022-12-18 10:17:10   260064612462ab24f164_ip 192.168.9.33
#     2022-12-18 10:16:55   260064612462ab24f164_localkey b37a96597e2837b4
#     2022-12-18 10:16:55   260064612462ab24f164_name SP3 Kühlschrank Küche
#     2022-12-18 10:16:55   260064612462ab24f164_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   260064612462ab24f164_version 3.3
#     2022-12-18 10:16:55   260064612cf432ca55d8_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:55   260064612cf432ca55d8_id 260064612cf432ca55d8
#     2022-12-18 10:17:10   260064612cf432ca55d8_ip 192.168.9.31
#     2022-12-18 10:16:55   260064612cf432ca55d8_localkey 52a00c366067a6f7
#     2022-12-18 10:16:55   260064612cf432ca55d8_name SP1 Waschmaschine
#     2022-12-18 10:16:55   260064612cf432ca55d8_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   260064612cf432ca55d8_version 3.3
#     2022-12-18 10:16:56   30180616dc4f22fc97ae_icon https://images.tuyaeu.com/smart/icon/1553220447w51qc6eyig_0.jpg
#     2022-12-18 10:16:56   30180616dc4f22fc97ae_id 30180616dc4f22fc97ae
#     2022-12-18 10:17:11   30180616dc4f22fc97ae_ip 192.168.9.28
#     2022-12-18 10:16:56   30180616dc4f22fc97ae_localkey 146b39d4a5992d2f
#     2022-12-18 10:16:56   30180616dc4f22fc97ae_name Kleiderschrank 1
#     2022-12-18 10:16:56   30180616dc4f22fc97ae_productid ON0fHlAaAf7Pt7ja
#     2022-12-18 10:17:11   30180616dc4f22fc97ae_version 3.1
#     2022-12-18 10:16:54   30180616dc4f22fc986a_icon https://images.tuyaeu.com/smart/icon/1553220447w51qc6eyig_0.jpg
#     2022-12-18 10:16:54   30180616dc4f22fc986a_id 30180616dc4f22fc986a
#     2022-12-18 10:17:10   30180616dc4f22fc986a_ip 192.168.9.42
#     2022-12-18 10:16:54   30180616dc4f22fc986a_localkey fe51534f379b27c0
#     2022-12-18 10:16:54   30180616dc4f22fc986a_name Springbrunnen
#     2022-12-18 10:16:54   30180616dc4f22fc986a_productid ON0fHlAaAf7Pt7ja
#     2022-12-18 10:17:10   30180616dc4f22fc986a_version 3.1
#     2022-12-18 10:16:57   30180616dc4f22fc9a71_icon https://images.tuyaeu.com/smart/icon/1553220447w51qc6eyig_0.jpg
#     2022-12-18 10:16:57   30180616dc4f22fc9a71_id 30180616dc4f22fc9a71
#     2022-12-18 10:17:12   30180616dc4f22fc9a71_ip 192.168.9.41
#     2022-12-18 10:16:57   30180616dc4f22fc9a71_localkey 3fd05440412ec1f5
#     2022-12-18 10:16:57   30180616dc4f22fc9a71_name Küche Herd
#     2022-12-18 10:16:57   30180616dc4f22fc9a71_productid ON0fHlAaAf7Pt7ja
#     2022-12-18 10:17:12   30180616dc4f22fc9a71_version 3.1
#     2022-12-18 10:16:57   30510063d8bfc00b396b_icon https://images.tuyaeu.com/smart/icon/ay1530852819489IlyEr/2095506b84aecb16a843c2d04b4ccd61.png
#     2022-12-18 10:16:57   30510063d8bfc00b396b_id 30510063d8bfc00b396b
#     2022-12-18 10:17:12   30510063d8bfc00b396b_ip 192.168.9.40
#     2022-12-18 10:16:57   30510063d8bfc00b396b_localkey d559d18f36e9d325
#     2022-12-18 10:16:57   30510063d8bfc00b396b_name Schlafzimmer oben
#     2022-12-18 10:16:57   30510063d8bfc00b396b_productid 6agmomauevaw5zav
#     2022-12-18 10:17:12   30510063d8bfc00b396b_version 3.3
#     2022-12-18 10:16:57   3367036770039f60c576_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/3367036770039f60c576163417966053451.png
#     2022-12-18 10:16:57   3367036770039f60c576_id 3367036770039f60c576
#     2022-12-18 10:17:12   3367036770039f60c576_ip 192.168.9.27
#     2022-12-18 10:16:57   3367036770039f60c576_localkey 628b38730b4c06e3
#     2022-12-18 10:16:57   3367036770039f60c576_name Steckdose Garage 1
#     2022-12-18 10:16:57   3367036770039f60c576_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   3367036770039f60c576_version 3.3
#     2022-12-18 10:16:57   3367036770039f60ce2b_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:57   3367036770039f60ce2b_id 3367036770039f60ce2b
#     2022-12-18 10:17:12   3367036770039f60ce2b_ip 192.168.9.62
#     2022-12-18 10:16:57   3367036770039f60ce2b_localkey 7322892db7dfa5bd
#     2022-12-18 10:16:57   3367036770039f60ce2b_name USB Lader 1 Thomas
#     2022-12-18 10:16:57   3367036770039f60ce2b_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   3367036770039f60ce2b_version 3.3
#     2022-12-18 10:16:57   3367036770039f613620_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:57   3367036770039f613620_id 3367036770039f613620
#     2022-12-18 10:17:12   3367036770039f613620_ip 192.168.9.81
#     2022-12-18 10:16:57   3367036770039f613620_localkey 9ef95a16eea43688
#     2022-12-18 10:16:57   3367036770039f613620_name USB Lader 2 Thomas
#     2022-12-18 10:16:57   3367036770039f613620_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   3367036770039f613620_version 3.3
#     2022-12-18 10:16:57   33670367c4dd573813d8_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:57   33670367c4dd573813d8_id 33670367c4dd573813d8
#     2022-12-18 10:17:12   33670367c4dd573813d8_ip 192.168.9.38
#     2022-12-18 10:16:57   33670367c4dd573813d8_localkey 89b8de9eed9ef579
#     2022-12-18 10:16:57   33670367c4dd573813d8_name USB Lader 3 Thomas
#     2022-12-18 10:16:57   33670367c4dd573813d8_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   33670367c4dd573813d8_version 3.3
#     2022-12-18 10:16:59   34602852ecfabc47cbe1_icon https://images.tuyaeu.com/smart/product_icon/qt.png
#     2022-12-18 10:16:59   34602852ecfabc47cbe1_id 34602852ecfabc47cbe1
#     2022-12-18 10:17:13   34602852ecfabc47cbe1_ip offline
#     2022-12-18 10:16:59   34602852ecfabc47cbe1_localkey d06e40ee498060c8
#     2022-12-18 10:16:59   34602852ecfabc47cbe1_name Rolltor
#     2022-12-18 10:16:59   34602852ecfabc47cbe1_productid 7by9ERqg60JA8wxA
#     2022-12-18 10:17:13   34602852ecfabc47cbe1_version 3.3
#     2022-12-18 10:16:54   41888155dc4f229d95af_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   41888155dc4f229d95af_id 41888155dc4f229d95af
#     2022-12-18 10:17:10   41888155dc4f229d95af_ip 192.168.9.36
#     2022-12-18 10:16:54   41888155dc4f229d95af_localkey b54391dbd2d9f161
#     2022-12-18 10:16:54   41888155dc4f229d95af_name SP06 EX18
#     2022-12-18 10:16:54   41888155dc4f229d95af_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   41888155dc4f229d95af_version 3.3
#     2022-12-18 10:16:56   44277377840d8e5e47c8_icon https://images.tuyaeu.com/smart/icon/1504185916_0.png
#     2022-12-18 10:16:56   44277377840d8e5e47c8_id 44277377840d8e5e47c8
#     2022-12-18 10:17:11   44277377840d8e5e47c8_ip offline
#     2022-12-18 10:16:56   44277377840d8e5e47c8_localkey 5cdad42a6c79ca1f
#     2022-12-18 10:16:56   44277377840d8e5e47c8_name PS5 Garage
#     2022-12-18 10:16:56   44277377840d8e5e47c8_productid D7Hl3AxFbHDS98iO
#     2022-12-18 10:17:11   44277377840d8e5e47c8_version 3.3
#     2022-12-18 10:16:59   453005615002911dfe06_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/453005615002911dfe06163417957708355.png
#     2022-12-18 10:16:59   453005615002911dfe06_id 453005615002911dfe06
#     2022-12-18 10:17:13   453005615002911dfe06_ip 192.168.9.54
#     2022-12-18 10:16:59   453005615002911dfe06_localkey db41567569a265b4
#     2022-12-18 10:16:59   453005615002911dfe06_name Heizkissen 2
#     2022-12-18 10:16:59   453005615002911dfe06_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   453005615002911dfe06_version 3.3
#     2022-12-18 10:16:55   453005615002911e00b4_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:55   453005615002911e00b4_id 453005615002911e00b4
#     2022-12-18 10:17:11   453005615002911e00b4_ip 192.168.9.73
#     2022-12-18 10:16:55   453005615002911e00b4_localkey 82a5beef86e160cd
#     2022-12-18 10:16:55   453005615002911e00b4_name USB Lader 5 Bett
#     2022-12-18 10:16:55   453005615002911e00b4_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:11   453005615002911e00b4_version 3.3
#     2022-12-18 10:16:59   4530056170039f4a808b_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/4530056170039f4a808b163417934465521.png
#     2022-12-18 10:16:59   4530056170039f4a808b_id 4530056170039f4a808b
#     2022-12-18 10:17:13   4530056170039f4a808b_ip offline
#     2022-12-18 10:16:59   4530056170039f4a808b_localkey 35a617145fa97b06
#     2022-12-18 10:16:59   4530056170039f4a808b_name Leselampe 4
#     2022-12-18 10:16:59   4530056170039f4a808b_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   4530056170039f4a808b_version 3.3
#     2022-12-18 10:16:59   4530056170039f4a87e5_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:59   4530056170039f4a87e5_id 4530056170039f4a87e5
#     2022-12-18 10:17:13   4530056170039f4a87e5_ip offline
#     2022-12-18 10:16:59   4530056170039f4a87e5_localkey 2204c23a9c30d10b
#     2022-12-18 10:16:59   4530056170039f4a87e5_name Heizdecke 1
#     2022-12-18 10:16:59   4530056170039f4a87e5_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   4530056170039f4a87e5_version 3.3
#     2022-12-18 10:16:57   47104178dc4f2236e437_icon https://images.tuyaeu.com/smart/icon/1526403552c7uw51lvs7lmwf8ljr2qllq5mi_0.png
#     2022-12-18 10:16:57   47104178dc4f2236e437_id 47104178dc4f2236e437
#     2022-12-18 10:17:12   47104178dc4f2236e437_ip 192.168.9.51
#     2022-12-18 10:16:57   47104178dc4f2236e437_localkey bc16d1d29f2b2c9e
#     2022-12-18 10:16:57   47104178dc4f2236e437_name Garagentor
#     2022-12-18 10:16:57   47104178dc4f2236e437_productid ld4GRDxQZZ2NAnk6
#     2022-12-18 10:17:12   47104178dc4f2236e437_version 3.1
#     2022-12-18 10:16:55   50134218c4dd571b3390_icon https://images.tuyaeu.com/smart/icon/1555585425a1oqvs7elur_0.jpg
#     2022-12-18 10:16:55   50134218c4dd571b3390_id 50134218c4dd571b3390
#     2022-12-18 10:17:10   50134218c4dd571b3390_ip offline
#     2022-12-18 10:16:55   50134218c4dd571b3390_localkey fce75597b4421601
#     2022-12-18 10:16:55   50134218c4dd571b3390_name PS7 zbV
#     2022-12-18 10:16:55   50134218c4dd571b3390_productid gl5fdiv1tc9mkvlp
#     2022-12-18 10:17:10   50134218c4dd571b3390_version 3.3
#     2022-12-18 10:16:59   5062137624a1600b6d62_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/6148b7b09db869f44d97d64efd75781d.jpg
#     2022-12-18 10:16:59   5062137624a1600b6d62_id 5062137624a1600b6d62
#     2022-12-18 10:17:13   5062137624a1600b6d62_ip offline
#     2022-12-18 10:16:59   5062137624a1600b6d62_localkey d029f7f52f9fbec5
#     2022-12-18 10:16:59   5062137624a1600b6d62_name Heizdecke 2
#     2022-12-18 10:16:59   5062137624a1600b6d62_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   5062137624a1600b6d62_version 3.3
#     2022-12-18 10:16:57   5062137624a1600b9479_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/5062137624a1600b9479163417873444451.png
#     2022-12-18 10:16:57   5062137624a1600b9479_id 5062137624a1600b9479
#     2022-12-18 10:17:12   5062137624a1600b9479_ip 192.168.9.26
#     2022-12-18 10:16:57   5062137624a1600b9479_localkey 6e11e14987828d1c
#     2022-12-18 10:16:57   5062137624a1600b9479_name Duravit Bidet
#     2022-12-18 10:16:57   5062137624a1600b9479_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   5062137624a1600b9479_version 3.3
#     2022-12-18 10:16:59   50621376c4dd57125717_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/50621376c4dd5712571716341794176501.png
#     2022-12-18 10:16:59   50621376c4dd57125717_id 50621376c4dd57125717
#     2022-12-18 10:17:13   50621376c4dd57125717_ip offline
#     2022-12-18 10:16:59   50621376c4dd57125717_localkey e61c8eb5d24cf300
#     2022-12-18 10:16:59   50621376c4dd57125717_name Leselampe 5
#     2022-12-18 10:16:59   50621376c4dd57125717_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   50621376c4dd57125717_version 3.3
#     2022-12-18 10:16:59   50621376c4dd57131135_icon https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/50621376c4dd57131135163417952893779.png
#     2022-12-18 10:16:59   50621376c4dd57131135_id 50621376c4dd57131135
#     2022-12-18 10:17:13   50621376c4dd57131135_ip 192.168.9.92
#     2022-12-18 10:16:59   50621376c4dd57131135_localkey f215d22a78c5f9ba
#     2022-12-18 10:16:59   50621376c4dd57131135_name Heizkissen 1
#     2022-12-18 10:16:59   50621376c4dd57131135_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:13   50621376c4dd57131135_version 3.3
#     2022-12-18 10:17:01   50880180840d8e87664b_icon https://images.tuyaeu.com/smart/icon/1528364839bqwi2byfbhv_0.png
#     2022-12-18 10:17:01   50880180840d8e87664b_id 50880180840d8e87664b
#     2022-12-18 10:17:14   50880180840d8e87664b_ip offline
#     2022-12-18 10:17:01   50880180840d8e87664b_localkey fec41c3edc0c787d
#     2022-12-18 10:17:01   50880180840d8e87664b_name Wassersensor 2 Heizraum
#     2022-12-18 10:17:01   50880180840d8e87664b_productid SmFKLTOcGHbPQvmh
#     2022-12-18 10:17:14   50880180840d8e87664b_version 3.3
#     2022-12-18 10:17:01   50880180cc50e30c4c90_icon https://images.tuyaeu.com/smart/icon/1528364839bqwi2byfbhv_0.png
#     2022-12-18 10:17:01   50880180cc50e30c4c90_id 50880180cc50e30c4c90
#     2022-12-18 10:17:14   50880180cc50e30c4c90_ip offline
#     2022-12-18 10:17:01   50880180cc50e30c4c90_localkey 9b7df3fc66763e8b
#     2022-12-18 10:17:01   50880180cc50e30c4c90_name Wassersensor 3 Waschmaschine
#     2022-12-18 10:17:01   50880180cc50e30c4c90_productid SmFKLTOcGHbPQvmh
#     2022-12-18 10:17:14   50880180cc50e30c4c90_version 3.3
#     2022-12-18 10:17:00   50880180cc50e30cbe91_icon https://images.tuyaeu.com/smart/icon/1528364839bqwi2byfbhv_0.png
#     2022-12-18 10:17:00   50880180cc50e30cbe91_id 50880180cc50e30cbe91
#     2022-12-18 10:17:14   50880180cc50e30cbe91_ip offline
#     2022-12-18 10:17:00   50880180cc50e30cbe91_localkey 7db73073d587d531
#     2022-12-18 10:17:00   50880180cc50e30cbe91_name Wassersensor 1 Küche
#     2022-12-18 10:17:00   50880180cc50e30cbe91_productid SmFKLTOcGHbPQvmh
#     2022-12-18 10:17:14   50880180cc50e30cbe91_version 3.3
#     2022-12-18 10:16:56   52470320e09806c9a53f_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:56   52470320e09806c9a53f_id 52470320e09806c9a53f
#     2022-12-18 10:17:11   52470320e09806c9a53f_ip 192.168.9.70
#     2022-12-18 10:16:56   52470320e09806c9a53f_localkey b3ec7f7a682799d4
#     2022-12-18 10:16:56   52470320e09806c9a53f_name SP13 THOMAS Süd2 Schreibtisch
#     2022-12-18 10:16:56   52470320e09806c9a53f_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   52470320e09806c9a53f_version 3.3
#     2022-12-18 10:16:54   60020372840d8e6f937a_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   60020372840d8e6f937a_id 60020372840d8e6f937a
#     2022-12-18 10:17:10   60020372840d8e6f937a_ip 192.168.9.47
#     2022-12-18 10:16:54   60020372840d8e6f937a_localkey 026c4f068bfdc97f
#     2022-12-18 10:16:54   60020372840d8e6f937a_name SP05 EX17
#     2022-12-18 10:16:54   60020372840d8e6f937a_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   60020372840d8e6f937a_version 3.3
#     2022-12-18 10:16:59   60381718500291bade80_icon https://images.tuyaeu.com/smart/icon/1528364671b3tgndtkqr_0.png
#     2022-12-18 10:16:59   60381718500291bade80_id 60381718500291bade80
#     2022-12-18 10:17:13   60381718500291bade80_ip offline
#     2022-12-18 10:16:59   60381718500291bade80_localkey 8c17a8415057e4a7
#     2022-12-18 10:16:59   60381718500291bade80_name Haustüre
#     2022-12-18 10:16:59   60381718500291bade80_productid 6l4vhjl3gttstgxj
#     2022-12-18 10:17:13   60381718500291bade80_version 3.3
#     2022-12-18 10:16:54   60381718807d3a01eb63_icon https://images.tuyaeu.com/smart/icon/1528364671b3tgndtkqr_0.png
#     2022-12-18 10:16:54   60381718807d3a01eb63_id 60381718807d3a01eb63
#     2022-12-18 10:17:09   60381718807d3a01eb63_ip offline
#     2022-12-18 10:16:54   60381718807d3a01eb63_localkey 60d7c07cc350d317
#     2022-12-18 10:16:54   60381718807d3a01eb63_name Türsensor 3
#     2022-12-18 10:16:54   60381718807d3a01eb63_productid 6l4vhjl3gttstgxj
#     2022-12-18 10:17:09   60381718807d3a01eb63_version 3.3
#     2022-12-18 10:17:00   60381718807d3a04bbb4_icon https://images.tuyaeu.com/smart/icon/1528364671b3tgndtkqr_0.png
#     2022-12-18 10:17:00   60381718807d3a04bbb4_id 60381718807d3a04bbb4
#     2022-12-18 10:17:14   60381718807d3a04bbb4_ip offline
#     2022-12-18 10:17:00   60381718807d3a04bbb4_localkey 0b6ade2172baef93
#     2022-12-18 10:17:00   60381718807d3a04bbb4_name Türsensor 2
#     2022-12-18 10:17:00   60381718807d3a04bbb4_productid 6l4vhjl3gttstgxj
#     2022-12-18 10:17:14   60381718807d3a04bbb4_version 3.3
#     2022-12-18 10:16:55   620661512462ab30ddbd_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:55   620661512462ab30ddbd_id 620661512462ab30ddbd
#     2022-12-18 10:17:11   620661512462ab30ddbd_ip 192.168.9.35
#     2022-12-18 10:16:55   620661512462ab30ddbd_localkey 9faac636188ff4ef
#     2022-12-18 10:16:55   620661512462ab30ddbd_name Medien Petra
#     2022-12-18 10:16:55   620661512462ab30ddbd_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   620661512462ab30ddbd_version 3.3
#     2022-12-18 10:16:56   62066151d8f15bb08810_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:56   62066151d8f15bb08810_id 62066151d8f15bb08810
#     2022-12-18 10:17:11   62066151d8f15bb08810_ip 192.168.9.72
#     2022-12-18 10:16:56   62066151d8f15bb08810_localkey 0f67904fe7677fb8
#     2022-12-18 10:16:56   62066151d8f15bb08810_name SP11 THOMAS Ost
#     2022-12-18 10:16:56   62066151d8f15bb08810_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:11   62066151d8f15bb08810_version 3.3
#     2022-12-18 10:16:54   62066151d8f15bdec539_icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2022-12-18 10:16:54   62066151d8f15bdec539_id 62066151d8f15bdec539
#     2022-12-18 10:17:10   62066151d8f15bdec539_ip 192.168.9.29
#     2022-12-18 10:16:54   62066151d8f15bdec539_localkey 6bd97fc327e7f057
#     2022-12-18 10:16:54   62066151d8f15bdec539_name SP07 Garagenkeller
#     2022-12-18 10:16:54   62066151d8f15bdec539_productid IGzCi97RpN2Lf9cu
#     2022-12-18 10:17:10   62066151d8f15bdec539_version 3.3
#     2022-12-18 10:17:00   627425735002915f502b_icon https://images.tuyaeu.com/smart/icon/ay1524194438166Zg2hZ/c3db264e1bc8e6ab11cf88171e87dc39.jpg
#     2022-12-18 10:17:00   627425735002915f502b_id 627425735002915f502b
#     2022-12-18 10:17:14   627425735002915f502b_ip offline
#     2022-12-18 10:17:00   627425735002915f502b_localkey 6b53e2230bf927f2
#     2022-12-18 10:17:00   627425735002915f502b_name PIR Sensor 2
#     2022-12-18 10:17:00   627425735002915f502b_productid XFD2nSDKxFlGV5sV
#     2022-12-18 10:17:14   627425735002915f502b_version 3.3
#     2022-12-18 10:16:58   63667231840d8e501cab_icon https://images.tuyaeu.com/smart/icon/1504185916_0.png
#     2022-12-18 10:16:58   63667231840d8e501cab_id 63667231840d8e501cab
#     2022-12-18 10:17:13   63667231840d8e501cab_ip offline
#     2022-12-18 10:16:58   63667231840d8e501cab_localkey a801e4c40666c1e8
#     2022-12-18 10:16:58   63667231840d8e501cab_name PS4 Schreibtisch Petra
#     2022-12-18 10:16:58   63667231840d8e501cab_productid D7Hl3AxFbHDS98iO
#     2022-12-18 10:17:13   63667231840d8e501cab_version 3.3
#     2022-12-18 10:16:54   63667231dc4f22f329f1_icon https://images.tuyaeu.com/smart/icon/1504185916_0.png
#     2022-12-18 10:16:54   63667231dc4f22f329f1_id 63667231dc4f22f329f1
#     2022-12-18 10:17:10   63667231dc4f22f329f1_ip 192.168.9.89
#     2022-12-18 10:16:54   63667231dc4f22f329f1_localkey dd15e495a74e7d69
#     2022-12-18 10:16:54   63667231dc4f22f329f1_name PS2 ESSEN
#     2022-12-18 10:16:54   63667231dc4f22f329f1_productid D7Hl3AxFbHDS98iO
#     2022-12-18 10:17:10   63667231dc4f22f329f1_version 3.1
#     2022-12-18 10:16:58   63667231dc4f22f32f01_icon https://images.tuyaeu.com/smart/icon/1504185916_0.png
#     2022-12-18 10:16:58   63667231dc4f22f32f01_id 63667231dc4f22f32f01
#     2022-12-18 10:17:13   63667231dc4f22f32f01_ip offline
#     2022-12-18 10:16:58   63667231dc4f22f32f01_localkey 565c70fe237fc932
#     2022-12-18 10:16:58   63667231dc4f22f32f01_name PS1 Thomas Media
#     2022-12-18 10:16:58   63667231dc4f22f32f01_productid D7Hl3AxFbHDS98iO
#     2022-12-18 10:17:13   63667231dc4f22f32f01_version 3.3
#     2022-12-18 10:16:54   67242256f4cfa2ce1662_icon https://images.tuyaeu.com/smart/icon/1551969519maq7h6mi1l_0.jpg
#     2022-12-18 10:16:54   67242256f4cfa2ce1662_id 67242256f4cfa2ce1662
#     2022-12-18 10:17:09   67242256f4cfa2ce1662_ip offline
#     2022-12-18 10:16:54   67242256f4cfa2ce1662_localkey 20a826d3c4d36122
#     2022-12-18 10:16:54   67242256f4cfa2ce1662_name TürSensor 4
#     2022-12-18 10:16:54   67242256f4cfa2ce1662_productid hx5ztlztij4yxxvg
#     2022-12-18 10:17:09   67242256f4cfa2ce1662_version 3.3
#     2022-12-18 10:16:59   720570712462ab27e625_icon https://images.tuyaeu.com/smart/program_category_icon/cz.png
#     2022-12-18 10:16:59   720570712462ab27e625_id 720570712462ab27e625
#     2022-12-18 10:17:13   720570712462ab27e625_ip offline
#     2022-12-18 10:16:59   720570712462ab27e625_localkey 61a68dcc87fc6592
#     2022-12-18 10:16:59   720570712462ab27e625_name Steckdose 4
#     2022-12-18 10:16:59   720570712462ab27e625_productid namu1lshm4jrx1td
#     2022-12-18 10:17:13   720570712462ab27e625_version 3.3
#     2022-12-18 10:17:00   720570712462ab280270_icon https://images.tuyaeu.com/smart/program_category_icon/cz.png
#     2022-12-18 10:17:00   720570712462ab280270_id 720570712462ab280270
#     2022-12-18 10:17:14   720570712462ab280270_ip offline
#     2022-12-18 10:17:00   720570712462ab280270_localkey 4dd2676f4fa16db6
#     2022-12-18 10:17:00   720570712462ab280270_name Steckdose 3
#     2022-12-18 10:17:00   720570712462ab280270_productid namu1lshm4jrx1td
#     2022-12-18 10:17:14   720570712462ab280270_version 3.3
#     2022-12-18 10:17:00   743066432cf43267661d_icon https://images.tuyaeu.com/smart/icon/ay1524194438166Zg2hZ/c3db264e1bc8e6ab11cf88171e87dc39.jpg
#     2022-12-18 10:17:00   743066432cf43267661d_id 743066432cf43267661d
#     2022-12-18 10:17:14   743066432cf43267661d_ip offline
#     2022-12-18 10:17:00   743066432cf43267661d_localkey a4d341ce9f636bf9
#     2022-12-18 10:17:00   743066432cf43267661d_name PIR Sensor 3
#     2022-12-18 10:17:00   743066432cf43267661d_productid XFD2nSDKxFlGV5sV
#     2022-12-18 10:17:14   743066432cf43267661d_version 3.3
#     2022-12-18 10:16:57   8513738324a1601779dd_icon https://images.tuyaeu.com/smart/icon/1553220447w51qc6eyig_0.jpg
#     2022-12-18 10:16:57   8513738324a1601779dd_id 8513738324a1601779dd
#     2022-12-18 10:17:12   8513738324a1601779dd_ip 192.168.9.20
#     2022-12-18 10:16:57   8513738324a1601779dd_localkey 108105c3b1a447be
#     2022-12-18 10:16:57   8513738324a1601779dd_name Kleiderschrank 2
#     2022-12-18 10:16:57   8513738324a1601779dd_productid ON0fHlAaAf7Pt7ja
#     2022-12-18 10:17:12   8513738324a1601779dd_version 3.3
#     2022-12-18 10:17:00   853556472cf4326e60da_icon https://images.tuyaeu.com/smart/icon/ay1524194438166Zg2hZ/c3db264e1bc8e6ab11cf88171e87dc39.jpg
#     2022-12-18 10:17:00   853556472cf4326e60da_id 853556472cf4326e60da
#     2022-12-18 10:17:14   853556472cf4326e60da_ip offline
#     2022-12-18 10:17:00   853556472cf4326e60da_localkey 9623196e257884f7
#     2022-12-18 10:17:00   853556472cf4326e60da_name PIR Sensor 1
#     2022-12-18 10:17:00   853556472cf4326e60da_productid XFD2nSDKxFlGV5sV
#     2022-12-18 10:17:14   853556472cf4326e60da_version 3.3
#     2022-12-18 10:16:58   8877821724a16014a898_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2022-12-18 10:16:58   8877821724a16014a898_id 8877821724a16014a898
#     2022-12-18 10:17:12   8877821724a16014a898_ip 192.168.9.65
#     2022-12-18 10:16:58   8877821724a16014a898_localkey 1eb1f8bf71957568
#     2022-12-18 10:16:58   8877821724a16014a898_name Medien THOMAS
#     2022-12-18 10:16:58   8877821724a16014a898_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   8877821724a16014a898_version 3.3
#     2022-12-18 10:16:57   8877821724a16014ef14_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2022-12-18 10:16:57   8877821724a16014ef14_id 8877821724a16014ef14
#     2022-12-18 10:17:12   8877821724a16014ef14_ip 192.168.9.93
#     2022-12-18 10:16:57   8877821724a16014ef14_localkey f3ac3693f76b2a96
#     2022-12-18 10:16:57   8877821724a16014ef14_name GL AXT1800 JL35
#     2022-12-18 10:16:57   8877821724a16014ef14_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:12   8877821724a16014ef14_version 3.3
#     2022-12-18 10:16:54   8877821724a160150bef_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2022-12-18 10:16:54   8877821724a160150bef_id 8877821724a160150bef
#     2022-12-18 10:17:10   8877821724a160150bef_ip 192.168.9.112
#     2022-12-18 10:16:54   8877821724a160150bef_localkey 76bba760eda63914
#     2022-12-18 10:16:54   8877821724a160150bef_name JL36 EX15 Fritzbox
#     2022-12-18 10:16:54   8877821724a160150bef_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:10   8877821724a160150bef_version 3.3
#     2022-12-18 10:16:55   8877821724a160151069_icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2022-12-18 10:16:55   8877821724a160151069_id 8877821724a160151069
#     2022-12-18 10:17:11   8877821724a160151069_ip 192.168.9.63
#     2022-12-18 10:16:55   8877821724a160151069_localkey c57e219a20d5e0bf
#     2022-12-18 10:16:55   8877821724a160151069_name Schreibtisch Thomas
#     2022-12-18 10:16:55   8877821724a160151069_productid wifvoilfrqeo6hvu
#     2022-12-18 10:17:11   8877821724a160151069_version 3.3
#     2022-12-18 10:17:00   887800042cf4325f15ef_icon https://images.tuyaeu.com/smart/icon/dj.png
#     2022-12-18 10:17:00   887800042cf4325f15ef_id 887800042cf4325f15ef
#     2022-12-18 10:17:14   887800042cf4325f15ef_ip offline
#
# ... truncated to 50k, original length 125231
[/code]

Den bekommst du erst nach scan_devices.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 18 Dezember 2022, 12:21:16
Zitat von: thburkhart am 18 Dezember 2022, 12:11:33


Mist: voltage aus meinen SP111 kommt auch lokal noch mit Faktor 10


[code]define tuya_local_8877821724a160150bef fhempy tuya wifvoilfrqeo6hvu 8--
attr tuya_local_8877821724a160150bef alias JL36 EX15 Fritzbox
attr tuya_local_8877821724a160150bef dp_01 switch_1
attr tuya_local_8877821724a160150bef dp_02 countdown_1
attr tuya_local_8877821724a160150bef dp_03 add_ele
attr tuya_local_8877821724a160150bef dp_04 cur_current
attr tuya_local_8877821724a160150bef dp_05 cur_power
attr tuya_local_8877821724a160150bef dp_06 cur_voltage
attr tuya_local_8877821724a160150bef group tuya
attr tuya_local_8877821724a160150bef room fhempy
attr tuya_local_8877821724a160150bef tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '秒', 'max': 86400, 'step': 1}, 'desc': 'countdown 1'}]
attr tuya_local_8877821724a160150bef tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '秒', 'max': 86400, 'step': 1}}, {'code': 'add_ele', 'dp_id': 3, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '度', 'max': 500000, 'step': 100}}, {'code': 'cur_current', 'dp_id': 4, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'mA', 'max': 30000, 'step': 1}}, {'code': 'cur_power', 'dp_id': 5, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'W', 'max': 50000, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 6, 'type': 'Integer', 'values': {'min': 0, 'unit': 'V', 'scale': 0, 'max': 2500, 'step': 1}}]
#   CFGFN     
#   DEF        tuya wifvoilfrqeo6hvu 8877821724a160150.
#   DEVICEID   8877821724a160150bef
#   FHEMPYTYPE tuya
#   FUUID      639ef43a-f33f-fd5f-6358-9ec526adcdcbcbc8
#   IODev      local_pybinding
#   NAME       tuya_local_8877821724a160150bef
#   NR         2006
#   PYTHONTYPE tuya
#   STATE      on
#   TYPE       fhempy
#   eventCount 9
#   READINGS:
#     2022-12-18 12:06:36   active_time     1639217675
#     2022-12-18 12:06:36   biz_type        18
#     2022-12-18 12:06:36   category        cz
#     2022-12-18 12:06:36   countdown_1     0.0
#     2022-12-18 12:06:36   create_time     1639217675
#     2022-12-18 12:06:36   cur_current     0.0
#     2022-12-18 12:06:36   cur_power       0.0
[color=red]#     2022-12-18 12:07:29   cur_voltage     2292.0[/color]
#     2022-12-18 12:06:36   dp_07           0
#     2022-12-18 12:06:42   dp_09           0
#     2022-12-18 12:06:42   dp_18           0
#     2022-12-18 12:06:42   dp_19           0
#     2022-12-18 12:06:42   dp_20           2404
#     2022-12-18 12:06:42   dp_21           1
#     2022-12-18 12:06:42   dp_22           775
#     2022-12-18 12:06:42   dp_23           33633
#     2022-12-18 12:06:42   dp_24           24228
#     2022-12-18 12:06:42   dp_25           860
#     2022-12-18 12:06:36   icon            smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2022-12-18 12:06:36   id              8877821724a160150bef
#     2022-12-18 12:06:36   ip              149.172.226.177
#     2022-12-18 12:06:36   lat             48.5585
#     2022-12-18 12:06:36   local_key       76bba760eda63914
#     2022-12-18 12:06:36   lon             9.2025
#     2022-12-18 12:06:36   model           欧规,10A,带计电量,支持酷客RF产测
#     2022-12-18 12:06:36   name            JL36 EX15 Fritzbox
#     2022-12-18 12:06:36   online          1
#     2022-12-18 12:06:36   owner_id        3389434
#     2022-12-18 12:06:36   product_id      wifvoilfrqeo6hvu
#     2022-12-18 12:06:36   product_name    Smart Socket
#     2022-12-18 12:06:36   state           on
#     2022-12-18 12:06:36   sub             0
#     2022-12-18 12:06:36   time_zone       +01:00
#     2022-12-18 12:06:36   uid             eu1548823829280mLHX1
#     2022-12-18 12:06:36   update_time     1671077227
#     2022-12-18 12:06:36   uuid            8877821724a160150bef
#   args:
#     tuya_local_8877821724a160150bef
#     fhempy
#     tuya
#     wifvoilfrqeo6hvu
#     8877821724a160150bef
#     192.168.9.112
#     76bba760eda63914
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate tuya_local_8877821724a160150bef on
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 active_time 1639217675
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 biz_type 18
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 category cz
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 countdown_1 0.0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 create_time 1639217675
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 cur_current 0.0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 cur_power 0.0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:07:29 cur_voltage 2292.0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 dp_07 0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_09 0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_18 0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_19 0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_20 2404
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_21 1
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_22 775
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_23 33633
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_24 24228
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_25 860
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 icon smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 id 8877821724a160150bef
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 ip 149.172.226.177
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 lat 48.5585
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 local_key 76bba760eda63914
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 lon 9.2025
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 model 欧规,10A,带计电量,支持酷客RF产测
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 name JL36 EX15 Fritzbox
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 online 1
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 owner_id 3389434
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 product_id wifvoilfrqeo6hvu
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 product_name Smart Socket
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 state on
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 sub 0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 time_zone +01:00
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 uid eu1548823829280mLHX1
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 update_time 1671077227
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 uuid 8877821724a160150bef

[/code]

Poste bitte die Attribute tuya....
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 18 Dezember 2022, 12:27:37
ZitatPoste bitte die Attribute tuya....

hmm sind die da nicht dabei ?
bzw. wo finde ich die im Device?

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 18 Dezember 2022, 12:31:46
Ah, ja, sorry hatte ich übersehen.

Da liefert tuya falsche Werte, ich mach das anpassbar. Update folgt am Abend.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 18 Dezember 2022, 13:46:27
super!
damit "lohnt sich mein Wechsel auf tuya_lokal

oder machst du das auch in tuya_cloud?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: fretti am 18 Dezember 2022, 14:44:35
Hi, nach dem Umstieg auf 533 bekomme ich in Sekundentakt forlgende Ausgabe im Log-File von fhempy:
2022-12-18 14:40:51,004 - WARNING  - asyncio: Executing <Task pending name='Task-221' coro=<main() running at /opt/fhem/.local/lib/python3.9/site-packages/tinytuya/__init__.py:247>
wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_write_done(15, handle=<Handle BaseS...events.py:296>)(), <TaskWakeupMethWrapper object at 0x7fbf029f70d0>()] created at /usr/lib/python3.9/asyncio/base_events.py:424> created at /usr/lib/python3.9/asyncio/tasks.py:361> took 0.101 seconds
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: fretti am 18 Dezember 2022, 14:54:20
Zitat von: fretti am 18 Dezember 2022, 14:44:35
Hi, nach dem Umstieg auf 533 bekomme ich in Sekundentakt forlgende Ausgabe im Log-File von fhempy:
2022-12-18 14:40:51,004 - WARNING  - asyncio: Executing <Task pending name='Task-221' coro=<main() running at /opt/fhem/.local/lib/python3.9/site-packages/tinytuya/__init__.py:247>
wait_for=<Future pending cb=[BaseSelectorEventLoop._sock_write_done(15, handle=<Handle BaseS...events.py:296>)(), <TaskWakeupMethWrapper object at 0x7fbf029f70d0>()] created at /usr/lib/python3.9/asyncio/base_events.py:424> created at /usr/lib/python3.9/asyncio/tasks.py:361> took 0.101 seconds


Das scheint ein Tuya-Device (Smart-Plug) zu verursachen.
Sobald ich dieses lösche ist Ruhe im Log.
fhempy initialisiert das Device und setzt es ready, dann gehen die Meldungen los und das Device ist auch nicht bedienbar, lässt sich nicht on-off schalten im fhemweb
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 18 Dezember 2022, 22:07:03
Zitat von: thburkhart am 18 Dezember 2022, 13:46:27
super!
damit "lohnt sich mein Wechsel auf tuya_lokal

oder machst du das auch in tuya_cloud?

Mit 0.1.534 kannst du nun tuya_spec_status ändern und dort bei cur_voltage den Wert scale auf 1 (aktuell 0 bei dir) setzen. tuya_cloud muss ich noch anpassen, dort geht es das noch nicht.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 18 Dezember 2022, 22:11:33
Zitat von: fretti am 18 Dezember 2022, 14:54:20
Das scheint ein Tuya-Device (Smart-Plug) zu verursachen.
Sobald ich dieses lösche ist Ruhe im Log.
fhempy initialisiert das Device und setzt es ready, dann gehen die Meldungen los und das Device ist auch nicht bedienbar, lässt sich nicht on-off schalten im fhemweb

Kann es sein, dass dieses Device nicht verfügbar war/ist?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: fretti am 18 Dezember 2022, 22:20:51
Zitat von: dominik am 18 Dezember 2022, 22:11:33
Kann es sein, dass dieses Device nicht verfügbar war/ist?

In der SmartLife-App kann ich es schalten.
Ping geht auch.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 18 Dezember 2022, 22:21:55
Kannst du das Device nochmals anlegen und schauen ob du es über fhempy steuern kannst?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: fretti am 18 Dezember 2022, 22:26:13
Zitat von: dominik am 18 Dezember 2022, 22:21:55
Kannst du das Device nochmals anlegen und schauen ob du es über fhempy steuern kannst?
Hab ich gerade mit der 534 versucht.
Lässt sich anlegen, steuerbar ist es nicht.
in den readings von tuya_system steht bei dem Gerät auch keine IP sondern offline. Wenn ich das im DEF vom Plug dann händisch ändere, gehen die Meldungen im Log los.

Ich hab noch ein zweites tuya-Gerät eine WLAN-Lampe da funktioniert alles.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 18 Dezember 2022, 22:30:57
Hat dieses Gerät schon mal mit fhempy funktioniert? Kann es sein, dass es vielleicht ein Version 3.4 Device ist?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: fretti am 18 Dezember 2022, 22:33:51
Zitat von: dominik am 18 Dezember 2022, 22:30:57
Hat dieses Gerät schon mal mit fhempy funktioniert? Kann es sein, dass es vielleicht ein Version 3.4 Device ist?
Nein, ich bin erst später auf fhempy aufmerksam geworden. Habe bisher tuya-mqtt benutzt, da funktioniert er Plug.
Lt. Readings von tuya_system ist es Version3.3
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 18 Dezember 2022, 23:13:12
hi Dominik,
ich konnte nun 18 von meinen 62 Devices übernehmen.
Zuletzt "49 devices found localy"

Es wurde dann nur noch "scan_devices" angeboten
nach Ausführung "error"

auch nach shutdown restart erscheint im Dropdown-Feld SET keines der Devices mehr.

Im Vorfeld hatte ich bemerkt, dass Devices mit Umlauten im "smartlife"-Namen nicht übernommen wurden. Hatte sie deshalb in SmartLife umbenannt.

das steht zuletzt im log:
2022.12.18 23:04:56 1: readingsUpdate(tuya_local_30180616dc4f22fc986a,dp_25,0) missed to call readingsBeginUpdate first.
2022.12.18 23:04:56 1: stacktrace:
2022.12.18 23:04:56 1:     main::readingsBulkUpdate            called by fhem.pl (5012)
2022.12.18 23:04:56 1:     main::readingsBulkUpdateIfChanged   called by (eval 5451) (1)
2022.12.18 23:04:56 1:     (eval)                              called by ./FHEM/10_BindingsIo.pm (561)
2022.12.18 23:04:56 1:     main::BindingsIo_processMessage     called by ./FHEM/10_BindingsIo.pm (676)
2022.12.18 23:04:56 1:     main::BindingsIo_readWebsocketMessage called by ./FHEM/10_BindingsIo.pm (425)
2022.12.18 23:04:56 1:     main::BindingsIo_Write              called by fhem.pl (1064)
2022.12.18 23:04:56 1:     main::IOWrite                       called by ./FHEM/10_fhempy.pm (91)
2022.12.18 23:04:56 1:     main::fhempy_Set                    called by fhem.pl (3976)
2022.12.18 23:04:56 1:     main::CallFn                        called by fhem.pl (1954)
2022.12.18 23:04:56 1:     main::DoSet                         called by fhem.pl (1996)
2022.12.18 23:04:56 1:     main::CommandSet                    called by fhem.pl (2904)
2022.12.18 23:04:56 1:     main::getAllSets                    called by ./FHEM/01_FHEMWEB.pm (3326)
2022.12.18 23:04:56 1:     main::FW_devState                   called by ./FHEM/01_FHEMWEB.pm (3219)
2022.12.18 23:04:56 1:     main::FW_Notify                     called by fhem.pl (3976)
2022.12.18 23:04:56 1:     main::CallFn                        called by fhem.pl (3888)
2022.12.18 23:04:56 1:     main::DoTrigger                     called by fhem.pl (4995)
2022.12.18 23:04:56 1:     main::readingsEndUpdate             called by (eval 5410) (1)
2022.12.18 23:04:56 1:     (eval)                              called by ./FHEM/10_BindingsIo.pm (561)
2022.12.18 23:04:56 1:     main::BindingsIo_processMessage     called by ./FHEM/10_BindingsIo.pm (676)
2022.12.18 23:04:56 1:     main::BindingsIo_readWebsocketMessage called by ./FHEM/10_BindingsIo.pm (425)
2022.12.18 23:04:56 1:     main::BindingsIo_Write              called by fhem.pl (1064)
2022.12.18 23:04:56 1:     main::IOWrite                       called by ./FHEM/10_fhempy.pm (91)
2022.12.18 23:04:56 1:     main::fhempy_Set                    called by fhem.pl (3976)
2022.12.18 23:04:56 1:     main::CallFn                        called by fhem.pl (1954)
2022.12.18 23:04:56 1:     main::DoSet                         called by fhem.pl (1996)
2022.12.18 23:04:56 1:     main::CommandSet                    called by fhem.pl (2904)
2022.12.18 23:04:56 1:     main::getAllSets                    called by ./FHEM/01_FHEMWEB.pm (3326)
2022.12.18 23:04:56 1:     main::FW_devState                   called by ./FHEM/01_FHEMWEB.pm (3219)
2022.12.18 23:04:56 1:     main::FW_Notify                     called by fhem.pl (3976)
2022.12.18 23:04:56 1:     main::CallFn                        called by fhem.pl (3888)
2022.12.18 23:04:56 1:     main::DoTrigger                     called by fhem.pl (4995)
2022.12.18 23:04:56 1:     main::readingsEndUpdate             called by (eval 5393) (1)
2022.12.18 23:04:56 1:     (eval)                              called by ./FHEM/10_BindingsIo.pm (561)
2022.12.18 23:04:56 1:     main::BindingsIo_processMessage     called by ./FHEM/10_BindingsIo.pm (676)
2022.12.18 23:04:56 1:     main::BindingsIo_readWebsocketMessage called by ./FHEM/10_BindingsIo.pm (425)
2022.12.18 23:04:56 1:     main::BindingsIo_Write              called by fhem.pl (1064)
2022.12.18 23:04:56 1:     main::IOWrite                       called by ./FHEM/10_fhempy.pm (91)
2022.12.18 23:04:56 1:     main::fhempy_Set                    called by fhem.pl (3976)
2022.12.18 23:04:56 1:     main::CallFn                        called by fhem.pl (1954)
2022.12.18 23:04:56 1:     main::DoSet                         called by fhem.pl (1996)
2022.12.18 23:04:56 1:     main::CommandSet                    called by fhem.pl (2904)
2022.12.18 23:04:56 1:     main::getAllSets                    called by ./FHEM/01_FHEMWEB.pm (3326)
2022.12.18 23:04:56 1:     main::FW_devState                   called by ./FHEM/01_FHEMWEB.pm (3219)
2022.12.18 23:04:56 1:     main::FW_Notify                     called by fhem.pl (3976)
2022.12.18 23:04:56 1:     main::CallFn                        called by fhem.pl (3888)
2022.12.18 23:04:56 1:     main::DoTrigger                     called by fhem.pl (4995)
2022.12.18 23:04:56 1:     main::readingsEndUpdate             called by (eval 5379) (1)
2022.12.18 23:04:56 1:     (eval)                              called by ./FHEM/10_BindingsIo.pm (561)


Du kriegst wohl die lokale IPs der Devices mit. Könnte man die auch in ein reading schreiben?

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 18 Dezember 2022, 23:13:24
@fretti
Siehst du Readings wenn es angelegt ist? Kannst du mir mal die Inhalte reinposten was das Device in FHEM anzeigt?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 18 Dezember 2022, 23:15:57
Zitat von: thburkhart am 18 Dezember 2022, 23:13:12
hi Dominik,
ich konnte nun 18 von meinen 62 Devices übernehmen.
Zuletzt "49 devices found localy"

Es wurde dann nur noch "scan_devices" angeboten
nach Ausführung "error"

auch nach shutdown restart erscheint im Dropdown-Feld SET keines der Devices mehr.

Im Vorfeld hatte ich bemerkt, dass Devices mit Umlauten im "smartlife"-Namen nicht übernommen wurden. Hatte sie deshalb in SmartLife umbenannt.

das steht zuletzt im log:
2022.12.18 23:04:56 1: readingsUpdate(tuya_local_30180616dc4f22fc986a,dp_25,0) missed to call readingsBeginUpdate first.
2022.12.18 23:04:56 1: stacktrace:
2022.12.18 23:04:56 1:     main::readingsBulkUpdate            called by fhem.pl (5012)
2022.12.18 23:04:56 1:     main::readingsBulkUpdateIfChanged   called by (eval 5451) (1)
2022.12.18 23:04:56 1:     (eval)                              called by ./FHEM/10_BindingsIo.pm (561)
2022.12.18 23:04:56 1:     main::BindingsIo_processMessage     called by ./FHEM/10_BindingsIo.pm (676)
2022.12.18 23:04:56 1:     main::BindingsIo_readWebsocketMessage called by ./FHEM/10_BindingsIo.pm (425)
2022.12.18 23:04:56 1:     main::BindingsIo_Write              called by fhem.pl (1064)
2022.12.18 23:04:56 1:     main::IOWrite                       called by ./FHEM/10_fhempy.pm (91)
2022.12.18 23:04:56 1:     main::fhempy_Set                    called by fhem.pl (3976)
2022.12.18 23:04:56 1:     main::CallFn                        called by fhem.pl (1954)
2022.12.18 23:04:56 1:     main::DoSet                         called by fhem.pl (1996)
2022.12.18 23:04:56 1:     main::CommandSet                    called by fhem.pl (2904)
2022.12.18 23:04:56 1:     main::getAllSets                    called by ./FHEM/01_FHEMWEB.pm (3326)
2022.12.18 23:04:56 1:     main::FW_devState                   called by ./FHEM/01_FHEMWEB.pm (3219)
2022.12.18 23:04:56 1:     main::FW_Notify                     called by fhem.pl (3976)
2022.12.18 23:04:56 1:     main::CallFn                        called by fhem.pl (3888)
2022.12.18 23:04:56 1:     main::DoTrigger                     called by fhem.pl (4995)
2022.12.18 23:04:56 1:     main::readingsEndUpdate             called by (eval 5410) (1)
2022.12.18 23:04:56 1:     (eval)                              called by ./FHEM/10_BindingsIo.pm (561)
2022.12.18 23:04:56 1:     main::BindingsIo_processMessage     called by ./FHEM/10_BindingsIo.pm (676)
2022.12.18 23:04:56 1:     main::BindingsIo_readWebsocketMessage called by ./FHEM/10_BindingsIo.pm (425)
2022.12.18 23:04:56 1:     main::BindingsIo_Write              called by fhem.pl (1064)
2022.12.18 23:04:56 1:     main::IOWrite                       called by ./FHEM/10_fhempy.pm (91)
2022.12.18 23:04:56 1:     main::fhempy_Set                    called by fhem.pl (3976)
2022.12.18 23:04:56 1:     main::CallFn                        called by fhem.pl (1954)
2022.12.18 23:04:56 1:     main::DoSet                         called by fhem.pl (1996)
2022.12.18 23:04:56 1:     main::CommandSet                    called by fhem.pl (2904)
2022.12.18 23:04:56 1:     main::getAllSets                    called by ./FHEM/01_FHEMWEB.pm (3326)
2022.12.18 23:04:56 1:     main::FW_devState                   called by ./FHEM/01_FHEMWEB.pm (3219)
2022.12.18 23:04:56 1:     main::FW_Notify                     called by fhem.pl (3976)
2022.12.18 23:04:56 1:     main::CallFn                        called by fhem.pl (3888)
2022.12.18 23:04:56 1:     main::DoTrigger                     called by fhem.pl (4995)
2022.12.18 23:04:56 1:     main::readingsEndUpdate             called by (eval 5393) (1)
2022.12.18 23:04:56 1:     (eval)                              called by ./FHEM/10_BindingsIo.pm (561)
2022.12.18 23:04:56 1:     main::BindingsIo_processMessage     called by ./FHEM/10_BindingsIo.pm (676)
2022.12.18 23:04:56 1:     main::BindingsIo_readWebsocketMessage called by ./FHEM/10_BindingsIo.pm (425)
2022.12.18 23:04:56 1:     main::BindingsIo_Write              called by fhem.pl (1064)
2022.12.18 23:04:56 1:     main::IOWrite                       called by ./FHEM/10_fhempy.pm (91)
2022.12.18 23:04:56 1:     main::fhempy_Set                    called by fhem.pl (3976)
2022.12.18 23:04:56 1:     main::CallFn                        called by fhem.pl (1954)
2022.12.18 23:04:56 1:     main::DoSet                         called by fhem.pl (1996)
2022.12.18 23:04:56 1:     main::CommandSet                    called by fhem.pl (2904)
2022.12.18 23:04:56 1:     main::getAllSets                    called by ./FHEM/01_FHEMWEB.pm (3326)
2022.12.18 23:04:56 1:     main::FW_devState                   called by ./FHEM/01_FHEMWEB.pm (3219)
2022.12.18 23:04:56 1:     main::FW_Notify                     called by fhem.pl (3976)
2022.12.18 23:04:56 1:     main::CallFn                        called by fhem.pl (3888)
2022.12.18 23:04:56 1:     main::DoTrigger                     called by fhem.pl (4995)
2022.12.18 23:04:56 1:     main::readingsEndUpdate             called by (eval 5379) (1)
2022.12.18 23:04:56 1:     (eval)                              called by ./FHEM/10_BindingsIo.pm (561)


Du kriegst wohl die lokale IPs der Devices mit. Könnte man die auch in ein reading schreiben?

Mach mal nur einen Restart von fhempy, warte danach bitte ein paar Minuten und drück nichts im FHEMWEB. Nach einem Restart von fhempy wird FHEM nämlich mit ziemlich vielen Anfragen belastet und reagiert daher sehr träge.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 18 Dezember 2022, 23:21:46
genau:

2022-12-18 23:04:49,064 - ERROR    - fhempy.lib.fhem: NO RESPONSE since 60s: readingsBulkUpdate($defs{'SensorW3'},'uid','eu1548823829280mLHX1');;
2022-12-18 23:04:52,146 - WARNING  - asyncio: Executing <Task pending name='Task-1738' coro=<FhemModule._run_coro() running at /opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py:196> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at /usr/lib/python3.9/asyncio/futures.py:384, <TaskWakeupMethWrapper object at 0xb44226b8>()] created at /usr/lib/python3.9/asyncio/base_events.py:424> cb=[FhemModule._handle_task_result()] created at /usr/lib/python3.9/asyncio/tasks.py:361> took 0.101 seconds
2022-12-18 23:04:53,542 - WARNING  - urllib3.connectionpool: Connection pool is full, discarding connection: openapi.tuyaeu.com


nur, wie starte ich fhempy neu ?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 18 Dezember 2022, 23:35:22
fhempy restart gefunden und ausgeführt

immer noch Connection pool is full, discarding connection: openapi.tuyaeu.com

wann komme ich wohl wieder in den Pool?
ich dachtescan_devices sucht im lokalen Netz ; oder erst in der cloud und dann lokal?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 18 Dezember 2022, 23:44:03
Zuerst wird die Connection zur Cloud aufgebaut, damit man den local key bekommt, danach wird das lokale Netz gescannt.

Aktuell muss man noch scan_devices ausführen damit man create_device bekommt. Das muss ich noch umbauen, damit man nach einem Restart nicht nochmals einen Scan machen muss.

Connection pool full ist leider noch ein Fehler in der tuya Library welche Tuya noch nicht behoben hat: https://github.com/tuya/tuya-iot-python-sdk/pull/63
Probier einfach nochmals scan_devices.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 19 Dezember 2022, 00:05:15
ok gemacht:

"found 104  start local scan"
dann
"49 devices found localy"

aber immer noch kein "create_devices"
letztes gefundenes war 10:18 gestern
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 19 Dezember 2022, 00:34:02
Schau ich morgen woran das liegt.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 19 Dezember 2022, 08:48:44
Mit .534 kommen beim temp_set jetzt sehr komische Werte beim Thermostat an:

temp_set -> Anzeige Thermostat
5 -> 50
20 -> 72
23 -> A2
35 -> 94

Wenn ich am Thermostat eine Temperatur einstelle 35.0 Grad und dann langsam runterschalte sehe ich im Log:


2022-12-19 08:47:36 fhempy tuya_local_30000443e8db84b97ec6 temp_set: 3.5
2022-12-19 08:47:38 fhempy tuya_local_30000443e8db84b97ec6 temp_set: 3.45
2022-12-19 08:47:39 fhempy tuya_local_30000443e8db84b97ec6 temp_set: 3.4
2022-12-19 08:47:39 fhempy tuya_local_30000443e8db84b97ec6 temp_set: 3.35
2022-12-19 08:47:40 fhempy tuya_local_30000443e8db84b97ec6 temp_set: 3.3
2022-12-19 08:47:41 fhempy tuya_local_30000443e8db84b97ec6 temp_set: 3.25
2022-12-19 08:47:41 fhempy tuya_local_30000443e8db84b97ec6 temp_set: 3.2
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: x86 am 19 Dezember 2022, 11:59:04
Ich versuche seit gestern, fhempy mit Tuya lokal zum Laufen zu bekommen, scheitere aber immer daran, dass nach der Definition meiner tuya-Smartbulb die automatische Nachinstallation von tiny-tuya nicht zu gelingen scheint. Im Logfile heißt es:

2022-12-19 11:51:32,581 - INFO     - fhempy.lib.pkg_installer: Attempting install of git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3
2022-12-19 11:51:32,591 - WARNING  - asyncio: Executing <Handle <TaskWakeupMethWrapper object at 0xb48f8930>(<Future finis...events.py:396>) created at /usr/lib/python3.7/asyncio/tasks.py:368> took 0.179 seconds
2022-12-19 11:52:29,438 - ERROR    - fhempy.lib.pkg_installer: Unable to install package git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-ohxm06hp/


Ich bin noch auf Debian Buster und somit auch noch auf Python 3.7.3, aber pip und setuptools sind halbwegs aktuell... Auch fhempy_local ist aktuell (0.1.534).

Das automatische Installieren der ganzen anderen Module nach dem "define fhempy_local BindingsIo fhempy" hat ja auch reibungslos geklappt! Irgend ne Idee, warum er dann an der Installation des tinytuya scheitert?

Tausend Dank schon mal für Ideen!

Beste Grüße,
x86
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 19 Dezember 2022, 22:57:43
ZitatIch bin noch auf Debian Buster und somit auch noch auf Python 3.7.3, aber pip und setuptools sind halbwegs aktuell... Auch fhempy_local ist aktuell (0.1.534).

was spricht gegen BullsEye?

bin auch u.a. wegen fhempi gewechselt; nach langem hin und her frischaufgesetzt
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: fretti am 20 Dezember 2022, 07:30:30
Zitat von: dominik am 18 Dezember 2022, 23:13:24
@fretti
Siehst du Readings wenn es angelegt ist? Kannst du mir mal die Inhalte reinposten was das Device in FHEM anzeigt?

Hi Dominik,
sorry war erst heute wieder am Computer, hier die Readings:


setstate tuya_local_12345678912345678999 ready
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 active_time 1671056329
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 biz_type 18
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 category cz
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 create_time 1669928891
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 icon smart/icon/ay1523669254163tcGDj/15740664992a02dbf9174.png
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 id 12345678912345678999
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 ip 91.62.170.227
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 lat 50.7881
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 local_key xxxxxxx4xxxxxxxxx
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 lon 11.6799
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 name SmartPlug1
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 online 1
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 owner_id 45705999
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 product_id idxdl5aimuw9unn8
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 product_name Smart Plug
setstate tuya_local_12345678912345678999 2022-12-20 07:23:48 state ready
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 sub 0
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 time_zone +01:00
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 uid eu164015289999hCM0r
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 update_time 1671056333
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 uuid 12345678912345678999
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 20 Dezember 2022, 18:10:03
Zitat von: thburkhart am 19 Dezember 2022, 00:05:15
ok gemacht:

"found 104  start local scan"
dann
"49 devices found localy"

aber immer noch kein "create_devices"
letztes gefundenes war 10:18 gestern

Kannst du bitte im fhempy Log schauen ob da ein Fehler drin ist nach dem scan_devices? Weil im Code sieht das korrekt aus und es müsste immer am Ende vom Scan kommen. Hast du auch einen Reload der Seite gemacht, damit die neuen Commands angezeigt werden?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 20 Dezember 2022, 18:12:15
Zitat von: fretti am 20 Dezember 2022, 07:30:30
Hi Dominik,
sorry war erst heute wieder am Computer, hier die Readings:


setstate tuya_local_12345678912345678999 ready
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 active_time 1671056329
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 biz_type 18
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 category cz
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 create_time 1669928891
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 icon smart/icon/ay1523669254163tcGDj/15740664992a02dbf9174.png
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 id 12345678912345678999
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 ip 91.62.170.227
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 lat 50.7881
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 local_key xxxxxxx4xxxxxxxxx
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 lon 11.6799
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 name SmartPlug1
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 online 1
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 owner_id 45705999
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 product_id idxdl5aimuw9unn8
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 product_name Smart Plug
setstate tuya_local_12345678912345678999 2022-12-20 07:23:48 state ready
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 sub 0
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 time_zone +01:00
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 uid eu164015289999hCM0r
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 update_time 1671056333
setstate tuya_local_12345678912345678999 2022-12-20 07:23:33 uuid 12345678912345678999


Bitte auch die Attribute.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 20 Dezember 2022, 18:13:44
Zitat von: Christian83 am 19 Dezember 2022, 08:48:44
Mit .534 kommen beim temp_set jetzt sehr komische Werte beim Thermostat an:

temp_set -> Anzeige Thermostat
5 -> 50
20 -> 72
23 -> A2
35 -> 94

Wenn ich am Thermostat eine Temperatur einstelle 35.0 Grad und dann langsam runterschalte sehe ich im Log:


2022-12-19 08:47:36 fhempy tuya_local_30000443e8db84b97ec6 temp_set: 3.5
2022-12-19 08:47:38 fhempy tuya_local_30000443e8db84b97ec6 temp_set: 3.45
2022-12-19 08:47:39 fhempy tuya_local_30000443e8db84b97ec6 temp_set: 3.4
2022-12-19 08:47:39 fhempy tuya_local_30000443e8db84b97ec6 temp_set: 3.35
2022-12-19 08:47:40 fhempy tuya_local_30000443e8db84b97ec6 temp_set: 3.3
2022-12-19 08:47:41 fhempy tuya_local_30000443e8db84b97ec6 temp_set: 3.25
2022-12-19 08:47:41 fhempy tuya_local_30000443e8db84b97ec6 temp_set: 3.2


0.1.535 sollte nun klappen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: fretti am 20 Dezember 2022, 18:57:50
Zitat von: dominik am 20 Dezember 2022, 18:12:15
Bitte auch die Attribute.
Sorry, hier ist die komplette RAW-def
define tuya_local_12345678912345678999 fhempy tuya idxdl5aimuw9unn8 12345678912345678999 192.168.999.999 9999999999999995 3.3 3t9t9999999999999999 99999999999999999999999999999992
attr tuya_local_12345678912345678999 alias SmartPlug1
attr tuya_local_12345678912345678999 dp_01 switch_1
attr tuya_local_12345678912345678999 dp_09 countdown_1
attr tuya_local_12345678912345678999 dp_17 add_ele
attr tuya_local_12345678912345678999 dp_18 cur_current
attr tuya_local_12345678912345678999 dp_19 cur_power
attr tuya_local_12345678912345678999 dp_20 cur_voltage
attr tuya_local_12345678912345678999 group tuya
attr tuya_local_12345678912345678999 room fhempy
attr tuya_local_12345678912345678999 tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}]
attr tuya_local_12345678912345678999 tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'add_ele', 'dp_id': 17, 'type': 'Integer', 'values': {'unit': '', 'min': 0, 'max': 50000, 'scale': 3, 'step': 100}}, {'code': 'cur_current', 'dp_id': 18, 'type': 'Integer', 'values': {'unit': 'mA', 'min': 0, 'max': 30000, 'scale': 0, 'step': 1}}, {'code': 'cur_power', 'dp_id': 19, 'type': 'Integer', 'values': {'unit': 'W', 'min': 0, 'max': 50000, 'scale': 1, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 20, 'type': 'Integer', 'values': {'unit': 'V', 'min': 0, 'max': 5000, 'scale': 1, 'step': 1}}]
#   CFGFN     
#   DEF        tuya idxdl5aimuw9unn8 12345678912345678999 192.168.999.999 9999999999999995 3.3 3t9t9999999999999999 99999999999999999999999999999992
#   DEVICEID   12345678912345678999
#   FHEMPYTYPE tuya
#   FUUID      63a1f5a4-f33f-0aa8-4d91-026fbe464d180a53
#   IODev      fhempy_local
#   NAME       tuya_local_12345678912345678999
#   NR         45574
#   PYTHONTYPE tuya
#   STATE      ready
#   TYPE       fhempy
#   eventCount 5
#   READINGS:
#     2022-12-20 18:50:03   active_time     1671056329
#     2022-12-20 18:50:03   biz_type        18
#     2022-12-20 18:50:03   category        cz
#     2022-12-20 18:50:03   create_time     1669928891
#     2022-12-20 18:50:03   icon            smart/icon/ay1523669254163tcGDj/15740664992a02dbf9174.png
#     2022-12-20 18:50:03   id              12345678912345678999
#     2022-12-20 18:50:03   ip              99.99.999.999
#     2022-12-20 18:50:03   lat             99.7881
#     2022-12-20 18:50:03   local_key       d4ee917497907ed5
#     2022-12-20 18:50:03   lon             11.6799
#     2022-12-20 18:50:03   name            SmartPlug1
#     2022-12-20 18:50:03   online          1
#     2022-12-20 18:50:03   owner_id        45705758
#     2022-12-20 18:50:03   product_id      idxdl5aimuw9unn8
#     2022-12-20 18:50:03   product_name    Smart Plug
#     2022-12-20 18:50:23   state           ready
#     2022-12-20 18:50:03   sub             0
#     2022-12-20 18:50:03   time_zone       +01:00
#     2022-12-20 18:50:03   uid             eu1640152826989hCM0r
#     2022-12-20 18:50:03   update_time     1671056333
#     2022-12-20 18:50:03   uuid            12345678912345678999
#   args:
#     tuya_local_12345678912345678999
#     fhempy
#     tuya
#     idxdl5aimuw9unn8
#     12345678912345678999
#     192.168.999.999
#     9999999999999995
#     3.3
#     3t9tw999999999999999
#     99999999999999999999999999999992
#   argsh:
#   hmccu:
#
setstate tuya_local_12345678912345678999 ready
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 active_time 1671056329
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 biz_type 18
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 category cz
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 create_time 1669928891
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 icon smart/icon/ay1523669254163tcGDj/15740664992a02dbf9174.png
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 id 12345678912345678999
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 ip 91.62.170.227
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 lat 50.7881
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 local_key d4ee919999999ed5
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 lon 11.6799
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 name SmartPlug1
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 online 1
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 owner_id 49999958
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 product_id idxdl5aimuw9unn8
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 product_name Smart Plug
setstate tuya_local_12345678912345678999 2022-12-20 18:50:23 state ready
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 sub 0
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 time_zone +01:00
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 uid eu1640999999999hCM0r
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 update_time 1671056333
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 uuid 12345678912345678999

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 20 Dezember 2022, 21:15:28
Zitat0.1.535 sollte nun klappen

das 10fach-Problem ist noch da


[code]define tuya_local_8877821724a160150bef fhempy tuya wifvoilfrqeo6hvu 8877821724a160150bef 192.168.9.112 76bba760eda63914 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
attr tuya_local_8877821724a160150bef alias JL36 EX15 Fritzbox
attr tuya_local_8877821724a160150bef dp_01 switch_1
attr tuya_local_8877821724a160150bef dp_02 countdown_1
attr tuya_local_8877821724a160150bef dp_03 add_ele
attr tuya_local_8877821724a160150bef dp_04 cur_current
attr tuya_local_8877821724a160150bef dp_05 cur_power
attr tuya_local_8877821724a160150bef dp_06 cur_voltage
attr tuya_local_8877821724a160150bef group tuya
attr tuya_local_8877821724a160150bef room fhempy
attr tuya_local_8877821724a160150bef tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '秒', 'max': 86400, 'step': 1}, 'desc': 'countdown 1'}]
attr tuya_local_8877821724a160150bef tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '秒', 'max': 86400, 'step': 1}}, {'code': 'add_ele', 'dp_id': 3, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '度', 'max': 500000, 'step': 100}}, {'code': 'cur_current', 'dp_id': 4, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'mA', 'max': 30000, 'step': 1}}, {'code': 'cur_power', 'dp_id': 5, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'W', 'max': 50000, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 6, 'type': 'Integer', 'values': {'min': 0, 'unit': 'V', 'scale': 0, 'max': 2500, 'step': 1}}]
#   DEF        tuya wifvoilfrqeo6hvu 8877821724a160150bef 192.168.9.112 76bba760eda63914 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   8877821724a160150bef
#   FHEMPYTYPE tuya
#   FUUID      639ef43a-f33f-fd5f-6358-9ec526adcdcbcbc8
#   IODev      local_pybinding
#   NAME       tuya_local_8877821724a160150bef
#   NR         1936
#   PYTHONTYPE tuya
#   STATE      on
#   TYPE       fhempy
#   eventCount 21
#   READINGS:
#     2022-12-18 12:06:36   active_time     1639217675
#     2022-12-18 18:19:17   add_ele         1.0
#     2022-12-18 12:06:36   biz_type        18
#     2022-12-18 12:06:36   category        cz
#     2022-12-20 20:45:13   countdown_1     0.0
#     2022-12-18 12:06:36   create_time     1639217675
#     2022-12-20 20:42:14   cur_current     0.0
#     2022-12-20 20:35:49   cur_power       0.0
#     2022-12-20 20:51:15   cur_voltage     2306.0
#     2022-12-18 23:51:09   dp_07           0
#     2022-12-18 12:06:42   dp_09           0
#     2022-12-18 18:19:17   dp_101          0
#     2022-12-18 18:19:17   dp_102          0
#     2022-12-18 18:19:17   dp_103          0
#     2022-12-18 18:19:17   dp_104          0
#     2022-12-18 18:19:17   dp_105          0
#     2022-12-18 19:40:44   dp_18           0
#     2022-12-18 21:11:24   dp_19           0
#     2022-12-20 20:44:21   dp_20           2272
#     2022-12-20 20:44:21   dp_21           1
#     2022-12-20 20:44:21   dp_22           717
#     2022-12-20 20:44:21   dp_23           30909
#     2022-12-20 20:44:21   dp_24           20551
#     2022-12-20 20:44:21   dp_25           1015
#     2022-12-18 12:06:36   icon            smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2022-12-18 12:06:36   id              8877821724a160150bef
#     2022-12-18 12:06:36   ip              149.172.226.177
#     2022-12-18 12:06:36   lat             48.5585
#     2022-12-18 12:06:36   local_key       76bba760eda63914
#     2022-12-18 12:06:36   lon             9.2025
#     2022-12-18 12:06:36   model           欧规,10A,带计电量,支持酷客RF产测
#     2022-12-18 12:06:36   name            JL36 EX15 Fritzbox
#     2022-12-20 20:44:44   online          1
#     2022-12-18 12:06:36   owner_id        3389434
#     2022-12-18 12:06:36   product_id      wifvoilfrqeo6hvu
#     2022-12-18 12:06:36   product_name    Smart Socket
#     2022-12-20 20:45:13   state           on
#     2022-12-18 12:06:36   sub             0
#     2022-12-18 12:06:36   time_zone       +01:00
#     2022-12-18 12:06:36   uid             eu1548823829280mLHX1
#     2022-12-18 12:06:36   update_time     1671077227
#     2022-12-18 12:06:36   uuid            8877821724a160150bef
#   args:
#     tuya_local_8877821724a160150bef
#     fhempy
#     tuya
#     wifvoilfrqeo6hvu
#     8877821724a160150bef
#     192.168.9.112
#     76bba760eda63914
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate tuya_local_8877821724a160150bef on
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 active_time 1639217675
setstate tuya_local_8877821724a160150bef 2022-12-18 18:19:17 add_ele 1.0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 biz_type 18
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 category cz
setstate tuya_local_8877821724a160150bef 2022-12-20 20:45:13 countdown_1 0.0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 create_time 1639217675
setstate tuya_local_8877821724a160150bef 2022-12-20 20:42:14 cur_current 0.0
setstate tuya_local_8877821724a160150bef 2022-12-20 20:35:49 cur_power 0.0
setstate tuya_local_8877821724a160150bef 2022-12-20 20:51:15 cur_voltage 2306.0
setstate tuya_local_8877821724a160150bef 2022-12-18 23:51:09 dp_07 0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_09 0
setstate tuya_local_8877821724a160150bef 2022-12-18 18:19:17 dp_101 0
setstate tuya_local_8877821724a160150bef 2022-12-18 18:19:17 dp_102 0
setstate tuya_local_8877821724a160150bef 2022-12-18 18:19:17 dp_103 0
setstate tuya_local_8877821724a160150bef 2022-12-18 18:19:17 dp_104 0
setstate tuya_local_8877821724a160150bef 2022-12-18 18:19:17 dp_105 0
setstate tuya_local_8877821724a160150bef 2022-12-18 19:40:44 dp_18 0
setstate tuya_local_8877821724a160150bef 2022-12-18 21:11:24 dp_19 0
setstate tuya_local_8877821724a160150bef 2022-12-20 20:44:21 dp_20 2272
setstate tuya_local_8877821724a160150bef 2022-12-20 20:44:21 dp_21 1
setstate tuya_local_8877821724a160150bef 2022-12-20 20:44:21 dp_22 717
setstate tuya_local_8877821724a160150bef 2022-12-20 20:44:21 dp_23 30909
setstate tuya_local_8877821724a160150bef 2022-12-20 20:44:21 dp_24 20551
setstate tuya_local_8877821724a160150bef 2022-12-20 20:44:21 dp_25 1015
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 icon smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 id 8877821724a160150bef
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 ip 149.172.226.177
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 lat 48.5585
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 local_key 76bba760eda63914
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 lon 9.2025
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 model 欧规,10A,带计电量,支持酷客RF产测
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 name JL36 EX15 Fritzbox
setstate tuya_local_8877821724a160150bef 2022-12-20 20:44:44 online 1
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 owner_id 3389434
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 product_id wifvoilfrqeo6hvu
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 product_name Smart Socket
setstate tuya_local_8877821724a160150bef 2022-12-20 20:45:13 state on
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 sub 0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 time_zone +01:00
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 uid eu1548823829280mLHX1
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 update_time 1671077227
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 uuid 8877821724a160150bef

[/code]

inzwischen konnte ich 6 weitere Devices createn

nun hängt er wieder bei scandevices

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: x86 am 20 Dezember 2022, 23:29:03
Zitat von: thburkhart am 19 Dezember 2022, 22:57:43
was spricht gegen BullsEye?

Dass ich leider nur einen alten Raspberry Pi 1 Model B habe, bei dem ich mir nicht sicher bin, ob Bullseye überhaupt performant läuft. Buster (Lite-Version ohne Desktop) läuft noch recht gut auf dem alten Ding....

Außerdem bin ich bei sowas immer eher an Ursachenforschung und -behebung interessiert, anstatt an einem Rundumschlag a la Neuinstallation des Betriebssystems... auch wenn das, zugegeben, meist länger dauert. Gibt es denn eine definitive Aussage, dass das tinytuya Modul sich nicht unter Python 3.7.1 installieren lässt? In den Requirements im Code von fhempy ist überall jedenfalls von 3.7.1 die Rede, auch wenn in der Doku im readme.md von fhempy steht, dass unbedingt 3.8 benötigt wird. Was ist denn hier korrekt?

Ich habe auch schon probiert, mit pip das tinytuya manuell zu installieren, das scheint auch zu gehen, aber ich bekomme dann eine Version 1.9.x statt der in fhempy geforkten 1.7.x und außerdem landet sie unter /home/pi/.local/lib/python3.7/... und nicht unter /opt/fhem/.local/lib/python3.7/.  :(

Ich akzeptiere natürlich, wenn eine Neuinstallation mit Bullseye die einzige Lösung sein sollte, aber falls nicht, würde es mich total freuen, wenn vielleicht ein Python-Experte noch irgend ne Idee hat... ;) In jedem Falle vielen Dank für die viele Hilfe hier im Forum!

-- x86
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: x86 am 21 Dezember 2022, 02:40:00
Okay, die Lösung war, dass aus irgendeinem Grund das Modul "colorama" nicht installiert war.

Der Installer macht das scheinbar nicht automatisch, und das Installscript von tinytuya verlässt sich auf das Vorhandensein dieses Moduls.

Beide Module manuell installiert und nach /opt/fhem/.local/lib/python3.7 kopiert --> alles läuft!

Trotzdem danke für die Antworten!
-- x86
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Teemo am 21 Dezember 2022, 09:00:24
Hallo,
Nach dem letzten Update funktioniert "set temp_set" überhaupt nicht mehr - während "reading temp_set" nun korrekt ist und "upper_temp" den falschen Dezimalpunkt hat, habe ich 20,5 im Raum und die Anzeige ist 205,0

Andererseits, wie @Christian83 schrieb, war in der vorherigen Version der Wert "upper_temp" in Ordnung, aber "set temp_set" sah aus, als wäre er mit 10 multipliziert worden, d.h. 1 -> 10, 2->20 usw.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 21 Dezember 2022, 09:11:58
wie erwähnt sind nur bei manchen Devices manche Werte um den Faktor 10 erhöht
in der Smartlife wird das wohl indiv. korrigiert .. das ist natürlich schwierig nachzubauen

betroffene DeviceIDs habe ich bereits mitgerteilt

könnte in diesem Zuge auf gleich die Aufsummierung erfolgen?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 21 Dezember 2022, 10:19:48
Zitat von: dominik am 20 Dezember 2022, 18:13:44
0.1.535 sollte nun klappen.

Leider ist jetzt wieder der Ausgangspunkt:
aktuelle Temperatur wird verzehnfacht (16,5 wird zu 165,0)
das Setzen der Temperatur kommt immer als 0.0 am Thermostat an (also wahrschein ein zu hoher Wert, mit dem er nicht umgehen kann)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: x86 am 21 Dezember 2022, 19:33:28
OK, nächstes Problem: nachdem meine Tuya Smart Bulb (von hama, gabs mal bei Pollin für 2,99 :D) nach dem Define ordnungsgemäß gefunden wurde und sich auch steuern lässt, ist der State zwischenzeitlich nach Neustart von FHEM von "ready" erstmal auf "fhempy server offline" gewechselt, was sich durch ein set start im fhempyserver beheben ließ, nun aber ist die Lampe auf "Initializing..." gewechselt und verharrt da auch hartnäckig. Es kommt kein "ready".

Weiterhin lässt sich die Lampe aber korrekt steuern, aber Updaten tut sich ihr Status nur bei Refresh der Seite in FHEM.

Allerdings bekomme ich im Minutentakt folgende Meldungen im fhempy-Log und die CPU-Auslastung ist auch relativ hoch:

2022-12-21 19:11:50,269 - ERROR    - WLAN_Tuya_Stehlampe_Buero: Failed to update readings
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/tuya/tuya.py", line 615, in update_readings
    flat_json = self.convert_json(status[dp], st)
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/tuya/tuya.py", line 567, in convert_json
    if "category" in self.info_dict and self.info_dict["category"] == "zndb":
AttributeError: 'tuya' object has no attribute 'info_dict'


Ideen? Probleme mit Python oder dem Environment schließe ich mittlerweile aus, da alles ansonsten rund läuft und nach dem ersten Define der Lampe der State ja auch auf "ready" wechselte, daher glaube ich nicht dass es an der Python 3.7.10 oder der Busted-Distribution liegt, eher irgendwas zwischen Tuya und FHEM, was genau bei dieser Lampe hakt, kann das sein?

Hier die "forum ready" DEF der Lampe:

define WLAN_Tuya_Stehlampe_Buero fhempy tuya xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx wlan0.fritz.box xxxxxxxxxxxxx 3.3 xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxx
attr WLAN_Tuya_Stehlampe_Buero alias Stehlampe Büro
attr WLAN_Tuya_Stehlampe_Buero devStateIcon {if (ReadingsVal($name,"online",1) eq 0) { return("on:light_question off:light_question") } else { sprintf("on:light_light_dim_%02d",10*int(ReadingsVal($name,"bright_value_v2",1000)/100))."\@orange:off off:off:on"}}
attr WLAN_Tuya_Stehlampe_Buero dp_20 switch_led
attr WLAN_Tuya_Stehlampe_Buero dp_21 work_mode
attr WLAN_Tuya_Stehlampe_Buero dp_22 bright_value_v2
attr WLAN_Tuya_Stehlampe_Buero dp_23 temp_value_v2
attr WLAN_Tuya_Stehlampe_Buero dp_25 scene_data_v2
attr WLAN_Tuya_Stehlampe_Buero dp_26 countdown_1
attr WLAN_Tuya_Stehlampe_Buero dp_28 control_data
attr WLAN_Tuya_Stehlampe_Buero dp_30 rhythm_mode
attr WLAN_Tuya_Stehlampe_Buero dp_31 sleep_mode
attr WLAN_Tuya_Stehlampe_Buero dp_32 wakeup_mode
attr WLAN_Tuya_Stehlampe_Buero eventMap /switch_led on:on/switch_led off:off/
attr WLAN_Tuya_Stehlampe_Buero group Lampen
attr WLAN_Tuya_Stehlampe_Buero icon light_floor_lamp
attr WLAN_Tuya_Stehlampe_Buero room Büro,Dashboard
attr WLAN_Tuya_Stehlampe_Buero stateFormat switch_led
attr WLAN_Tuya_Stehlampe_Buero tuya_spec_functions [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}, 'desc': 'switch led'}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}, 'desc': 'work mode'}, {'code': 'bright_value_v2', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'bright value v2'}, {'code': 'temp_value_v2', 'dp_id': 23, 'type': 'Integer', 'values': {'min': 0, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'temp value v2'}, {'code': 'scene_data_v2', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, 'desc': 'scene data v2'}, {'code': 'countdown_1', 'dp_id': 26, 'type': 'Integer', 'values': {'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}, {'code': 'control_data', 'dp_id': 28, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}, 'desc': 'control data'}, {'code': 'rhythm_mode', 'dp_id': 30, 'type': 'Raw', 'values': {'maxlen': 255}, 'desc': 'rhythm mode'}, {'code': 'sleep_mode', 'dp_id': 31, 'type': 'Raw', 'values': {'maxlen': 255}, 'desc': 'sleep mode'}, {'code': 'wakeup_mode', 'dp_id': 32, 'type': 'Raw', 'values': {'maxlen': 255}, 'desc': 'wakeup mode'}]
attr WLAN_Tuya_Stehlampe_Buero tuya_spec_status [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}}, {'code': 'bright_value_v2', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'temp_value_v2', 'dp_id': 23, 'type': 'Integer', 'values': {'min': 0, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'scene_data_v2', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}}, {'code': 'countdown_1', 'dp_id': 26, 'type': 'Integer', 'values': {'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'control_data', 'dp_id': 28, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}}, {'code': 'rhythm_mode', 'dp_id': 30, 'type': 'Raw', 'values': {'maxlen': '255'}}, {'code': 'sleep_mode', 'dp_id': 31, 'type': 'Raw', 'values': {'maxlen': '255'}}, {'code': 'wakeup_mode', 'dp_id': 32, 'type': 'Raw', 'values': {'maxlen': '255'}}]
attr WLAN_Tuya_Stehlampe_Buero webCmd on:off
attr WLAN_Tuya_Stehlampe_Buero widgetOverride bright_value_v2:colorpicker,BRI,0,10,1000
#   DEF        tuya xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx wlan0.fritz.box xxxxxxxxxxxxx 3.3 xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxx
#   DEVICEID   xxxxxxxxxxxxxxxxx
#   FHEMPYTYPE tuya
#   FUUID      xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#   IODev      fhempy_local
#   NAME       WLAN_Tuya_Stehlampe_Buero
#   NR         122
#   PYTHONTYPE tuya
#   STATE      on
#   TYPE       fhempy
#   eventCount 6
#   READINGS:
#     2022-12-21 13:11:20   active_time     1671404203
#     2022-12-21 13:11:20   biz_type        18
#     2022-12-21 13:29:02   bright_value_v2 600.0
#     2022-12-21 13:11:20   category        dj
#     2022-12-21 13:11:24   countdown_1     0.0
#     2022-12-21 13:11:20   create_time     1669840680
#     2022-12-21 13:11:20   id              xxxxxxxxxxxxxxxxxxxx
#     2022-12-21 13:11:20   ip              xxx.xxx.xxx.xxx
#     2022-12-21 13:11:20   lat             xx.xxxxx
#     2022-12-21 13:11:20   local_key       xxxxxxxxxxxxxxxx
#     2022-12-21 13:11:20   lon             x.xxxx
#     2022-12-21 13:11:20   model           Meka A60 CW
#     2022-12-21 13:11:20   name            Stehlampe Büro
#     2022-12-21 19:25:04   online          1
#     2022-12-21 13:11:20   owner_id        xxxxxxxxxxxx
#     2022-12-21 13:11:20   product_id      xxxxxxxxxxxxxxxxx
#     2022-12-21 13:11:20   product_name    xxxxxxxxxx
#     2022-12-21 13:11:28   rhythm_mode     AAAAAAA=
#     2022-12-21 13:11:30   sleep_mode      AAA=
#     2022-12-21 19:24:58   state           Initializing...
#     2022-12-21 13:11:20   sub             0
#     2022-12-21 19:26:09   switch_led      on
#     2022-12-21 13:11:24   temp_value_v2   10.0
#     2022-12-21 13:11:20   time_zone       +01:00
#     2022-12-21 13:11:20   uid             xxxxxxxxxxxxxxxxxxxxxxx
#     2022-12-21 13:11:20   update_time     1671404203
#     2022-12-21 13:11:20   uuid            xxxxxxxxxxxxxxxxxx
#     2022-12-21 13:11:31   wakeup_mode     AAA=
#     2022-12-21 13:11:24   work_mode       white
#   args:
#     WLAN_Tuya_Stehlampe_Buero
#     fhempy
#     tuya
#     xxxxxxxxxxxxxxxxxxxx
#     xxxxxxxxxxxxxxxxxxxxxx
#     wlan0.fritz.box
#     xxxxxxxxxxxxxxxxxxxxx
#     3.3
#     xxxxxxxxxxxxxxxxxxxxxx
#     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


IDs und Keys habe ich ausge-x-t. Der Hostname der Lampe ist einfach "wlan0", ist wohl fix, den habe ich anstelle der IP genommen, da der Hostname im Netz der Fritzbox wohl immer genau so lauten wird, die IP sich aber ändern kann. Auch daran liegt es, glaube ich, nicht, denn ich habe die Lampe testweise auch schon mal über ihre aktuelle lokale IP definiert, gleiches Problem nach reboot/restart.

AttributeError: 'tuya' object has no attribute 'info_dict' ist wohl das Problem. Wenn ich das richtig sehe, wird info_dict in update_info_readings in der tuya.py gesetzt, kann es sein, dass update_info_readings aus irgendwelchen Gründen beim Neustart nicht mehr durchlaufen wird, oder sowas?

Bin für Ideen dankbar!
LG x86
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 21 Dezember 2022, 22:43:03
Zitat von: fretti am 20 Dezember 2022, 18:57:50
Sorry, hier ist die komplette RAW-def
define tuya_local_12345678912345678999 fhempy tuya idxdl5aimuw9unn8 12345678912345678999 192.168.999.999 9999999999999995 3.3 3t9t9999999999999999 99999999999999999999999999999992
attr tuya_local_12345678912345678999 alias SmartPlug1
attr tuya_local_12345678912345678999 dp_01 switch_1
attr tuya_local_12345678912345678999 dp_09 countdown_1
attr tuya_local_12345678912345678999 dp_17 add_ele
attr tuya_local_12345678912345678999 dp_18 cur_current
attr tuya_local_12345678912345678999 dp_19 cur_power
attr tuya_local_12345678912345678999 dp_20 cur_voltage
attr tuya_local_12345678912345678999 group tuya
attr tuya_local_12345678912345678999 room fhempy
attr tuya_local_12345678912345678999 tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}]
attr tuya_local_12345678912345678999 tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'add_ele', 'dp_id': 17, 'type': 'Integer', 'values': {'unit': '', 'min': 0, 'max': 50000, 'scale': 3, 'step': 100}}, {'code': 'cur_current', 'dp_id': 18, 'type': 'Integer', 'values': {'unit': 'mA', 'min': 0, 'max': 30000, 'scale': 0, 'step': 1}}, {'code': 'cur_power', 'dp_id': 19, 'type': 'Integer', 'values': {'unit': 'W', 'min': 0, 'max': 50000, 'scale': 1, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 20, 'type': 'Integer', 'values': {'unit': 'V', 'min': 0, 'max': 5000, 'scale': 1, 'step': 1}}]
#   CFGFN     
#   DEF        tuya idxdl5aimuw9unn8 12345678912345678999 192.168.999.999 9999999999999995 3.3 3t9t9999999999999999 99999999999999999999999999999992
#   DEVICEID   12345678912345678999
#   FHEMPYTYPE tuya
#   FUUID      63a1f5a4-f33f-0aa8-4d91-026fbe464d180a53
#   IODev      fhempy_local
#   NAME       tuya_local_12345678912345678999
#   NR         45574
#   PYTHONTYPE tuya
#   STATE      ready
#   TYPE       fhempy
#   eventCount 5
#   READINGS:
#     2022-12-20 18:50:03   active_time     1671056329
#     2022-12-20 18:50:03   biz_type        18
#     2022-12-20 18:50:03   category        cz
#     2022-12-20 18:50:03   create_time     1669928891
#     2022-12-20 18:50:03   icon            smart/icon/ay1523669254163tcGDj/15740664992a02dbf9174.png
#     2022-12-20 18:50:03   id              12345678912345678999
#     2022-12-20 18:50:03   ip              99.99.999.999
#     2022-12-20 18:50:03   lat             99.7881
#     2022-12-20 18:50:03   local_key       d4ee917497907ed5
#     2022-12-20 18:50:03   lon             11.6799
#     2022-12-20 18:50:03   name            SmartPlug1
#     2022-12-20 18:50:03   online          1
#     2022-12-20 18:50:03   owner_id        45705758
#     2022-12-20 18:50:03   product_id      idxdl5aimuw9unn8
#     2022-12-20 18:50:03   product_name    Smart Plug
#     2022-12-20 18:50:23   state           ready
#     2022-12-20 18:50:03   sub             0
#     2022-12-20 18:50:03   time_zone       +01:00
#     2022-12-20 18:50:03   uid             eu1640152826989hCM0r
#     2022-12-20 18:50:03   update_time     1671056333
#     2022-12-20 18:50:03   uuid            12345678912345678999
#   args:
#     tuya_local_12345678912345678999
#     fhempy
#     tuya
#     idxdl5aimuw9unn8
#     12345678912345678999
#     192.168.999.999
#     9999999999999995
#     3.3
#     3t9tw999999999999999
#     99999999999999999999999999999992
#   argsh:
#   hmccu:
#
setstate tuya_local_12345678912345678999 ready
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 active_time 1671056329
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 biz_type 18
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 category cz
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 create_time 1669928891
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 icon smart/icon/ay1523669254163tcGDj/15740664992a02dbf9174.png
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 id 12345678912345678999
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 ip 91.62.170.227
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 lat 50.7881
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 local_key d4ee919999999ed5
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 lon 11.6799
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 name SmartPlug1
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 online 1
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 owner_id 49999958
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 product_id idxdl5aimuw9unn8
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 product_name Smart Plug
setstate tuya_local_12345678912345678999 2022-12-20 18:50:23 state ready
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 sub 0
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 time_zone +01:00
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 uid eu1640999999999hCM0r
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 update_time 1671056333
setstate tuya_local_12345678912345678999 2022-12-20 18:50:03 uuid 12345678912345678999



Teste bitte folgendes
pip3 install --upgrade tinytuya
danach
python3
> import tinytuya
> a = tinytuya.OutletDevice('DEVICE_ID', 'IP', 'LOCAL_KEY', 'device22')
> a.set_version(3.3)
> a.set_dpsUsed({"24": None})
> data =  a.status()
> print(data)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 21 Dezember 2022, 22:55:34
update:

ich bekomme häppchenweise meine lokalen Devices zum Create gereicht..

Das dauert wohl immer einige Stunden
Faktor 10 ist immanent
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 21 Dezember 2022, 22:56:54
Zitat von: thburkhart am 20 Dezember 2022, 21:15:28
das 10fach-Problem ist noch da


[code]define tuya_local_8877821724a160150bef fhempy tuya wifvoilfrqeo6hvu 8877821724a160150bef 192.168.9.112 76bba760eda63914 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
attr tuya_local_8877821724a160150bef alias JL36 EX15 Fritzbox
attr tuya_local_8877821724a160150bef dp_01 switch_1
attr tuya_local_8877821724a160150bef dp_02 countdown_1
attr tuya_local_8877821724a160150bef dp_03 add_ele
attr tuya_local_8877821724a160150bef dp_04 cur_current
attr tuya_local_8877821724a160150bef dp_05 cur_power
attr tuya_local_8877821724a160150bef dp_06 cur_voltage
attr tuya_local_8877821724a160150bef group tuya
attr tuya_local_8877821724a160150bef room fhempy
attr tuya_local_8877821724a160150bef tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '秒', 'max': 86400, 'step': 1}, 'desc': 'countdown 1'}]
attr tuya_local_8877821724a160150bef tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '秒', 'max': 86400, 'step': 1}}, {'code': 'add_ele', 'dp_id': 3, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '度', 'max': 500000, 'step': 100}}, {'code': 'cur_current', 'dp_id': 4, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'mA', 'max': 30000, 'step': 1}}, {'code': 'cur_power', 'dp_id': 5, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'W', 'max': 50000, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 6, 'type': 'Integer', 'values': {'min': 0, 'unit': 'V', 'scale': 0, 'max': 2500, 'step': 1}}]
#   DEF        tuya wifvoilfrqeo6hvu 8877821724a160150bef 192.168.9.112 76bba760eda63914 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   8877821724a160150bef
#   FHEMPYTYPE tuya
#   FUUID      639ef43a-f33f-fd5f-6358-9ec526adcdcbcbc8
#   IODev      local_pybinding
#   NAME       tuya_local_8877821724a160150bef
#   NR         1936
#   PYTHONTYPE tuya
#   STATE      on
#   TYPE       fhempy
#   eventCount 21
#   READINGS:
#     2022-12-18 12:06:36   active_time     1639217675
#     2022-12-18 18:19:17   add_ele         1.0
#     2022-12-18 12:06:36   biz_type        18
#     2022-12-18 12:06:36   category        cz
#     2022-12-20 20:45:13   countdown_1     0.0
#     2022-12-18 12:06:36   create_time     1639217675
#     2022-12-20 20:42:14   cur_current     0.0
#     2022-12-20 20:35:49   cur_power       0.0
#     2022-12-20 20:51:15   cur_voltage     2306.0
#     2022-12-18 23:51:09   dp_07           0
#     2022-12-18 12:06:42   dp_09           0
#     2022-12-18 18:19:17   dp_101          0
#     2022-12-18 18:19:17   dp_102          0
#     2022-12-18 18:19:17   dp_103          0
#     2022-12-18 18:19:17   dp_104          0
#     2022-12-18 18:19:17   dp_105          0
#     2022-12-18 19:40:44   dp_18           0
#     2022-12-18 21:11:24   dp_19           0
#     2022-12-20 20:44:21   dp_20           2272
#     2022-12-20 20:44:21   dp_21           1
#     2022-12-20 20:44:21   dp_22           717
#     2022-12-20 20:44:21   dp_23           30909
#     2022-12-20 20:44:21   dp_24           20551
#     2022-12-20 20:44:21   dp_25           1015
#     2022-12-18 12:06:36   icon            smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2022-12-18 12:06:36   id              8877821724a160150bef
#     2022-12-18 12:06:36   ip              149.172.226.177
#     2022-12-18 12:06:36   lat             48.5585
#     2022-12-18 12:06:36   local_key       76bba760eda63914
#     2022-12-18 12:06:36   lon             9.2025
#     2022-12-18 12:06:36   model           欧规,10A,带计电量,支持酷客RF产测
#     2022-12-18 12:06:36   name            JL36 EX15 Fritzbox
#     2022-12-20 20:44:44   online          1
#     2022-12-18 12:06:36   owner_id        3389434
#     2022-12-18 12:06:36   product_id      wifvoilfrqeo6hvu
#     2022-12-18 12:06:36   product_name    Smart Socket
#     2022-12-20 20:45:13   state           on
#     2022-12-18 12:06:36   sub             0
#     2022-12-18 12:06:36   time_zone       +01:00
#     2022-12-18 12:06:36   uid             eu1548823829280mLHX1
#     2022-12-18 12:06:36   update_time     1671077227
#     2022-12-18 12:06:36   uuid            8877821724a160150bef
#   args:
#     tuya_local_8877821724a160150bef
#     fhempy
#     tuya
#     wifvoilfrqeo6hvu
#     8877821724a160150bef
#     192.168.9.112
#     76bba760eda63914
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate tuya_local_8877821724a160150bef on
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 active_time 1639217675
setstate tuya_local_8877821724a160150bef 2022-12-18 18:19:17 add_ele 1.0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 biz_type 18
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 category cz
setstate tuya_local_8877821724a160150bef 2022-12-20 20:45:13 countdown_1 0.0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 create_time 1639217675
setstate tuya_local_8877821724a160150bef 2022-12-20 20:42:14 cur_current 0.0
setstate tuya_local_8877821724a160150bef 2022-12-20 20:35:49 cur_power 0.0
setstate tuya_local_8877821724a160150bef 2022-12-20 20:51:15 cur_voltage 2306.0
setstate tuya_local_8877821724a160150bef 2022-12-18 23:51:09 dp_07 0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:42 dp_09 0
setstate tuya_local_8877821724a160150bef 2022-12-18 18:19:17 dp_101 0
setstate tuya_local_8877821724a160150bef 2022-12-18 18:19:17 dp_102 0
setstate tuya_local_8877821724a160150bef 2022-12-18 18:19:17 dp_103 0
setstate tuya_local_8877821724a160150bef 2022-12-18 18:19:17 dp_104 0
setstate tuya_local_8877821724a160150bef 2022-12-18 18:19:17 dp_105 0
setstate tuya_local_8877821724a160150bef 2022-12-18 19:40:44 dp_18 0
setstate tuya_local_8877821724a160150bef 2022-12-18 21:11:24 dp_19 0
setstate tuya_local_8877821724a160150bef 2022-12-20 20:44:21 dp_20 2272
setstate tuya_local_8877821724a160150bef 2022-12-20 20:44:21 dp_21 1
setstate tuya_local_8877821724a160150bef 2022-12-20 20:44:21 dp_22 717
setstate tuya_local_8877821724a160150bef 2022-12-20 20:44:21 dp_23 30909
setstate tuya_local_8877821724a160150bef 2022-12-20 20:44:21 dp_24 20551
setstate tuya_local_8877821724a160150bef 2022-12-20 20:44:21 dp_25 1015
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 icon smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 id 8877821724a160150bef
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 ip 149.172.226.177
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 lat 48.5585
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 local_key 76bba760eda63914
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 lon 9.2025
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 model 欧规,10A,带计电量,支持酷客RF产测
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 name JL36 EX15 Fritzbox
setstate tuya_local_8877821724a160150bef 2022-12-20 20:44:44 online 1
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 owner_id 3389434
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 product_id wifvoilfrqeo6hvu
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 product_name Smart Socket
setstate tuya_local_8877821724a160150bef 2022-12-20 20:45:13 state on
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 sub 0
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 time_zone +01:00
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 uid eu1548823829280mLHX1
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 update_time 1671077227
setstate tuya_local_8877821724a160150bef 2022-12-18 12:06:36 uuid 8877821724a160150bef

[/code]

inzwischen konnte ich 6 weitere Devices createn

nun hängt er wieder bei scandevices

Das Problem ist nur bei cur_voltage, oder? Wenn ja, werde ich das für die product_id direkt hinterlegen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 21 Dezember 2022, 22:59:04
Zitat von: Christian83 am 21 Dezember 2022, 10:19:48
Leider ist jetzt wieder der Ausgangspunkt:
aktuelle Temperatur wird verzehnfacht (16,5 wird zu 165,0)
das Setzen der Temperatur kommt immer als 0.0 am Thermostat an (also wahrschein ein zu hoher Wert, mit dem er nicht umgehen kann)

Ok, poste mir bitte nochmals welche Readings welche Werte haben und welche sie haben sollen. Poste bitte auch nochmals die tuya_specs Attribute dazu, damit ich das gesammelt in einem Post habe und nicht wieder alles zusammensuchen muss :) Danke!
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 22 Dezember 2022, 08:18:59
Zitat von: dominik am 21 Dezember 2022, 22:59:04
Ok, poste mir bitte nochmals welche Readings welche Werte haben und welche sie haben sollen. Poste bitte auch nochmals die tuya_specs Attribute dazu, damit ich das gesammelt in einem Post habe und nicht wieder alles zusammensuchen muss :) Danke!


define tuya_local_30000443e8db84b97ec6 fhempy tuya IAYz2WK1th0cMLmL 30000443e8db84b97ec6 192.168.0.150 xxx 3.3 xxxx cxxxx
attr tuya_local_30000443e8db84b97ec6 DbLogInclude temperature
attr tuya_local_30000443e8db84b97ec6 alias thermostat
attr tuya_local_30000443e8db84b97ec6 dp_01 switch
attr tuya_local_30000443e8db84b97ec6 dp_02 temp_set
attr tuya_local_30000443e8db84b97ec6 dp_03 upper_temp
attr tuya_local_30000443e8db84b97ec6 dp_05 eco
attr tuya_local_30000443e8db84b97ec6 dp_06 child_lock
attr tuya_local_30000443e8db84b97ec6 group tuya
attr tuya_local_30000443e8db84b97ec6 room fhempy
attr tuya_local_30000443e8db84b97ec6 stateFormat switch
attr tuya_local_30000443e8db84b97ec6 tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'child_lock', 'dp_id': 6, 'type': 'Boolean', 'values': {}, 'desc': 'child lock'}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 10, 'max': 70, 'scale': 1, 'step': 5}, 'desc': 'temp set'}, {'code': 'eco', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'eco'}, {'code': 'upper_temp', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 100, 'scale': 0, 'step': 5}, 'desc': 'upper temp'}]
attr tuya_local_30000443e8db84b97ec6 tuya_spec_status [{'code': 'eco', 'dp_id': 5, 'type': 'Boolean', 'values': {}}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 10, 'max': 70, 'scale': 1, 'step': 5}}, {'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'child_lock', 'dp_id': 6, 'type': 'Boolean', 'values': {}}, {'code': 'upper_temp', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 100, 'scale': 0, 'step': 5}}]
attr tuya_local_30000443e8db84b97ec6 userReadings temperature:upper_temp.* {ReadingsVal("tuya_local_30000443e8db84b97ec6","upper_temp",0)}
#   DEVICEID   30000443e8db84b97ec6
#   FHEMPYTYPE tuya
#   FUUID      639c6473-f33f-d2f0-ded7-c57f83f01d793ae9
#   IODev      fhempy_local
#   NAME       tuya_local_30000443e8db84b97ec6
#   NR         122
#   PYTHONTYPE tuya
#   STATE      on
#   TYPE       fhempy
#   eventCount 42
#   Helper:
#     DBLOG:
#       temperature:
#         logdb:
#           TIME       1671693045.30848
#           VALUE      150.0
#   READINGS:
#     2022-12-16 13:28:36   active_time     1670674063
#     2022-12-16 13:28:36   biz_type        0
#     2022-12-16 13:28:36   category        wk
#     2022-12-16 13:28:37   child_lock      off
#     2022-12-16 13:28:36   create_time     1670669996
#     2022-12-16 13:28:37   dp_04           1
#     2022-12-17 20:15:58   dp_101          AAYoAAgeHgseHg0eABEsABYeAAYoAAgoHgsoHg0oABEoABYeAAYoAAgoHgsoHg0oABEoABYe
#     2022-12-16 13:28:37   dp_102          0
#     2022-12-16 13:28:37   dp_104          1
#     2022-12-16 13:28:37   eco             off
#     2022-12-16 13:28:36   icon            smart/icon/15264583415nnlzwfs1qd2wqz6i937op3nmi_0.png
#     2022-12-16 13:28:36   ip              93.199.164.114
#     2022-12-16 13:28:36   lat             48.4231
#     2022-12-16 13:28:36   lon             11.0790
#     2022-12-16 13:28:36   name            thermostat
#     2022-12-21 10:08:14   online          1
#     2022-12-16 13:28:36   owner_id        74123069
#     2022-12-16 13:28:36   product_id      IAYz2WK1th0cMLmL
#     2022-12-16 13:28:36   product_name    thermostat
#     2022-12-21 10:08:20   state           ready
#     2022-12-16 13:28:36   sub             0
#     2022-12-18 16:20:39   switch          on
#     2022-12-22 08:11:34   temp_set        14.0
#     2022-12-22 08:10:45   temperature     150.0
#     2022-12-16 13:28:36   time_zone       +01:00
#     2022-12-16 13:28:36   update_time     1670674065
#     2022-12-22 08:10:45   upper_temp      150.0



Das Reading upper_temp ist die aktuell gemessene Temperatur am Thermostat. Die kommt um den Faktor 10 zu hoch.

temp_set ist die eingestellte Soll-Temperatur am Thermostat.
Hier sieht das Reading gut aus. Am Thermostat entsteht dann aber immer 00.0.
Was hier auffällt ist, dass beim Stellen der Temperatur am Thermostat im Log steht:

2022-12-22 08:16:33 fhempy tuya_local_30000443e8db84b97ec6 temp_set: 7.0

Setze ich es über FHEM dann steht folgendes:
2022-12-22 08:17:07 fhempy tuya_local_30000443e8db84b97ec6 temp_set 7

Also die Nachkomastelle fehlt. Vielleicht ist die nötig beim Gerät?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 23 Dezember 2022, 18:11:34
hallo,

ich habe nun einige zwar gefundene Devices wie

DIY1 Kueche Herd
Change DEF and use IP instead of 'offline'


oder genauer
[code]define TUYA_DIY1 fhempy tuya ON0fHlAaAf7Pt7ja 30180616dc4f22fc9a71 offline 3fd05440412ec1f5 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
attr TUYA_DIY1 alias DIY1 Kueche Herd
attr TUYA_DIY1 group Schalter (DIY),Schalter Licht
attr TUYA_DIY1 room Küche,fhempy
#   DEF        tuya ON0fHlAaAf7Pt7ja 30180616dc4f22fc9a71 offline 3fd05440412ec1f5 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   FHEMPYTYPE tuya
#   FUUID      63a38787-f33f-fd5f-6795-4e018316a4cb4c88
#   IODev      local_pybinding
#   NAME       TUYA_DIY1
#   NR         2053
#   PYTHONTYPE tuya
#   STATE      Change DEF and use IP instead of 'offline'
#   TYPE       fhempy
#   eventCount 5
#   Helper:
#     DBLOG:
#       state:
#         dblog_THB:
#           TIME       1671814949.20349
#           VALUE      Change DEF and use IP instead of 'offline'
#   READINGS:
#     2022-12-21 23:24:07   online          0
#     2022-12-23 18:02:29   state           Change DEF and use IP instead of 'offline'
#   args:
#     TUYA_DIY1
#     fhempy
#     tuya
#     ON0fHlAaAf7Pt7ja
#     30180616dc4f22fc9a71
#     offline
#     3fd05440412ec1f5
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate TUYA_DIY1 Change DEF and use IP instead of 'offline'
setstate TUYA_DIY1 2022-12-21 23:24:07 online 0
setstate TUYA_DIY1 2022-12-23 18:02:29 state Change DEF and use IP instead of 'offline'

[/code]
die definitiv immer online sind, deren lokale IP aber wegen meiner Vielfalt noch nicht in der Fritzbox finden konnte.

Was tun ?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: fretti am 23 Dezember 2022, 23:10:15
Zitat von: dominik am 21 Dezember 2022, 22:43:03
Teste bitte folgendes
pip3 install --upgrade tinytuya
danach
python3
> import tinytuya
> a = tinytuya.OutletDevice('DEVICE_ID', 'IP', 'LOCAL_KEY', 'device22')
> a.set_version(3.3)
> a.set_dpsUsed({"24": None})
> data =  a.status()
> print(data)


>>> a = tinytuya.OutletDevice('69994574c4dd57244455', '192.168.999.999', 'd999917497907ed5', 'device22')
>>> a.set_version(3.3)
>>> a.set_dpsUsed({"24": None})
>>> print(data)
{'Error': 'Network Error: Unable to Connect', 'Err': '901', 'Payload': None}


aber ein ping zur IP funktioniert:

64 bytes from 192.168.999.999: icmp_seq=19167 ttl=255 time=4.37 ms

--- 192.168.999.999 ping statistics ---
19167 packets transmitted, 11954 received, 37.6324% packet loss, time 19686ms
rtt min/avg/max/mdev = 2.313/10.364/474.282/26.252 ms



Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 24 Dezember 2022, 08:28:25
Sorry, bin for Weihnachten nicht mehr dazu gekommen, melde mich ab 1.1. wieder.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 24 Dezember 2022, 08:58:20
Zitat von: dominik am 24 Dezember 2022, 08:28:25
Sorry, bin for Weihnachten nicht mehr dazu gekommen, melde mich ab 1.1. wieder.

Frohe Weihnachten und guten Rutsch.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 24 Dezember 2022, 15:02:58
wie macht ihr es denn in der DbLog?

a) damit nur die gewüschten readings geschrieben werden.

das müsste doch mit
DBLogSelectionsmode Exclude/Include
und je Device mit

attr Tuyaxx DBLogExclude .*
attr Tuyaxx DBLoginclude cur_current .... ....


gehen.

Muss man das tatsächlich fur alle Devices machen und dabei noch eventfilter setzen?
Kann man für alle cur-readings maskieren?

Oder kann man das irgendwie Global für alle Tuya-Devices setzen.

Meine dB ist schon wieder am volllaufen.

Danke für Hilfe

Thomas
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Gisbert am 26 Dezember 2022, 11:22:48
Hallo Dominik,
das Problem hat sich erledigt. Das Device tuya_system funktioniert und es wurde ein lokales Gerät gefunden, das ich dann per create_device anlegen konnte. Ohne dass ich etwas geändert habe, funktioniert jetzt alles bestens.

Hallo Dominik,

es wäre schön, wenn du dich wieder melden könntest, wenn du wieder Zeit hast.

Ich hab die beiden Github-Anleitungen aus dem 1. Beitrag befolgt.
Zusätzlich habe ich noch durchgeführt: sudo pip3 install --upgrade tinytuya

Ich erhalte. jeweils ein list:
define fhempy_local BindingsIo fhempy
attr fhempy_local devStateIcon {        my $status_img = "10px-kreis-gruen";;;;        my $status_txt = "connected";;;;        my $ver = ReadingsVal($name, "version", "-");;;;        my $ver_available = ReadingsVal($name, "version_available", $ver);;;;        my $update_icon = "";;;;        if ($ver_available ne $ver) {          $status_img = "10px-kreis-gelb";;;;          $status_txt = "Version ".$ver_available." available for update";;;;        }        if (ReadingsVal($name, "state", "disconnected") eq "disconnected") {          $status_img = "10px-kreis-rot";;;;          $status_txt = "disconnected";;;;        }        $update_icon = "<a  href=\"/fhem?cmd.dummy=set $name update&XHR=1\" title=\"Start ".$ver_available." update\">".FW_makeImage("refresh")."</a>";;;;        "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a> ".$ver." </a>".$update_icon."</div>"      }
attr fhempy_local group fhempy
attr fhempy_local icon file_json-ld2
attr fhempy_local room fhempy
#   BindingType fhempy
#   DEF        fhempy
#   DeviceName ws:localhost:15733
#   FUUID      63a83048-f33f-e986-6132-b13d8093ac8d3a0d
#   IP         127.0.0.1
#   NAME       fhempy_local
#   NR         1306
#   NTFY_ORDER 50-fhempy_local
#   PORT       15733
#   STATE      Installing fhempy (15min)...
#   TYPE       BindingsIo
#   binary     1
#   devioLoglevel 0
#   eventCount 3
#   installing 0
#   localBinding 1
#   nextOpenDelay 10
#   READINGS:
#     2022-12-25 12:16:42   hostname        HPT610
#     2022-12-25 12:16:42   os              posix
#     2022-12-25 12:16:42   python          3.9.2
#     2022-12-25 12:16:42   release         6.0.0-0.deb11.2-amd64
#     2022-12-26 08:06:18   state           Installing fhempy (15min)...
#     2022-12-25 12:16:42   system          Linux
#     2022-12-25 12:16:42   version         0.1.535
#     2022-12-25 12:16:42   version_available 0.1.535
#     2022-12-25 12:16:42   version_release_notes <html><a href="https://github.com/fhempy/fhempy/releases" target="_blank">Release Notes</a></html>
#   args:
#     fhempy_local
#     BindingsIo
#     fhempy
#   helper:
#     bm:
#       CODE(0x5560ef2c30f0):
#         cnt        1
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 08:06:18
#         max        0.00797796249389648
#         tot        0.00797796249389648
#         mAr:
#           HASH(0x5560f010f858)
#           ARRAY(0x5560efb981e0)
#           HASH(0x5560efcd34d8)
#       CODE(0x5560ef2d76b0):
#         cnt        9937
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 10:53:53
#         max        0.00267910957336426
#         tot        0.474875211715698
#         mAr:
#           HASH(0x5560f010f858)
#           HASH(0x5560efede938)
#       CODE(0x5560ef331c60):
#         cnt        53
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 09:20:22
#         max        0.000200986862182617
#         tot        0.00166535377502441
#         mAr:
#           HASH(0x5560f010f858)
#           ARRAY(0x5560f1f9c470)
#           HASH(0x5560f1632ef0)
#       CODE(0x5560ef3403e8):
#         cnt        9
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 11:01:18
#         max        1.12056732177734e-05
#         tot        8.53538513183594e-05
#         mAr:
#           HASH(0x5560f010f858)
#           ARRAY(0x5560f1674560)
#           HASH(0x5560f0b8ca40)
#       CODE(0x5560ef34aed0):
#         cnt        4
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 08:06:18
#         max        4.60147857666016e-05
#         tot        6.98566436767578e-05
#         mAr:
#           set
#           fhempy_local
#           devStateIcon
#           {        my $status_img = "10px-kreis-gruen";;        my $status_txt = "connected";;        my $ver = ReadingsVal($name, "version", "-");;        my $ver_available = ReadingsVal($name, "version_available", $ver);;        my $update_icon = "";;        if ($ver_available ne $ver) {          $status_img = "10px-kreis-gelb";;          $status_txt = "Version ".$ver_available." available for update";;        }        if (ReadingsVal($name, "state", "disconnected") eq "disconnected") {          $status_img = "10px-kreis-rot";;          $status_txt = "disconnected";;        }        $update_icon = "<a  href=\"/fhem?cmd.dummy=set $name update&XHR=1\" title=\"Start ".$ver_available." update\">".FW_makeImage("refresh")."</a>";;        "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a> ".$ver." </a>".$update_icon."</div>"      }
#
setstate fhempy_local Installing fhempy (15min)...
setstate fhempy_local 2022-12-25 12:16:42 hostname HPT610
setstate fhempy_local 2022-12-25 12:16:42 os posix
setstate fhempy_local 2022-12-25 12:16:42 python 3.9.2
setstate fhempy_local 2022-12-25 12:16:42 release 6.0.0-0.deb11.2-amd64
setstate fhempy_local 2022-12-26 08:06:18 state Installing fhempy (15min)...
setstate fhempy_local 2022-12-25 12:16:42 system Linux
setstate fhempy_local 2022-12-25 12:16:42 version 0.1.535
setstate fhempy_local 2022-12-25 12:16:42 version_available 0.1.535
setstate fhempy_local 2022-12-25 12:16:42 version_release_notes <html><a href="https://github.com/fhempy/fhempy/releases" target="_blank">Release Notes</a></html>



define fhempyserver_15733 fhempyServer 0
attr fhempyserver_15733 devStateIcon {      my $status_img = "10px-kreis-gruen";;;;      my $status_txt = "running";;;;      if (substr(ReadingsVal($name, "fhempy", "running"),0,7) ne "running") {        $status_img = "10px-kreis-rot";;;;        $status_txt = "stopped";;;;      }      "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a  href=\"/fhem?cmd.dummy=set $name restart&XHR=1\" title=\"Restart\">".FW_makeImage("audio_repeat")."</a></div>"      }
attr fhempyserver_15733 group fhempy
attr fhempyserver_15733 icon python
attr fhempyserver_15733 logfile ./log/fhempy-%Y-%m-%d.log
attr fhempyserver_15733 nrarchive 10
attr fhempyserver_15733 room fhempy
#   DEF        0
#   FD         68
#   FUUID      63a83048-f33f-e986-7b02-cf56bdecb0d40a34
#   LAST_START 2022-12-26 09:50:01
#   LAST_STOP  2022-12-26 09:50:01
#   NAME       fhempyserver_15733
#   NR         1307
#   NTFY_ORDER 50-fhempyserver_15733
#   PID        451569
#   STARTS     2
#   STATE      ???
#   TYPE       fhempyServer
#   currentlogfile ./log/fhempy-2022-12-26.log
#   eventCount 6
#   logfile    ./log/fhempy-%Y-%m-%d.log
#   CoProcess:
#     cmdFn      fhempyServer_getCmd
#     name       fhempy
#     state      running FHEM/bindings/python/bin/fhempy
#   READINGS:
#     2022-12-26 09:50:01   fhempy          running FHEM/bindings/python/bin/fhempy
#     2022-12-26 09:50:01   python          v3.9.2
#   helper:
#     bm:
#       fhempyServer_Attr:
#         cnt        12
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 08:06:18
#         max        0.0624969005584717
#         tot        0.111003875732422
#         mAr:
#           set
#           fhempyserver_15733
#           logfile
#           ./log/fhempy-%Y-%m-%d.log
#       fhempyServer_Define:
#         cnt        1
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 08:06:18
#         max        0.0652859210968018
#         tot        0.0652859210968018
#         mAr:
#           HASH(0x5560f0569090)
#           ARRAY(0x5560ea4c4a00)
#           HASH(0x5560f02f4468)
#       fhempyServer_Get:
#         cnt        6
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 09:18:03
#         max        1.78813934326172e-05
#         tot        7.48634338378906e-05
#         mAr:
#           HASH(0x5560f0569090)
#           ARRAY(0x5560f17f7618)
#           HASH(0x5560f159eef0)
#       fhempyServer_Notify:
#         cnt        9980
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 08:06:21
#         max        0.0600531101226807
#         tot        0.175320386886597
#         mAr:
#           HASH(0x5560f0569090)
#           HASH(0x5560f052e718)
#       fhempyServer_Read:
#         cnt        11
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 09:50:01
#         max        0.097135066986084
#         tot        0.102240562438965
#         mAr:
#           HASH(0x5560f0569090)
#       fhempyServer_Set:
#         cnt        46
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 09:37:45
#         max        0.17604398727417
#         tot        0.296662092208862
#         mAr:
#           HASH(0x5560f0569090)
#           ARRAY(0x5560f19b56e0)
#           HASH(0x5560f13d7820)
#
setstate fhempyserver_15733 2022-12-26 09:50:01 fhempy running FHEM/bindings/python/bin/fhempy
setstate fhempyserver_15733 2022-12-26 09:50:01 python v3.9.2



In der Tuya IoT platform habe ich folgende Daten erzeugt:
Access ID/Client ID: XXXXXXhvt3qs5XXXXXX
Access Secret/Client Secret: YYYYYYYf94b2298a33dYYYYYYYY
Project Code: ZZZZZZZ4102482ZZZZZZ

Device Name      Device ID      Product         Device Status   Device Type   Activation Time      Device Permission   Operation
NWT Dehumidifier   AAAadc3b33d9AAA   NWT Dehumidifier   Online      Real Device   2022-12-25 11:51:15            Link

Eine Virtual ID habe ich in der SmartLife App nicht gefunden:
1. Connect a device with your SmartLife app and copy the Virtual ID of one device (doesn't matter which) to a text editor

Ich habe dann die folgende Definition in Fhem ausgeführt:
define tuya_system fhempy tuya setup API_KEY API_SECRET DEVICE_ID, also so:
defmod tuya_system fhempy tuya setup XXXXXXhvt3qs5XXXXXX YYYYYYYf94b2298a33dYYYYYYYY AAAadc3b33d9AAA

Allerdings erhalte ich nur: fhempy server offline
Das lsit dieses Devices:
define tuya_system fhempy tuya setup XXXXXXhvt3qs5XXXXXX YYYYYYYf94b2298a33dYYYYYYYY AAAadc3b33d9AAA
attr tuya_system room fhempy
attr tuya_system verbose 5
#   CFGFN     
#   DEF        tuya setup XXXXXXhvt3qs5XXXXXX YYYYYYYf94b2298a33dYYYYYYYY AAAadc3b33d9AAA
#   FHEMPYTYPE tuya
#   FUUID      63a95b8d-f33f-e986-f3b7-c8839af72bb8dfc4
#   IODev      fhempy_local
#   NAME       tuya_system
#   NR         2210
#   PYTHONTYPE tuya
#   STATE      fhempy server offline
#   TYPE       fhempy
#   eventCount 208
#   READINGS:
#     2022-12-26 11:11:24   state           fhempy server offline
#   args:
#     tuya_system
#     fhempy
#     tuya
#     setup
#     XXXXXXhvt3qs5XXXXXX
#     YYYYYYYf94b2298a33dYYYYYYYY
#     AAAadc3b33d9AAA
#   argsh:
#   helper:
#     bm:
#       fhempy_Attr:
#         cnt        3
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 10:22:40
#         max        0.041187047958374
#         tot        0.105538129806519
#         mAr:
#           set
#           tuya_system
#           verbose
#           4
#       fhempy_Define:
#         cnt        7
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 10:03:01
#         max        0.0593328475952148
#         tot        0.297488451004028
#         mAr:
#           HASH(0x5560f1cbf9e0)
#           ARRAY(0x5560f1606848)
#           HASH(0x5560f1d1d1c8)
#       fhempy_Get:
#         cnt        26
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 09:40:28
#         max        0.0236937999725342
#         tot        0.556432723999023
#         mAr:
#           HASH(0x5560f1cbf9e0)
#           ARRAY(0x5560f0828550)
#           HASH(0x5560f12ba820)
#       fhempy_Set:
#         cnt        216
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 10:00:30
#         max        0.110536098480225
#         tot        7.19586849212646
#         mAr:
#           HASH(0x5560f1cbf9e0)
#           ARRAY(0x5560f1b6d198)
#           HASH(0x5560f1fdc820)
#
setstate tuya_system fhempy server offline
setstate tuya_system 2022-12-26 11:11:24 state fhempy server offline



Ich habe als Netzwerk eine Fritzbox 7510, und dahinter mein eigentliches Netzwerk bestehend aus einem UniFi-Router und AP. An der Fritzbox hängt lediglich mein UniFi-Router, sonst nichts.
In der Fritzbox habe habe ich die Ports UDP 6666 und 66667 freigegeben, und im UniFi-Controller habe ich eine Portweiterleitung auf Port 6666 und 6667 aktiviert. Vielleicht habe ich da was falsch gemacht, die Frage ist dann, wie ich es prüfen kann.

Ich weiß nicht, an welcher Stelle etwas schiefgelaufen ist.
Es wäre schön, wenn du drüber schauen könntest, wenn du wieder Zeit hast.

Viele Grüße Gisbert
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 26 Dezember 2022, 11:24:12
Hallo.
Habe erfolgreich eine LED-Leiste in betrieb genommen, auch unter tuya_local einscannen können. Nur passt hier etwas mit der ansteuerung nicht.

Farben passen gar nicht, weder mit HEX noch colorpicker. Irgendwas wird da falsch übersetzt. Wollte 0000FF zur Lampe senden, eingestellt wurde aber weiss


Internals:
   CFGFN     
   DEF        tuya
   DEVICEID   
   FHEMPYTYPE tuya
   FUUID     
   IODev      local_pybinding
   NAME       
   NR         30761
   PYTHONTYPE tuya
   STATE      ready
   TYPE       fhempy
   READINGS:
     2022-12-25 18:14:26   active_time     1665091703
     2022-12-25 18:14:26   biz_type        18
     2022-12-25 18:14:27   bright_value    1000.0
     2022-12-25 18:14:26   category        dd
     2022-12-25 18:14:26   create_time     1665091703
     2022-12-25 18:14:34   dp_01           1
     2022-12-25 18:14:34   dp_06           CTQAAAAAAAA=
     2022-12-25 18:14:34   dp_07           0
     2022-12-25 18:14:34   dp_09           0
     2022-12-25 18:14:34   dp_10           0
     2022-12-25 18:14:34   dp_101          0
     2022-12-25 18:14:34   dp_12           0
     2022-12-25 18:14:34   dp_13           0
     2022-12-25 18:14:34   dp_15           0
     2022-12-25 18:14:34   dp_16           1
     2022-12-25 18:14:34   dp_17           AQAAPAMAAPUEAAC0CAAAHg==
     2022-12-25 18:14:34   dp_18           0
     2022-12-25 18:14:34   dp_19           0
     2022-12-25 18:14:34   dp_25           1208
     2022-12-25 18:14:34   dp_38           2
     2022-12-25 18:14:34   dp_39           relay
     2022-12-25 18:14:34   dp_40           0
     2022-12-25 18:14:26   icon            smart/icon/ay1546498573119RvMs4/2a28ff0931c7b2e77d86c81cba03f719.png
     2022-12-25 18:14:26   id             
     2022-12-25 18:14:26   name            LED
     2022-12-25 18:14:26   online          1
     2022-12-25 18:14:26   product_name    GLEDOPTO RGBW LIGHT
     2022-12-25 18:14:34   state           ready
     2022-12-25 18:14:26   sub             0
     2022-12-25 23:39:01   switch_led      off
     2022-12-25 18:14:27   temp_value      283.0
     2022-12-25 18:14:26   time_zone       +02:00
     2022-12-25 18:14:26   update_time     1665091721
     2022-12-25 18:14:26   uuid            7bc12061da3d01b9
     2022-12-25 18:14:27   work_mode       colour
   args:
     
     fhempy
     tuya
     p0thyuzp
     580454aaff1jg
     dc3522e58
     3.3
     a4zih1hjtcd
     38dd60cd65
   argsh:
Attributes:
   alias      LED_Vorzimmer
   dp_20      switch_led
   dp_21      work_mode
   dp_22      bright_value
   dp_23      temp_value
   dp_24      colour_data
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}, 'desc': 'switch led'}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}, 'desc': 'work mode'}, {'code': 'bright_value', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'bright value'}, {'code': 'temp_value', 'dp_id': 23, 'type': 'Integer', 'values': {'min': 0, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'temp value'}, {'code': 'colour_data', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}, 'desc': 'colour data'}]
   tuya_spec_status [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}}, {'code': 'bright_value', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'temp_value', 'dp_id': 23, 'type': 'Integer', 'values': {'min': 0, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'colour_data', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}]
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: fretti am 26 Dezember 2022, 11:37:08
Zitat von: dominik am 24 Dezember 2022, 08:28:25
Sorry, bin for Weihnachten nicht mehr dazu gekommen, melde mich ab 1.1. wieder.

Alles gut:-)
Frohe Weihnachten noch und eine guten Rutsch...


Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 03 Januar 2023, 09:08:36
Hallo dominik,

hoffe bist gut rübergekommen.

Habe jetzt Version 0.1.538 im Einsatz.
temp_set funktioniert jetzt.

upper_temp rechnet aber mal 0,5 ( / 10 * 2) Also aus
15,5 wird 3.1 (2023-01-03 09:06:13 fhempy tuya_local_30000443e8db84b97ec6 upper_temp: 3.1)
18,0 wird 3.6 (2023-01-03 09:07:46 fhempy tuya_local_30000443e8db84b97ec6 temperature: 3.6)

Brauchst du noch mehr Informationen?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 05 Januar 2023, 15:02:26
Habe es jetzt wieder über ein UserReading gelöst. Passt also soweit.

jetzt ist mir aufgefallen, dass Temperaturdaten nur erfasst werden, wenn sie sich am Thermostat ändern.
Wenn sich die Temperatur nicht ändern, habe ich also auch keine Daten für z.B. Plots.
Gibt es einen Befehl, um die Daten abzufragen?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Gisbert am 05 Januar 2023, 18:10:55
Hallo Christian,

ZitatWenn sich die Temperatur nicht ändern, habe ich also auch keine Daten für z.B. Plots.
Gibt es einen Befehl, um die Daten abzufragen?

ich hab das mit addlog im Filelog-Device gelöst:
addLog
This attribute takes a comma-separated list of devspec:reading:maxInterval triples. You may use regular expressions for reading. The last value of the reading will be written to the logfile, if after maxInterval seconds no event for this device/reading has arrived.

Viele Grüße Gisbert
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: romanh am 06 Januar 2023, 20:29:18
Hallo miteinander!

Ich wollte mir für eine Tuya-Steckdose mit Leistungsmessung versuchsweise mal fhempy installieren. Leider habe ich nun dieses Problem:

2023-01-06 20:03:29,765 - ERROR    - tuya_local_bfde56df327bb24689tpit: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/tuya/tuya.py", line 485, in setup_connection
    self._connected_device = await self.tt.connect(
AttributeError: module 'tinytuya' has no attribute 'connect'


Und soweit ich sehen kann (bin kein python-Guru ;-) gibt es im tinytuya-Modul tatsächlich keine connect-Methode.

Ich hatte erst das aktuelle tinytuya-1.9.1 installiert und im Logfile von fhempy entdeckt, dass er gern 1.7.3 installieren würde. Deshalb habe ich testweise mal 1.7.2 installiert (1.7.3 gibt's bei pypi nicht) Leider hilft das aber auch nicht, die Meldung wegen fehlendem connect bleibt.

Die anderen Infos: Der Scan von 'tuya_local' war (irgendwann) fertig und hat mir Create für das SmartPlug-Device angeboten; das hängt aber dann immer in 'Initializing'. fhempy ist Version 0.1.541, tinytuya eben 1.9.1 bzw. 1.7.2.

Und noch eine andere Beobachtung: Ich wollte das Logfile auf Monate umstellen (%Y-%m ohne %d), aber das klappt nicht richtig. 'fhempyserver_XXX' hat als Attribut weiterhin ein Logfile mit %d, im Reading steht's ohne ... aber damit könnte man zur Not leben ;-)


PS: Direkt mit tinytuya ist der SmartPlug ansprechbar und liefert plausible Werte. DevID und Keys usw. sind also vermutlich ok.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 07 Januar 2023, 10:36:58
was ist bitte tinytuya ?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 07 Januar 2023, 10:42:39
hallo.
ich habe hier 2 idente smart_sockets, aber unterschiedliche readings.
wie bekomme ich beide gleich?

PYTHONTYPE tuya
   STATE      on
   TYPE       fhempy
   READINGS:
     2022-08-07 11:35:06   active_time     1649949043
     2023-01-07 10:15:32   add_ele         0.002
     2022-08-07 11:35:06   biz_type        18
     2022-08-07 11:35:06   category        pc
     2022-08-07 11:35:11   child_lock      off
     2022-08-07 11:35:11   countdown_1     0.0
     2022-08-07 11:35:11   countdown_usb1  0.0
     2022-08-07 11:35:06   create_time     1640333383
     2023-01-07 10:22:49   cur_current     20.0
     2023-01-07 10:22:49   cur_power       4.7
     2023-01-07 10:22:44   cur_voltage     226.2
     2022-08-07 11:35:11   dp_101          0
     2022-08-07 11:35:11   dp_21           1
     2022-08-07 11:35:11   dp_22           576
     2022-08-07 11:35:11   dp_23           31437
     2022-08-07 11:35:11   dp_24           16524
     2022-08-07 11:35:11   dp_25           1260
     2022-08-07 11:35:06   icon            smart/icon/ay1517974017716dABhC/0295712f08a611c25356d269f5563e61.png
     2022-08-07 11:35:06   id              bffe6zas
     2022-08-07 11:35:06   ip              8
     2022-09-25 15:57:30   lat             4
     2022-08-07 11:35:11   light_mode      relay
     2022-08-07 11:35:06   local_key       5
     2022-09-25 15:57:30   lon             16.5123
     2022-08-07 11:35:06   model           SP112_RTL
     2022-08-07 11:35:06   name            Wohnzimmer
     2023-01-04 16:50:25   online          1
     2022-08-07 11:35:06   owner_id        49137187
     2022-08-07 11:35:06   product_id      zmql6aexy8ua5rox
     2022-08-07 11:35:06   product_name    Smart Socket
     2022-08-07 11:35:11   relay_status    2
     2023-01-07 08:00:00   state           on
     2022-08-07 11:35:06   sub             0
     2023-01-07 10:22:40   switch_usb1     on
     2022-08-07 11:35:06   time_zone       +02:00
     2022-08-07 11:35:06   uid             eu16427744688382eG9R
     2022-09-25 15:57:30   update_time     1660290754
     2022-08-07 11:35:06   uuid            b667fe62f47a94d0



READINGS:
     2023-01-04 16:45:04   active_time     1672823546
     2023-01-07 10:41:10   add_ele         0.01
     2023-01-04 16:45:04   biz_type        18
     2023-01-04 16:45:04   category        pc
     2023-01-07 10:41:10   child_lock      off
     2023-01-07 10:41:10   countdown_1     0.0
     2023-01-07 10:41:10   countdown_usb1  0.0
     2023-01-04 16:45:04   create_time     1640333453
     2023-01-07 10:41:10   cur_current     2948.0
     2023-01-07 10:41:10   cur_power       658.8
     2023-01-07 10:41:10   cur_voltage     223.4
     2023-01-07 10:41:10   cycle_time     
     2023-01-04 16:45:04   icon            https://images.tuyaeu.com/smart/icon/ay1517974017716dABhC/0295712f08a611c25356d269f5563e61.png
     2023-01-04 16:45:04   id              bsynp
     2023-01-04 16:45:04   ip              8
     2023-01-04 16:45:04   lat             4
     2023-01-07 10:41:10   light_mode      relay
     2023-01-04 16:45:04   local_key       
     2023-01-04 16:45:04   lon             16.5125
     2023-01-04 16:45:04   model           SP112_RTL
     2023-01-04 16:45:04   name            Aquarium Switch
     2023-01-04 16:45:04   online          on
     2023-01-04 16:45:04   owner_id        49137187
     2023-01-04 16:45:04   product_id      zmql6aexy8ua5rox
     2023-01-04 16:45:04   product_name    Smart Socket
     2023-01-07 10:41:10   random_time     
     2023-01-07 10:41:10   relay_status    power_on
     2023-01-07 10:41:10   state           on
     2023-01-04 16:45:04   sub             off
     2023-01-07 10:41:10   switch_inching 
     2023-01-07 10:41:10   switch_usb1     off
     2023-01-04 16:45:04   time_zone       +01:00
     2023-01-04 16:45:04   uid             eu16427744688382eG9R
     2023-01-04 16:45:04   update_time     1672823602
     2023-01-04 16:45:04   uuid            f895810825f60018
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: romanh am 08 Januar 2023, 18:49:20
Zitat von: satprofi am 07 Januar 2023, 10:36:58
was ist bitte tinytuya ?

Das ist ein lowlevel-Python-Modul, das die Kommunikation mit den Tuya-Gerätschaften übernimmt, und dabei en/decryption etc. übernimmt:https://github.com/jasonacox/tinytuya (https://github.com/jasonacox/tinytuya)

tinytuya wird auch von dem 'tuya'-Subdevice von fhempy benutzt, so bin ich drauf gekommen ;-)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 14 Januar 2023, 13:41:18
Zitat von: Gisbert am 05 Januar 2023, 18:10:55
Hallo Christian,

ich hab das mit addlog im Filelog-Device gelöst:
addLog
This attribute takes a comma-separated list of devspec:reading:maxInterval triples. You may use regular expressions for reading. The last value of the reading will be written to the logfile, if after maxInterval seconds no event for this device/reading has arrived.

Viele Grüße Gisbert

Danke.
Weißt du, wie das beim DbLog geht?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Gisbert am 14 Januar 2023, 15:37:55
Hallo Christian,

keine Ahnung ob es bei DbLog auch ein Attribut addlog gibt. Ich glaube, dass du das alleine rausfinden musst. Schau doch mal in die Attributliste des DbLog-Devices rein, ob du da was passendes findest.

Viele Grüße Gisbert
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 14 Januar 2023, 17:01:35
Zitat von: Gisbert am 14 Januar 2023, 15:37:55
Hallo Christian,

keine Ahnung ob es bei DbLog auch ein Attribut addlog gibt. Ich glaube, dass du das alleine rausfinden musst. Schau doch mal in die Attributliste des DbLog-Devices rein, ob du da was passendes findest.

Viele Grüße Gisbert

Habs gefunden.
Bei DbLog ist es ein Set Befehl.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 15 Januar 2023, 22:17:59
Hallo Dominik,

habe gestern aus dem OBI die Smart Wave Plugs ohne Probleme eingebunden.
Vielen Dank für das coole Modul!

Das wollte ich nur mal los werden.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 17 Januar 2023, 12:16:42
Hallo dominik,

nach Neustart des fhempy Servers bekommen alle Devices (Thermostate) die gleichen Werte (temp_set, upper_temp, etc.). Erst wenn das jeweilige Gerät ein Update schickt, werden die Daten korrigiert.
Woran könnte das liegen?

2. Frage: Nach dem der Testzeitraum der tuya Cloud Develpoment abgelaufen ist, funktioniert nun ein scan_devices nicht mehr. Wie kann ich jetzt ein weiteres Device einbinden?
nach dem Beispiel "define wifi_plug fhempy tuya PRODUCT_ID DEVICE_ID IP LOCAL_KEY [VERSION] [API_KEY] [API_SECRET]" wird zwar das Gerät angelegt aber niemals Daten empfangen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Gisbert am 18 Januar 2023, 13:43:04
Hallo zusammen,

ich nutze dieses Modul - und eigentlich hat es auch schon in den vergangen Wochen alles sehr schön funktioniert, jetzt leider nicht mehr, und ich weiß jetzt nicht mehr weiter.

Ich habe 2 Probleme:

Mehr Events als mir lieb ist:
Hierzu hab ich folgendes Attribut erzeugt:
attr tuya_local_bf25adc3b33d91441acnxr event-min-interval humidity_indoor:120,temp_indoor:120,dewpoint:120,state:120,f_dewpoint:120,dewpoint:120,f_temperature:120
Bei anderen Devices, weiß ich, dass minimal 120 Sekunden (in diesem Fall) vergehen müssen, bevor ein neues Event und Reading geschrieben wird, sofern das existiert.
Im Event-Monitor sieht man aber, dass jede Minute etwas reinkommt:
2023-01-18 12:57:12.564 fhempy tuya_local_bf25adc3b33d91441acnxr dewpoint: 5.4
2023-01-18 12:57:12.564 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 12:57:12.564 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 12:58:42.782 fhempy tuya_local_bf25adc3b33d91441acnxr f_temperature: 24<span style='vertical-align: +4px; font-size: 75%;'>0</span>
2023-01-18 12:58:42.782 fhempy tuya_local_bf25adc3b33d91441acnxr f_dewpoint: 5<span style='vertical-align: +4px; font-size: 75%;'>4</span>
2023-01-18 12:58:42.782 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 12:58:42.782 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 12:59:20.675 fhempy tuya_local_bf25adc3b33d91441acnxr dewpoint: 5.4
2023-01-18 12:59:20.675 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 12:59:20.675 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 13:00:18.926 fhempy tuya_local_bf25adc3b33d91441acnxr f_temperature: 24<span style='vertical-align: +4px; font-size: 75%;'>0</span>
2023-01-18 13:00:18.926 fhempy tuya_local_bf25adc3b33d91441acnxr f_dewpoint: 5<span style='vertical-align: +4px; font-size: 75%;'>4</span>
2023-01-18 13:00:18.926 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 13:00:18.926 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 13:01:07.480 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 13:01:07.480 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 13:02:07.874 fhempy tuya_local_bf25adc3b33d91441acnxr dewpoint: 5.4
2023-01-18 13:02:07.874 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 13:02:07.874 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 13:03:08.304 fhempy tuya_local_bf25adc3b33d91441acnxr f_temperature: 24<span style='vertical-align: +4px; font-size: 75%;'>0</span>
2023-01-18 13:03:08.304 fhempy tuya_local_bf25adc3b33d91441acnxr f_dewpoint: 5<span style='vertical-align: +4px; font-size: 75%;'>4</span>
2023-01-18 13:03:08.304 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 13:03:08.304 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 13:04:07.794 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 13:04:07.794 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 13:05:10.458 fhempy tuya_local_bf25adc3b33d91441acnxr f_temperature: 24<span style='vertical-align: +4px; font-size: 75%;'>0</span>
2023-01-18 13:05:10.458 fhempy tuya_local_bf25adc3b33d91441acnxr dewpoint: 5.4
2023-01-18 13:05:10.458 fhempy tuya_local_bf25adc3b33d91441acnxr f_dewpoint: 5<span style='vertical-align: +4px; font-size: 75%;'>4</span>
2023-01-18 13:05:10.458 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 13:05:10.458 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 13:06:07.834 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 13:06:07.834 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 13:07:47.889 fhempy tuya_local_bf25adc3b33d91441acnxr f_temperature: 24<span style='vertical-align: +4px; font-size: 75%;'>0</span>
2023-01-18 13:07:47.889 fhempy tuya_local_bf25adc3b33d91441acnxr dewpoint: 5.4
2023-01-18 13:07:47.889 fhempy tuya_local_bf25adc3b33d91441acnxr f_dewpoint: 5<span style='vertical-align: +4px; font-size: 75%;'>4</span>
2023-01-18 13:07:47.889 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 13:07:47.889 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 13:08:09.590 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 13:08:09.590 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 13:09:08.012 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 13:09:08.012 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 13:10:11.925 fhempy tuya_local_bf25adc3b33d91441acnxr f_temperature: 24<span style='vertical-align: +4px; font-size: 75%;'>0</span>
2023-01-18 13:10:11.925 fhempy tuya_local_bf25adc3b33d91441acnxr dewpoint: 5.4
2023-01-18 13:10:11.925 fhempy tuya_local_bf25adc3b33d91441acnxr f_dewpoint: 5<span style='vertical-align: +4px; font-size: 75%;'>4</span>
2023-01-18 13:10:11.925 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 13:10:11.925 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 13:11:07.565 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 13:11:07.565 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 13:12:07.744 fhempy tuya_local_bf25adc3b33d91441acnxr f_temperature: 24<span style='vertical-align: +4px; font-size: 75%;'>0</span>
2023-01-18 13:12:07.744 fhempy tuya_local_bf25adc3b33d91441acnxr dewpoint: 5.4
2023-01-18 13:12:07.744 fhempy tuya_local_bf25adc3b33d91441acnxr f_dewpoint: 5<span style='vertical-align: +4px; font-size: 75%;'>4</span>
2023-01-18 13:12:07.744 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 13:12:07.744 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 13:13:07.600 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 13:13:07.600 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 13:14:07.743 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 13:14:07.743 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>
2023-01-18 13:15:07.648 fhempy tuya_local_bf25adc3b33d91441acnxr f_temperature: 24<span style='vertical-align: +4px; font-size: 75%;'>0</span>
2023-01-18 13:15:07.648 fhempy tuya_local_bf25adc3b33d91441acnxr dewpoint: 5.4
2023-01-18 13:15:07.648 fhempy tuya_local_bf25adc3b33d91441acnxr f_dewpoint: 5<span style='vertical-align: +4px; font-size: 75%;'>4</span>
2023-01-18 13:15:07.648 fhempy tuya_local_bf25adc3b33d91441acnxr Zeitstempel: 2023-01-18 11:56
2023-01-18 13:15:07.648 fhempy tuya_local_bf25adc3b33d91441acnxr WDH_an_aus: <span style='color:#000000'>ist aus</span>

Warum ist das so?

Beim Reading state wird kein Event erzeugt:
Der Event-Monitor schweigt dazu, wenn ich das Gerät ein/ausschalte, aber das Reading ändert sich.
Stattdessen kommt das im Event-Monitor (ohne das Reading "state"), und das auch gleich zweimal:
2023-01-18 13:19:02.803 fhempy tuya_local_bf25adc3b33d91441acnxr on
2023-01-18 13:19:03.274 fhempy tuya_local_bf25adc3b33d91441acnxr on


Bei anderen Devices bin ich sehr gut in der Lage die Anzahl der Events auf die wenigen erforderlichen zu begrenzen, in diesem Fall aber nicht.

Anbei noch das vollständige list (Credentials:GEHEIM):
define tuya_local_bf25adc3b33d91441acnxr fhempy tuya GEHEIM
attr tuya_local_bf25adc3b33d91441acnxr alias NWT Dehumidifier
attr tuya_local_bf25adc3b33d91441acnxr cmdIcon on:vent_ventilation_level_3@darkred off:vent_ventilation@gray
attr tuya_local_bf25adc3b33d91441acnxr dp_01 switch
attr tuya_local_bf25adc3b33d91441acnxr dp_03 dehumidify_set_enum
attr tuya_local_bf25adc3b33d91441acnxr dp_04 fan_speed_enum
attr tuya_local_bf25adc3b33d91441acnxr dp_06 humidity_indoor
attr tuya_local_bf25adc3b33d91441acnxr dp_07 temp_indoor
attr tuya_local_bf25adc3b33d91441acnxr dp_17 countdown_set
attr tuya_local_bf25adc3b33d91441acnxr dp_19 fault
attr tuya_local_bf25adc3b33d91441acnxr event-min-interval humidity_indoor:120,temp_indoor:120,dewpoint:120,state:120,f_dewpoint:120,dewpoint:120,f_temperature:120
attr tuya_local_bf25adc3b33d91441acnxr group Sensoren
attr tuya_local_bf25adc3b33d91441acnxr icon humidity
attr tuya_local_bf25adc3b33d91441acnxr room HomeHM,fhempy
attr tuya_local_bf25adc3b33d91441acnxr stateFormat Entfeuchter [$name:WDH_an_aus]<br/>T[$name:f_temperature] H[$name:humidity_indoor:r0]<span style='vertical-align: +4px;; font-size: 75%;;'>%</span> D[$name:f_dewpoint]<br/><div style='vertical-align: middle;; font-size: 85%'>[$name:Zeitstempel]</div>
attr tuya_local_bf25adc3b33d91441acnxr tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'dehumidify_set_enum', 'dp_id': 3, 'type': 'Enum', 'values': {'range': ['30', '40', '50']}, 'desc': 'dehumidify set enum'}, {'code': 'fan_speed_enum', 'dp_id': 4, 'type': 'Enum', 'values': {'range': ['low', 'high']}, 'desc': 'fan speed enum'}, {'code': 'countdown_set', 'dp_id': 17, 'type': 'Enum', 'values': {'range': ['cancel', '1h', '2h', '3h']}, 'desc': 'countdown set'}]
attr tuya_local_bf25adc3b33d91441acnxr tuya_spec_status [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'dehumidify_set_enum', 'dp_id': 3, 'type': 'Enum', 'values': {'range': ['30', '40', '50']}}, {'code': 'fan_speed_enum', 'dp_id': 4, 'type': 'Enum', 'values': {'range': ['low', 'high']}}, {'code': 'humidity_indoor', 'dp_id': 6, 'type': 'Integer', 'values': {'unit': '%', 'min': 30, 'max': 90, 'scale': 0, 'step': 1}}, {'code': 'temp_indoor', 'dp_id': 7, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 50, 'scale': 0, 'step': 1}}, {'code': 'countdown_set', 'dp_id': 17, 'type': 'Enum', 'values': {'range': ['cancel', '1h', '2h', '3h']}}, {'code': 'fault', 'dp_id': 19, 'type': 'Bitmap', 'values': {'label': ['E1', 'E2']}}]
attr tuya_local_bf25adc3b33d91441acnxr userReadings f_temperature {int(ReadingsVal($name,'temp_indoor',''))."<span style='vertical-align: +4px;; font-size: 75%;;'>".substr(round(abs(ReadingsVal($name,'temp_indoor','')-int(ReadingsVal($name,'temp_indoor',''))),3),2,1)."</span>"},\
dewpoint {urDewpoint($name,'temp_indoor','humidity_indoor')},\
f_dewpoint {int(ReadingsVal($name,'dewpoint',''))."<span style='vertical-align: +4px;; font-size: 75%;;'>".substr(round(abs(ReadingsVal($name,'dewpoint','')-int(ReadingsVal($name,'dewpoint',''))),3),2,1)."</span>"},\
Zeitstempel {substr(ReadingsTimestamp($name,'humidity_indoor',''),0,16)},\
WDH_an_aus {(ReadingsVal($name,'state','') eq "off") ? "<span style='color:#000000'>ist aus</span>":"<span style='color:#2e5e87'><b>läuft</b></span>"}
#   CFGFN      ./FHEM/myfhempy.cfg
#   DEF        tuya GEHEIM
#   DEVICEID   bf25adc3b33d91441acnxr
#   FHEMPYTYPE tuya
#   FUUID      GEHEIM
#   IODev      fhempy_local
#   NAME       tuya_local_bf25adc3b33d91441acnxr
#   NR         1305
#   PYTHONTYPE tuya
#   STATE      Entfeuchter <span style='color:#2e5e87'><b>läuft</b></span><br/>T23<span style='vertical-align: +4px; font-size: 75%;'>0</span> H32<span style='vertical-align: +4px; font-size: 75%;'>%</span> D5<span style='vertical-align: +4px; font-size: 75%;'>4</span><br/><div style='vertical-align: middle; font-size: 85%'>2023-01-18 13:22</div>
#   TYPE       fhempy
#   eventCount 12103
#   READINGS:
#     2023-01-18 13:23:12   WDH_an_aus      <span style='color:#2e5e87'><b>läuft</b></span>
#     2023-01-18 13:23:12   Zeitstempel     2023-01-18 13:22
#     2023-01-01 16:19:49   active_time     1671965475
#     2023-01-01 16:19:49   biz_type        18
#     2023-01-01 16:19:49   category        cs
#     2023-01-01 16:19:49   countdown_set   cancel
#     2023-01-01 16:19:49   create_time     1671536623
#     2023-01-01 20:34:36   dehumidify_set_enum 45
#     2023-01-18 13:23:12   dewpoint        5.4
#     2023-01-17 21:37:46   dp_101          0
#     2023-01-01 16:19:49   dp_102          0
#     2023-01-18 13:23:12   f_dewpoint      5<span style='vertical-align: +4px; font-size: 75%;'>4</span>
#     2023-01-18 13:23:12   f_temperature   23<span style='vertical-align: +4px; font-size: 75%;'>0</span>
#     2023-01-14 13:10:15   fan_speed_enum  low
#     2023-01-01 16:19:49   fault           0
#     2023-01-18 13:22:06   humidity_indoor 32.0
#     2023-01-01 16:19:49   icon            smart/icon/ay1540889171034rOso7/4f38d442ccf33c14aa9d924a5ef2bdb5.png
#     2023-01-01 16:19:49   id              bf25adc3b33d91441acnxr
#     2023-01-01 16:19:49   ip              92.209.93.158
#     2023-01-01 16:19:49   lat             51.0295
#     2023-01-01 16:19:49   local_key       GEHEIM
#     2023-01-01 16:19:49   lon             7.0558
#     2023-01-01 16:19:49   model           WDH-310EK
#     2023-01-01 16:19:49   name            NWT Dehumidifier
#     2023-01-18 08:39:03   online          1
#     2023-01-01 16:19:49   owner_id        75937461
#     2023-01-01 16:19:49   product_id      GEHEIM
#     2023-01-01 16:19:49   product_name    NWT Dehumidifier
#     2023-01-18 13:19:03   state           on
#     2023-01-01 16:19:49   sub             0
#     2023-01-17 04:54:47   switch          off
#     2023-01-18 13:23:12   temp_indoor     23.0
#     2023-01-01 16:19:49   time_zone       +01:00
#     2023-01-01 16:19:49   uid             GEHEIM
#     2023-01-01 16:19:49   update_time     1671965475
#     2023-01-01 16:19:49   uuid            GEHEIM
#   args:
#     tuya_local_bf25adc3b33d91441acnxr
#     fhempy
#     tuya
#     GEHEIM
#     bf25adc3b33d91441acnxr
#     GEHEIM
#     GEHEIM
#     GEHEIM
#     GEHEIM
#     GEHEIM
#   argsh:
#   helper:
#     bm:
#       fhempy_Attr:
#         cnt        11
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        18.01. 12:55:26
#         max        0.0162248611450195
#         tot        0.163519620895386
#         mAr:
#           set
#           tuya_local_bf25adc3b33d91441acnxr
#           event-min-interval
#           humidity_indoor:120,temp_indoor:120,dewpoint:120,state:120,f_dewpoint:120,dewpoint:120,f_temperature:120
#       fhempy_Get:
#         cnt        49
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        18.01. 04:26:46
#         max        0.0103509426116943
#         tot        0.393774032592773
#         mAr:
#           HASH(0x55ebb76cf410)
#           ARRAY(0x55ebc80a4e38)
#           HASH(0x55ebc85186b8)
#       fhempy_Set:
#         cnt        14598
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        16.01. 05:49:21
#         max        0.203808069229126
#         tot        182.351126432419
#         mAr:
#           HASH(0x55ebb76cf410)
#           ARRAY(0x55ebc0b79d10)
#           HASH(0x55ebc069f0f0)
#
setstate tuya_local_bf25adc3b33d91441acnxr Entfeuchter <span style='color:#2e5e87'><b>läuft</b></span><br/>T23<span style='vertical-align: +4px;; font-size: 75%;;'>0</span> H32<span style='vertical-align: +4px;; font-size: 75%;;'>%</span> D5<span style='vertical-align: +4px;; font-size: 75%;;'>4</span><br/><div style='vertical-align: middle;; font-size: 85%'>2023-01-18 13:22</div>
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-18 13:23:12 WDH_an_aus <span style='color:#2e5e87'><b>läuft</b></span>
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-18 13:23:12 Zeitstempel 2023-01-18 13:22
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 active_time 1671965475
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 biz_type 18
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 category cs
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 countdown_set cancel
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 create_time 1671536623
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 20:34:36 dehumidify_set_enum 45
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-18 13:23:12 dewpoint 5.4
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-17 21:37:46 dp_101 0
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 dp_102 0
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-18 13:23:12 f_dewpoint 5<span style='vertical-align: +4px;; font-size: 75%;;'>4</span>
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-18 13:23:12 f_temperature 23<span style='vertical-align: +4px;; font-size: 75%;;'>0</span>
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-14 13:10:15 fan_speed_enum low
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 fault 0
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-18 13:22:06 humidity_indoor 32.0
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 icon smart/icon/ay1540889171034rOso7/4f38d442ccf33c14aa9d924a5ef2bdb5.png
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 id bf25adc3b33d91441acnxr
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 ip GEHEIM
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 lat 51.0295
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 local_key GEHEIM
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 lon 7.0558
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 model WDH-310EK
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 name NWT Dehumidifier
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-18 08:39:03 online 1
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 owner_id 75937461
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 product_id GEHEIM
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 product_name NWT Dehumidifier
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-18 13:19:03 state on
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 sub 0
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-17 04:54:47 switch off
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-18 13:23:12 temp_indoor 23.0
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 time_zone +01:00
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 uid GEHEIM
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 update_time 1671965475
setstate tuya_local_bf25adc3b33d91441acnxr 2023-01-01 16:19:49 uuid GEHEIM



Viele Grüße Gisbert
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 18 Januar 2023, 14:23:07
ich kann nur berichten, dass die Events für ein und dasselbe Device im Sekundentakt reinkommen; das war schon immer so

um die dlog nicht zu fluten, setze ich

attr xxxx DbLogExclude .*
und schließe mit DBLogInclude nur die gewünschetn Readings ein.

Weiterhin setze ich zur weiteren Eindämmung je nach Zweck
attr event-on-update, event-on-change

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Gisbert am 18 Januar 2023, 19:14:48
Hallo thburkhart,

die Anzahl der log-Einträge hatte ich schon gebändigt, und mittlerweile auch die Anzahl von Events auf mein gewünschtes Maß zu reduzieren.

Es bleibt lediglich die Tatsache, dass ich vom Reading state keine Events bekomme und damit keine log-Einträge. Sehr merkwürdig - ich verstehe es nicht.

Viele Grüße Gisbert
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 18 Januar 2023, 20:12:17
Zitat von: Gisbert am 18 Januar 2023, 19:14:48
Hallo thburkhart,

die Anzahl der log-Einträge hatte ich schon gebändigt, und mittlerweile auch die Anzahl von Events auf mein gewünschtes Maß zu reduzieren.

Es bleibt lediglich die Tatsache, dass ich vom Reading state keine Events bekomme und damit keine log-Einträge. Sehr merkwürdig - ich verstehe es nicht.

Viele Grüße Gisbert

Hallo Gisbert,

dann werden durch dein event-min-interval humidity_indoor:120,temp_indoor:120,dewpoint:120,state:120,f_dewpoint:120,dewpoint:120,f_temperature:120

wohl keine events erzeugt. Versuch es doch z.B. mit event on-Change

ansonsten liegt dann wirklich Fehler im Modul vor

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Gisbert am 19 Januar 2023, 08:07:30
Hallo thburkhart,

wie bereits erwähnt bekomme ich mit event-min-interval und event-on-change-reading jetzt alle Events, Readings und log-Einträge, nur nicht beim Reading state.
event-min-interval Zeitstempel:120,humidity_indoor:120,temp_indoor:120,state:120,dewpoint:300
event-on-change-reading Zeitstempel,humidity_indoor:2,temp_indoor,state,dewpoint:1


Wenn sich state ändert (on/off), ändert sich das Reading, es gibt aber kein Event und kein log-Eintrag.
Das war noch vor kurzer Zeit anders, da gab es ein Event und ein log-Eintrag.
Vielleicht hängt es mit einem Versions-Update zusammen, die alle paar Tage kommen.

Viele Grüße Gisbert
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 19 Januar 2023, 16:03:37
Zitat von: Gisbert am 19 Januar 2023, 08:07:30
Hallo thburkhart,

wie bereits erwähnt bekomme ich mit event-min-interval und event-on-change-reading jetzt alle Events, Readings und log-Einträge, nur nicht beim Reading state.
event-min-interval Zeitstempel:120,humidity_indoor:120,temp_indoor:120,state:120,dewpoint:300
event-on-change-reading Zeitstempel,humidity_indoor:2,temp_indoor,state,dewpoint:1


Wenn sich state ändert (on/off), ändert sich das Reading, es gibt aber kein Event und kein log-Eintrag.
Das war noch vor kurzer Zeit anders, da gab es ein Event und ein log-Eintrag.
Vielleicht hängt es mit einem Versions-Update zusammen, die alle paar Tage kommen.

Viele Grüße Gisbert

ich habe nun auch ein device, bei dem keine events mehr erzeugt werden :

[code]define TUYA_Temp4 fhempy tuya lf36y5nwb8jkxwgg bf0982f08295070ae7tulb 192.168.9.129 d81b4251f2f1ac46 3.3
attr TUYA_Temp4 DbLogInclude va_humidity,va_temperature
attr TUYA_Temp4 alias TUYA_Temp4 Temperatur Terrasse
attr TUYA_Temp4 dp_01 va_temperature
attr TUYA_Temp4 dp_02 va_humidity
attr TUYA_Temp4 dp_03 battery_state
attr TUYA_Temp4 dp_09 temp_unit_convert
attr TUYA_Temp4 event-min-interval va_temperature:3000
attr TUYA_Temp4 event-on-change-reading .*
attr TUYA_Temp4 group Temperatur und Feuchtigkeit aussen
attr TUYA_Temp4 room TUYA TempHum,Temperaturen Aussen,Terrasse,fhempy
attr TUYA_Temp4 tuya_spec_functions [{'code': 'temp_unit_convert', 'dp_id': 9, 'type': 'Enum', 'values': {'range': ['c', 'f']}, 'desc': 'temp unit convert'}]
attr TUYA_Temp4 tuya_spec_status [{'code': 'va_temperature', 'dp_id': 1, 'type': 'Integer', 'values': {'unit': '℃', 'min': -200, 'max': 600, 'scale': 1, 'step': 1}}, {'code': 'va_humidity', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '%', 'min': 0, 'max': 100, 'scale': 0, 'step': 1}}, {'code': 'battery_state', 'dp_id': 3, 'type': 'Enum', 'values': {'range': ['low', 'middle', 'high']}}, {'code': 'temp_unit_convert', 'dp_id': 9, 'type': 'Enum', 'values': {'range': ['c', 'f']}}]
#   DEF        tuya lf36y5nwb8jkxwgg bf0982f08295070ae7tulb 192.168.9.129 d81b4251f2f1ac46 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   bf0982f08295070ae7tulb
#   FHEMPYTYPE tuya
#   FUUID      63af679f-f33f-fd5f-742e-e728a0f623922f1a
#   IODev      local_pybinding
#   NAME       TUYA_Temp4
#   NR         1987
#   PYTHONTYPE tuya
#   STATE      ready
#   TYPE       fhempy
#   eventCount 24
#   Helper:
#     DBLOG:
#       online:
#         dblog_THB:
#           TIME       1674113906.04127
#           VALUE      1
#       state:
#         dblog_THB:
#           TIME       1674113906.04127
#           VALUE      ready
#       va_humidity:
#         dblog_THB:
#           TIME       1674113906.04127
#           VALUE      32.0
#       va_temperature:
#         dblog_THB:
#           TIME       1674113906.04127
#           VALUE      0.0
#   READINGS:
#     2023-01-01 12:29:11   active_time     1671725935
#     2023-01-15 22:49:06   battery_state   1
#     2023-01-01 12:29:11   biz_type        18
#     2023-01-01 12:29:11   category        wsdcg
#     2023-01-01 12:29:11   create_time     1671725935
#     2023-01-19 08:38:10   dp_04           559
#     2023-01-19 08:38:10   dp_05           20
#     2023-01-19 08:38:10   dp_06           2294
#     2023-01-17 11:27:08   dp_07           0
#     2023-01-13 21:16:44   dp_08           0
#     2023-01-13 21:16:44   dp_10           0
#     2023-01-01 12:29:32   dp_101          0
#     2023-01-01 12:29:32   dp_102          0
#     2023-01-17 14:52:47   dp_103          0
#     2023-01-01 12:29:32   dp_104          0
#     2023-01-01 12:29:32   dp_105          0
#     2023-01-13 21:16:44   dp_11           0
#     2023-01-13 21:16:44   dp_12           0
#     2023-01-13 21:16:44   dp_15           0
#     2023-01-19 08:38:10   dp_18           77
#     2023-01-19 08:38:10   dp_19           1712
#     2023-01-19 08:38:10   dp_20           2293
#     2023-01-19 08:38:10   dp_21           1
#     2023-01-19 08:38:10   dp_22           709
#     2023-01-19 08:38:10   dp_23           30147
#     2023-01-19 08:38:10   dp_24           20479
#     2023-01-19 08:38:10   dp_25           1020
#     2023-01-01 12:29:32   dp_26           0
#     2023-01-10 00:28:17   dp_32           normal
#     2023-01-13 21:16:44   dp_38           1
#     2023-01-01 12:29:32   dp_39           0
#     2023-01-01 12:29:11   icon            smart/icon/ay1525749833414yotNt/d9d4ceec63cb81ff6e8c8d6c2fb4edb3.png
#     2023-01-01 12:29:11   id              bf0982f08295070ae7tulb
#     2023-01-01 12:29:11   ip              78.43.212.60
#     2023-01-01 12:29:11   lat             48.5585
#     2023-01-01 12:29:11   local_key       d81b4251f2f1ac46
#     2023-01-01 12:29:11   lon             9.2025
#     2023-01-01 12:29:11   model           TH01 CB3S
#     2023-01-01 12:29:11   name            Temperatur Terrasse
#     2023-01-19 08:38:10   online          1
#     2023-01-01 12:29:11   owner_id        3389434
#     2023-01-01 12:29:11   product_id      lf36y5nwb8jkxwgg
#     2023-01-01 12:29:11   product_name    T & H Sensor
#     2023-01-19 08:38:10   state           ready
#     2023-01-01 12:29:11   sub             0
#     2023-01-01 12:29:32   temp_unit_convert 0
#     2023-01-01 12:29:11   time_zone       +01:00
#     2023-01-01 12:29:11   uid             eu1548823829280mLHX1
#     2023-01-01 12:29:11   update_time     1671989741
#     2023-01-01 12:29:11   uuid            1ff0620fa0c0d31a
#     2023-01-19 08:38:10   va_humidity     32.0
#     2023-01-19 08:38:10   va_temperature  0.0
#   args:
#     TUYA_Temp4
#     fhempy
#     tuya
#     lf36y5nwb8jkxwgg
#     bf0982f08295070ae7tulb
#     192.168.9.129
#     d81b4251f2f1ac46
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate TUYA_Temp4 ready
setstate TUYA_Temp4 2023-01-01 12:29:11 active_time 1671725935
setstate TUYA_Temp4 2023-01-15 22:49:06 battery_state 1
setstate TUYA_Temp4 2023-01-01 12:29:11 biz_type 18
setstate TUYA_Temp4 2023-01-01 12:29:11 category wsdcg
setstate TUYA_Temp4 2023-01-01 12:29:11 create_time 1671725935
setstate TUYA_Temp4 2023-01-19 08:38:10 dp_04 559
setstate TUYA_Temp4 2023-01-19 08:38:10 dp_05 20
setstate TUYA_Temp4 2023-01-19 08:38:10 dp_06 2294
setstate TUYA_Temp4 2023-01-17 11:27:08 dp_07 0
setstate TUYA_Temp4 2023-01-13 21:16:44 dp_08 0
setstate TUYA_Temp4 2023-01-13 21:16:44 dp_10 0
setstate TUYA_Temp4 2023-01-01 12:29:32 dp_101 0
setstate TUYA_Temp4 2023-01-01 12:29:32 dp_102 0
setstate TUYA_Temp4 2023-01-17 14:52:47 dp_103 0
setstate TUYA_Temp4 2023-01-01 12:29:32 dp_104 0
setstate TUYA_Temp4 2023-01-01 12:29:32 dp_105 0
setstate TUYA_Temp4 2023-01-13 21:16:44 dp_11 0
setstate TUYA_Temp4 2023-01-13 21:16:44 dp_12 0
setstate TUYA_Temp4 2023-01-13 21:16:44 dp_15 0
setstate TUYA_Temp4 2023-01-19 08:38:10 dp_18 77
setstate TUYA_Temp4 2023-01-19 08:38:10 dp_19 1712
setstate TUYA_Temp4 2023-01-19 08:38:10 dp_20 2293
setstate TUYA_Temp4 2023-01-19 08:38:10 dp_21 1
setstate TUYA_Temp4 2023-01-19 08:38:10 dp_22 709
setstate TUYA_Temp4 2023-01-19 08:38:10 dp_23 30147
setstate TUYA_Temp4 2023-01-19 08:38:10 dp_24 20479
setstate TUYA_Temp4 2023-01-19 08:38:10 dp_25 1020
setstate TUYA_Temp4 2023-01-01 12:29:32 dp_26 0
setstate TUYA_Temp4 2023-01-10 00:28:17 dp_32 normal
setstate TUYA_Temp4 2023-01-13 21:16:44 dp_38 1
setstate TUYA_Temp4 2023-01-01 12:29:32 dp_39 0
setstate TUYA_Temp4 2023-01-01 12:29:11 icon smart/icon/ay1525749833414yotNt/d9d4ceec63cb81ff6e8c8d6c2fb4edb3.png
setstate TUYA_Temp4 2023-01-01 12:29:11 id bf0982f08295070ae7tulb
setstate TUYA_Temp4 2023-01-01 12:29:11 ip 78.43.212.60
setstate TUYA_Temp4 2023-01-01 12:29:11 lat 48.5585
setstate TUYA_Temp4 2023-01-01 12:29:11 local_key d81b4251f2f1ac46
setstate TUYA_Temp4 2023-01-01 12:29:11 lon 9.2025
setstate TUYA_Temp4 2023-01-01 12:29:11 model TH01 CB3S
setstate TUYA_Temp4 2023-01-01 12:29:11 name Temperatur Terrasse
setstate TUYA_Temp4 2023-01-19 08:38:10 online 1
setstate TUYA_Temp4 2023-01-01 12:29:11 owner_id 3389434
setstate TUYA_Temp4 2023-01-01 12:29:11 product_id lf36y5nwb8jkxwgg
setstate TUYA_Temp4 2023-01-01 12:29:11 product_name T & H Sensor
setstate TUYA_Temp4 2023-01-19 08:38:10 state ready
setstate TUYA_Temp4 2023-01-01 12:29:11 sub 0
setstate TUYA_Temp4 2023-01-01 12:29:32 temp_unit_convert 0
setstate TUYA_Temp4 2023-01-01 12:29:11 time_zone +01:00
setstate TUYA_Temp4 2023-01-01 12:29:11 uid eu1548823829280mLHX1
setstate TUYA_Temp4 2023-01-01 12:29:11 update_time 1671989741
setstate TUYA_Temp4 2023-01-01 12:29:11 uuid 1ff0620fa0c0d31a
setstate TUYA_Temp4 2023-01-19 08:38:10 va_humidity 32.0
setstate TUYA_Temp4 2023-01-19 08:38:10 va_temperature 0.0

[/code]

btw: könnte man die Temperatur ähnlich wie bei den Lampen in der "Voransicht" mit Ikon anzeigen ?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Gisbert am 20 Januar 2023, 10:57:22
Hallo Thomas,

ich hab jetzt einen work-around mit meinen Mitteln erreicht.
Ich definiere ein userReading, welches mir (Milli)sekundengenau ein Event und damit ein log-Eintrag generiert, basierend auf dem Reading state, welches jeweils geschrieben wird, aber kein Event erzeugt:
attr <device> userReadings _on_off {(ReadingsVal($name,'state','') eq "off") ? "0":"1"}
Die weiteren Definitionen sehen so aus:
attr <device> event-min-interval Zeitstempel:300,humidity_indoor:300,temp_indoor:300,state:300,dewpoint:300
attr <device> event-on-change-reading _on_off,Zeitstempel,humidity_indoor:2,temp_indoor:1.5,state,dewpoint:1.5


Zeitstempel ist ein eigenes Ding von mir, nur als Info:
attr <device> userReadings Zeitstempel {substr(ReadingsTimestamp($name,'temp_indoor',''),0,16)}

Viele Grüße Gisbert
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 20 Januar 2023, 11:39:28
Zitat von: Gisbert am 20 Januar 2023, 10:57:22
Hallo Thomas,

ich hab jetzt einen work-around mit meinen Mitteln erreicht.
Ich definiere ein userReading, welches mir (Milli)sekundengenau ein Event und damit ein log-Eintrag generiert, basierend auf dem Reading state, welches jeweils geschrieben wird, aber kein Event erzeugt:


Viele Grüße Gisbert

Hallo Gisbert, das klingt super.

Muss ich heute Abend gleich ausprobieren.

vielen Dank!

Thomas
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 21 Januar 2023, 08:31:30
Zitat
nach Neustart des fhempy Servers bekommen alle Devices (Thermostate) die gleichen Werte (temp_set, upper_temp, etc.). Erst wenn das jeweilige Gerät ein Update schickt, werden die Daten korrigiert.
Woran könnte das liegen?

Hat jemand eine Idee, wie ob und wie ich das unterbinden kann? Plots sind sonst nicht zu gebrauchen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 21 Januar 2023, 08:42:53
Hi,

kannst du das anhand eines Beispiels genauer ausführen?
Bitte auch im Log schauen ob ein Fehler auftritt.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 21 Januar 2023, 09:57:13
Guten Morgen Dominik,

wie könnte ich es bewerkstelligen, dass nur 2 neue ZigBee-devices von tuya_cloud eingelesen werden.

Sobald ich Tuya_cloud ja aktiviere, holt es ja ungefragt ALLE TUYA-Devices aus der Cloud.

Die ZigBee-Temperatur-Devices sind inzwischen sehr günstig geworden. Die Datenhistorie wird in Smart-Live wunderbar angezeigt. Ich möchte das in FHEM nachführen.

Hoffe auf baldige Hinweise

Grüße

Thomas
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 21 Januar 2023, 10:00:44
Aktuell gar nicht. Nach einem Neustart werden die automatisch wieder angelegt. Das muss ich noch umbauen.
Bitte für tuya_cloud den anderen Threads verwenden ;)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 21 Januar 2023, 15:29:35
Ich hätte jetzt verstanden, dass es keine weiteren groben Bugs in tuya local gibt? Wenn ja, dann kann ich mich gerne dem "Faktor 10" Bug widmen.

Bitte dazu um aktuelle Infos:
- welches Reading
- aktueller Wert im Reading
- tuya_spec_... Attribut Inhalte
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 21 Januar 2023, 16:13:40
Zitat von: dominik am 21 Januar 2023, 15:29:35
Ich hätte jetzt verstanden, dass es keine weiteren groben Bugs in tuya local gibt? Wenn ja, dann kann ich mich gerne dem "Faktor 10" Bug widmen.

Bitte dazu um aktuelle Infos:
- welches Reading
- aktueller Wert im Reading
- tuya_spec_... Attribut Inhalte

Hallo Dominik,

ich habe ja alle Steckdosen-Devices rausgenommen, da sie mir ohne brauchbare Verbrauchsreadings wenig nützen.
Du wolltest prüfen, ob die kumulierten Verbrauchswerte im Monatsraster (wie in der Smart Live-App) als reading von tuya_local erzeut werden können.
Könnte das in diesem Zuge mit erledigt werden ? ;-)

Ich lese aber gleich mal die Schaltsteckdosen wieder ein und berichte wegen des Faktor-10 . Andere User hatten auch sch welche eingemeldet.


edit:

1) 36 Steckdosen erfolgreich eingelesen; auch offlines :-)
2)  8 davon haben Faktor 10 (das sind 2x 4er-Pakete, die ich letztes Jahr kaufte)


Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 21 Januar 2023, 16:45:22
hier die Infos:
[code]define TUYA_JL13 fhempy tuya 37mnhia3pojleqfh 104380002462ab301b83 192.168.9.76 5bf8e554de9b7777 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
attr TUYA_JL13 DbLogExclude .*
attr TUYA_JL13 alias JL13 Router EAP225
attr TUYA_JL13 dp_01 switch
attr TUYA_JL13 dp_02 countdown_1
attr TUYA_JL13 dp_04 cur_current
attr TUYA_JL13 dp_05 cur_power
attr TUYA_JL13 dp_06 cur_voltage
attr TUYA_JL13 group Schalter (T),Schalter Router
attr TUYA_JL13 room fhempy
attr TUYA_JL13 tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 's', 'max': 86400, 'step': 1}, 'desc': 'countdown 1'}]
attr TUYA_JL13 tuya_spec_status [{'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 's', 'max': 86400, 'step': 1}}, {'code': 'cur_current', 'dp_id': 4, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'mA', 'max': 30000, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 6, 'type': 'Integer', 'values': {'min': 0, 'unit': 'V', 'scale': 0, 'max': 2500, 'step': 1}}, {'code': 'cur_power', 'dp_id': 5, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'W', 'max': 50000, 'step': 1}}, {'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}]
#   DEF        tuya 37mnhia3pojleqfh 104380002462ab301b83 192.168.9.76 5bf8e554de9b7777 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   104380002462ab301b83
#   FHEMPYTYPE tuya
#   FUUID      63a4a628-f33f-fd5f-5520-8f98e8b8e0a03559
#   IODev      local_pybinding
#   NAME       TUYA_JL13
#   NR         1900
#   PYTHONTYPE tuya
#   STATE      off
#   TYPE       fhempy
#   eventCount 36
#   READINGS:
#     2023-01-21 16:20:12   countdown_1     0.0
#     2023-01-21 16:20:24   cur_current     25.0
#     2023-01-21 16:20:24   cur_power       59.0
#     2023-01-21 16:27:31   cur_voltage     2279.0
#     2023-01-21 16:20:12   dp_07           0
#     2023-01-21 16:20:24   dp_11           0
#     2023-01-21 16:20:24   dp_32           normal
#     2023-01-21 16:20:12   online          1
#     2023-01-21 16:20:24   state           off
#     2023-01-21 16:20:12   switch          off
#   args:
#     TUYA_JL13
#     fhempy
#     tuya
#     37mnhia3pojleqfh
#     104380002462ab301b83
#     192.168.9.76
#     5bf8e554de9b7777
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate TUYA_JL13 off
setstate TUYA_JL13 2023-01-21 16:20:12 countdown_1 0.0
setstate TUYA_JL13 2023-01-21 16:20:24 cur_current 25.0
setstate TUYA_JL13 2023-01-21 16:20:24 cur_power 59.0
setstate TUYA_JL13 2023-01-21 16:27:31 cur_voltage 2279.0
setstate TUYA_JL13 2023-01-21 16:20:12 dp_07 0
setstate TUYA_JL13 2023-01-21 16:20:24 dp_11 0
setstate TUYA_JL13 2023-01-21 16:20:24 dp_32 normal
setstate TUYA_JL13 2023-01-21 16:20:12 online 1
setstate TUYA_JL13 2023-01-21 16:20:24 state off
setstate TUYA_JL13 2023-01-21 16:20:12 switch off

[/code]

cur_voltage ist Faktor 10

was meinst du mit tuya_spec_... Attribut Inhalte ?

tuya_system kriege ich moment nicht dazu, zu scannen..


nun doch:

104380002462ab301b83_icon
https://images.tuyaeu.com/smart/device_icon/eu1548823829280mLHX1/104380002462ab301b83163417879515259.png
2022-12-18 10:16:55
104380002462ab301b83_id
104380002462ab301b83
2022-12-18 10:16:55
104380002462ab301b83_ip
offline
2023-01-21 16:44:31
104380002462ab301b83_localkey
5bf8e554de9b7777
2022-12-18 10:16:55
104380002462ab301b83_name
Router EAP225
2022-12-18 10:16:55
104380002462ab301b83_productid
37mnhia3pojleqfh
2022-12-18 10:16:55
104380002462ab301b83_version
3.3
2022-12-18 10:17:1


und noch eine :2053863070039f179683_icon
https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/d6d1396a4acbafed7c7542c7bddc2fff.png
2022-12-18 10:16:57
2053863070039f179683_id
2053863070039f179683
2022-12-18 10:16:57
2053863070039f179683_ip
offline
2023-01-21 16:44:19
2053863070039f179683_localkey
8c15546d598a51f9
2022-12-18 10:16:57
2053863070039f179683_name
JL31
2023-01-04 00:36:42
2053863070039f179683_productid
37mnhia3pojleqfh
2022-12-18 10:16:57
2053863070039f179683_version
3.3
2022-12-18 10:17:12
20538630c44f33f7b2b6_icon
https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/d6d1396a4acbafed7c7542c7bddc2fff.png
2022-12-18 10:16:58


es ist also die productid 37mnhia3pojleqfh betroffen (8x)


Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 21 Januar 2023, 17:24:59
Jedes Device hat tuya_spec_status, tuya_spec_functions Attribute...die Inhalte dieser benötige ich.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 21 Januar 2023, 17:36:24
Zitat von: dominik am 21 Januar 2023, 08:42:53
Hi,

kannst du das anhand eines Beispiels genauer ausführen?
Bitte auch im Log schauen ob ein Fehler auftritt.

Hab nen neues Thema aufgemacht, damit es nicht unübersichtlicher wird.

https://forum.fhem.de/index.php/topic,131749.0.html (https://forum.fhem.de/index.php/topic,131749.0.html)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 21 Januar 2023, 17:55:24
Zitat von: dominik am 21 Januar 2023, 17:24:59
Jedes Device hat tuya_spec_status, tuya_spec_functions Attribute...die Inhalte dieser benötige ich.

ok diese hatte ich ja oben mitgereicht:

attr TUYA_JL13 tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 's', 'max': 86400, 'step': 1}, 'desc': 'countdown 1'}]
attr TUYA_JL13 tuya_spec_status [{'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 's', 'max': 86400, 'step': 1}}, {'code': 'cur_current', 'dp_id': 4, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'mA', 'max': 30000, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 6, 'type': 'Integer', 'values': {'min': 0, 'unit': 'V', 'scale': 0, 'max': 2500, 'step': 1}}, {'code': 'cur_power', 'dp_id': 5, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'W', 'max': 50000, 'step': 1}}, {'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}]
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 21 Januar 2023, 21:50:46
Sorry, hatte ich vorher am Handy nicht gesehen :)

Fix steht in wenigen Minuten bereit => 0.1.567.

Weil du vorher geschrieben hast, dass FHEM gehängt ist. Kann es sein, dass das nach dem fhempy Neustart war? Wenn du fhempy neu startest, musst du FHEM für einigen Minuten in Ruhe lassen (nichts im Webinterface klicken!!). Weil FHEM wird in der Zeit mit Anfragen überhäuft und schafft das nicht so schnell zu verarbeiten. Ich überlege noch wie ich da eine Drosselung einbaue.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 21 Januar 2023, 21:54:09
Zitat von: dominik am 21 Januar 2023, 21:50:46
Sorry, hatte ich vorher am Handy nicht gesehen :)

Fix steht in wenigen Minuten bereit => 0.1.567.

Weil du vorher geschrieben hast, dass FHEM gehängt ist. Kann es sein, dass das nach dem fhempy Neustart war? Wenn du fhempy neu startest, musst du FHEM für einigen Minuten in Ruhe lassen (nichts im Webinterface klicken!!). Weil FHEM wird in der Zeit mit Anfragen überhäuft und schafft das nicht so schnell zu verarbeiten. Ich überlege noch wie ich da eine Drosselung einbaue.

perfekt :-)

ja das war nach fhem / fhempy neustart und shutdown restart
Titel: Antw:fhempy: tuya (lokal) keine /falsche Werte Temp
Beitrag von: thburkhart am 22 Januar 2023, 10:26:25
hie hier habe ich ein Temp-Device, das mir keine events erzeugt:

[code]define TUYA_Temp4 fhempy tuya lf36y5nwb8jkxwgg bf0982f08295070ae7tulb 192.168.9.129 xxxxxxx xxxxx
attr TUYA_Temp4 DbLogInclude va_humidity,va_temperature
attr TUYA_Temp4 alias TUYA_Temp4 Temperatur Terrasse
attr TUYA_Temp4 dp_01 va_temperature
attr TUYA_Temp4 dp_02 va_humidity
attr TUYA_Temp4 dp_03 battery_state
attr TUYA_Temp4 dp_09 temp_unit_convert
attr TUYA_Temp4 event-min-interval va_temperature:3000
attr TUYA_Temp4 event-on-change-reading .*
attr TUYA_Temp4 group Temperatur und Feuchtigkeit aussen
attr TUYA_Temp4 room TUYA TempHum,Temperaturen Aussen,Terrasse,fhempy
attr TUYA_Temp4 tuya_spec_functions [{'code': 'temp_unit_convert', 'dp_id': 9, 'type': 'Enum', 'values': {'range': ['c', 'f']}, 'desc': 'temp unit convert'}]
attr TUYA_Temp4 tuya_spec_status [{'code': 'va_temperature', 'dp_id': 1, 'type': 'Integer', 'values': {'unit': '℃', 'min': -200, 'max': 600, 'scale': 1, 'step': 1}}, {'code': 'va_humidity', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '%', 'min': 0, 'max': 100, 'scale': 0, 'step': 1}}, {'code': 'battery_state', 'dp_id': 3, 'type': 'Enum', 'values': {'range': ['low', 'middle', 'high']}}, {'code': 'temp_unit_convert', 'dp_id': 9, 'type': 'Enum', 'values': {'range': ['c', 'f']}}]
#   DEF        tuya lf36y5nwb8jkxwgg bf0982f08295070ae7tulb 192.168.9.129 d81b4251f2f1ac46 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   bf0982f08295070ae7tulb
#   FHEMPYTYPE tuya
#   FUUID      63af679f-f33f-fd5f-742e-e728a0f623922f1a
#   IODev      local_pybinding
#   NAME       TUYA_Temp4
#   NR         3079
#   PYTHONTYPE tuya
#   STATE      ready
#   TYPE       fhempy
#   eventCount 10
#   Helper:
#     DBLOG:
#       online:
#         dblog_THB:
#           TIME       1674337991.36763
#           VALUE      1
#       state:
#         dblog_THB:
#           TIME       1674337991.36763
#           VALUE      ready
#       va_humidity:
#         dblog_THB:
#           TIME       1674337991.36763
#           VALUE      34.0
#       va_temperature:
#         dblog_THB:
#           TIME       1674337991.36763
#           VALUE      18.4
#   READINGS:
#     2023-01-21 20:01:25   dp_04           0
#     2023-01-21 18:07:09   dp_05           20
#     2023-01-21 18:07:09   dp_06           2329
#     2023-01-21 16:21:08   dp_07           0
#     2023-01-21 16:21:08   dp_11           0
#     2023-01-21 18:07:09   dp_18           18
#     2023-01-21 18:07:09   dp_19           25
#     2023-01-21 16:21:08   dp_20           2276
#     2023-01-21 11:40:18   dp_21           1
#     2023-01-21 18:07:09   dp_22           710
#     2023-01-21 18:07:09   dp_23           30058
#     2023-01-21 18:07:09   dp_24           20343
#     2023-01-21 18:07:09   dp_25           1025
#     2023-01-20 21:12:20   dp_26           0
#     2023-01-20 20:58:44   dp_32           normal
#     2023-01-21 22:53:10   online          1
#     2023-01-21 22:53:10   state           ready
#     2023-01-21 11:40:18   temp_unit_convert 0
#     2023-01-21 22:53:10   va_humidity     34.0
#     2023-01-21 22:53:10   va_temperature  18.4
#   args:
#     TUYA_Temp4
#     fhempy
#     tuya
#     lf36y5nwb8jkxwgg
#     bf0982f08295070ae7tulb
#     192.168.9.129
#     d81b4251f2f1ac46
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate TUYA_Temp4 ready
setstate TUYA_Temp4 2023-01-21 20:01:25 dp_04 0
setstate TUYA_Temp4 2023-01-21 18:07:09 dp_05 20
setstate TUYA_Temp4 2023-01-21 18:07:09 dp_06 2329
setstate TUYA_Temp4 2023-01-21 16:21:08 dp_07 0
setstate TUYA_Temp4 2023-01-21 16:21:08 dp_11 0
setstate TUYA_Temp4 2023-01-21 18:07:09 dp_18 18
setstate TUYA_Temp4 2023-01-21 18:07:09 dp_19 25
setstate TUYA_Temp4 2023-01-21 16:21:08 dp_20 2276
setstate TUYA_Temp4 2023-01-21 11:40:18 dp_21 1
setstate TUYA_Temp4 2023-01-21 18:07:09 dp_22 710
setstate TUYA_Temp4 2023-01-21 18:07:09 dp_23 30058
setstate TUYA_Temp4 2023-01-21 18:07:09 dp_24 20343
setstate TUYA_Temp4 2023-01-21 18:07:09 dp_25 1025
setstate TUYA_Temp4 2023-01-20 21:12:20 dp_26 0
setstate TUYA_Temp4 2023-01-20 20:58:44 dp_32 normal
setstate TUYA_Temp4 2023-01-21 22:53:10 online 1
setstate TUYA_Temp4 2023-01-21 22:53:10 state ready
setstate TUYA_Temp4 2023-01-21 11:40:18 temp_unit_convert 0
setstate TUYA_Temp4 2023-01-21 22:53:10 va_humidity 34.0
setstate TUYA_Temp4 2023-01-21 22:53:10 va_temperature 18.4

[/code]

der Temperatur Wert 2023-01-21 22:53:10   va_temperature  18.4 kann nicht sein

Ergänzung:

zwei Thermometer mit der ProductID lf36y5nwb8jkxwgg melden konstant die falsche Temperatur 18.4

SmartLive zeigt korrekt -1,8 an

was läuft da wohl falsch?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 23 Januar 2023, 19:43:19
Kannst du das Thermostat auch bei Zimmertemperatur testen um zu sehen was da für ein Wert rein kommt? Bitte dann posten welcher Wert in SmartLife und welcher in fhempy angezeigt wird.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 23 Januar 2023, 20:56:28
Zitat von: dominik am 23 Januar 2023, 19:43:19
Kannst du das Thermostat auch bei Zimmertemperatur testen um zu sehen was da für ein Wert rein kommt? Bitte dann posten welcher Wert in SmartLife und welcher in fhempy angezeigt wird.


ok ... wird gemacht.
Die Dinger melden ja nur alle Stunde Werte.

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 23 Januar 2023, 21:33:01
sodele nun sagt SmartLife 19,4

und tuya_local nach shutdown restar unbeeindruckt:

va_humidity
47.0
2023-01-23 17:39:36
va_temperature
18.4




Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 23 Januar 2023, 21:41:47
Ich glaube die passiven Devices funktionieren gerade nicht...ich muss mir das anschauen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 23 Januar 2023, 21:48:49
Zitat von: dominik am 23 Januar 2023, 21:41:47
Ich glaube die passiven Devices funktionieren gerade nicht...ich muss mir das anschauen.

klingt plausibel
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 23 Januar 2023, 22:34:43
Stell bitte bei diesem Device verbose = 5 und mach ein fhempy Update auf 0.1.571. Poste dann das fhempy Log.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 23 Januar 2023, 23:40:27
Zitat von: dominik am 23 Januar 2023, 22:34:43
Stell bitte bei diesem Device verbose = 5 und mach ein fhempy Update auf 0.1.571. Poste dann das fhempy Log.

ValueError: invalid literal for int() with base 10: 'reqType'
2023-01-23 23:30:57,403 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2023-01-23 23:30:57,404 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2023-01-23 23:31:09,529 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2023-01-23 23:31:09,576 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-01-23 23:31:09,579 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-01-23 23:31:09,579 - INFO     - websockets.server: server closing
2023-01-23 23:31:19,585 - INFO     - websockets.server: connection closed
2023-01-23 23:31:19,586 - INFO     - websockets.server: server closed
2023-01-23 23:31:19,590 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-01-23 23:31:20,768 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.571...
2023-01-23 23:31:20,772 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-01-23 23:31:20,802 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-01-23 23:31:29,741 - INFO     - websockets.server: connection open
2023-01-23 23:31:29,741 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-01-23 23:31:31,919 - ERROR    - tuya_local_07847240dc4f225fdda0: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 549, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 445, in _create_cloudmapping_dev
    await self.retrieve_tuya_specs()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 420, in retrieve_tuya_specs
    spec = await self.get_tuya_dev_specification()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 374, in get_tuya_dev_specification
    return resp["result"]
KeyError: 'result'
2023-01-23 23:31:50,071 - DEBUG    - tuya_local_bfe1b5bb54592232acz7dg: handle type Integer for dp_id 1 with value 205
2023-01-23 23:31:50,078 - DEBUG    - tuya_local_bfe1b5bb54592232acz7dg: handle type Integer for dp_id 2 with value 331
2023-01-23 23:33:24,562 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-01-23 23:33:24,565 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-01-23 23:33:24,566 - INFO     - websockets.server: server closing
2023-01-23 23:33:34,575 - INFO     - websockets.server: connection closed
2023-01-23 23:33:34,576 - INFO     - websockets.server: server closed
2023-01-23 23:33:34,580 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-01-23 23:33:35,760 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.571...
2023-01-23 23:33:35,763 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-01-23 23:33:35,794 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-01-23 23:33:45,189 - INFO     - websockets.server: connection open
2023-01-23 23:33:45,190 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-01-23 23:33:47,522 - ERROR    - tuya_local_07847240dc4f225fdda0: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 549, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 445, in _create_cloudmapping_dev
    await self.retrieve_tuya_specs()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 420, in retrieve_tuya_specs
    spec = await self.get_tuya_dev_specification()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 374, in get_tuya_dev_specification
    return resp["result"]
KeyError: 'result'
2023-01-23 23:34:05,188 - DEBUG    - tuya_local_bfe1b5bb54592232acz7dg: handle type Integer for dp_id 1 with value 184
2023-01-23 23:34:05,192 - DEBUG    - tuya_local_bfe1b5bb54592232acz7dg: handle type Integer for dp_id 2 with value 47
2023-01-23 23:37:08,208 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.571...
2023-01-23 23:37:08,212 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-01-23 23:37:08,253 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-01-23 23:37:14,329 - INFO     - websockets.server: connection open
2023-01-23 23:37:14,329 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-01-23 23:37:17,201 - ERROR    - tuya_local_07847240dc4f225fdda0: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 549, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 445, in _create_cloudmapping_dev
    await self.retrieve_tuya_specs()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 420, in retrieve_tuya_specs
    spec = await self.get_tuya_dev_specification()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 374, in get_tuya_dev_specification
    return resp["result"]
KeyError: 'result'
2023-01-23 23:37:36,256 - DEBUG    - tuya_local_bfe1b5bb54592232acz7dg: handle type Integer for dp_id 1 with value 196
2023-01-23 23:37:36,272 - DEBUG    - tuya_local_bfe1b5bb54592232acz7dg: handle type Integer for dp_id 2 with value 47


die Readings sind immer noch fasch:
va_humidity
47.0
2023-01-23 23:34:05
va_temperature
19.6
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 23 Januar 2023, 23:45:56
Hast du manuell öfter neu gestartet oder ist was gecrashed?

Ansonsten sehe ich zumindest Werte ankommen, sind die auch in Fhem angekommen? Ist der Sensor dauerhaft online oder schickt der nur kurz was und geht dann offline?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 23 Januar 2023, 23:56:48
Zitat von: dominik am 23 Januar 2023, 23:45:56
Hast du manuell öfter neu gestartet oder ist was gecrashed?

Ansonsten sehe ich zumindest Werte ankommen, sind die auch in Fhem angekommen? Ist der Sensor dauerhaft online oder schickt der nur kurz was und geht dann offline?

Schritte
verbose 5
fhempy update
fhempy restart
5 min gewartet bis fhem reagierte
shutdown restart

Der Sensor schickt wohl nur alle Stunde in die tuya-Cloud (wegen Batterie-Betrieb)

aber auch der Temp3  mit productid jy3ue7qz0zcmmizf hat das selbe Verhalten, schickt aber bei tempÄnderung


Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 24 Januar 2023, 00:04:17
Korrektur:

der Temp3  mit productid jy3ue7qz0zcmmizf zeigt nun richtige Werte an (nach dem Update) 
der schickt aber auch wohl bei jeder Änderung; zeigt aber keine negativen Temperaturen :-(
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 24 Januar 2023, 16:53:24
Ist Temp3 ein aktiver oder passiver Sensor? Aktiv = dauerhaft im WLAN, passiv = WLAN wird nur beim Versenden aufgeweckt und danach wieder abgedreht, sind meistens batteriebetrieben
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 24 Januar 2023, 18:41:12
Zitat von: dominik am 24 Januar 2023, 16:53:24
Ist Temp3 ein aktiver oder passiver Sensor? Aktiv = dauerhaft im WLAN, passiv = WLAN wird nur beim Versenden aufgeweckt und danach wieder abgedreht, sind meistens batteriebetrieben

das ist der:

https://www.amazon.de/gp/product/B09CZ679X7/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 (https://www.amazon.de/gp/product/B09CZ679X7/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1)

also mit Batterie; auch er zeigt in fhempy keine korrekten daten mehr an.
in SmartLife sehe ich quasi sofortige Updates

die Temp4 und Temp5 sind:

https://www.amazon.de/gp/product/B0BHW2Y5QC/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 (https://www.amazon.de/gp/product/B0BHW2Y5QC/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1)

in SmartLife kommmt nur stündlich ein update

Temp3 sehe ich in der Fritzbox fast immer; temp4 und Temp5 quasi nie



Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 24 Januar 2023, 21:00:37
Teste bitte noch mit 0.1.575. Falls das nicht funktioniert, komm ich erst in 2 Wochen dazu selbst mit einem passiven Device (Rauchmelder) zu testen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 24 Januar 2023, 21:38:03
Zitat von: dominik am 24 Januar 2023, 21:00:37
Teste bitte noch mit 0.1.575. Falls das nicht funktioniert, komm ich erst in 2 Wochen dazu selbst mit einem passiven Device (Rauchmelder) zu testen.

version_available
0.1.571

???
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 24 Januar 2023, 21:52:40
Wird nur alle 24h aktualisiert dieser Wert...es ist bereits 0.1.575 online
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Gisbert am 27 Januar 2023, 10:57:38
Hallo dominik,

benötigt mein Tuya-Gerät (es ist ein Entfeuchter) eigentlich dauernd eine Verbindung zur Cloud?
Mir leuchtet ein, dass ich für die Ersteinrichtung einen Zugang zur Cloud gewähren muss, aber gilt dies auch für den laufenden Betrieb? Und wie verhält es sich dann mit den regelmäßigen Updates im Fhem-Device?

Viele Grüße Gisbert
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 27 Januar 2023, 14:29:34
Zitat von: dominik am 24 Januar 2023, 21:52:40
Wird nur alle 24h aktualisiert dieser Wert...es ist bereits 0.1.575 online
habe update durchgeführt.
Problem "WLAN-ondemand"- besteht weiter
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 28 Januar 2023, 07:57:52
hallo.
nach jedem update bekommt irgendein gerät abderen nanen zugewiesen. wie kann man das abstellen ?
muss meine DOIF immer neu anpassen
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 28 Januar 2023, 10:11:38
Zitat von: Gisbert am 27 Januar 2023, 10:57:38
Hallo dominik,

benötigt mein Tuya-Gerät (es ist ein Entfeuchter) eigentlich dauernd eine Verbindung zur Cloud?
Mir leuchtet ein, dass ich für die Ersteinrichtung einen Zugang zur Cloud gewähren muss, aber gilt dies auch für den laufenden Betrieb? Und wie verhält es sich dann mit den regelmäßigen Updates im Fhem-Device?

Viele Grüße Gisbert

Nein, nur zur Einrichtung. Danach gibt es keinen Request mehr der zur Cloud geht.
Die Updates der Readings werden direkt vom Device lokal gepushed. Es passiert kein Poll und auch keine Abfrage der Cloud.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 28 Januar 2023, 10:13:31
Zitat von: thburkhart am 27 Januar 2023, 14:29:34
habe update durchgeführt.
Problem "WLAN-ondemand"- besteht weiter

Echt? Hier hat auch jemand ein passives Devices und da funktioniert es:
https://github.com/fhempy/fhempy/issues/124

Was hast du für ein Device?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 28 Januar 2023, 10:15:57
Zitat von: satprofi am 28 Januar 2023, 07:57:52
hallo.
nach jedem update bekommt irgendein gerät abderen nanen zugewiesen. wie kann man das abstellen ?
muss meine DOIF immer neu anpassen

Sorry dafür, das sollte eigentlich nicht sein, da vor einer Anlage eines neuen Devices immer geprüft wird ob die DEVICEID schon in einem anderen Device vergeben ist. Leider kommt es da vor, dass beim Start nicht alle Rückmeldungen von FHEM ankommen. Es erscheint eine "NO RESPONSE" Fehlermeldung im fhempy Log. Schau mal ob du eine solche hast. Ich bin gerade dabei die NO RESPONSE Thematik genauer zu analysieren.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 28 Januar 2023, 10:56:14
Zitat von: dominik am 28 Januar 2023, 10:13:31
Echt? Hier hat auch jemand ein passives Devices und da funktioniert es:
https://github.com/fhempy/fhempy/issues/124

das ist produkt_ID xlk3mtpjo1zkmdvh

ich habe:
1x "Temp3"
https://www.amazon.de/gp/product/B09CZ679X7/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 (https://www.amazon.de/gp/product/B09CZ679X7/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1)
mit Batterie
Produkt_ID: jy3ue7qz0zcmmizf


angezeigt wird aktuell ein Wert von gestern Abend , der plausibel ist

und 2x
https://www.amazon.de/gp/product/B0BHW2Y5QC/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 (https://www.amazon.de/gp/product/B0BHW2Y5QC/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1)
mit Batterie
product_id lf36y5nwb8jkxwgg

angezeigt werden falsche Werte von gestern und vorgestern, die definit falsch sind


offensichtlich kriegt fhempy es nicht, oder nur manchmal mit, wenn die diese passiven Devices sich mit (neuen) Werten melden
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 28 Januar 2023, 11:13:59
Kannst du bitte ein paar Temperaturänderungen machen (draußen und dann wieder rein) um zu sehen ob es so gut wie nie empfangen wird oder doch öfter?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: stefanru am 28 Januar 2023, 17:31:52
Hi,
habe das Problem mit so einem nur sporadisch sendenden Temperatursensor auch.
Aber ich bekomme den local garnicht angelegt.

Das Cloud Device liefert Werte und zwar immer wenn einer gesendet wird.
Also als Cloud Device läuft es perfekt.

Will ich es local verwenden bekomme ich nach dem anlegen aber nur diese Meldung:
T & H Sensor: Change DEF and use IP instead of 'offline'
Verstehe ich auch weil in der IP des Devices im tuya_local device nur "offline" steht.

Habe mit setreading mal die lokale IP ins tuya_local für das Device geschrieben.
Hat aber leider nicht funktioniert.

Mache ich etwas falsch?
Wie bekommt man so ein Device local angelegt?

Vielen Dank,
Stefan

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 28 Januar 2023, 17:40:14
Zitat von: stefanru am 28 Januar 2023, 17:31:52
Hi,
habe das Problem mit so einem nur sporadisch sendenden Temperatursensor auch.
Aber ich bekomme den local garnicht angelegt.

Das Cloud Device liefert Werte und zwar immer wenn einer gesendet wird.
Also als Cloud Device läuft es perfekt.

Will ich es local verwenden bekomme ich nach dem anlegen aber nur diese Meldung:
T & H Sensor: Change DEF and use IP instead of 'offline'
Verstehe ich auch weil in der IP des Devices im tuya_local device nur "offline" steht.

Habe mit setreading mal die lokale IP ins tuya_local für das Device geschrieben.
Hat aber leider nicht funktioniert.

Mache ich etwas falsch?
Wie bekommt man so ein Device local angelegt?

Vielen Dank,
Stefan

Du musst im Def des Device das "offline" durch deine IP ersetzen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 28 Januar 2023, 17:56:02
Zitat von: Christian83 am 28 Januar 2023, 17:40:14
Du musst im Def des Device das "offline" durch deine IP ersetzen.
genauer durch die IP des besagten Devices. Die ist bei mehreren Devices gar nicht so leicht zu identifizieren.
In der FritzBox erscheint sie unter nichtaktiv meist mit ESP-xxxxxx
xxxxx sind die letzten 6 Stellen der localID. Diese findest du in SmartLife-App beim entsprechenden Gerät.



Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 28 Januar 2023, 18:01:03
Zitat von: dominik am 28 Januar 2023, 11:13:59
Kannst du bitte ein paar Temperaturänderungen machen (draußen und dann wieder rein) um zu sehen ob es so gut wie nie empfangen wird oder doch öfter?

negativ ...

nach über 4 Stunden steht in SmartlifeApp der korrekte Wert; in FHEM immer noch derselbe Mist
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 28 Januar 2023, 21:25:35
hallo Dominik.
ich meine,  dass die passiven Devices über Tuya_cloud sauber dargestellt werden.
Allerdigsf möchte ich tuya-cloud nich mehr aktivieren, solange dann bei mir 100 andere devices mein FHEM ausbremsen.

So fände ich es für die Fehlereingrenzung hilfreich, in tuyacloud den erwähnten Filter z.B. auf TempDevices einzubauen.
Zudem wären dan meine ZIg-Bees verwendbar
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 29 Januar 2023, 11:36:30
Zitat von: dominik am 28 Januar 2023, 10:13:31
Echt? Hier hat auch jemand ein passives Devices und da funktioniert es:
https://github.com/fhempy/fhempy/issues/124

Was hast du für ein Device?

https://www.amazon.de/gp/product/B09J8NBCBN/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 29 Januar 2023, 13:08:06
Zitat von: satprofi am 29 Januar 2023, 11:36:30
https://www.amazon.de/gp/product/B09J8NBCBN/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

hmm das ist doch kein Passiv-Device
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 29 Januar 2023, 15:00:05
Mit 0.1.580 werden nun nur mehr Devices erstellt, die noch nicht existieren. Dabei ist egal ob sie in tuya oder tuya_cloud angelegt sind.
Wenn dazu etwas nicht funktioniert, dann bitte im tuya_cloud Thread rückmelden.

Hat irgendjemand nun ein passives Device erfolgreich im Einsatz?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 29 Januar 2023, 15:36:22
Zitat von: dominik am 29 Januar 2023, 15:00:05
Mit 0.1.580 werden nun nur mehr Devices erstellt, die noch nicht existieren. Dabei ist egal ob sie in tuya oder tuya_cloud angelegt sind.
Wenn dazu etwas nicht funktioniert, dann bitte im tuya_cloud Thread rückmelden.

Hat irgendjemand nun ein passives Device erfolgreich im Einsatz?

super!

ist upgedatet; soll ich dabei neue createn Lassen?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 29 Januar 2023, 15:52:02
Macht tuya_cloud im Gegensatz zu tuya eh automatisch beim Start.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 29 Januar 2023, 16:54:46
Zitat von: dominik am 29 Januar 2023, 15:52:02
Macht tuya_cloud im Gegensatz zu tuya eh automatisch beim Start.

aus erwähnten Gründen verwende ich ja tuya_cloud momentan nicht....

aber ich habe mein Temp4 in tuya_localneue createn lassen:

[code]define tuya_local_bf0982f08295070ae7tulb fhempy tuya lf36y5nwb8jkxwgg bf0982f08295070ae7tulb 192.168.9.129 d81b4251f2f1ac46 3.3
attr tuya_local_bf0982f08295070ae7tulb DbLogExclude .*
attr tuya_local_bf0982f08295070ae7tulb alias TempHum4 Terrasse
attr tuya_local_bf0982f08295070ae7tulb dp_01 va_temperature
attr tuya_local_bf0982f08295070ae7tulb dp_02 va_humidity
attr tuya_local_bf0982f08295070ae7tulb dp_03 battery_state
attr tuya_local_bf0982f08295070ae7tulb dp_09 temp_unit_convert
attr tuya_local_bf0982f08295070ae7tulb event-on-change-reading .*
attr tuya_local_bf0982f08295070ae7tulb group tuya
attr tuya_local_bf0982f08295070ae7tulb room fhempy
attr tuya_local_bf0982f08295070ae7tulb tuya_spec_functions [{'code': 'temp_unit_convert', 'dp_id': 9, 'type': 'Enum', 'values': {'range': ['c', 'f']}, 'desc': 'temp unit convert'}]
attr tuya_local_bf0982f08295070ae7tulb tuya_spec_status [{'code': 'va_temperature', 'dp_id': 1, 'type': 'Integer', 'values': {'unit': '℃', 'min': -200, 'max': 600, 'scale': 1, 'step': 1}}, {'code': 'va_humidity', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '%', 'min': 0, 'max': 100, 'scale': 0, 'step': 1}}, {'code': 'battery_state', 'dp_id': 3, 'type': 'Enum', 'values': {'range': ['low', 'middle', 'high']}}, {'code': 'temp_unit_convert', 'dp_id': 9, 'type': 'Enum', 'values': {'range': ['c', 'f']}}]
#   CFGFN     
#   DEF        tuya lf36y5nwb8jkxwgg bf0982f08295070ae7tulb 192.168.9.129 d81b4251f2f1ac46 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   bf0982f08295070ae7tulb
#   FHEMPYTYPE tuya
#   FUUID      63d685c8-f33f-fd5f-aa5a-6b808bf3f74f5ba3
#   IODev      local_pybinding
#   NAME       tuya_local_bf0982f08295070ae7tulb
#   NR         3116
#   PYTHONTYPE tuya
#   STATE      ready
#   TYPE       fhempy
#   eventCount 5
#   READINGS:
#     2023-01-29 15:43:35   active_time     1671725935
#     2023-01-29 15:43:35   biz_type        18
#     2023-01-29 15:43:35   category        wsdcg
#     2023-01-29 15:43:35   create_time     1671725935
#     2023-01-29 15:43:35   icon            smart/icon/ay1525749833414yotNt/d9d4ceec63cb81ff6e8c8d6c2fb4edb3.png
#     2023-01-29 15:43:35   id              bf0982f08295070ae7tulb
#     2023-01-29 15:43:35   ip              78.43.212.60
#     2023-01-29 15:43:35   lat             48.5585
#     2023-01-29 15:43:35   local_key       d81b4251f2f1ac46
#     2023-01-29 15:43:35   lon             9.2025
#     2023-01-29 15:43:35   model           TH01 CB3S
#     2023-01-29 15:43:35   name            TempHum4 Terrasse
#     2023-01-29 15:43:35   online          1
#     2023-01-29 15:43:35   owner_id        3389434
#     2023-01-29 15:43:35   product_id      lf36y5nwb8jkxwgg
#     2023-01-29 15:43:35   product_name    T & H Sensor
#     2023-01-29 15:43:54   state           ready
#     2023-01-29 15:43:35   sub             0
#     2023-01-29 15:43:35   time_zone       +01:00
#     2023-01-29 15:43:35   uid             eu1548823829280mLHX1
#     2023-01-29 15:43:35   update_time     1674379870
#     2023-01-29 15:43:35   uuid            1ff0620fa0c0d31a
#   args:
#     tuya_local_bf0982f08295070ae7tulb
#     fhempy
#     tuya
#     lf36y5nwb8jkxwgg
#     bf0982f08295070ae7tulb
#     192.168.9.129
#     d81b4251f2f1ac46
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate tuya_local_bf0982f08295070ae7tulb ready
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 active_time 1671725935
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 biz_type 18
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 category wsdcg
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 create_time 1671725935
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 icon smart/icon/ay1525749833414yotNt/d9d4ceec63cb81ff6e8c8d6c2fb4edb3.png
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 id bf0982f08295070ae7tulb
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 ip 78.43.212.60
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 lat 48.5585
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 local_key d81b4251f2f1ac46
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 lon 9.2025
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 model TH01 CB3S
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 name TempHum4 Terrasse
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 online 1
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 owner_id 3389434
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 product_id lf36y5nwb8jkxwgg
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 product_name T & H Sensor
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:54 state ready
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 sub 0
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 time_zone +01:00
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 uid eu1548823829280mLHX1
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 update_time 1674379870
setstate tuya_local_bf0982f08295070ae7tulb 2023-01-29 15:43:35 uuid 1ff0620fa0c0d31a

[/code]

keine Temp/Hum reading

und hier das vorherige :

[code]define TUYA_Temp4 fhempy tuya lf36y5nwb8jkxwgg bf0982f08295070ae7tulb 192.168.9.129 d81b4251f2f1ac46 3.3
attr TUYA_Temp4 DbLogInclude va_humidity,va_temperature
attr TUYA_Temp4 alias TUYA_Temp4 Temperatur Terrasse
attr TUYA_Temp4 dp_01 va_temperature
attr TUYA_Temp4 dp_02 va_humidity
attr TUYA_Temp4 dp_03 battery_state
attr TUYA_Temp4 dp_09 temp_unit_convert
attr TUYA_Temp4 event-min-interval va_temperature:300
attr TUYA_Temp4 event-on-change-reading .*
attr TUYA_Temp4 group Temperatur und Feuchtigkeit aussen
attr TUYA_Temp4 room TUYA TempHum,Temperaturen Aussen,Terrasse,fhempy
attr TUYA_Temp4 tuya_spec_functions [{'code': 'temp_unit_convert', 'dp_id': 9, 'type': 'Enum', 'values': {'range': ['c', 'f']}, 'desc': 'temp unit convert'}]
attr TUYA_Temp4 tuya_spec_status [{'code': 'va_temperature', 'dp_id': 1, 'type': 'Integer', 'values': {'unit': '℃', 'min': -200, 'max': 600, 'scale': 1, 'step': 1}}, {'code': 'va_humidity', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '%', 'min': 0, 'max': 100, 'scale': 0, 'step': 1}}, {'code': 'battery_state', 'dp_id': 3, 'type': 'Enum', 'values': {'range': ['low', 'middle', 'high']}}, {'code': 'temp_unit_convert', 'dp_id': 9, 'type': 'Enum', 'values': {'range': ['c', 'f']}}]
#   DEF        tuya lf36y5nwb8jkxwgg bf0982f08295070ae7tulb 192.168.9.129 d81b4251f2f1ac46 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   bf0982f08295070ae7tulb
#   FHEMPYTYPE tuya
#   FUUID      63af679f-f33f-fd5f-742e-e728a0f623922f1a
#   IODev      local_pybinding
#   NAME       TUYA_Temp4
#   NR         3065
#   PYTHONTYPE tuya
#   STATE      ready
#   TYPE       fhempy
#   eventCount 4
#   Helper:
#     DBLOG:
#       online:
#         dblog_THB:
#           TIME       1675003201.70914
#           VALUE      1
#       state:
#         dblog_THB:
#           TIME       1675003201.70914
#           VALUE      ready
#   READINGS:
#     2023-01-21 20:01:25   dp_04           0
#     2023-01-21 18:07:09   dp_05           20
#     2023-01-21 18:07:09   dp_06           2329
#     2023-01-21 16:21:08   dp_07           0
#     2023-01-21 16:21:08   dp_11           0
#     2023-01-21 18:07:09   dp_18           18
#     2023-01-21 18:07:09   dp_19           25
#     2023-01-21 16:21:08   dp_20           2276
#     2023-01-21 11:40:18   dp_21           1
#     2023-01-21 18:07:09   dp_22           710
#     2023-01-21 18:07:09   dp_23           30058
#     2023-01-21 18:07:09   dp_24           20343
#     2023-01-21 18:07:09   dp_25           1025
#     2023-01-20 21:12:20   dp_26           0
#     2023-01-20 20:58:44   dp_32           normal
#     2023-01-29 15:40:01   online          1
#     2023-01-29 15:40:01   state           ready
#     2023-01-21 11:40:18   temp_unit_convert 0
#     2023-01-25 21:32:43   va_humidity     49.0
#     2023-01-26 09:43:14   va_temperature  17.5
#   args:
#     TUYA_Temp4
#     fhempy
#     tuya
#     lf36y5nwb8jkxwgg
#     bf0982f08295070ae7tulb
#     192.168.9.129
#     d81b4251f2f1ac46
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate TUYA_Temp4 ready
setstate TUYA_Temp4 2023-01-21 20:01:25 dp_04 0
setstate TUYA_Temp4 2023-01-21 18:07:09 dp_05 20
setstate TUYA_Temp4 2023-01-21 18:07:09 dp_06 2329
setstate TUYA_Temp4 2023-01-21 16:21:08 dp_07 0
setstate TUYA_Temp4 2023-01-21 16:21:08 dp_11 0
setstate TUYA_Temp4 2023-01-21 18:07:09 dp_18 18
setstate TUYA_Temp4 2023-01-21 18:07:09 dp_19 25
setstate TUYA_Temp4 2023-01-21 16:21:08 dp_20 2276
setstate TUYA_Temp4 2023-01-21 11:40:18 dp_21 1
setstate TUYA_Temp4 2023-01-21 18:07:09 dp_22 710
setstate TUYA_Temp4 2023-01-21 18:07:09 dp_23 30058
setstate TUYA_Temp4 2023-01-21 18:07:09 dp_24 20343
setstate TUYA_Temp4 2023-01-21 18:07:09 dp_25 1025
setstate TUYA_Temp4 2023-01-20 21:12:20 dp_26 0
setstate TUYA_Temp4 2023-01-20 20:58:44 dp_32 normal
setstate TUYA_Temp4 2023-01-29 15:40:01 online 1
setstate TUYA_Temp4 2023-01-29 15:40:01 state ready
setstate TUYA_Temp4 2023-01-21 11:40:18 temp_unit_convert 0
setstate TUYA_Temp4 2023-01-25 21:32:43 va_humidity 49.0
setstate TUYA_Temp4 2023-01-26 09:43:14 va_temperature 17.5

[/code]

mit Phantasie-readings.

Nur zum Verständnis: Mir ist der Ablauf nicht klar. Tuya_local schaut erst anhand der Local_ID im lokalen Netzwerk nach, welche der Devices es findet und gibt dann die Device_ID und locale IP-Nr. weiter.
Dann werden diese ständig (wie oft) auf readings-Änderungen abgefragt?
Wenn es dabei nicht das Mini-Zeitfenster mitkriegt, in dem die "Schläfer"-Sensoren mal aktiv sind und ihre Daten übermitteln., bleiben dort die alten stehen.

Extra wegen der Schläfer müsste man also öfters abfragen und dies nur für die Schläfer.


Nun habe ich mal in der Fritzbox nachgeschaut:

wann das Temp4 zuletzt im Netzwerk war:

siehe Screenshot

dort sieht man, dass Temp 4 unter der IP .174 vor wenigen minute da war.

Ichg habe deshalb die Ip im Device ebenfalls auf .174 geändert.

Aber auch dann bleiben dort die alten Daten stehen









Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 29 Januar 2023, 18:18:41
update:

an den fest vergebenen IP-Adressen lags auch nicht. Nach Restart der Fritzbox haben auch alle Schäfer die richtige IKp-Adresse.

Beide Schläfer zeigen identische Werte an


Übrigens der "Halbschläfer" Temp3 zeigt korrekte Werte an; allerdings sehr verzögert:

jetzt ist es 18:30 ; die Werte sind von 16:43 und haben wohl zum damaliegen Zeitpunkt gestimmt; die aktuellen laut app sind höher, was der Realität entspricht. Damit könnte ich leben, da ja in der Datenbank der korrekte Wert geloggt wird.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 29 Januar 2023, 20:10:12
Nochmals zum Verständnis: 0.1.580 legt mit tuya_cloud nur neue Devices an, wenn kein Device mit dieser DEVICEID existiert (egal ob tuya oder tuya_cloud). Du kannst also tuya_cloud starten.

Zum Verständnis wie tuya (local) funktioniert:
- es wird eine Verbindung zum Device aufgebaut
- das Device meldet sich automatisch über diese Verbindung wenn sich der Status ändert
- Passive Devices haben aber keine aktive WLAN Verbindung, das bedeutet, die Verbindung kann nicht aufgebaut werden
- Bei passiven Devices versuche ich aktuell 15s eine Verbindung aufzubauen, wenn das nicht kappt, wird 1s gewartet und dann wird wieder versucht 15s eine Verbindung aufzubauen
- Sobald die Verbindung einmal aufgebaut ist, können die aktuellen Werte ausgelesen werden bzw. Updates vom Device empfangen werden

Es kann also sein, dass die 1s Wartezeit gar nicht nötig ist bzw. die 15s zu lang sind. An diesen Parametern würde ich noch etwas herumprobieren.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 30 Januar 2023, 08:57:49
Zitat von: dominik am 29 Januar 2023, 20:10:12
Nochmals zum Verständnis: 0.1.580 legt mit tuya_cloud nur neue Devices an, wenn kein Device mit dieser DEVICEID existiert (egal ob tuya oder tuya_cloud). Du kannst also tuya_cloud starten.

Zum Verständnis wie tuya (local) funktioniert:
- es wird eine Verbindung zum Device aufgebaut
- das Device meldet sich automatisch über diese Verbindung wenn sich der Status ändert
- Passive Devices haben aber keine aktive WLAN Verbindung, das bedeutet, die Verbindung kann nicht aufgebaut werden
- Bei passiven Devices versuche ich aktuell 15s eine Verbindung aufzubauen, wenn das nicht kappt, wird 1s gewartet und dann wird wieder versucht 15s eine Verbindung aufzubauen
- Sobald die Verbindung einmal aufgebaut ist, können die aktuellen Werte ausgelesen werden bzw. Updates vom Device empfangen werden

Es kann also sein, dass die 1s Wartezeit gar nicht nötig ist bzw. die 15s zu lang sind. An diesen Parametern würde ich noch etwas herumprobieren.

das war der entscheidende Hinweis: Nochmals zum Verständnis: 0.1.580 legt mit tuya_cloud nur neue Devices an, wenn kein Device mit dieser DEVICEID existiert (egal ob tuya oder tuya_cloud). Du kannst also tuya_cloud starten.
und das ist wohl neu...

dann bleiben wohl die timing-Probleme ist Tuya_local

Jedenfalls funktionieren die "Schläfer" /"offline" Devices bei mir via tuya-Cloud einwandfrei :-)

Jedoch dauert es nun sehr lange, bis der room fhempy aufgebaut ist.
Das liegt wohl an meinen vielen Steckdosen.

gerne würde ich dies in Kauf nehmen, wenn bei diesen auf die Verbräuchen pro Monat als reading zur Verfügung ständen.

Das würde mir sehr, sehr helfen .

Herzliche Grüße und vielen Dank

Thomas Burkhart

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: stefanru am 30 Januar 2023, 11:55:59
Danke!
Im Def hatte ich das offline garnicht gesehen.
Ich werde berichten wie sich das Device verhält.

Bisher war es noch nicht online und somit habe ich noch keine Werte für die Temperatur.

Danke und Gruß,
Stefan
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 30 Januar 2023, 13:37:26
ich berichte nun vom Halbschläfer Tem3

[code]define TUYA_Temp03 fhempy tuya_cloud TUYA bf14f376fe39bc2648iaeu
attr TUYA_Temp03 DbLogExclude .*
attr TUYA_Temp03 DbLogInclude va_temperature,va_humidity
attr TUYA_Temp03 alias TUYA TempHum03 Wohnzimmer
attr TUYA_Temp03 event-min-interval va_temperature:300,va_humidity:300
attr TUYA_Temp03 event-on-change-reading .*
attr TUYA_Temp03 group Temperatur und Feuchtigkeit,Temperatur und Feuchtigkeit innen
attr TUYA_Temp03 room THOMAS,TUYA TempHum,Temperaturen Innen,fhempy
#   DEF        tuya_cloud TUYA bf14f376fe39bc2648iaeu
#   DEVICEID   bf14f376fe39bc2648iaeu
#   FHEMPYTYPE tuya_cloud
#   FUUID      63d7a028-f33f-fd5f-c9c1-b40915a5a38434c9
#   IODev      local_pybinding
#   NAME       TUYA_Temp03
#   NR         2356
#   PYTHONTYPE tuya_cloud
#   STATE      ready
#   TYPE       fhempy
#   eventCount 2
#   READINGS:
#     2023-01-30 12:32:53   active_time     1653333582
#     2023-01-30 13:20:21   battery_percentage 63.0
#     2023-01-30 13:20:21   battery_state   high
#     2023-01-30 12:32:53   biz_type        18
#     2023-01-30 12:32:53   category        wsdcg
#     2023-01-30 12:32:53   create_time     1651069176
#     2023-01-30 13:20:21   hum_alarm       cancel
#     2023-01-30 13:20:21   hum_periodic_report 120.0
#     2023-01-30 13:20:21   hum_sensitivity 6.0
#     2023-01-30 12:32:53   icon            https://images.tuyaeu.com/smart/icon/ay1547018215107OLzeG/135fa070d64b4ce4858851a2df3da9ca.png
#     2023-01-30 12:32:53   id              bf14f376fe39bc2648iaeu
#     2023-01-30 12:32:53   ip              46.5.205.243
#     2023-01-30 12:32:53   lat             48.5585
#     2023-01-30 12:32:53   local_key       5d205119d6f1507c
#     2023-01-30 12:32:53   lon             9.2025
#     2023-01-30 13:20:21   maxhum_set      70.0
#     2023-01-30 13:20:21   maxtemp_set     38.9
#     2023-01-30 13:20:21   minihum_set     21.0
#     2023-01-30 13:20:21   minitemp_set    11.0
#     2023-01-30 12:32:53   model           WL-TH01
#     2023-01-30 12:32:53   name            Temperatur Wohnzimmer
#     2023-01-30 12:32:53   online          on
#     2023-01-30 12:32:53   owner_id        3389434
#     2023-01-30 11:47:06   product_id      jy3ue7qz0zcmmizf
#     2023-01-30 12:32:53   product_name    Diivoo WiFi Thermometer Hygrometer
#     2023-01-30 12:32:52   state           ready
#     2023-01-30 12:32:53   sub             off
#     2023-01-30 13:20:21   temp_alarm      cancel
#     2023-01-30 13:20:21   temp_periodic_report 120.0
#     2023-01-30 13:20:21   temp_sensitivity 0.6
#     2023-01-30 13:20:21   temp_unit_convert c
#     2023-01-30 12:32:53   time_zone       +02:00
#     2023-01-30 12:32:53   uid             eu1548823829280mLHX1
#     2023-01-30 12:32:53   update_time     1653333585
#     2023-01-30 12:32:53   uuid            3774d28e626e3c36
#     2023-01-30 13:20:21   va_humidity     40.0
#     2023-01-30 13:20:21   va_temperature  20.8
#   args:
#     tuya_cloud_bf14f376fe39bc2648iaeu
#     fhempy
#     tuya_cloud
#     TUYA
#     bf14f376fe39bc2648iaeu
#   argsh:
#
setstate TUYA_Temp03 ready
setstate TUYA_Temp03 2023-01-30 12:32:53 active_time 1653333582
setstate TUYA_Temp03 2023-01-30 13:20:21 battery_percentage 63.0
setstate TUYA_Temp03 2023-01-30 13:20:21 battery_state high
setstate TUYA_Temp03 2023-01-30 12:32:53 biz_type 18
setstate TUYA_Temp03 2023-01-30 12:32:53 category wsdcg
setstate TUYA_Temp03 2023-01-30 12:32:53 create_time 1651069176
setstate TUYA_Temp03 2023-01-30 13:20:21 hum_alarm cancel
setstate TUYA_Temp03 2023-01-30 13:20:21 hum_periodic_report 120.0
setstate TUYA_Temp03 2023-01-30 13:20:21 hum_sensitivity 6.0
setstate TUYA_Temp03 2023-01-30 12:32:53 icon https://images.tuyaeu.com/smart/icon/ay1547018215107OLzeG/135fa070d64b4ce4858851a2df3da9ca.png
setstate TUYA_Temp03 2023-01-30 12:32:53 id bf14f376fe39bc2648iaeu
setstate TUYA_Temp03 2023-01-30 12:32:53 ip 46.5.205.243
setstate TUYA_Temp03 2023-01-30 12:32:53 lat 48.5585
setstate TUYA_Temp03 2023-01-30 12:32:53 local_key 5d205119d6f1507c
setstate TUYA_Temp03 2023-01-30 12:32:53 lon 9.2025
setstate TUYA_Temp03 2023-01-30 13:20:21 maxhum_set 70.0
setstate TUYA_Temp03 2023-01-30 13:20:21 maxtemp_set 38.9
setstate TUYA_Temp03 2023-01-30 13:20:21 minihum_set 21.0
setstate TUYA_Temp03 2023-01-30 13:20:21 minitemp_set 11.0
setstate TUYA_Temp03 2023-01-30 12:32:53 model WL-TH01
setstate TUYA_Temp03 2023-01-30 12:32:53 name Temperatur Wohnzimmer
setstate TUYA_Temp03 2023-01-30 12:32:53 online on
setstate TUYA_Temp03 2023-01-30 12:32:53 owner_id 3389434
setstate TUYA_Temp03 2023-01-30 11:47:06 product_id jy3ue7qz0zcmmizf
setstate TUYA_Temp03 2023-01-30 12:32:53 product_name Diivoo WiFi Thermometer Hygrometer
setstate TUYA_Temp03 2023-01-30 12:32:52 state ready
setstate TUYA_Temp03 2023-01-30 12:32:53 sub off
setstate TUYA_Temp03 2023-01-30 13:20:21 temp_alarm cancel
setstate TUYA_Temp03 2023-01-30 13:20:21 temp_periodic_report 120.0
setstate TUYA_Temp03 2023-01-30 13:20:21 temp_sensitivity 0.6
setstate TUYA_Temp03 2023-01-30 13:20:21 temp_unit_convert c
setstate TUYA_Temp03 2023-01-30 12:32:53 time_zone +02:00
setstate TUYA_Temp03 2023-01-30 12:32:53 uid eu1548823829280mLHX1
setstate TUYA_Temp03 2023-01-30 12:32:53 update_time 1653333585
setstate TUYA_Temp03 2023-01-30 12:32:53 uuid 3774d28e626e3c36
setstate TUYA_Temp03 2023-01-30 13:20:21 va_humidity 40.0
setstate TUYA_Temp03 2023-01-30 13:20:21 va_temperature 20.8

[/code]

dakommt ja nun ein interessantes Reading:

#     2023-01-30 13:20:21   temp_periodic_report 120.0
#     2023-01-30 13:20:21   temp_sensitivity 0.6
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 04 Februar 2023, 16:09:24
Hallo wollte das Modul Mal bei mir testen doch leider bekomme ich im Fhem Log immer diese Fehlermeldung:
2023.02.04 12:28:57 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.32.1 /usr/local/share/perl/5.32.1 /usr/lib/arm-linux-gnueabihf/perl5/5.32 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl-base /usr/lib/arm-linux-gnueabihf/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl) at ./FHEM/10_BindingsIo.pm line 12.
BEGIN failed--compilation aborted at ./FHEM/10_BindingsIo.pm line 12.


Was muss ich tun?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 04 Februar 2023, 16:10:28
Bitte die Anleitung zur fhempy Installation befolgen. Websockets Perl Paket fehlt.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 04 Februar 2023, 17:32:48
Ja hatte eig die Anleitung befolgt und die Perl Pakete installiert, ging aber anscheinend erst beim 2 Mal.

Jetzt bin ich beim einrichten von tuya, find's da nicht wo man ein Projekt anlegt. Oder geht das nicht vom Handy?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 04 Februar 2023, 18:01:42
Hänge bei der einrichtung leidert an dem Punkt wo ich mit der Tuya app auf dem handy den QR Code scannen soll.

wenn ich nach dem Scannen auf "Login bestätigen" klicke steht oben in rot "kein zugriff"

kennt jemand das problem?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: erdnar am 05 Februar 2023, 13:07:39
Hallo,
nachdem es mir nach langer Zeit gelungen ist, fhempy zu installieren (ich hatte ewig Probleme mit der Perl-Version), hänge ich nun am tuya-system.
Nach "set tuya_system scan_devices" kommt:{'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 1106: 'permission deny'"}
Hier ein List:API_KEY    xyz
   API_SECRET abc
   CFGFN     
   DEF        tuya setup xyz abc 123
   DEVICEID   0
   FHEMPYTYPE tuya
   FUUID      63df902c-f33f-50f1-4a67-f10c4adb028b8791
   IODev      fhempy_local
   NAME       tuya_system
   NR         35808
   PYTHONTYPE tuya
   REGION     eu
   STATE      {'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 1106: 'permission deny'"}
   TYPE       fhempy
   eventCount 13
   READINGS:
     2023-02-05 12:54:46   state           {'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 1106: 'permission deny'"}
   args:
     tuya_system
     fhempy
     tuya
     setup
     xyz
     abc
     123
   argsh:
   helper:
     bm:
       fhempy_Attr:
         cnt        2
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        05.02. 12:18:31
         max        0.00486516952514648
         tot        0.00956916809082031
         mAr:
           set
           tuya_system
           room
           fhempy
       fhempy_Define:
         cnt        1
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        05.02. 12:17:00
         max        0.022205114364624
         tot        0.022205114364624
         mAr:
           HASH(0x55d91f640e80)
           ARRAY(0x55d922479458)
           HASH(0x55d91f007e10)
       fhempy_Get:
         cnt        8
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        05.02. 12:54:45
         max        0.00585198402404785
         tot        0.037498950958252
         mAr:
           HASH(0x55d91f640e80)
           ARRAY(0x55d9229ff8b8)
           HASH(0x55d9225cf180)
       fhempy_Set:
         cnt        42
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        05.02. 12:46:50
         max        0.0544989109039307
         tot        0.556588411331177
         mAr:
           HASH(0x55d91f640e80)
           ARRAY(0x55d91f2f95f8)
           HASH(0x55d9228bcce0)
Attributes:
   group      tuya
   room       fhempy

Ich hatte erst das falsche Data Center (West Europe Central Europe).
Danke vorab
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 05 Februar 2023, 13:35:42
Api Key und Secret ist ganz sicher korrekt?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: erdnar am 05 Februar 2023, 13:51:17
Hallo Dominik,
wenn du hoffentlich mit Api Key die "Access ID/Client ID" und mit Secret das "Access Secret/Client Secret" meinst, dann ist es korrekt.
Das Modul scheint sich ja imho zu verbinden:2023-02-05 13:46:05,195 - INFO     - fhempy.lib.pkg_installer: Attempting install of git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3
2023-02-05 13:46:22,355 - INFO     - fhempy.lib.pkg_installer: Successfully installed git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3 update!
2023-02-05 13:46:44,320 - ERROR    - tuya_system: getdevices: {'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 1106: 'permission deny'"}

Oder bekommt es das Update auch ohne Key?
Danke
ErdnaR
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 05 Februar 2023, 13:52:45
Hallo vielleicht bin ich zu doof oder zu alt lol aber welchen API Key??
Den aus dem Screenshot??

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: erdnar am 05 Februar 2023, 13:56:44
... die beiden habe ich genommen ...  "Access ID/Client ID" und "Access Secret/Client Secret" ... mit v.g. Ergebnis  :(
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 05 Februar 2023, 14:10:34
Bei mir sieht's Grade so aus wie auf dem Screenshot habe die tuya Installation damit glaube ich abgeschlossen. Wie geht's jetzt wieder weiter?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 05 Februar 2023, 14:27:43
Alter wie geil ist das denn?
Alle device sind steuerbar und der Status wird auch sehr schnell aktualisiert.
Selbst meine Kameras kann ich steuern.

Gibt es jetzt auch noch die möglichkeit das Kamerabild über das Modul anzuzeigen?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: erdnar am 05 Februar 2023, 14:34:48
Zitat von: erdnar am 05 Februar 2023, 13:51:17
2023-02-05 13:46:05,195 - INFO     - fhempy.lib.pkg_installer: Attempting install of git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3
2023-02-05 13:46:22,355 - INFO     - fhempy.lib.pkg_installer: Successfully installed git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3 update!
2023-02-05 13:46:44,320 - ERROR    - tuya_system: getdevices: {'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 1106: 'permission deny'"}

bei mir ist das Ergebnis leider immer noch zum :'(, irgendwas habe ich wohl falsch gemacht.
NUR WAS???
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 05 Februar 2023, 16:17:36
Die DeviceID die du verwendest ist auch sicher eine richtige? Ist egal von welchem Device, aber es muss eine vorhandene sein.

Wg. Kamerabild, aktuell noch nicht. Ich denke das wird aber nur über die Cloud gehen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 05 Februar 2023, 16:26:24
Hey also auf dem Test Fhem lief alles nachdem man wußte was und wie. Ist

Jetzt wollte ich es auf meinem richtigen FHEM installieren aber da steht im State SEID 45 MIN
Installing fhempy (15min)..
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: erdnar am 05 Februar 2023, 16:45:19
Zitat von: dominik am 05 Februar 2023, 16:17:36
Die DeviceID die du verwendest ist auch sicher eine richtige? Ist egal von welchem Device, aber es muss eine vorhandene sein.
Auch hier die Frage: Du meinst die "Virtuelle ID" eines Gerätes aus der Tuya-App?  :-\
Dann ist es eine richtige.
ER
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: erdnar am 05 Februar 2023, 17:08:52
  >:(
2023-02-05 16:58:58,165 - INFO     - fhempy.lib.pkg_installer: Attempting install of git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3
2023-02-05 16:59:15,855 - INFO     - fhempy.lib.pkg_installer: Successfully installed git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3 update!
2023-02-05 16:59:28,347 - ERROR    - tuya_system: Exception raised by task: <Task finished name='Task-296' coro=<FhemModule._run_coro() done, defined at /opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py:194> exception=KeyError('result')>
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py", line 202, in _handle_task_result
    task.result()
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py", line 196, in _run_coro
    await coro
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 721, in _scan_devices
    for i in json_data["result"]:
KeyError: 'result'

Dies kommt nun mit einer anderen DeviceID, nehme ich wieder die erste, ist auch der Fehler wieder der Alte:
2023-02-05 17:10:26,423 - INFO     - fhempy.lib.pkg_installer: Attempting install of git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3
2023-02-05 17:10:43,566 - INFO     - fhempy.lib.pkg_installer: Successfully installed git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3 update!
2023-02-05 17:10:50,256 - ERROR    - tuya_system: getdevices: {'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 1106: 'permission deny'"}

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: erdnar am 05 Februar 2023, 17:22:37
dritte DeviceID
2023-02-05 17:16:46,334 - INFO     - fhempy.lib.pkg_installer: Attempting install of git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3
2023-02-05 17:17:03,300 - INFO     - fhempy.lib.pkg_installer: Successfully installed git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3 update!
2023-02-05 17:17:22,879 - ERROR    - tuya_system: Exception raised by task: <Task finished name='Task-438' coro=<FhemModule._run_coro() done, defined at /opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py:194> exception=KeyError('result')>
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py", line 202, in _handle_task_result
    task.result()
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py", line 196, in _run_coro
    await coro
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 721, in _scan_devices
    for i in json_data["result"]:
KeyError: 'result'

Erste ID 2023-02-05 17:20:01,951 - INFO     - fhempy.lib.pkg_installer: Attempting install of git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3
2023-02-05 17:20:18,812 - INFO     - fhempy.lib.pkg_installer: Successfully installed git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3 update!
2023-02-05 17:20:24,636 - ERROR    - tuya_system: getdevices: {'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 1106: 'permission deny'"}

Ich gebe erst mal auf.
Ich werde mal alles auf tuya.com löschen und versuche es noch mal neu. :'( :'( :'(
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 05 Februar 2023, 18:22:41
Na toll, jetzt ist mein FHEM abgemacht. Es startet nicht mehr.

Bzw der ganze raspberry
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 05 Februar 2023, 19:08:56
könnte an einer fehlhaften fhem.cfg liegen.
Hast du ein backup davon und/oder versuch bit der demo.cfg zu starten
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 05 Februar 2023, 19:55:01
Habe den fdisk Check aus der config beim start raus genommen damit startet der Pi im notmodus fhem läuft da soweit aber andere system Prozesse wie Light starten nicht.

Kann es sein das die Hintergrund Installation irgendwas zerschossen hat beim reboot???

Im fhempm_local steht immernoch "Installing fhempy (15min)."

Denke da macht was probleme
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 05 Februar 2023, 21:32:13
Aktualisiert bitte auf die letzte Version 0.1.593.

Wie ich den Fehlermeldungen hier entnehmen kann, dürften noch alte in Verwendung sein.

Manuelles Update:
sudo -u fhem bash
pip3 install --upgrade fhempy
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 05 Februar 2023, 21:41:12
Hallo,
bekomme leider diese Fehlermeldung
pi@FhemServer:~ $ sudo -u fhem bash
fhem@FhemServer:/home/pi$ pip3 install --upgrade fhempy
Collecting fhempy
  Could not find a version that satisfies the requirement fhempy (from versions: )
No matching distribution found for fhempy
fhem@FhemServer:/home/pi$
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 05 Februar 2023, 21:46:33
Welche python Version nutzt du?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 05 Februar 2023, 21:51:56
Hier noch ein Video vom Raspberry start bevor ich die automatische überprüfung und Reperatur aus der config vom Pi genommen habe.

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 05 Februar 2023, 21:54:00
Denke Phyton 3

Habe diese Schritte ausgeführt
Others
Use the following 2 commands if you run Debian 10 (Buster) or older (e.g. stretch, jessie, ...).

sudo apt install python3 python3-pip python3-dev libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libglib2.0-dev libdbus-1-dev bluez libbluetooth-dev git
sudo cpan Protocol::WebSocket
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 05 Februar 2023, 21:56:45
Kann das sein das 2 Python Versionen laufen???

fhem@FhemServer:/home/pi$ python --version
Python 2.7.13
fhem@FhemServer:/home/pi$ python3 --version
Python 3.5.3
fhem@FhemServer:/home/pi$
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 05 Februar 2023, 22:00:10
Du hast Python 3.5.3, das geht nicht.

Bitte auf bullseye aktualisieren und damit Python 3.9 im Standard. Bitte keine manuelle Python 3.9 Installation machen, das endet meistens in einer Katastrophe.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 05 Februar 2023, 22:06:09
Dann muss ich den ja ganz neu aufsetzen... Mit allem Pipapo.
Denn von einem Upgrade wird ja abgeraten.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 05 Februar 2023, 22:20:40
Naja, ich hab auf 3 RPi auf bullseye aktualisiert und hatte kaum große Probleme. Die laufen bis jetzt stabil damit.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 05 Februar 2023, 22:28:09
Okay, werde es versuchen, aber erst ziehe ich mir die aktuellen logs und DB und config etc
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 05 Februar 2023, 22:45:15
Zitat von: Tueftler1983 am 05 Februar 2023, 22:06:09
Dann muss ich den ja ganz neu aufsetzen... Mit allem Pipapo.
Denn von einem Upgrade wird ja abgeraten.


Ich hab nen Update ohne Probleme gemacht. Dann ging auch die Python Version.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: erdnar am 06 Februar 2023, 16:18:29
Zitat von: dominik am 05 Februar 2023, 21:32:13
Aktualisiert bitte auf die letzte Version 0.1.593.

Habe ich gemacht, mit folgendem Ergebnis:

Last login: Mon Jan 23 19:09:15 2023 from 192.168.2.11
ak@nuki:~$ sudo -u fhem bash
[sudo] Passwort für ak:
fhem@nuki:~$ pip3 install --upgrade fhempy
The directory '/home/ak/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ak/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting fhempy
  Downloading https://files.pythonhosted.org/packages/3e/55/9aacfe9dac445de8c1bd4b15ec700ac2e36dd6604c7662c64bf54dd42f82/fhempy-0.1.593-py3-none-any.whl (4.5MB)
    100% |████████████████████████████████| 4.5MB 118kB/s
Collecting zeroconf==0.36.12 (from fhempy)
  Downloading https://files.pythonhosted.org/packages/ad/a1/193a309b1cacf35688eb820cfb5fcc90f47b6ec2f529dfeca18862c04ffe/zeroconf-0.36.12-py3-none-any.whl (104kB)
    100% |████████████████████████████████| 112kB 3.2MB/s
Collecting aiohttp[speedups]==3.8.1 (from fhempy)
  Downloading https://files.pythonhosted.org/packages/38/71/e1db3f96fa85f77906ef002a08fa8d02dbdb3292180d41eb1b17ddab72bf/aiohttp-3.8.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 417kB/s
Collecting markdown2==2.4.2 (from fhempy)
  Downloading https://files.pythonhosted.org/packages/ab/36/101b2a0fb8880ae7ea2bbcee5a2f91e74bb58e5f23d0d692020fb07623c6/markdown2-2.4.2-py2.py3-none-any.whl
Collecting pycryptodomex==3.16.0 (from fhempy)
  Downloading https://files.pythonhosted.org/packages/76/dd/7276f37251f84931bd97bb42fe10455cad782dcb9a38b9820f65d2a098e8/pycryptodomex-3.16.0-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.3MB)
    100% |████████████████████████████████| 2.3MB 241kB/s
Collecting websockets==10.4 (from fhempy)
  Downloading https://files.pythonhosted.org/packages/3e/a5/e4535867a96bb07000c54172e1be82cd0b3a95339244cac1d400f8ba9b64/websockets-10.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (106kB)
    100% |████████████████████████████████| 112kB 3.1MB/s
Collecting requests==2.26.0 (from fhempy)
  Downloading https://files.pythonhosted.org/packages/92/96/144f70b972a9c0eabbd4391ef93ccd49d0f2747f4f6a2a2738e99e5adc65/requests-2.26.0-py2.py3-none-any.whl (62kB)
    100% |████████████████████████████████| 71kB 3.5MB/s
Collecting importlib-metadata==4.8.1 (from fhempy)
  Downloading https://files.pythonhosted.org/packages/71/c2/cb1855f0b2a0ae9ccc9b69f150a7aebd4a8d815bd951e74621c4154c52a8/importlib_metadata-4.8.1-py3-none-any.whl
Collecting ifaddr>=0.1.7 (from zeroconf==0.36.12->fhempy)
  Downloading https://files.pythonhosted.org/packages/9c/1f/19ebc343cc71a7ffa78f17018535adc5cbdd87afb31d7c34874680148b32/ifaddr-0.2.0-py3-none-any.whl
Collecting aiosignal>=1.1.2 (from aiohttp[speedups]==3.8.1->fhempy)
  Downloading https://files.pythonhosted.org/packages/76/ac/a7305707cb852b7e16ff80eaf5692309bde30e2b1100a1fcacdc8f731d97/aiosignal-1.3.1-py3-none-any.whl
Collecting async-timeout<5.0,>=4.0.0a3 (from aiohttp[speedups]==3.8.1->fhempy)
  Downloading https://files.pythonhosted.org/packages/d6/c1/8991e7c5385b897b8c020cdaad718c5b087a6626d1d11a23e1ea87e325a7/async_timeout-4.0.2-py3-none-any.whl
Collecting yarl<2.0,>=1.0 (from aiohttp[speedups]==3.8.1->fhempy)
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 342, in run
    requirement_set.prepare_files(finder)
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 376, in prepare_files
    discovered_reqs.extend(self._prepare_file(
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 551, in _prepare_file
    req_to_install.populate_link(
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 281, in populate_link
    self.link = self._wheel_cache.cached_wheel(self.link, self.name)
  File "/usr/lib/python3/dist-packages/pip/wheel.py", line 67, in cached_wheel
    return cached_wheel(
  File "/usr/lib/python3/dist-packages/pip/wheel.py", line 129, in cached_wheel
    wheel_names = os.listdir(root)
PermissionError: [Errno 13] Keine Berechtigung: '/home/ak/.cache/pip/wheels/59/9d/fc/c3828bc495d3ae87029dee8212ea52c3ca40471c16119d3bed'


Ich kann leider mit den Meldungen nichts anfangen  :-[
Mein Python: 3.8.16
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 06 Februar 2023, 16:27:21
@erdnar
wie und woraus hast du das so schön (mit Balken etc.) in Code kopiert gekriegt?


inhaltlich sieht's wohl nach einem Rechteproblem aus
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: erdnar am 06 Februar 2023, 16:47:21
ich habe es aus PUTTY rauskopiert  8)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: erdnar am 06 Februar 2023, 16:48:27
Zitat von: thburkhart am 06 Februar 2023, 16:27:21
inhaltlich sieht's wohl nach einem Rechteproblem aus

Und wie kann ich das lösen?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 06 Februar 2023, 17:16:45
Zitat von: Tueftler1983 am 05 Februar 2023, 14:27:43
Alter wie geil ist das denn?
Alle device sind steuerbar und der Status wird auch sehr schnell aktualisiert.
Selbst meine Kameras kann ich steuern.

Gibt es jetzt auch noch die möglichkeit das Kamerabild über das Modul anzuzeigen?

wie genauer kannst Du Cameras aus FHEM steuern? Ich habe nur Werte zum Anzeigen
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 06 Februar 2023, 17:19:35
Zitat von: erdnar am 06 Februar 2023, 16:48:27
Und wie kann ich das lösen?

https://forum.fhem.de/index.php?topic=75801.0#:~:text=Meist%20muss%20der%20User%20fhem,Logs%20muss%20er%20schreiben%20k%C3%B6nnen.&text=chown%20%2DR%20fhem%3A%20%2Fopt%2Ffhem%20Du%20bekommst%20wie,nicht%20auf%20einer%20Seite%20darstellbar. (https://forum.fhem.de/index.php?topic=75801.0#:~:text=Meist%20muss%20der%20User%20fhem,Logs%20muss%20er%20schreiben%20k%C3%B6nnen.&text=chown%20%2DR%20fhem%3A%20%2Fopt%2Ffhem%20Du%20bekommst%20wie,nicht%20auf%20einer%20Seite%20darstellbar.)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 06 Februar 2023, 17:38:52
Zitat von: thburkhart am 06 Februar 2023, 17:16:45
wie genauer kannst Du Cameras aus FHEM steuern? Ich habe nur Werte zum Anzeigen

Habe z.b. eine PTZ Kamera im Garten da kann ich über den Befehl set Kamera_Garten ptz (1-8) die preset Positionen anfahren oder die Bewegungsverfolgung ein oder aus schalten oder die Nachtsicht ein und aus schalten, all sowas
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: erdnar am 06 Februar 2023, 17:46:37
Zitat von: thburkhart am 06 Februar 2023, 17:19:35
https://forum.fhem.de/index.php?topic=75801.0#:~:text=Meist%20muss%20der%20User%20fhem,Logs%20muss%20er%20schreiben%20k%C3%B6nnen.&text=chown%20%2DR%20fhem%3A%20%2Fopt%2Ffhem%20Du%20bekommst%20wie,nicht%20auf%20einer%20Seite%20darstellbar. (https://forum.fhem.de/index.php?topic=75801.0#:~:text=Meist%20muss%20der%20User%20fhem,Logs%20muss%20er%20schreiben%20k%C3%B6nnen.&text=chown%20%2DR%20fhem%3A%20%2Fopt%2Ffhem%20Du%20bekommst%20wie,nicht%20auf%20einer%20Seite%20darstellbar.)

OK, In der Hoffnung das du das gemeint hast:

Zitat von: Wernieman am 24 August 2017, 14:41:11
Um es mal in Summe sauber zu machen:
chown -R fhem: /opt/fhem
# Hinweis: zwischen fhem und /opt ist ein :
cd /opf/fhem
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod 744 fhem.pl

Habe ich mal gemacht und den NUKi neu gestartet ... Das Ergebnis sah jetzt nicht anders aus und fhempy bleibt auch bei seiner Meldung:
2023-02-06 17:39:57,429 - INFO     - fhempy.lib.fhem_pythonbinding: Shutdown initiated...
2023-02-06 17:39:57,430 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-02-06 17:39:57,430 - INFO     - websockets.server: server closing
2023-02-06 17:42:29,555 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.571...
2023-02-06 17:42:29,565 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-02-06 17:42:29,634 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-02-06 17:42:36,998 - INFO     - websockets.server: connection open
2023-02-06 17:42:36,998 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-02-06 17:42:39,247 - INFO     - fhempy.lib.pkg_installer: Attempting install of git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3
2023-02-06 17:42:59,502 - INFO     - fhempy.lib.pkg_installer: Successfully installed git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3 update!
2023-02-06 17:44:02,224 - ERROR    - tuya_system: Exception raised by task: <Task finished name='Task-57' coro=<FhemModule._run_coro() done, defined at /opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py:194> exception=KeyError('result')>
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py", line 202, in _handle_task_result
    task.result()
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py", line 196, in _run_coro
    await coro
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 721, in _scan_devices
    for i in json_data["result"]:
KeyError: 'result'


Ich bleibe ratlos und hoffe auf Hilfe.
ErdnaR
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 06 Februar 2023, 18:02:51
Zitat von: Tueftler1983 am 06 Februar 2023, 17:38:52
Habe z.b. eine PTZ Kamera im Garten da kann ich über den Befehl set Kamera_Garten ptz (1-8) die preset Positionen anfahren oder die Bewegungsverfolgung ein oder aus schalten oder die Nachtsicht ein und aus schalten, all sowas

wow das geht bei mir auch :-)
hatte ganz übersehen, dass es SET gibt

Ja fhempy ist schon echt stark !!!!!
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 06 Februar 2023, 18:11:08
Ja ist echt geil, wenn ich jetzt noch das Kamerabild in fhem anzeigen könnte, wäre das der Hammer.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 06 Februar 2023, 18:16:34
Zitat von: Tueftler1983 am 06 Februar 2023, 18:11:08
Ja ist echt geil, wenn ich jetzt noch das Kamerabild in fhem anzeigen könnte, wäre das der Hammer.

das müsste wohl aus der Cloud geladen werden
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 Februar 2023, 22:55:20
erdnar, hast du Python 3.8 manuell installiert? Wenn ja, dann bitte auf bullseye aktualisieren.

Da ist irgendwas bei deiner Installation vermurkst, pip versucht auf das /home/ak Verzeichnis zuzugreifen, wo es keine Rechte hat. Der User fhem braucht dort aber auch keine Rechte und sollte sie auch nicht bekommen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: erdnar am 07 Februar 2023, 17:11:00
Hallo Dominik,
ich habe keinen Raspi. Es ist ein intel NUK mit Ubuntu 18.04.6 LTS.
Und ja, Python habe ich "irgendwie" manuell installiert.

Kann man das nicht wieder zurechtbiegen?  :-\

Bin für jede Hilfe dankbar, die eine komplette Neuinstallation verhindert.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 08 Februar 2023, 22:56:43
Kannst du Ubuntu nicht auf 20.04 sauber aktualisieren?

Die manuelle Installation von Python macht dir sonst nur Probleme.

Du kannst noch folgendes probieren...
sudo -u fhem bash
pip3 install --no-cache-dir --upgrade fhempy
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 09 Februar 2023, 10:19:39
Wie gewünscht hier die gleiche Frage:

Nachdem meine TUYA-Device wieder funktionieren wurde bei der Neuinstallation jetzt auf die Local-Variante umgestellt.
Zwar gibt es jetzt mehr Readings, dafür ist bei den Set-Befehlen nur noch on/off verfügbar. In der Cloud-Version hatte ich da zumindest noch Modus und Drehzahl oder Oszilation.

Kann man die Set-Befehle irgendwie erweitern, so dass die Readings auch wieder ausführbar sind?

Außerdem vermisse ich die Lüftergeschwindigkeit. Auf diese wird unten in den beiden Funktionen bei den Attributen verwiesen, aber unter den Readings nicht gelistet.

Außerdem hätte ich die Frage ob es irgendwie möglich ist, die Namen der Readings zu ändern. Im Moment lege ich die Readings mit UserReadings mit sprechendem Namen alle doppelt an. Schöner wäre es aber, wenn diese direkt einen sprechenden Namen hätten.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 09 Februar 2023, 16:42:36
Poste mal einen Screenshot vom Device inkl. Attribute. API Key unkenntlich machen nicht vergessen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: erdnar am 09 Februar 2023, 17:51:36
Zitat von: dominik am 08 Februar 2023, 22:56:43
Kannst du Ubuntu nicht auf 20.04 sauber aktualisieren?
Wenn ich wüsste wie das geht, OHNE Fhem zu zerstören bzw. neu installieren zu müssen.

Zitat
Du kannst noch folgendes probieren...
sudo -u fhem bash
pip3 install --no-cache-dir --upgrade fhempy

Hier das Ergebnis, am Ende wieder viele Fehler ...
fhem@nuki:~$ pip3 install --no-cache-dir --upgrade fhempy

Collecting fhempy
  Downloading https://files.pythonhosted.org/packages/ac/f7/ff4fd0fb1b2c5da8fc6d14de1fa0bfa7a0d12ab852ac51b4e81192d211b4/fhempy-0.1.595-py3-none-any.whl (4.5MB)
    100% |████████████████████████████████| 4.5MB 7.6MB/s
Collecting pycryptodomex==3.16.0 (from fhempy)
  Downloading https://files.pythonhosted.org/packages/76/dd/7276f37251f84931bd97bb42fe10455cad782dcb9a38b9820f65d2a098e8/pycryptodomex-3.16.0-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.3MB)
    100% |████████████████████████████████| 2.3MB 19.9MB/s
Collecting importlib-metadata==4.8.1 (from fhempy)
  Downloading https://files.pythonhosted.org/packages/71/c2/cb1855f0b2a0ae9ccc9b69f150a7aebd4a8d815bd951e74621c4154c52a8/importlib_metadata-4.8.1-py3-none-any.whl
Collecting zeroconf==0.36.12 (from fhempy)
  Downloading https://files.pythonhosted.org/packages/ad/a1/193a309b1cacf35688eb820cfb5fcc90f47b6ec2f529dfeca18862c04ffe/zeroconf-0.36.12-py3-none-any.whl (104kB)
    100% |████████████████████████████████| 112kB 8.7MB/s
Collecting aiohttp[speedups]==3.8.1 (from fhempy)
  Downloading https://files.pythonhosted.org/packages/38/71/e1db3f96fa85f77906ef002a08fa8d02dbdb3292180d41eb1b17ddab72bf/aiohttp-3.8.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 18.3MB/s
Collecting markdown2==2.4.2 (from fhempy)
  Downloading https://files.pythonhosted.org/packages/ab/36/101b2a0fb8880ae7ea2bbcee5a2f91e74bb58e5f23d0d692020fb07623c6/markdown2-2.4.2-py2.py3-none-any.whl
Collecting websockets==10.4 (from fhempy)
  Downloading https://files.pythonhosted.org/packages/3e/a5/e4535867a96bb07000c54172e1be82cd0b3a95339244cac1d400f8ba9b64/websockets-10.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (106kB)
    100% |████████████████████████████████| 112kB 15.5MB/s
Collecting requests==2.26.0 (from fhempy)
  Downloading https://files.pythonhosted.org/packages/92/96/144f70b972a9c0eabbd4391ef93ccd49d0f2747f4f6a2a2738e99e5adc65/requests-2.26.0-py2.py3-none-any.whl (62kB)
    100% |████████████████████████████████| 71kB 9.4MB/s
Collecting zipp>=0.5 (from importlib-metadata==4.8.1->fhempy)
  Downloading https://files.pythonhosted.org/packages/37/7d/4a5221043904612db108bbe7d0ad7409015fb143bae137c72d9dfd7b75e1/zipp-3.12.1-py3-none-any.whl
Collecting ifaddr>=0.1.7 (from zeroconf==0.36.12->fhempy)
  Downloading https://files.pythonhosted.org/packages/9c/1f/19ebc343cc71a7ffa78f17018535adc5cbdd87afb31d7c34874680148b32/ifaddr-0.2.0-py3-none-any.whl
Collecting charset-normalizer<3.0,>=2.0 (from aiohttp[speedups]==3.8.1->fhempy)
  Downloading https://files.pythonhosted.org/packages/db/51/a507c856293ab05cdc1db77ff4bc1268ddd39f29e7dc4919aa497f0adbec/charset_normalizer-2.1.1-py3-none-any.whl
Collecting attrs>=17.3.0 (from aiohttp[speedups]==3.8.1->fhempy)
  Downloading https://files.pythonhosted.org/packages/fb/6e/6f83bf616d2becdf333a1640f1d463fef3150e2e926b7010cb0f81c95e88/attrs-22.2.0-py3-none-any.whl (60kB)
    100% |████████████████████████████████| 61kB 7.4MB/s
Collecting yarl<2.0,>=1.0 (from aiohttp[speedups]==3.8.1->fhempy)
  Downloading https://files.pythonhosted.org/packages/c4/1e/1b204050c601d5cd82b45d5c8f439cb6f744a2ce0c0a6f83be0ddf0dc7b2/yarl-1.8.2.tar.gz (172kB)
    100% |████████████████████████████████| 174kB 10.4MB/s
Collecting aiosignal>=1.1.2 (from aiohttp[speedups]==3.8.1->fhempy)
  Downloading https://files.pythonhosted.org/packages/76/ac/a7305707cb852b7e16ff80eaf5692309bde30e2b1100a1fcacdc8f731d97/aiosignal-1.3.1-py3-none-any.whl
Collecting multidict<7.0,>=4.5 (from aiohttp[speedups]==3.8.1->fhempy)
  Downloading https://files.pythonhosted.org/packages/4a/15/bd620f7a6eb9aa5112c4ef93e7031bcd071e0611763d8e17706ef8ba65e0/multidict-6.0.4.tar.gz (51kB)
    100% |████████████████████████████████| 61kB 1.3MB/s
Collecting async-timeout<5.0,>=4.0.0a3 (from aiohttp[speedups]==3.8.1->fhempy)
  Downloading https://files.pythonhosted.org/packages/d6/c1/8991e7c5385b897b8c020cdaad718c5b087a6626d1d11a23e1ea87e325a7/async_timeout-4.0.2-py3-none-any.whl
Collecting frozenlist>=1.1.1 (from aiohttp[speedups]==3.8.1->fhempy)
  Downloading https://files.pythonhosted.org/packages/ec/ab/a440db757401a1e8863c9abb374a77cb2884eda74ffbf555dedcf1fbe7f6/frozenlist-1.3.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (161kB)
    100% |████████████████████████████████| 163kB 9.1MB/s
Collecting aiodns; extra == "speedups" (from aiohttp[speedups]==3.8.1->fhempy)
  Downloading https://files.pythonhosted.org/packages/ab/72/991ee33a517df69c6cd6f3486cfe9b6329557cb55acaa8cefac33c2aa4d2/aiodns-3.0.0-py3-none-any.whl
Collecting cchardet; extra == "speedups" (from aiohttp[speedups]==3.8.1->fhempy)
  Downloading https://files.pythonhosted.org/packages/c8/e3/11ead63869139948f61b922a1539f4439554358e6b4d304ccf2f1c836004/cchardet-2.1.7-cp38-cp38-manylinux1_x86_64.whl (265kB)
    100% |████████████████████████████████| 266kB 12.7MB/s
Collecting Brotli; extra == "speedups" (from aiohttp[speedups]==3.8.1->fhempy)
  Downloading https://files.pythonhosted.org/packages/68/5f/460520bf0c58ce21653e670635c649bd6e6760d2dbfd3b3ad18ceb8085a6/Brotli-1.0.9-cp38-cp38-manylinux1_x86_64.whl (357kB)
    100% |████████████████████████████████| 358kB 14.3MB/s
Collecting urllib3<1.27,>=1.21.1 (from requests==2.26.0->fhempy)
  Downloading https://files.pythonhosted.org/packages/fe/ca/466766e20b767ddb9b951202542310cba37ea5f2d792dae7589f1741af58/urllib3-1.26.14-py2.py3-none-any.whl (140kB)
    100% |████████████████████████████████| 143kB 9.8MB/s
Collecting idna<4,>=2.5; python_version >= "3" (from requests==2.26.0->fhempy)
  Downloading https://files.pythonhosted.org/packages/fc/34/3030de6f1370931b9dbb4dad48f6ab1015ab1d32447850b9fc94e60097be/idna-3.4-py3-none-any.whl (61kB)
    100% |████████████████████████████████| 71kB 8.1MB/s
Collecting certifi>=2017.4.17 (from requests==2.26.0->fhempy)
  Downloading https://files.pythonhosted.org/packages/71/4c/3db2b8021bd6f2f0ceb0e088d6b2d49147671f25832fb17970e9b583d742/certifi-2022.12.7-py3-none-any.whl (155kB)
    100% |████████████████████████████████| 163kB 13.7MB/s
Collecting pycares>=4.0.0 (from aiodns; extra == "speedups"->aiohttp[speedups]==3.8.1->fhempy)
  Downloading https://files.pythonhosted.org/packages/01/50/e3015e6e03a3cf64113f509e8b86b71af37169b59ccedfcb182f3d031329/pycares-4.3.0.tar.gz (821kB)
    100% |████████████████████████████████| 829kB 13.1MB/s
Collecting cffi>=1.5.0 (from pycares>=4.0.0->aiodns; extra == "speedups"->aiohttp[speedups]==3.8.1->fhempy)
  Downloading https://files.pythonhosted.org/packages/2b/a8/050ab4f0c3d4c1b8aaa805f70e26e84d0e27004907c5b8ecc1d31815f92a/cffi-1.15.1.tar.gz (508kB)
    100% |████████████████████████████████| 512kB 9.1MB/s
Collecting pycparser (from cffi>=1.5.0->pycares>=4.0.0->aiodns; extra == "speedups"->aiohttp[speedups]==3.8.1->fhempy)
  Downloading https://files.pythonhosted.org/packages/62/d5/5f610ebe421e85889f2e55e33b7f9a6795bd982198517d912eb1c76e1a53/pycparser-2.21-py2.py3-none-any.whl (118kB)
    100% |████████████████████████████████| 122kB 8.7MB/s
Installing collected packages: pycryptodomex, zipp, importlib-metadata, ifaddr, zeroconf, charset-normalizer, attrs, idna, multidict, yarl, frozenlist, aiosignal, async-timeout, pycparser, cffi, pycares, aiodns, cchardet, Brotli, aiohttp, markdown2, websockets, urllib3, certifi, requests, fhempy
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 356, in run
    requirement_set.install(
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 780, in install
    requirement.install(
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1057, in move_wheel_files
    move_wheel_files(
  File "/usr/lib/python3/dist-packages/pip/wheel.py", line 245, in move_wheel_files
    scheme = distutils_scheme(
  File "/usr/lib/python3/dist-packages/pip/locations.py", line 153, in distutils_scheme
    i.finalize_options()
  File "/usr/share/python-wheels/setuptools-39.0.1-py2.py3-none-any.whl/setuptools/command/install.py", line 38, in finalize_options
    orig.install.finalize_options(self)
  File "/usr/lib/python3.8/distutils/command/install.py", line 351, in finalize_options
    self.create_home_path()
  File "/usr/lib/python3.8/distutils/command/install.py", line 581, in create_home_path
    os.makedirs(path, 0o700)
  File "/usr/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Keine Berechtigung: '/home/ak/.local/lib'

... und das Resultat mit fhempy sieht leider auch nicht anders aus:
2023-02-09 17:35:37,235 - INFO     - fhempy.lib.pkg_installer: Attempting install of git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3
2023-02-09 17:36:02,109 - INFO     - fhempy.lib.pkg_installer: Successfully installed git+https://github.com/fhempy/tinytuya#tinytuya==1.7.3 update!
2023-02-09 17:36:17,572 - ERROR    - tuya_system: Exception raised by task: <Task finished name='Task-62' coro=<FhemModule._run_coro() done, defined at /opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py:194> exception=KeyError('result')>
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py", line 202, in _handle_task_result
    task.result()
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/generic.py", line 196, in _run_coro
    await coro
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/tuya/tuya.py", line 721, in _scan_devices
    for i in json_data["result"]:
KeyError: 'result'
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 09 Februar 2023, 20:26:18
Kann es sein, dass dein fhem User /home/ak als Home Directory verwendet? Mit echo $HOME kannst es prüfen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 10 Februar 2023, 23:54:29
Hier das gewünschte List:
Internals:
   DEF        tuya 6awobc9jfnlwvqtw bf934a1eb83b21bc25uo4x 192.168.178.171 9d214ad6b3b2a7e9 3.3 asfg5sj9aurr9nib73fx fc553d7a6bfa4a569bc69ed2aa6924ed
   DEVICEID   bf934a1eb83b21bc25uo4x
   FHEMPYTYPE tuya
   FUUID      63e01980-f33f-7706-c14d-f29b1dd99d5e2a92
   FVERSION   10_fhempy.pm:0.182830/2019-01-16
   IODev      fhempy_local
   NAME       tuya_local_bf934a1eb83b21bc25uo4x
   NR         63
   PYTHONTYPE tuya
   STATE      off
   TYPE       fhempy
   eventCount 3218
   READINGS:
     2023-02-10 23:51:31   Diffusor        close
     2023-02-10 23:51:31   Feuchte         38
     2023-02-10 23:51:31   FilterQuality   82
     2023-02-10 23:51:31   Mode            close
     2023-02-10 23:51:31   Oszillation     off
     2023-02-10 23:51:31   PM25            24
     2023-02-10 23:51:31   Signalton       0
     2023-02-10 23:51:31   Timer           0
     2023-02-10 23:51:31   UV              0
     2023-02-05 22:03:55   active_time     1654519182
     2023-02-05 22:03:55   biz_type        18
     2023-02-05 22:03:55   category        fs
     2023-02-05 22:03:55   create_time     1651829119
     2023-02-06 23:46:59   dp_02           close
     2023-02-08 19:13:55   dp_101          24
     2023-02-06 23:11:19   dp_102          0
     2023-02-06 22:28:06   dp_103          82
     2023-02-08 18:49:47   dp_105          close
     2023-02-08 19:03:41   dp_106          38
     2023-02-06 23:16:34   dp_13           0
     2023-02-06 23:44:10   dp_22           cancel
     2023-02-06 23:44:10   dp_23           0
     2023-02-05 22:03:55   icon            smart/icon/bay1579257011827QOvk/05cb05801c69fa7b6bdacda9c7f21196.png
     2023-02-05 22:03:55   id              bf934a1eb83b21bc25uo4x
     2023-02-05 22:03:55   ip              88.153.83.160
     2023-02-05 22:03:55   lat             51.0583
     2023-02-05 22:03:55   local_key       9d214ad6b3b2a7e9
     2023-02-05 22:03:55   lon             6.1030
     2023-02-05 22:03:55   model           ARC Humidifier
     2023-02-05 22:03:55   name            Wohnzimmerventilator
     2023-02-10 23:50:30   online          0
     2023-02-05 22:03:55   owner_id        23921647
     2023-02-05 22:03:55   product_id      6awobc9jfnlwvqtw
     2023-02-05 22:03:55   product_name    ARC Humidifier
     2023-02-10 23:51:31   state           off
     2023-02-05 22:03:55   sub             0
     2023-02-10 23:50:31   switch          off
     2023-02-06 23:19:39   switch_horizontal off
     2023-02-05 22:03:55   time_zone       +02:00
     2023-02-05 22:03:55   uid             eu1610479166063muAw8
     2023-02-05 22:03:55   update_time     1654519186
     2023-02-05 22:03:55   uuid            f3e5852aa7804328
   args:
     tuya_local_bf934a1eb83b21bc25uo4x
     fhempy
     tuya
     6awobc9jfnlwvqtw
     bf934a1eb83b21bc25uo4x
     192.168.178.171
     9d214ad6b3b2a7e9
     3.3
     asfg5sj9aurr9nib73fx
     fc553d7a6bfa4a569bc69ed2aa6924ed
   argsh:
Attributes:
   alias      Wohnzimmerventilator
   devStateIcon aus:ios-off:an an:ios-on-blue:aus off:ios-off:on on:ios-on-green:off .*:ios-off .*:
   dp_01      switch
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}, 'desc': 'fan speed percent'}, {'code': 'switch_horizontal', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'switch horizontal'}]
   tuya_spec_status [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}}, {'code': 'switch_horizontal', 'dp_id': 5, 'type': 'Boolean', 'values': {}}]
   userReadings Mode { ReadingsVal("tuya_local_bf934a1eb83b21bc25uo4x", "dp_02", 0) },PM25 { ReadingsVal("tuya_local_bf934a1eb83b21bc25uo4x", "dp_101", 0) },
UV { ReadingsVal("tuya_local_bf934a1eb83b21bc25uo4x", "dp_102", 0) },
FilterQuality { ReadingsVal("tuya_local_bf934a1eb83b21bc25uo4x", "dp_103", 0) },
Diffusor { ReadingsVal("tuya_local_bf934a1eb83b21bc25uo4x", "dp_105", 0) },
Feuchte { ReadingsVal("tuya_local_bf934a1eb83b21bc25uo4x", "dp_106", 0) },
Signalton { ReadingsVal("tuya_local_bf934a1eb83b21bc25uo4x", "dp_13", 0) },
Timer { ReadingsVal("tuya_local_bf934a1eb83b21bc25uo4x", "dp_23", 0) },
Oszillation { ReadingsVal("tuya_local_bf934a1eb83b21bc25uo4x", "switch_horizontal", 0) },


Interessanterweise funktionieren jetzt zwei der drei Devices nicht mehr und haben gar kein Set mehr.
Beim Klicken darauf kommt nur noch "Command not available for this device."
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 11 Februar 2023, 00:04:26
Du brauchst nur die tuya_spec_functions bzw. tuya_spec_status Attribute erweitern.

tuya_spec_status => für die Darstellung der Readings
tuya_spec_functions => für die Set Funktionen

Was hast du gemacht, dass die Devices nicht mehr funktionieren? fhempy Neustart schon probiert?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 11 Februar 2023, 09:20:48
Habe ich mir fast gedacht, nur leider weiß ich nicht wie es zu erweitern ist, da ich den Code nicht verstehe.
Aber wenn ich es richtig lese müssten die aktuellen Einstellungen 3 Readings bzw. Set-Befehle erzeugen sollte. Bei den Readings fehlen genau diese Angaben aber.

Warum zwei der drei Devices nicht mehr funktionieren weiß ich nicht. Das einzige was mir aufgefallen ist, das das Device für das nose.js immer wieder auf rot springt, nach einem StatusRequest aber wieder auf Grün geht.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 11 Februar 2023, 09:37:48
Mach bitte folgendes, damit wir einen sauberen Ausgangszustand haben:
- die 3 local Devices löschen
- fhempy aktualisieren
- fhem update
- restart
- scan für die Devices starten
- 1 Device anlegen
- prüfen was bei dem Device funktioniert und was nicht, Ergebnis bitte posten.

Dann schauen wir uns ein Device nach dem anderen an.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: erdnar am 11 Februar 2023, 12:34:26
Zitat von: dominik am 09 Februar 2023, 20:26:18
Kann es sein, dass dein fhem User /home/ak als Home Directory verwendet? Mit echo $HOME kannst es prüfen.
Ja:
ak@nuki:~$ echo $HOME
/home/ak
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 11 Februar 2023, 16:53:19
Hallo Dominik,

Ich habe die 3 Devices gelöscht und nach einem Update und restart von Fhempy auch den kompletten Fhem-Server upgedatet u d neugestartet.
Doch bevor ich einen Scan machen konnte, waren die drei Devices wieder da inkl. der Userreadings die ich in dem einen Device angelegt hatte.
Verhalten der 3 Devices ist genauso wie vorher.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: satprofi am 12 Februar 2023, 12:47:54
ich habe hier 4x tuya steckdosen, alle baugleich.  beim scan alle auch erkannt, nur richtig angelegt werden nur 3 lokal, die 4. nur als tuya_cloud.  sp112
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 12 Februar 2023, 18:29:57
So, nach dem 3. Restart von Fhempy habe ich jetzt wieder bedienbare Devices. Musste zwischen Löschen der Devices und restart vom Fhem-Server auch den fhempy-Server stoppen, sonst wurden die 3 Devices immer wieder automatisch erzeugt.

Erst mit ausgeschaltetem fhempy-Server konnte ich nach den Devices scannen und diese dann neu erstellen lassen.

Allerdings ist es nach wie vor so, dass nur on/off geht.
Was muss ich denn in den zwei Attributen reinschreiben um mehr zu bekommen bzw. die Namen der Readings zu ändern?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 16 Februar 2023, 16:50:20
#behoben#
*Es lag an den Einstellungen des Servicecenters*
Hey, ich bin es wieder.

Wollte Tuya jetzt bei nem Freund installieren bekomme aber beim scan nach devices diese Meldung!
{'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 1106: 'permission deny'"}

Die anderen Tuya devices( fempty_local femptyserver) sehen gut aus

Internals:
   API_KEY    qcdxp5xtsngskkqwsdjn
   API_SECRET 96ac49712ba5459d8622807f39ea859a
   CFGFN     
   DEF        tuya setup uuuuuuu ooooooooo xxxxxxxx
   DEVICEID   0
   FHEMPYTYPE tuya
   FUUID      63ee4e12-f33f-b458-b11e-aeca0a58a189af26
   IODev      fhempy_local
   NAME       tuya_system
   NR         478
   PYTHONTYPE tuya
   REGION     eu
   STATE      {'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 1106: 'permission deny'"}
   TYPE       fhempy
   eventCount 3
   READINGS:
     2023-02-16 16:39:13   state           {'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 1106: 'permission deny'"}
   args:
     tuya_system
     fhempy
     tuya
     setup
     Uuuuuuuuuuuuuuuu
     Oooooooooooooooooooooooo
     Xxxxxxxxxxxxxxxxmpa
   argsh:
Attributes:
   group      tuya
   room       fhempy
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Paul_M am 16 Februar 2023, 17:52:31
Hi dominik,
zurzeit läuft im fhempy-Bereich alles ohne Probleme ;) Jetzt hab ich mir die Frage getsellt, ob es den möglich ist von den Steckdosen auch den Gesamtverbrauch anzeigen zu lassen, so wie in der App? Die aktuelle Leistung wird ganz normal angezeigt. Aber da kannst du wahrscheinlich nicht viel machen, da das ja über die Tuya Cloud nichtmal zur Verfügung gestellt wird, wenn ich das richtig gesehen habe... Vielleicht kann ja trotzdem jemand weiterhelfen. Danke euch ;D

Gruß Paul
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 16 Februar 2023, 19:04:30
Zitat von: Paul_M am 16 Februar 2023, 17:52:31
Hi dominik,
zurzeit läuft im fhempy-Bereich alles ohne Probleme ;) Jetzt hab ich mir die Frage getsellt, ob es den möglich ist von den Steckdosen auch den Gesamtverbrauch anzeigen zu lassen, so wie in der App? Die aktuelle Leistung wird ganz normal angezeigt. Aber da kannst du wahrscheinlich nicht viel machen, da das ja über die Tuya Cloud nichtmal zur Verfügung gestellt wird, wenn ich das richtig gesehen habe... Vielleicht kann ja trotzdem jemand weiterhelfen. Danke euch ;D

Gruß Paul

danach sehne ich mich auch ; ich habe bislang keine Lösung finden können oder es zu kompliziert für mich; es könnte wohl mit dblog und/oder rechnenden UserReadings gehen.
Die Aufsummierung über fhempy hat Dominik ja in der Pipeline :-)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: erdnar am 16 Februar 2023, 19:19:37
ZitatZitat von: dominik am 09 Februar 2023, 20:26:18
Kann es sein, dass dein fhem User /home/ak als Home Directory verwendet? Mit echo $HOME kannst es prüfen.
Zitat von: erdnar am 11 Februar 2023, 12:34:26
Ja:
ak@nuki:~$ echo $HOME
/home/ak

Was hat das "falsche" Home Directory für Auswirkungen? Kann/sollte ich etwas ändern oder Pfade umbiegen oder ...
Danke vorab.
ErdnaR
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 16 Februar 2023, 19:25:13
Ich habe ne Doppelsteckdose, gibt es die möglichkeid das ich von beiden Kanälen den Status sehe und auch beide direkt schalten kann über FhemWeb?

Hier ein List

Internals:
   CFGFN     
   DEF        tuya axrman9ocn73hz5n bf8c9778186caa56369mpa 192.168.1.29 321c6fdf0aa71e19 3.3 qcdxp5xtsngskkqwsdjn 96ac49712ba5459d8622807f39ea859a
   DEVICEID   bf8c9778186caa56369mpa
   FHEMPYTYPE tuya
   FUUID      63ee607c-f33f-b458-8d98-30439fd603c28bdb
   IODev      fhempy_local
   NAME       tuya_local_bf8c9778186caa56369mpa
   NR         1855
   PYTHONTYPE tuya
   STATE      off
   TYPE       fhempy
   eventCount 8
   READINGS:
     2023-02-16 17:57:35   active_time     1676558186
     2023-02-16 17:57:35   biz_type        0
     2023-02-16 17:57:35   category        pc
     2023-02-16 17:57:35   countdown_1     0.0
     2023-02-16 17:57:35   countdown_2     0.0
     2023-02-16 17:57:35   create_time     1655632695
     2023-02-16 17:57:35   icon            smart/icon/ay1513061730920i97zP/3c0a16895387101c733af3ab249b257b.jpg
     2023-02-16 17:57:35   id              bf8c9778186caa56369mpa
     2023-02-16 17:57:35   ip              46.114.111.211
     2023-02-16 17:57:35   lat             50.8641
     2023-02-16 17:57:35   light_mode      relay
     2023-02-16 17:57:35   local_key       321c6fdf0aa71e19
     2023-02-16 17:57:35   lon             6.1668
     2023-02-16 17:57:35   model           SH-26XEU
     2023-02-16 17:57:35   name            Yakuzzi
     2023-02-16 17:57:35   online          1
     2023-02-16 17:57:35   owner_id        81817100
     2023-02-16 17:57:35   product_id      axrman9ocn73hz5n
     2023-02-16 17:57:35   product_name    Dual outdoor plug
     2023-02-16 17:57:35   relay_status    off
     2023-02-16 18:49:23   state           off
     2023-02-16 17:57:35   sub             0
     2023-02-16 17:57:35   switch_1        off
     2023-02-16 17:57:35   switch_2        off
     2023-02-16 17:57:35   time_zone       +01:00
     2023-02-16 17:57:35   uid             eu16765577276199c5V2
     2023-02-16 17:57:35   update_time     1676559583
     2023-02-16 17:57:35   uuid            98e14b01594d40ad
   args:
     tuya_local_bf8c9778186caa56369mpa
     fhempy
     tuya
     axrman9ocn73hz5n
     Zzzzzzzzzz
     192.168.1.29
     321c6fdf0aa71e19
     3.3
     Oooooooooo
     Xxxxxxxxxx
   argsh:
Attributes:
   alias      Yakuzzi
   dp_01      switch_1
   dp_02      switch_2
   dp_09      countdown_1
   dp_10      countdown_2
   dp_38      relay_status
   dp_40      light_mode
   dp_42      cycle_time
   dp_43      random_time
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'switch_2', 'dp_id': 2, 'type': 'Boolean', 'values': {}, 'desc': 'switch 2'}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}, {'code': 'countdown_2', 'dp_id': 10, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 2'}, {'code': 'relay_status', 'dp_id': 38, 'type': 'Enum', 'values': {'range': ['power_off', 'power_on', 'last']}, 'desc': 'relay status'}, {'code': 'light_mode', 'dp_id': 40, 'type': 'Enum', 'values': {'range': ['relay', 'pos', 'none']}, 'desc': 'light mode'}, {'code': 'cycle_time', 'dp_id': 42, 'type': 'String', 'values': {}, 'desc': 'cycle time'}, {'code': 'random_time', 'dp_id': 43, 'type': 'String', 'values': {}, 'desc': 'random time'}]
   tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'switch_2', 'dp_id': 2, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'countdown_2', 'dp_id': 10, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'relay_status', 'dp_id': 38, 'type': 'Enum', 'values': {'range': ['power_off', 'power_on', 'last']}}, {'code': 'light_mode', 'dp_id': 40, 'type': 'Enum', 'values': {'range': ['relay', 'pos', 'none']}}, {'code': 'cycle_time', 'dp_id': 42, 'type': 'String', 'values': {}}, {'code': 'random_time', 'dp_id': 43, 'type': 'String', 'values': {}}]
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 17 Februar 2023, 10:45:22
Okay habe es mit DevStateIcon hinbekommen.
1.on:message_socket@green:+off 1.off:message_socket@red:+on 2.on:message_socket@green:switch_2+off 2.off:message_socket@red:switch_2+on
So sieht's in der oberfläche gut aus.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 17 Februar 2023, 15:21:36
Gibt es für die Attribute "tuya_spec_functions" und "tuya_spec_status" eine Art Syntex was man da eintragen kann um weitere Funktionen bzw. Readings zu generieren?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 22 Februar 2023, 10:28:02
Schade, dass du darauf nicht antwortest.

Du sagst zwar ich soll die Atribute erweitern, aber nicht wie.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 22 Februar 2023, 21:53:11
Zitat von: thburkhart am 16 Februar 2023, 19:04:30
danach sehne ich mich auch ; ich habe bislang keine Lösung finden können oder es zu kompliziert für mich; es könnte wohl mit dblog und/oder rechnenden UserReadings gehen.
Die Aufsummierung über fhempy hat Dominik ja in der Pipeline :-)

energy Reading ist nun integriert. Dabei wird cur_power herangezogen und mit folgender Formel berechnet
energy = energy + (aktuelle Zeit - letzte Messung) * (letzte Messung + aktuelle Messung)/2 /(3600 * 1000)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 22 Februar 2023, 21:54:40
Zitat von: erdnar am 16 Februar 2023, 19:19:37
Was hat das "falsche" Home Directory für Auswirkungen? Kann/sollte ich etwas ändern oder Pfade umbiegen oder ...
Danke vorab.
ErdnaR

Dass dein User ak das Home Directory /home/ak hat ist ja korrekt. Du musst mit dem fhem User das Home prüfen.
sudo -u fhem bash
echo $HOME
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 22 Februar 2023, 22:02:14
Zitat von: Superposchi am 17 Februar 2023, 15:21:36
Gibt es für die Attribute "tuya_spec_functions" und "tuya_spec_status" eine Art Syntex was man da eintragen kann um weitere Funktionen bzw. Readings zu generieren?

Schau dir einfach die bestehenden an. Es gibt 5 Typen: Integer, Enum, Boolean, String, Json
dp_id ist die dp_id
code der Name - kann man frei vergeben
values bei Integer/Enum die möglichen Werte
desc die Beschreibung

Einfach mal ausprobieren zu erweitern und dann fhempy neu starten.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 22 Februar 2023, 22:48:53
In meinen beiden Ventilatoren gibt es sowohl für die Readings als auch die Funktionen das Ein-/Ausschalten und die Ventilaturdrehzahl, wobei letzteres sowohl in den Readings als auch den Funktionen nicht angezeigt wird. Bei den Readings gibt es hingegen jede Menge die in dem Attribut nicht spezifiziert sind.

Also kein wirklich zu verwertendes Beispiel.
Darum frage ich ja hier so deutlich.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 22 Februar 2023, 22:52:00
Sorry, aber ich supporte ca. 50 Module, da weiß ich hier nicht zu jeder Zeit was wer wo wann gefragt hat und um was es geht.

Bitte daher nochmals um den Background damit ich weiß was du tun möchtest und bitte auch ein list wo ich die Attributwerte sehe.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 22 Februar 2023, 23:12:17

Save config
Residents
Wohnung
Information
Steuerung
Devices
System
Benachrichtigungen
Alexa
Logging
AMAD
Amazon
FBDECT
MQTT2_DEVICE
fhempy
Dummy
Unsorted
Papierkorb
Test
icoEverything Everything
Logfile
remotecontrol/black_btn_CH_LIST Commandref
Remote doc
Edit files
Select style
Event monitor
Backup
Update
Neustart
Internals:
   CFGFN     
   DEF        tuya 6awobc9jfnlwvqtw bf934a1eb83b21bc25uo4x 192.168.178.171 9d214ad6b3b2a7e9 3.3 asfg5sj9aurr9nib73fx fc553d7a6bfa4a569bc69ed2aa6924ed
   DEVICEID   bf934a1eb83b21bc25uo4x
   FHEMPYTYPE tuya
   FUUID      63eab68c-f33f-7706-d9db-aed9b35a549082f9
   IODev      fhempy_local
   NAME       tuya_local_bf934a1eb83b21bc25uo4x
   NR         69634
   PYTHONTYPE tuya
   STATE      off
   TYPE       fhempy
   eventCount 5
   READINGS:
     2023-02-13 23:15:41   active_time     1654519182
     2023-02-13 23:15:41   biz_type        18
     2023-02-13 23:15:41   category        fs
     2023-02-13 23:15:41   create_time     1651829119
     2023-02-13 23:15:41   dp_02           close
     2023-02-13 23:15:41   icon            smart/icon/bay1579257011827QOvk/05cb05801c69fa7b6bdacda9c7f21196.png
     2023-02-13 23:15:41   id              bf934a1eb83b21bc25uo4x
     2023-02-13 23:15:41   ip              88.153.83.160
     2023-02-13 23:15:41   lat             51.0583
     2023-02-13 23:15:41   local_key       9d214ad6b3b2a7e9
     2023-02-13 23:15:41   lon             6.1030
     2023-02-13 23:15:41   model           ARC Humidifier
     2023-02-13 23:15:41   name            Wohnzimmerventilator
     2023-02-13 23:15:41   online          1
     2023-02-13 23:15:41   owner_id        23921647
     2023-02-13 23:15:41   product_id      6awobc9jfnlwvqtw
     2023-02-13 23:15:41   product_name    ARC Humidifier
     2023-02-13 23:16:41   state           off
     2023-02-13 23:15:41   sub             0
     2023-02-13 23:15:41   switch          off
     2023-02-13 23:15:41   time_zone       +02:00
     2023-02-13 23:15:41   uid             eu1610479166063muAw8
     2023-02-13 23:15:41   update_time     1654519186
     2023-02-13 23:15:41   uuid            f3e5852aa7804328
   args:
     tuya_local_bf934a1eb83b21bc25uo4x
     fhempy
     tuya
     6awobc9jfnlwvqtw
     bf934a1eb83b21bc25uo4x
     192.168.178.171
     9d214ad6b3b2a7e9
     3.3
     asfg5sj9aurr9nib73fx
     fc553d7a6bfa4a569bc69ed2aa6924ed
   argsh:
Attributes:
   alias      Wohnzimmerventilator
   cmdIcon    on:general_an off:general_aus
   devStateIcon aus:ios-off:an an:ios-on-blue:aus off:ios-off:on on:ios-on-green:off .*:ios-off .*:
   dp_01      switch
   group      Geräte
   icon       Ventilator_fett
   room       Wohnung->Wohnzimmer,fhempy
   tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}, 'desc': 'fan speed percent'}, {'code': 'switch_horizontal', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'switch horizontal'}]
   tuya_spec_status [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}}, {'code': 'switch_horizontal', 'dp_id': 5, 'type': 'Boolean', 'values': {}}]
   webCmd     : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :on:off


Bei den Funktionen gibt es nur on und off, die Fan-speed steht nicht zur Verfügung.
Bei den Readings gibt es ebenfalls kein fan-speed, dafür aber etliche andere, die ich gerne auch per set-Befehl setzen würde soweit das geht, zb horizontales Bewegen oder UV-Funktion oder die als Option montierte Luftbefeuchtung (Entsprechende Readings existieren ohne Eintrag in den beiden Attributen).

Frage ist also wie die Fan-Speed sowohl bei der Funktion als auch den Readings zur Verfügung zu stellen und das Funktions-Attribut so zu erweitern, dass auch die genannten Readings gesetzt werden können.

Zweitens wäre es schön wenn man die Reading-Namen ändern könnte. ID_xx ist leider nichtssagend und man muss immer überlegen was was ist.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 22 Februar 2023, 23:27:37
So wie es aussieht, liefert dein Device die DPs 3 (fan_speed_percent) und 5 (switch_horizontal) nicht.

Wo siehst du diese etlichen anderen dp_xx Readings? Ich sehe nur ein einziges, das dp_02. Und was meinst du mit ID_xx? Ich sehe kein Reading ID_xx?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 22 Februar 2023, 23:56:02
Sorry, meinte dp_xx nicht id_xx. Hatte mich von deinem Post fehlleiten lassen.

Ich hab das List am Handy rauskopiert, daher nicht geschaut welche Readings genau angezeigt wurden. Die Readings werden erst nach dem ersten Einschalten des Geräts nach und nach erstellt. Beim Schlafzimmerventilator (gleiches Modell wie im Wohnzimmer) werden aktuell 3 angezeigt. Insgesamt habe ich glaube ich schon mehr als 7 Readings angezeigt gesehen.
Aber die Devices sind beide neu erstellt und wie gesagt kommen die Readings erst im laufenden Betrieb.

Zum Vergleich hier mal das List des Schlafzimmerventilators mit 3 Readings:
Internals:
   CFGFN     
   DEF        tuya 6awobc9jfnlwvqtw bf75378cf6e13718e0rvcj 192.168.178.169 7ada5a7cbf4a78e8 3.3 asfg5sj9aurr9nib73fx fc553d7a6bfa4a569bc69ed2aa6924ed
   DEVICEID   bf75378cf6e13718e0rvcj
   FHEMPYTYPE tuya
   FUUID      63eab589-f33f-7706-2293-af83091afa968b90
   IODev      fhempy_local
   NAME       tuya_local_bf75378cf6e13718e0rvcj
   NR         69512
   PYTHONTYPE tuya
   STATE      off
   TYPE       fhempy
   eventCount 70
   READINGS:
     2023-02-13 23:11:22   active_time     1654518995
     2023-02-13 23:11:22   biz_type        18
     2023-02-13 23:11:22   category        fs
     2023-02-13 23:11:22   create_time     1627922506
     2023-02-13 23:11:22   dp_02           close
     2023-02-14 19:57:38   dp_101          15
     2023-02-14 19:57:29   dp_106          46
     2023-02-13 23:11:22   icon            smart/icon/bay1579257011827QOvk/05cb05801c69fa7b6bdacda9c7f21196.png
     2023-02-13 23:11:22   id              bf75378cf6e13718e0rvcj
     2023-02-13 23:11:22   ip              88.153.83.160
     2023-02-13 23:11:22   lat             51.0583
     2023-02-13 23:11:22   local_key       7ada5a7cbf4a78e8
     2023-02-13 23:11:22   lon             6.1030
     2023-02-13 23:11:22   name            Schlafzimmerventilator
     2023-02-13 23:11:22   online          1
     2023-02-13 23:11:22   owner_id        23921647
     2023-02-13 23:11:22   product_id      6awobc9jfnlwvqtw
     2023-02-13 23:11:22   product_name    ARC Humidifier
     2023-02-14 19:57:57   state           off
     2023-02-13 23:11:22   sub             0
     2023-02-13 23:11:22   switch          on
     2023-02-13 23:11:22   time_zone       +02:00
     2023-02-13 23:11:22   uid             eu1610479166063muAw8
     2023-02-13 23:11:22   update_time     1654518998
     2023-02-13 23:11:22   uuid            fd0c8a9f78a36684
   args:
     tuya_local_bf75378cf6e13718e0rvcj
     fhempy
     tuya
     6awobc9jfnlwvqtw
     bf75378cf6e13718e0rvcj
     192.168.178.169
     7ada5a7cbf4a78e8
     3.3
     asfg5sj9aurr9nib73fx
     fc553d7a6bfa4a569bc69ed2aa6924ed
   argsh:
Attributes:
   alias      Schlafzimmerventilator
   cmdIcon    on:general_an off:general_aus
   devStateIcon aus:ios-off:an an:ios-on-blue:aus off:ios-off:on on:ios-on-green:off
   dp_01      switch
   group      Geräte
   icon       Ventilator_fett
   room       Wohnung->Schlafzimmer,fhempy
   tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}, 'desc': 'fan speed percent'}, {'code': 'switch_horizontal', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'switch horizontal'}]
   tuya_spec_status [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}}, {'code': 'switch_horizontal', 'dp_id': 5, 'type': 'Boolean', 'values': {}}]
   webCmd     : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :on:off
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 23 Februar 2023, 00:29:01
Ok, dann mach bitte folgendes:
- Alle Funktionen nacheinander am Ventilator einstellen
- Prüfen welche dp_xx sich ändert und die Werte und xx in einer Tabelle auflisten
- Dann alle Informationen gesammelt hier posten
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 23 Februar 2023, 10:25:02
Zitat von: dominik am 22 Februar 2023, 21:53:11
energy Reading ist nun integriert. Dabei wird cur_power herangezogen und mit folgender Formel berechnet
energy = energy + (aktuelle Zeit - letzte Messung) * (letzte Messung + aktuelle Messung)/2 /(3600 * 1000)


@Dominik,

super ! Vielen Dank!
in "energy" wird also ganz schlich aufsummiert und wir können den Monatsverbrauch mittels dblog/gplot selbst ermitteln und darstellen.
Muss ich gleich mal ausprobieren.
Als erstes muss ich energy mit dbloginclude in die Datenbank aufnehmen.

Wäre es für dich auch machbar analog zu SmartLife die Monate separat aufzunehmen:

energy   = Verbrauch von Start ab   "total"
energy_2302 Verbrauch 01.02.23 bis 28.02.23
energy_2303 Verbrauch 01.03.23 bis 31.03.23
energy_2304  usw.

dann hätte man das sofort im Überblick.

@all
oder wie macht ihr das?


Herzlicher Dank an Dominik für das suptertolle und stabile Modul

Viele Grüße

Thomas

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 23 Februar 2023, 12:43:12
ich habe nun begonnen, energy zu testen:hier mein JL35
[code]define TUYA_JL35 fhempy tuya wifvoilfrqeo6hvu 8877821724a16014ef14 192.168.9.93 f3ac3693f76b2a96 3.30
attr TUYA_JL35 DbLogExclude .*
attr TUYA_JL35 alias JL35 GL AXT1800
attr TUYA_JL35 dp_01 switch_1
attr TUYA_JL35 dp_02 countdown_1
attr TUYA_JL35 dp_03 add_ele
attr TUYA_JL35 dp_04 cur_current
attr TUYA_JL35 dp_05 cur_power
attr TUYA_JL35 dp_06 cur_voltage
attr TUYA_JL35 group Schalter (T)
attr TUYA_JL35 room -TUYA
attr TUYA_JL35 stateFormat E: energy kWh cP: cur_power W
attr TUYA_JL35 tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '秒', 'max': 86400, 'step': 1}, 'desc': 'countdown 1'}]
attr TUYA_JL35 tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '秒', 'max': 86400, 'step': 1}}, {'code': 'add_ele', 'dp_id': 3, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '度', 'max': 500000, 'step': 100}}, {'code': 'cur_current', 'dp_id': 4, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'mA', 'max': 30000, 'step': 1}}, {'code': 'cur_power', 'dp_id': 5, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'W', 'max': 50000, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 6, 'type': 'Integer', 'values': {'min': 0, 'unit': 'V', 'scale': 0, 'max': 2500, 'step': 1}}]
#   DEF        tuya wifvoilfrqeo6hvu 8877821724a16014ef14 192.168.9.93 f3ac3693f76b2a96 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   8877821724a16014ef14
#   FHEMPYTYPE tuya
#   FUUID      63b40e2e-f33f-fd5f-a6fc-66b5fe95602f2212
#   IODev      local_pybinding
#   NAME       TUYA_JL35
#   NR         1736
#   PYTHONTYPE tuya
#   STATE      E: 0.192 kWh cP: 56.0 W
#   TYPE       fhempy
#   eventCount 79
#   READINGS:
#     2023-01-30 07:59:19   countdown_1     0.0
#     2023-02-23 12:37:33   cur_current     23.0
#     2023-02-23 12:37:18   cur_power       56.0
#     2023-02-23 12:37:13   cur_voltage     233.4
#     2023-01-30 07:59:19   dp_07           0
#     2023-02-23 12:36:53   energy          0.192
#     2023-02-23 12:27:45   online          1
#     2023-02-23 12:27:59   state           on
#     2023-02-23 09:28:26   switch_1        on
#   args:
#     TUYA_JL35
#     fhempy
#     tuya
#     wifvoilfrqeo6hvu
#     8877821724a16014ef14
#     192.168.9.93
#     f3ac3693f76b2a96
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate TUYA_JL35 E: 0.192 kWh cP: 56.0 W
setstate TUYA_JL35 2023-01-30 07:59:19 countdown_1 0.0
setstate TUYA_JL35 2023-02-23 12:37:33 cur_current 23.0
setstate TUYA_JL35 2023-02-23 12:37:18 cur_power 56.0
setstate TUYA_JL35 2023-02-23 12:37:13 cur_voltage 233.4
setstate TUYA_JL35 2023-01-30 07:59:19 dp_07 0
setstate TUYA_JL35 2023-02-23 12:36:53 energy 0.192
setstate TUYA_JL35 2023-02-23 12:27:45 online 1
setstate TUYA_JL35 2023-02-23 12:27:59 state on
setstate TUYA_JL35 2023-02-23 09:28:26 switch_1 on

[/code]

cur_power ist um Faktor 10 zu hoch

JL04 ist ok

JL05,06,07

haben kein reading "energy"

@dominik , das müsstest du nachvollziehen können ;-)


Titel: Antw:fhempy: tuya (lokal)
Beitrag von: stefanru am 23 Februar 2023, 16:26:03
Hi Tomas,

bei meinen Steckdosen sieht das so aus:
cur_current 440.0 2023-02-23 16:20:47
cur_power    86.1 2023-02-23 16:20:47
cur_voltage 230.1 2023-02-23 16:20:47

Das passt eigentlich.
Sicher das die Readings zur selben Zeit gezogen wurden?
Dein cur_current kommt mir wenig vor. Das wären gerade mal 5 Watt.

auch denke ich die Readings kommen direkt von tuya und Dominik macht da nix dran.
Nur das neue Reading berechnet er.

Ich verwende Summen Power readings auch vom Smart Meter mit DB funktionen.
Ist jetzt vom Smart Meter aber ist hier auch anwendbar:
my $periodeStefanKW = $totalStefanKW - DbReadingsVal("logdbRep","stefan.stromzaehler:total_consumption",$startDateStefan,"no Value from DB");;

So kannst du den Wert zu einem Datum auslesen, hier startDateStefan und dann zu jetzt berechnen. Oder start date ist genau 30 Tage vor heute, usw.

Gruß,
Stefan
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 23 Februar 2023, 16:38:09
Zitat von: stefanru am 23 Februar 2023, 16:26:03
Hi Tomas,

bei meinen Steckdosen sieht das so aus:
cur_current 440.0 2023-02-23 16:20:47
cur_power    86.1 2023-02-23 16:20:47
cur_voltage 230.1 2023-02-23 16:20:47

Das passt eigentlich.

Hi Stefan ,
Dominik schrieb ja gestern Abend:

Zitatenergy Reading ist nun integriert. Dabei wird cur_power herangezogen und mit folgender Formel berechnet
energy = energy + (aktuelle Zeit - letzte Messung) * (letzte Messung + aktuelle Messung)/2 /(3600 * 1000)

Dieses neue Reading ist bei mir allerdings nur auf ein paar Gosund Steckdosen JLxx verfügbar.

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: stefanru am 23 Februar 2023, 17:54:15
Hi Thomas,

ja genau das neue Reading energy wird ja bei local devices angelegt die ein CUR_POWER haben.
Bei mir hat das geklappt alle meine Steckdosen die auch CUR_POWER liefern in local haben das neue Reading.

Siehe:
cur_current 377.0       2023-02-23 17:49:42
cur_power    71.0       2023-02-23 17:49:42
cur_voltage 227.9       2023-02-23 17:49:42
energy        0.892       2023-02-23 17:50:07

Seit gestern Abend hat mein PC, Bildschirm usw knapp 1 KW gezogen ;-)

Ich bin jetzt eher darauf eingegangen das du sagtest cur_power stimmt nicht. Bei mir kommt es hin, kein Faktor 10 und ich hatte Dominik so verstanden dass er ENERGY aus CUR_POWER berechnet. Und CUR_POWER kommt direkt vom Device. Das wird eigentlich denke ich nicht bearbeitet.
Das kann ich z.B. auch in den Werten der Cloud sehen. Auch noch vor FHEM, also im TUYA Cloud Viewer.

Hast du den Faktor 10 denn auch in der Handy App von TUYA?

Gruß,
Stefan





Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 23 Februar 2023, 17:57:06
Zuerst einmal das List mit allen Readings vom Schlafzimmerventilator:
Internals:
   CFGFN     
   DEF        tuya 6awobc9jfnlwvqtw bf75378cf6e13718e0rvcj 192.168.178.169 7ada5a7cbf4a78e8 3.3 asfg5sj9aurr9nib73fx fc553d7a6bfa4a569bc69ed2aa6924ed
   DEVICEID   bf75378cf6e13718e0rvcj
   FHEMPYTYPE tuya
   FUUID      63eab589-f33f-7706-2293-af83091afa968b90
   IODev      fhempy_local
   NAME       tuya_local_bf75378cf6e13718e0rvcj
   NR         69512
   PYTHONTYPE tuya
   STATE      on
   TYPE       fhempy
   eventCount 271
   READINGS:
     2023-02-13 23:11:22   active_time     1654518995
     2023-02-13 23:11:22   biz_type        18
     2023-02-13 23:11:22   category        fs
     2023-02-13 23:11:22   create_time     1627922506
     2023-02-23 17:45:43   dp_02           close
     2023-02-23 17:49:59   dp_101          8
     2023-02-23 17:36:06   dp_102          0
     2023-02-23 17:45:51   dp_105          close
     2023-02-23 17:36:09   dp_106          62
     2023-02-23 17:37:03   dp_13           0
     2023-02-23 17:46:24   dp_22           cancel
     2023-02-23 17:46:24   dp_23           0
     2023-02-13 23:11:22   icon            smart/icon/bay1579257011827QOvk/05cb05801c69fa7b6bdacda9c7f21196.png
     2023-02-13 23:11:22   id              bf75378cf6e13718e0rvcj
     2023-02-13 23:11:22   ip              88.153.83.160
     2023-02-13 23:11:22   lat             51.0583
     2023-02-13 23:11:22   local_key       7ada5a7cbf4a78e8
     2023-02-13 23:11:22   lon             6.1030
     2023-02-13 23:11:22   name            Schlafzimmerventilator
     2023-02-13 23:11:22   online          1
     2023-02-13 23:11:22   owner_id        23921647
     2023-02-13 23:11:22   product_id      6awobc9jfnlwvqtw
     2023-02-13 23:11:22   product_name    ARC Humidifier
     2023-02-23 17:32:59   state           on
     2023-02-13 23:11:22   sub             0
     2023-02-13 23:11:22   switch          on
     2023-02-23 17:39:22   switch_horizontal off
     2023-02-13 23:11:22   time_zone       +02:00
     2023-02-13 23:11:22   uid             eu1610479166063muAw8
     2023-02-13 23:11:22   update_time     1654518998
     2023-02-13 23:11:22   uuid            fd0c8a9f78a36684
   args:
     tuya_local_bf75378cf6e13718e0rvcj
     fhempy
     tuya
     6awobc9jfnlwvqtw
     bf75378cf6e13718e0rvcj
     192.168.178.169
     7ada5a7cbf4a78e8
     3.3
     asfg5sj9aurr9nib73fx
     fc553d7a6bfa4a569bc69ed2aa6924ed
   argsh:
Attributes:
   alias      Schlafzimmerventilator
   cmdIcon    on:general_an off:general_aus
   devStateIcon aus:ios-off:an an:ios-on-blue:aus off:ios-off:on on:ios-on-green:off
   dp_01      switch
   group      Geräte
   icon       Ventilator_fett
   room       Wohnung->Schlafzimmer,fhempy
   tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}, 'desc': 'fan speed percent'}, {'code': 'switch_horizontal', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'switch horizontal'}]
   tuya_spec_status [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}}, {'code': 'switch_horizontal', 'dp_id': 5, 'type': 'Boolean', 'values': {}}]
   webCmd     : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :on:off


Zusätzlich auch ein Screenshot der Weboberfläche. Ist das mit dem Text "Switch" unterhalb des Set-Befehls richtig so?

Außerdem die gewünschte Tabelle. Hoffe es ist selbsterklärend. Was wie gesagt an Readings noch komplett fehlt ist die Angabe des "Fan-Speed" in 1er Stufen von 1-9, so wie es in den Attributen auch drin steht. Wäre natürlich ebenfalls als Funktion zu konzipieren.
Wurde früher über das Tuya-Cloud-Modul auch angezeigt und war einstellbar. Nur als Hinweis.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 23 Februar 2023, 18:02:47
[code]define TUYA_JL35 f

setstate TUYA_JL35 E: 0.491 kWh cP: 56.0 W
setstate TUYA_JL35 2023-01-30 07:59:19 countdown_1 0.0
setstate TUYA_JL35 2023-02-23 17:56:57 cur_current 24.0
setstate TUYA_JL35 2023-02-23 17:57:02 cur_power 56.0
setstate TUYA_JL35 2023-02-23 17:56:17 cur_voltage 232.0
setstate TUYA_JL35 2023-01-30 07:59:19 dp_07 0
setstate TUYA_JL35 2023-02-23 17:56:52 energy 0.491
setstate TUYA_JL35 2023-02-23 12:27:45 online 1
setstate TUYA_JL35 2023-02-23 12:27:59 state on
setstate TUYA_JL35 2023-02-23 09:28:26 switch_1 on

[/code]
Hi Stefan,

so siehts bei meinem GL 1800X-Router aus. 56 Watt aktuell. Habe riesen Schreck gekriegt. In der App sind es plausible 5,6 Watt :-)

im Übrigen muss man die Devices wohl zum Update anregen und zwar durch ein/ausschalten.

Also nur das faktor 10 Problem bei cur_power bleibt.

Viele Grüße

Thomas
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: stefanru am 23 Februar 2023, 18:35:56
Ok,

das ist ja interessant, meine Steckdosen passen.
Scheint wohl auch Modell abhängig zu sein.
Dann muss wohl Dominik was zu sagen.

Gruß,
Stefan
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 23 Februar 2023, 19:20:30
Zitat von: stefanru am 23 Februar 2023, 16:26:03
Ich verwende Summen Power readings auch vom Smart Meter mit DB funktionen.
Ist jetzt vom Smart Meter aber ist hier auch anwendbar:
my $periodeStefanKW = $totalStefanKW - DbReadingsVal("logdbRep","stefan.stromzaehler:total_consumption",$startDateStefan,"no Value from DB");;

So kannst du den Wert zu einem Datum auslesen, hier startDateStefan und dann zu jetzt berechnen. Oder start date ist genau 30 Tage vor heute, usw.


hi Stefan, das war mir zu hoch ;-)

ist das in GPLOT?

da ich  ja nun energy habe und in die dblog schreibe, suche ich eine tabellarische und graphische Darstellung der Tabelle in der Form

Device   - Verbrauch Gesamt - Verbrauch 2023-01 - Verbrauch 2023-02  usw. usw
-------------------------------------------------------------------------------------------------

JL36        TUYA_JL36 energy       berechnet            berechnet
JL37
JL38
.
.
.

____________________________________________________________________________
Also wie in der App horizontal statt vertikal

geht das in GPLOT?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: stefanru am 23 Februar 2023, 20:33:43
Hi Thomas,

das war auch ohne Background von mir ;-)
Das ist eine Berechnung für meinen Stromzähler in einem User Reading:
my $periodeStefanKW = $totalStefanKW - DbReadingsVal("logdbRep","stefan.stromzaehler:total_consumption",$startDateStefan,"no Value from DB");;

Auf jeden fall mit deinem DBLOG_REP wie hier unter "Praxisbeispiele / Hinweise und Lösungsansätze für verschiedene Aufgaben" beschrieben bekommst du in FHEM Tabellen mit z.B. Monatsverbräuchen.
https://wiki.fhem.de/wiki/DbRep_-_Reporting_und_Management_von_DbLog-Datenbankinhalten

Ich glaube da geht auch was im GPLOT direkt, aber da habe ich gerade nichts das ich benutze.

Gruß,
Stefan
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 23 Februar 2023, 23:11:39
Zitat von: thburkhart am 23 Februar 2023, 10:25:02

@Dominik,

super ! Vielen Dank!
in "energy" wird also ganz schlich aufsummiert und wir können den Monatsverbrauch mittels dblog/gplot selbst ermitteln und darstellen.
Muss ich gleich mal ausprobieren.
Als erstes muss ich energy mit dbloginclude in die Datenbank aufnehmen.

Wäre es für dich auch machbar analog zu SmartLife die Monate separat aufzunehmen:

energy   = Verbrauch von Start ab   "total"
energy_2302 Verbrauch 01.02.23 bis 28.02.23
energy_2303 Verbrauch 01.03.23 bis 31.03.23
energy_2304  usw.

dann hätte man das sofort im Überblick.

@all
oder wie macht ihr das?


Herzlicher Dank an Dominik für das suptertolle und stabile Modul

Viele Grüße

Thomas

define stat statistics DEVICENAME

Danach erhältst du im Device DEVICENAME stateEnergy Readings wo du Stunde, Tag, etc. Infos erhälst.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 23 Februar 2023, 23:18:43
Zitat von: thburkhart am 23 Februar 2023, 12:43:12
ich habe nun begonnen, energy zu testen:hier mein JL35
[code]define TUYA_JL35 fhempy tuya wifvoilfrqeo6hvu 8877821724a16014ef14 192.168.9.93 f3ac3693f76b2a96 3.30
attr TUYA_JL35 DbLogExclude .*
attr TUYA_JL35 alias JL35 GL AXT1800
attr TUYA_JL35 dp_01 switch_1
attr TUYA_JL35 dp_02 countdown_1
attr TUYA_JL35 dp_03 add_ele
attr TUYA_JL35 dp_04 cur_current
attr TUYA_JL35 dp_05 cur_power
attr TUYA_JL35 dp_06 cur_voltage
attr TUYA_JL35 group Schalter (T)
attr TUYA_JL35 room -TUYA
attr TUYA_JL35 stateFormat E: energy kWh cP: cur_power W
attr TUYA_JL35 tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '秒', 'max': 86400, 'step': 1}, 'desc': 'countdown 1'}]
attr TUYA_JL35 tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '秒', 'max': 86400, 'step': 1}}, {'code': 'add_ele', 'dp_id': 3, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '度', 'max': 500000, 'step': 100}}, {'code': 'cur_current', 'dp_id': 4, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'mA', 'max': 30000, 'step': 1}}, {'code': 'cur_power', 'dp_id': 5, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'W', 'max': 50000, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 6, 'type': 'Integer', 'values': {'min': 0, 'unit': 'V', 'scale': 0, 'max': 2500, 'step': 1}}]
#   DEF        tuya wifvoilfrqeo6hvu 8877821724a16014ef14 192.168.9.93 f3ac3693f76b2a96 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   8877821724a16014ef14
#   FHEMPYTYPE tuya
#   FUUID      63b40e2e-f33f-fd5f-a6fc-66b5fe95602f2212
#   IODev      local_pybinding
#   NAME       TUYA_JL35
#   NR         1736
#   PYTHONTYPE tuya
#   STATE      E: 0.192 kWh cP: 56.0 W
#   TYPE       fhempy
#   eventCount 79
#   READINGS:
#     2023-01-30 07:59:19   countdown_1     0.0
#     2023-02-23 12:37:33   cur_current     23.0
#     2023-02-23 12:37:18   cur_power       56.0
#     2023-02-23 12:37:13   cur_voltage     233.4
#     2023-01-30 07:59:19   dp_07           0
#     2023-02-23 12:36:53   energy          0.192
#     2023-02-23 12:27:45   online          1
#     2023-02-23 12:27:59   state           on
#     2023-02-23 09:28:26   switch_1        on
#   args:
#     TUYA_JL35
#     fhempy
#     tuya
#     wifvoilfrqeo6hvu
#     8877821724a16014ef14
#     192.168.9.93
#     f3ac3693f76b2a96
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate TUYA_JL35 E: 0.192 kWh cP: 56.0 W
setstate TUYA_JL35 2023-01-30 07:59:19 countdown_1 0.0
setstate TUYA_JL35 2023-02-23 12:37:33 cur_current 23.0
setstate TUYA_JL35 2023-02-23 12:37:18 cur_power 56.0
setstate TUYA_JL35 2023-02-23 12:37:13 cur_voltage 233.4
setstate TUYA_JL35 2023-01-30 07:59:19 dp_07 0
setstate TUYA_JL35 2023-02-23 12:36:53 energy 0.192
setstate TUYA_JL35 2023-02-23 12:27:45 online 1
setstate TUYA_JL35 2023-02-23 12:27:59 state on
setstate TUYA_JL35 2023-02-23 09:28:26 switch_1 on

[/code]

cur_power ist um Faktor 10 zu hoch

JL04 ist ok

JL05,06,07

haben kein reading "energy"

@dominik , das müsstest du nachvollziehen können ;-)

Ist schade, dass tuya da bei manchen Werte falsche Specs liefert. Ich habe cur_power "korrigiert".

energy kommt erst wenn cur_power > 0. Vielleicht ist das noch nicht der Fall?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 23 Februar 2023, 23:27:17
Zitat von: Superposchi am 23 Februar 2023, 17:57:06
Zuerst einmal das List mit allen Readings vom Schlafzimmerventilator:
Internals:
   CFGFN     
   DEF        tuya 6awobc9jfnlwvqtw bf75378cf6e13718e0rvcj 192.168.178.169 7ada5a7cbf4a78e8 3.3 asfg5sj9aurr9nib73fx fc553d7a6bfa4a569bc69ed2aa6924ed
   DEVICEID   bf75378cf6e13718e0rvcj
   FHEMPYTYPE tuya
   FUUID      63eab589-f33f-7706-2293-af83091afa968b90
   IODev      fhempy_local
   NAME       tuya_local_bf75378cf6e13718e0rvcj
   NR         69512
   PYTHONTYPE tuya
   STATE      on
   TYPE       fhempy
   eventCount 271
   READINGS:
     2023-02-13 23:11:22   active_time     1654518995
     2023-02-13 23:11:22   biz_type        18
     2023-02-13 23:11:22   category        fs
     2023-02-13 23:11:22   create_time     1627922506
     2023-02-23 17:45:43   dp_02           close
     2023-02-23 17:49:59   dp_101          8
     2023-02-23 17:36:06   dp_102          0
     2023-02-23 17:45:51   dp_105          close
     2023-02-23 17:36:09   dp_106          62
     2023-02-23 17:37:03   dp_13           0
     2023-02-23 17:46:24   dp_22           cancel
     2023-02-23 17:46:24   dp_23           0
     2023-02-13 23:11:22   icon            smart/icon/bay1579257011827QOvk/05cb05801c69fa7b6bdacda9c7f21196.png
     2023-02-13 23:11:22   id              bf75378cf6e13718e0rvcj
     2023-02-13 23:11:22   ip              88.153.83.160
     2023-02-13 23:11:22   lat             51.0583
     2023-02-13 23:11:22   local_key       7ada5a7cbf4a78e8
     2023-02-13 23:11:22   lon             6.1030
     2023-02-13 23:11:22   name            Schlafzimmerventilator
     2023-02-13 23:11:22   online          1
     2023-02-13 23:11:22   owner_id        23921647
     2023-02-13 23:11:22   product_id      6awobc9jfnlwvqtw
     2023-02-13 23:11:22   product_name    ARC Humidifier
     2023-02-23 17:32:59   state           on
     2023-02-13 23:11:22   sub             0
     2023-02-13 23:11:22   switch          on
     2023-02-23 17:39:22   switch_horizontal off
     2023-02-13 23:11:22   time_zone       +02:00
     2023-02-13 23:11:22   uid             eu1610479166063muAw8
     2023-02-13 23:11:22   update_time     1654518998
     2023-02-13 23:11:22   uuid            fd0c8a9f78a36684
   args:
     tuya_local_bf75378cf6e13718e0rvcj
     fhempy
     tuya
     6awobc9jfnlwvqtw
     bf75378cf6e13718e0rvcj
     192.168.178.169
     7ada5a7cbf4a78e8
     3.3
     asfg5sj9aurr9nib73fx
     fc553d7a6bfa4a569bc69ed2aa6924ed
   argsh:
Attributes:
   alias      Schlafzimmerventilator
   cmdIcon    on:general_an off:general_aus
   devStateIcon aus:ios-off:an an:ios-on-blue:aus off:ios-off:on on:ios-on-green:off
   dp_01      switch
   group      Geräte
   icon       Ventilator_fett
   room       Wohnung->Schlafzimmer,fhempy
   tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}, 'desc': 'fan speed percent'}, {'code': 'switch_horizontal', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'switch horizontal'}]
   tuya_spec_status [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}}, {'code': 'switch_horizontal', 'dp_id': 5, 'type': 'Boolean', 'values': {}}]
   webCmd     : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :on:off


Zusätzlich auch ein Screenshot der Weboberfläche. Ist das mit dem Text "Switch" unterhalb des Set-Befehls richtig so?

Außerdem die gewünschte Tabelle. Hoffe es ist selbsterklärend. Was wie gesagt an Readings noch komplett fehlt ist die Angabe des "Fan-Speed" in 1er Stufen von 1-9, so wie es in den Attributen auch drin steht. Wäre natürlich ebenfalls als Funktion zu konzipieren.
Wurde früher über das Tuya-Cloud-Modul auch angezeigt und war einstellbar. Nur als Hinweis.

Hier nun der Hinweis wie du das selbst umsetzen kannst was in der Tabelle steht:

dp_02         Modus         Funktion und Info      sleep/fresh/strong/auto/close
anhand der Werte erkennt man, dass es ein Enum ist, also eine Aufzählung unterschiedlicher Strings

{'code': 'modus', 'dp_id': 2, 'type': 'Enum', 'values': '{"range":["sleep","fresh","strong", "auto", "close"]}', 'desc': 'modus'}
das fügst du in status und function ein, dann solltest du es setzen können und den aktuellen Wert im Reading modus sehen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 24 Februar 2023, 10:07:15
Zitat von: dominik am 23 Februar 2023, 23:18:43
Ist schade, dass tuya da bei manchen Werte falsche Specs liefert. Ich habe cur_power "korrigiert".

energy kommt erst wenn cur_power > 0. Vielleicht ist das noch nicht der Fall?

ich habe es nun irgendwie hingekriegt, dass alle Stecker nun mal ein energy. Reading gekriegt haben. Bis auf eines:

[code]define TUYA_SP04 fhempy tuya IGzCi97RpN2Lf9cu 045074212462ab24e988 192.168.9.34

attr TUYA_SP04 DbLogInclude energy,cur_power
attr TUYA_SP04 alias SP04 Spuelmaschine
attr TUYA_SP04 dp_01 switch_1
attr TUYA_SP04 dp_09 countdown_1
attr TUYA_SP04 dp_17 add_ele
attr TUYA_SP04 dp_18 cur_current
attr TUYA_SP04 dp_19 cur_power
attr TUYA_SP04 dp_20 cur_voltage
attr TUYA_SP04 event-min-interval .*:300
attr TUYA_SP04 group Schalter (T),Schalter Strommessung
attr TUYA_SP04 room -TUYA
attr TUYA_SP04 stateFormat E: energy kWh cP: cur_power W cV: cur_voltage V
attr TUYA_SP04 tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}]
attr TUYA_SP04 tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'add_ele', 'dp_id': 17, 'type': 'Integer', 'values': {'unit': '', 'min': 0, 'max': 50000, 'scale': 3, 'step': 100}}, {'code': 'cur_current', 'dp_id': 18, 'type': 'Integer', 'values': {'unit': 'mA', 'min': 0, 'max': 30000, 'scale': 0, 'step': 1}}, {'code': 'cur_power', 'dp_id': 19, 'type': 'Integer', 'values': {'unit': 'W', 'min': 0, 'max': 50000, 'scale': 1, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 20, 'type': 'Integer', 'values': {'unit': 'V', 'min': 0, 'max': 5000, 'scale': 1, 'step': 1}}]
#   DEF        tuya IGzCi97RpN2Lf9cu 045074212462ab24e988 192.168.9.34 6e637c2cfed441d8 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   045074212462ab24e988
#   FHEMPYTYPE tuya
#   FUUID      639f5053-f33f-fd5f-fbb4-5bcbd31a3c49c916
#   IODev      local_pybinding
#   NAME       TUYA_SP04
#   NR         1772
#   PYTHONTYPE tuya
#   STATE      E: energy kWh cP: cur_power W cV: cur_voltage V
#   TYPE       fhempy
#   eventCount 2
#   READINGS:
#     2023-02-24 09:58:14   online          1
#     2023-02-24 09:58:14   state           ready
#   args:
#     TUYA_SP04
#     fhempy
#     tuya
#     IGzCi97RpN2Lf9cu
#     045074212462ab24e988
#     192.168.9.34
#     6e637c2cfed441d8
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate TUYA_SP04 E: energy kWh cP: cur_power W cV: cur_voltage V
setstate TUYA_SP04 2023-02-24 09:58:14 online 1
setstate TUYA_SP04 2023-02-24 09:58:14 state ready

[/code]

Das ist die Spülmaschine. Über App kann ich sie schalten; nicht aber über FHEM. Liedfert keine readings

Wie bei alle anderen SP-Steckdosen wird kein Event erzeugt und somit nichts in die DB geschrieben.

Woran könnte das liegen ?

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 24 Februar 2023, 10:21:23
Ist die IP weiterhin korrekt oder hat die Steckdose vllt eine andere bekommen?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 24 Februar 2023, 13:06:39
Zitat von: dominik am 24 Februar 2023, 10:21:23
Ist die IP weiterhin korrekt oder hat die Steckdose vllt eine andere bekommen?

ja die IP stimmt und die MAC
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 24 Februar 2023, 13:29:32
hmm

allerdings sehe ich eben fhempy log:

2023-02-24 13:18:50,125 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:18:55,138 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:18:57,739 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:19:00,153 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:19:05,165 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:19:07,753 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:19:10,176 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:19:15,189 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:19:17,765 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:19:20,201 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:19:25,215 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:19:27,778 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:19:30,226 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:19:35,239 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:19:37,789 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:19:40,256 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:19:45,281 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:19:47,802 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 13:19:48,381 - WARNING  - asyncio: socket.send() raised exception.

und das seit Mitternacht
und nach fhme shutdown restart:

2023-02-24 13:22:47,059 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.606...
2023-02-24 13:22:47,063 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-02-24 13:22:47,103 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-02-24 13:22:54,984 - INFO     - websockets.server: connection open
2023-02-24 13:22:54,985 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-02-24 13:23:13,088 - ERROR    - TUYA_STF3: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 547, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 442, in _create_cloudmapping_dev
    await self.retrieve_tuya_specs()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 417, in retrieve_tuya_specs
    spec = await self.get_tuya_dev_specification()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 371, in get_tuya_dev_specification
    return resp["result"]
KeyError: 'result'
TUYA_STF3 ist ein Flächenschalter, der noch in der Schublade liegt

und die Fhem.log:

023.02.24 13:22:20 2: DbLog dblog_THB - Wait for last database cycle due to shutdown ...
2023.02.24 13:22:20 1: Server shutdown delayed due to dblog_THB,alexa for max 10 sec
2023.02.24 13:22:20 2: DbLog dblog_THB - Last database write cycle done
2023.02.24 13:22:22 3: alexa: read: end of file reached while sysread
2023.02.24 13:22:22 3: alexa: stopped
2023.02.24 13:22:22 0: Server shutdown
2023.02.24 13:22:22 2: DbLog dblog_THB - stopping SubProcess PID >5643< ...
2023.02.24 13:22:22 2: DbLog dblog_THB - SubProcess PID >5643< stopped
2023.02.24 13:22:23 1: Including fhem.cfg
2023.02.24 13:22:24 2: DbLog dblog_THB - Subprocess >7578< initialized ... ready for non-blocking operation
2023.02.24 13:22:25 3: telnetPort: port 7072 opened
2023.02.24 13:22:25 3: WEB: port 8083 opened
2023.02.24 13:22:25 3: WEBphone: port 8084 opened
2023.02.24 13:22:25 3: WEBtablet: port 8085 opened
2023.02.24 13:22:25 3: TelegramBot_Define TelegramBotTHB: called
2023.02.24 13:22:26 3: BindingsIo v1.0.1
2023.02.24 13:22:26 3: fhempyServer v1.0.0
2023.02.24 13:22:26 3: fhempy v1.0.0 (tuya_cloud: TUYA)
2023.02.24 13:22:26 3: fhempy v1.0.0 (tuya: tuya_system)
2023.02.24 13:22:26 3: Opening CUL_0 device /dev/ttyACM0
2023.02.24 13:22:26 3: Setting CUL_0 serial parameters to 9600,8,N,1
2023.02.24 13:22:26 3: CUL_0: Possible commands: BbCFiAZNkGMKUYRTVWXefmLltux
2023.02.24 13:22:26 3: CUL_0 device opened
2023.02.24 13:22:26 2: Switched CUL_0 rfmode to MAX
2023.02.24 13:22:26 3: Opening JLLaCR device /dev/ttyUSB0
2023.02.24 13:22:26 3: Setting JLLaCR serial parameters to 57600,8,N,1
2023.02.24 13:22:27 3: JLLaCR device opened
2023.02.24 13:22:27 1: PERL WARNING: Use of uninitialized value in numeric ge (>=) at ./FHEM/12_OilFox.pm line 387, <$fh> line 570.
2023.02.24 13:22:27 2: LOGIN TOKEN MISSING OR EXPIRED
2023.02.24 13:22:27 3: myOilFox - email set to bkt@gmx.net
2023.02.24 13:22:27 3: myOilFox - set interval: 36000
2023.02.24 13:22:27 3: myOilFox - password set to thbbkt25
2023.02.24 13:22:27 3: powerfox: Defined with URL https://bkt%40gmx.net:thbbkt25@backend.powerfox.energy/api/2.0/my/246f283cfeac/current and interval 60 featurelevel 6.2
2023.02.24 13:22:43 2: eventTypes: loaded 16487 lines from ./log/eventTypes.txt
2023.02.24 13:22:43 3: TX29_00: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_01: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_02: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_03: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_04: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_05: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_06: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_07: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_08: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_09: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_10: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_11: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_12: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX25IT_13: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_14: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_15: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_16: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_17: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_18: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_19: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_20: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_21: I/O device is JLLaCR
2023.02.24 13:22:43 3: TX29DTH_22: I/O device is JLLaCR
2023.02.24 13:22:43 3: HUEDevice2: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice4: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice5: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice6: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice7: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice8: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice10: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice17: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice18: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice19: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice20: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice22: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice23: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice24: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice25: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice27: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice28: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice29: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice30: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice31: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice32: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice33: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice38: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice39: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice40: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice41: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup0: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup1: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup2: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup3: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup4: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup5: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup6: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup7: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup8: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup9: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup10: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup11: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup12: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup13: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup14: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup15: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup16: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup17: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup18: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup19: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup20: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup21: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup22: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup23: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup24: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup25: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup26: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup27: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup28: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup29: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup30: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice44: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEGroup31: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUESensor6: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUESensor8: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUESensor10: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUESensor13: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUESensor24: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUESensor27: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUESensor34: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUESensor37: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUESensor45: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice45: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice46: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice47: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice48: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice49: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice50: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice51: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUESensor91: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUESensor110: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUESensor1: I/O device is hueBridge1
2023.02.24 13:22:43 3: HUEDevice52: I/O device is hueBridge1
2023.02.24 13:22:43 1: MaxTemp: WT
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_BULB01)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_BULB02)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya_cloud: TUYA_BULB03)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera1)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera2)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera3)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera4)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera5)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera6)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_DIY1)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_DIY3)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_DIY4)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_EMYLO1)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_EMYLO2)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_EMYLOD2)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_EMYLO3)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_EMYLO4)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL02)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL03)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL04)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL05)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL06)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL07)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL08)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL09)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL10Z)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL11Z)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL12Z)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL13)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL14)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL15)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL16)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL17)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL18)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya_cloud: TUYA_JL19)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL20)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL21)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL22)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL23)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL24)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya_cloud: TUYA_JL25)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL26)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL27)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL28)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL29)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL30)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL31)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL32)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL33)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL34)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL35)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_JL36)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_PS1)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_PS2)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_PS3)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_PS4)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_PS5)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_PS7)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_SCHF1)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_SCHF2)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_SCHF3)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya_cloud: TUYA_SCHFF4)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_SP01)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_SP02)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_SP03)
2023.02.24 13:22:44 3: fhempy v1.0.0 (tuya: TUYA_SP04)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya: TUYA_SP05)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya: TUYA_SP06)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya: TUYA_SP07)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya: TUYA_SP08)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya: TUYA_SP09)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya: TUYA_SP10)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya: TUYA_SP11)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya: TUYA_SP12)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya: TUYA_SP13)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya: TUYA_SP14)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya: TUYA_SP15)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya: TUYA_SP16)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_PIR01)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_PIR02)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_PIR03)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT01)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT02)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT03)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT04)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT05)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorW01)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorW02)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorW03)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorW04)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Sir01)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Sir02)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Sir03)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Relais01)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorSmoke01)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya: TUYA_STF1)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya: TUYA_STF2)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya: TUYA_STF3)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya: TUYA_MMG)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp01)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp02)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp03)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp04)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp05)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp06)
2023.02.24 13:22:45 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp07)
2023.02.24 13:22:45 1: PERL WARNING: Useless use of anonymous hash ({}) in void context at (eval 120) line 1, <$fh> line 6407.
2023.02.24 13:22:45 3: SST (SamsungSmartThingsConnector): define - CONNECTOR defined as SamsungSmartThingsConnector
2023.02.24 13:22:45 1: Including ./log/fhem.save
2023.02.24 13:22:45 1: Messages collected while initializing FHEM:SecurityCheck:
  WEB is not password protected
  WEBtablet is not password protected
  telnetPort is not password protected
  WEBphone is not password protected

Protect this FHEM installation by defining an allowed device with define allowed allowed
You can disable this message with attr global motd none

2023.02.24 13:22:46 2: alexa: starting alexa-fhem: /usr/local/bin/alexa-fhem -c ./alexa-fhem.cfg
2023.02.24 13:22:46 3: alexa: starting
2023.02.24 13:22:46 3: alexa: using logfile: ./log/alexa-2023-02-24.log
2023.02.24 13:22:46 2: hueBridge1: autocreate: created 0/0/0 devices (ignored 0/2/26)
2023.02.24 13:22:47 3: n_global_INITIALIZED return value: Unknown command <set, try help.
2023.02.24 13:22:48 2: alexa: starting alexa-fhem: /usr/local/bin/alexa-fhem -c ./alexa-fhem.cfg
2023.02.24 13:22:48 0: Featurelevel: 6.2
2023.02.24 13:22:48 0: Server started with 521 defined entities (fhem.pl:27110/2023-01-23 perl:5.032001 os:linux user:fhem pid:7577)
2023.02.24 13:22:48 3: DbLog dblog_THB - DB connection parameters are initialized in the SubProcess
2023.02.24 13:22:48 1: PERL WARNING: devspec2array *: Unknown verb pattern '' in regex; marked by <-- HERE in m/^(*) <-- HERE $/ at fhem.pl line 1352.
2023.02.24 13:22:48 1: PERL WARNING: ^* matches null string many times in regex; marked by <-- HERE in m/^* <-- HERE :.*RSSI.*$/ at ./FHEM/93_DbLog.pm line 1304.
2023.02.24 13:22:50 3: DbLog dblog_THB - DB connection parameters are stored in SubProcess
2023.02.24 13:22:51 3: alexa: read: end of file reached while sysread
2023.02.24 13:22:51 3: alexa: stopped
2023.02.24 13:22:51 2: alexa: starting alexa-fhem: /usr/local/bin/alexa-fhem -c ./alexa-fhem.cfg
2023.02.24 13:22:51 3: alexa: starting
2023.02.24 13:22:51 3: alexa: using logfile: ./log/alexa-2023-02-24.log
2023.02.24 13:22:52 2: AttrTemplates: got 258 entries
2023.02.24 13:22:55 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/10_BindingsIo.pm line 548.
2023.02.24 13:22:57 2: {"token_type":"Bearer","access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJiNmU5ZDg5Ni1kMzMwLTRiMWYtODVhNS0wYjk4NGQyZWJiMDQiLCJhdWQiOiJVU0VSIiwic2NvcGUiOiJDVVNUT01FUl9BUEkiLCJpc3MiOiJvaWxmb3guaW8iLCJleHAiOjE2NzcyNDIyNzUsImp0aSI6IjQ2NTMzNTk5LWMzMDgtNGY4MC05OGFhLWViZTYzNDQ4ZWQ1MSIsImVtYWlsIjoiYmt0QGdteC5uZXQifQ.-s-Hu0X_CkGOjrbxpO6s4xaXgxp7s-nHlwiKO6fQEokbqTwEZIJLAlYP0ZziXcYYxgDiM1-7d_-QR7CsLiuzVg","refresh_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzY29wZSI6IkNVU1RPTUVSX0FQSSIsImlzcyI6Im9pbGZveC5pbyIsImV4cCI6MTY3ODUzNzM3NSwianRpIjoiYzQxY2QzYjctZTE0MC00ODgyLTkzMDctZDdhNGZkZmVkMjUwIn0.1bMZjohmAUV0bTKtCEHzRbGy5YJc4Gh3Avh2fawl0zvS5lWKDBg3Z2Xi4fhlEuo_AIClEBcc9pAOm-fC22virA"}
2023.02.24 13:23:03 2: hueBridge1: http request failed: read from https://192.168.9.179:443 timed out
2023.02.24 13:23:17 2: hueBridge1: EventStream: event for unknown device received, trying to refresh resouces
2023.02.24 13:23:18 2: hueBridge1: autocreate: created 0/0/0 devices (ignored 0/2/26)
2023.02.24 13:23:19 3: DbLog dblog_THB - SubProcess connected to fhem


Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 24 Februar 2023, 13:51:39
Was sagt freezemon zu der Zeit?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 24 Februar 2023, 15:51:37
Zitat von: dominik am 24 Februar 2023, 13:51:39
Was sagt freezemon zu der Zeit?
nichts besonderes
inzwischen tauchen immer mehr JJs in der Datenbank auf:

TUYA_JL03 2729 cur_current 2023-02-23 16:15:11 FHEMPY cur_current: 207.0
TUYA_JL04 8709 cur_current 2023-02-23 11:11:01 FHEMPY cur_current: 28.0
TUYA_JL05 31 online 2023-02-23 11:10:26 FHEMPY online: 0
TUYA_JL07 23 energy 2023-02-23 17:49:03 FHEMPY energy: 0.0
TUYA_JL08 13 energy 2023-02-23 17:48:53 FHEMPY energy: 0.0
TUYA_JL20 4 energy 2023-02-24 07:04:44 FHEMPY energy: 1.184
TUYA_JL24 15 energy 2023-02-24 00:24:40 FHEMPY energy: 0.0
TUYA_JL26 1 energy 2023-02-24 07:31:09 FHEMPY energy: 0.002
TUYA_JL29 5 energy 2023-02-23 21:46:23 FHEMPY energy: 0.035
TUYA_JL30 10 energy 2023-02-24 09:21:21 FHEMPY energy: 11.011
TUYA_JL32 1 energy 2023-02-24 07:17:04 FHEMPY energy: 0.0
TUYA_JL33 6 energy 2023-02-23 21:14:03 FHEMPY energy: 0.0
TUYA_JL34 30 energy 2023-02-24 00:09:36 FHEMPY energy: 0.127
TUYA_JL35 125 energy 2023-02-23 20:40:52 FHEMPY energy: 0.639
TUYA_JL36 1 energy 2023-02-23 22:23:09 FHEMPY energy: 0.0


in der Devicelist kommen alle energy-Werte bis auf SP04

JL19 Heizkissen 2
on
off
JL20 Duravit Bidet
E: 1.753 kWh cP: 0.0 W cV: 230.1 V
on
off
JL21 Schnellkocher
E: energy kWh cP: 0.0 W cV: 0.0 V
on
off
JL22 frei
E: energy kWh cP: cur_power W cV: cur_voltage V
on
off
JL23 Heizdecke 2
E: energy kWh cP: cur_power W cV: cur_voltage V
on
off
JL24 USB Lader1 Bett
E: 0.453 kWh cP: 0.0 W cV: 229.3 V
on
off
JL25 USB Lader2 Thomas
E: 0.0 kWh cP: 69.0 W cV: 2277.0 V
on
off
JL26 USB Lader3 Thomas
E: 0.003 kWh cP: 0.0 W cV: 226.6 V
on
off
JL27 USB Lader4 Thomas
E: 0.001 kWh cP: 0.0 W cV: 226.6 V
on
off
JL28 Steckdose Garage 1
E: energy kWh cP: 0.0 W cV: 0.0 V
on
off
JL29 Leselampe 2
E: 0.172 kWh cP: 0.0 W cV: 229.0 V
on
off
JL30 Kaffeemaschine XELSIS
E: 21.804 kWh cP: 9.0 W cV: 232.1 V
on
off
JL31
E: energy kWh cP: 0.0 W cV: 224.0 V
on
off
JL32 Soundbar Wohnzimmer
E: 0.0 kWh cP: 0.0 W cV: 233.2 V
on
off
JL33 Schreibtisch Thomas
E: 0.086 kWh cP: 0.0 W cV: 0.0 V
on
off
JL34 Medien THOMAS
E: 4.956 kWh cP: 327.0 W cV: 230.6 V
on
off
JL35 GL AXT1800
E: 0.764 kWh cP: 0.0 W cV: 0.0 V
on
off
JL36 EX15 Fritzbox
E: 0.016 kWh cP: 0.0 W cV: 0.0 V
on
off
SP01 Waschmaschine
E: energy kWh cP: 0.0 W cV: 230.5 V
on
off
SP02 Kuehlschrank HWR
E: 3.968 kWh cP: 0.0 W cV: 227.9 V
on
off
SP03 Kuehlschrank Kueche
E: 0.543 kWh cP: 0.0 W cV: 212.1 V
on
off
SP04 Spuelmaschine
E: energy kWh cP: cur_power W cV: cur_voltage V
on
off
SP05 EX17
E: 0.195 kWh cP: 5.7 W cV: 210.7 V
on
off
SP06 Medien Wohnzimmer
E: 1.685 kWh cP: 0.0 W cV: 245.6 V
on
off
SP07 Garagenkeller
E: 0.109 kWh cP: 4.9 W cV: 224.0 V
on
off
SP08 Peugeot208
E: 26.008 kWh cP: 0.0 W cV: 225.9 V
on
off
SP09 Gartengrill
E: energy kWh cP: 0.0 W cV: 227.8 V
on
off
SP10 Medien Petra
E: 0.0 kWh cP: 0.0 W cV: 231.5 V
on
off
SP11 TH Ost
E: 0.771 kWh cP: 40.6 W cV: 229.9 V
on
off
SP12 TH Sued1
E: 1.286 kWh cP: 50.0 W cV: 229.5 V
on
off
SP13 TH Sued2 Schreibtisch
E: 1.087 kWh cP: 33.1 W cV: 228.0 V
on
off
SP14 PETRA SOst
E: 0.239 kWh cP: 6.2 W cV: 229.3 V
on
off
SP15 PETRA Bett
E: 0.152 kWh cP: 3.8 W cV: 227.6 V
on
off
SP16 TH West
E: 0.225 kWh cP: 7.8 W cV: 228.3 V
on
off[/code
Der SP04 ist aus derselben Charge wie SP01,SP02, SP04 (habe immer 4er-Packs gekauft)  übrigens sehr schaltstabil; an SP08 hängt das E-Auto zum laden
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 24 Februar 2023, 15:55:42
Bitte nicht zig Themen auf einmal ansprechen, sonst springen wir nur von einem zum nächsten und nix wird gelöst. Was soll jetzt gelöst werden?

Fokus SP4: Hat das Ding auch ein cur_power mit einem Wert >0?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 24 Februar 2023, 16:06:28
Zitat von: dominik am 24 Februar 2023, 15:55:42
Bitte nicht zig Themen auf einmal ansprechen, sonst springen wir nur von einem zum nächsten und nix wird gelöst. Was soll jetzt gelöst werden?

Fokus SP4: Hat das Ding auch ein cur_power mit einem Wert >0?

nein keine werte
nur per App

INFO:

[code]define TUYA_SP04 fhempy tuya IGzCi97RpN2Lf9cu 045074212462ab24e988 192.168.9.34 6e637c2cfed441d8 3.3
attr TUYA_SP04 DbLogInclude energy,cur_power
attr TUYA_SP04 alias SP04 Spuelmaschine
attr TUYA_SP04 dp_01 switch_1
attr TUYA_SP04 dp_09 countdown_1
attr TUYA_SP04 dp_17 add_ele
attr TUYA_SP04 dp_18 cur_current
attr TUYA_SP04 dp_19 cur_power
attr TUYA_SP04 dp_20 cur_voltage
attr TUYA_SP04 event-min-interval .*:300
attr TUYA_SP04 group Schalter (T),Schalter Strommessung
attr TUYA_SP04 room -TUYA
attr TUYA_SP04 stateFormat E: energy kWh cP: cur_power W cV: cur_voltage V
attr TUYA_SP04 tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}]
attr TUYA_SP04 tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'add_ele', 'dp_id': 17, 'type': 'Integer', 'values': {'unit': '', 'min': 0, 'max': 50000, 'scale': 3, 'step': 100}}, {'code': 'cur_current', 'dp_id': 18, 'type': 'Integer', 'values': {'unit': 'mA', 'min': 0, 'max': 30000, 'scale': 0, 'step': 1}}, {'code': 'cur_power', 'dp_id': 19, 'type': 'Integer', 'values': {'unit': 'W', 'min': 0, 'max': 50000, 'scale': 1, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 20, 'type': 'Integer', 'values': {'unit': 'V', 'min': 0, 'max': 5000, 'scale': 1, 'step': 1}}]
#   DEF        tuya IGzCi97RpN2Lf9cu 045074212462ab24e988 192.168.9.34 6e637c2cfed441d8 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   045074212462ab24e988
#   FHEMPYTYPE tuya
#   FUUID      639f5053-f33f-fd5f-fbb4-5bcbd31a3c49c916
#   IODev      local_pybinding
#   NAME       TUYA_SP04
#   NR         1772
#   PYTHONTYPE tuya
#   STATE      E: energy kWh cP: cur_power W cV: cur_voltage V
#   TYPE       fhempy
#   eventCount 2
#   READINGS:
#     2023-02-24 15:44:04   online          1
#     2023-02-24 15:44:04   state           ready
#   args:
#     TUYA_SP04
#     fhempy
#     tuya
#     IGzCi97RpN2Lf9cu
#     045074212462ab24e988
#     192.168.9.34
#     6e637c2cfed441d8
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate TUYA_SP04 E: energy kWh cP: cur_power W cV: cur_voltage V
setstate TUYA_SP04 2023-02-24 15:44:04 online 1
setstate TUYA_SP04 2023-02-24 15:44:04 state ready

[/code]

also nur state und online ist da

zum Vergleich SP03:

[code]define TUYA_SP03 fhempy tuya IGzCi97RpN2Lf9cu 260064612462ab24f164 192.168.9.33 b37a96597e2837b4 3.3
attr TUYA_SP03 DbLogExclude .*
attr TUYA_SP03 DbLogInclude energy
attr TUYA_SP03 alias SP03 Kuehlschrank Kueche
attr TUYA_SP03 dp_01 switch_1
attr TUYA_SP03 dp_09 countdown_1
attr TUYA_SP03 dp_17 add_ele
attr TUYA_SP03 dp_18 cur_current
attr TUYA_SP03 dp_19 cur_power
attr TUYA_SP03 dp_20 cur_voltage
attr TUYA_SP03 event-min-interval .*:300
attr TUYA_SP03 group Schalter (T),Schalter Strommessung
attr TUYA_SP03 room -TUYA
attr TUYA_SP03 stateFormat E: energy kWh cP: cur_power W cV: cur_voltage V
attr TUYA_SP03 tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}]
attr TUYA_SP03 tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'add_ele', 'dp_id': 17, 'type': 'Integer', 'values': {'unit': '', 'min': 0, 'max': 50000, 'scale': 3, 'step': 100}}, {'code': 'cur_current', 'dp_id': 18, 'type': 'Integer', 'values': {'unit': 'mA', 'min': 0, 'max': 30000, 'scale': 0, 'step': 1}}, {'code': 'cur_power', 'dp_id': 19, 'type': 'Integer', 'values': {'unit': 'W', 'min': 0, 'max': 50000, 'scale': 1, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 20, 'type': 'Integer', 'values': {'unit': 'V', 'min': 0, 'max': 5000, 'scale': 1, 'step': 1}}]
#   DEF        tuya IGzCi97RpN2Lf9cu 260064612462ab24f164 192.168.9.33 b37a96597e2837b4 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   260064612462ab24f164
#   FHEMPYTYPE tuya
#   FUUID      63a21338-f33f-fd5f-880d-8677bdc30df59441
#   IODev      local_pybinding
#   NAME       TUYA_SP03
#   NR         1770
#   PYTHONTYPE tuya
#   STATE      E: 0.543 kWh cP: 0.0 W cV: 212.1 V
#   TYPE       fhempy
#   eventCount 3
#   READINGS:
#     2023-01-30 08:00:12   countdown_1     0.0
#     2023-02-24 09:23:41   cur_current     0.0
#     2023-02-24 09:23:41   cur_power       0.0
#     2023-02-24 15:43:50   cur_voltage     212.1
#     2023-01-30 08:00:12   dp_21           2
#     2023-01-30 08:00:12   dp_22           0
#     2023-01-30 08:00:12   dp_23           0
#     2023-01-30 08:00:12   dp_24           0
#     2023-01-30 08:00:12   dp_25           0
#     2023-02-24 09:23:28   energy          0.543
#     2023-02-24 15:43:50   online          1
#     2023-02-24 15:44:08   state           off
#     2023-02-24 09:42:57   switch_1        off
#   args:
#     TUYA_SP03
#     fhempy
#     tuya
#     IGzCi97RpN2Lf9cu
#     260064612462ab24f164
#     192.168.9.33
#     b37a96597e2837b4
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate TUYA_SP03 E: 0.543 kWh cP: 0.0 W cV: 212.1 V
setstate TUYA_SP03 2023-01-30 08:00:12 countdown_1 0.0
setstate TUYA_SP03 2023-02-24 09:23:41 cur_current 0.0
setstate TUYA_SP03 2023-02-24 09:23:41 cur_power 0.0
setstate TUYA_SP03 2023-02-24 15:43:50 cur_voltage 212.1
setstate TUYA_SP03 2023-01-30 08:00:12 dp_21 2
setstate TUYA_SP03 2023-01-30 08:00:12 dp_22 0
setstate TUYA_SP03 2023-01-30 08:00:12 dp_23 0
setstate TUYA_SP03 2023-01-30 08:00:12 dp_24 0
setstate TUYA_SP03 2023-01-30 08:00:12 dp_25 0
setstate TUYA_SP03 2023-02-24 09:23:28 energy 0.543
setstate TUYA_SP03 2023-02-24 15:43:50 online 1
setstate TUYA_SP03 2023-02-24 15:44:08 state off
setstate TUYA_SP03 2023-02-24 09:42:57 switch_1 off

[/code]
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 24 Februar 2023, 16:42:21
sodele .. ich habe nun den SP04 nochmals local suchen lassen.

nun liest er Daten :-)

lösche nun das alte Device und benenne um

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 24 Februar 2023, 16:55:00
allerdings kommt nix mit power oder energy

[code]define tuya_local_045074212462ab24e988 fhempy tuya IGzCi97RpN2Lf9cu 045074212462ab24e988 192.168.9.34 6e637c2cfed441d8 3.3
attr tuya_local_045074212462ab24e988 DbLogExclude .*
attr tuya_local_045074212462ab24e988 alias SP04 Spuelmaschine
attr tuya_local_045074212462ab24e988 dp_01 switch_1
attr tuya_local_045074212462ab24e988 dp_09 countdown_1
attr tuya_local_045074212462ab24e988 dp_17 add_ele
attr tuya_local_045074212462ab24e988 dp_18 cur_current
attr tuya_local_045074212462ab24e988 dp_19 cur_power
attr tuya_local_045074212462ab24e988 dp_20 cur_voltage
attr tuya_local_045074212462ab24e988 event-on-change-reading .*
attr tuya_local_045074212462ab24e988 group tuya
attr tuya_local_045074212462ab24e988 room fhempy
attr tuya_local_045074212462ab24e988 tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}]
attr tuya_local_045074212462ab24e988 tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'add_ele', 'dp_id': 17, 'type': 'Integer', 'values': {'unit': '', 'min': 0, 'max': 50000, 'scale': 3, 'step': 100}}, {'code': 'cur_current', 'dp_id': 18, 'type': 'Integer', 'values': {'unit': 'mA', 'min': 0, 'max': 30000, 'scale': 0, 'step': 1}}, {'code': 'cur_power', 'dp_id': 19, 'type': 'Integer', 'values': {'unit': 'W', 'min': 0, 'max': 50000, 'scale': 1, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 20, 'type': 'Integer', 'values': {'unit': 'V', 'min': 0, 'max': 5000, 'scale': 1, 'step': 1}}]
#   DEF        tuya IGzCi97RpN2Lf9cu 045074212462ab24e988 192.168.9.34 6e637c2cfed441d8 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   045074212462ab24e988
#   FHEMPYTYPE tuya
#   FUUID      63f8d9d1-f33f-fd5f-6e90-0338c5a483982238
#   IODev      local_pybinding
#   NAME       tuya_local_045074212462ab24e988
#   NR         1790
#   PYTHONTYPE tuya
#   STATE      ready
#   TYPE       fhempy
#   eventCount 3
#   READINGS:
#     2023-02-24 16:38:43   active_time     1573754287
#     2023-02-24 16:38:43   biz_type        18
#     2023-02-24 16:38:43   category        cz
#     2023-02-24 16:38:43   create_time     1572954162
#     2023-02-24 16:38:43   icon            smart/icon/1536752669ijospdb3eoq_0.png
#     2023-02-24 16:38:43   id              045074212462ab24e988
#     2023-02-24 16:38:43   ip              46.5.205.127
#     2023-02-24 16:38:43   lat             48.5585
#     2023-02-24 16:38:43   local_key       6e637c2cfed441d8
#     2023-02-24 16:38:43   lon             9.2025
#     2023-02-24 16:38:43   model           SP1-C/16A/带计电量/gosund
#     2023-02-24 16:38:43   name            SP04 Spuelmaschine
#     2023-02-24 16:49:45   online          1
#     2023-02-24 16:38:43   owner_id        3389434
#     2023-02-24 16:38:43   product_id      IGzCi97RpN2Lf9cu
#     2023-02-24 16:38:43   product_name    Smart Socket
#     2023-02-24 16:49:45   state           ready
#     2023-02-24 16:38:43   sub             0
#     2023-02-24 16:38:43   time_zone       +01:00
#     2023-02-24 16:38:43   uid             eu1548823829280mLHX1
#     2023-02-24 16:38:43   update_time     1677182847
#     2023-02-24 16:38:43   uuid            045074212462ab24e988
#   args:
#     tuya_local_045074212462ab24e988
#     fhempy
#     tuya
#     IGzCi97RpN2Lf9cu
#     045074212462ab24e988
#     192.168.9.34
#     6e637c2cfed441d8
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate tuya_local_045074212462ab24e988 ready
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 active_time 1573754287
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 biz_type 18
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 category cz
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 create_time 1572954162
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 icon smart/icon/1536752669ijospdb3eoq_0.png
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 id 045074212462ab24e988
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 ip 46.5.205.127
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 lat 48.5585
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 local_key 6e637c2cfed441d8
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 lon 9.2025
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 model SP1-C/16A/带计电量/gosund
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 name SP04 Spuelmaschine
setstate tuya_local_045074212462ab24e988 2023-02-24 16:49:45 online 1
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 owner_id 3389434
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 product_id IGzCi97RpN2Lf9cu
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 product_name Smart Socket
setstate tuya_local_045074212462ab24e988 2023-02-24 16:49:45 state ready
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 sub 0
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 time_zone +01:00
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 uid eu1548823829280mLHX1
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 update_time 1677182847
setstate tuya_local_045074212462ab24e988 2023-02-24 16:38:43 uuid 045074212462ab24e988

[/code]

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 24 Februar 2023, 17:32:47
Nachtrag:

habe nun in der fhem.cnf das SP04 auskommentiert.

FHEM shutdown restart
SP04 wird schön neu als _cloud erkannt :-)

und SP04 ist mit allen Daten incl. energy da :-)

scheint also ein Problem in lokal zu sein.

nun ist nur noch ungeklärt; war die SPxx keine Events erzeugen.

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 24 Februar 2023, 18:36:02
Also, bitte nicht schon wieder was anderes...wir bleiben weiterhin beim SP05 und fixen das für local.
Lege SP05 nochmals an, prüfe bitte nochmals die IP und stell beim Device verbose 5. Danach poste das fhempy Log.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 24 Februar 2023, 18:47:35
Zitat von: dominik am 24 Februar 2023, 18:36:02
Also, bitte nicht schon wieder was anderes...wir bleiben weiterhin beim SP05 und fixen das für local.
Lege SP05 nochmals an, prüfe bitte nochmals die IP und stell beim Device verbose 5. Danach poste das fhempy Log.

SP05 ist ok

du meinst sp04 rollback auf Lokal?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 24 Februar 2023, 19:17:46
ok

ich habe SP04 durch Reauskommentieren reaktiviert:

define TUYA_SP04 fhempy tuya IGzCi97RpN2Lf9cu 045074212462ab24e988 192.168.9.34 6e637c2cfed441d8 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
setuuid TUYA_SP04 63f8d9d1-f33f-fd5f-6e90-0338c5a483982238
attr TUYA_SP04 alias SP04 Spuelmaschine
attr TUYA_SP04 dp_01 switch_1
attr TUYA_SP04 dp_01 verbose5
attr TUYA_SP04 dp_09 countdown_1
attr TUYA_SP04 dp_17 add_ele
attr TUYA_SP04 dp_18 cur_current
attr TUYA_SP04 dp_19 cur_power
attr TUYA_SP04 dp_20 cur_voltage
attr TUYA_SP04 event-on-change-reading .*
attr TUYA_SP04 group tuya
attr TUYA_SP04 room -TUYA,Küche,TUYA Stromverbrauch,fhempy
attr TUYA_SP04 tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}]
attr TUYA_SP04 tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'add_ele', 'dp_id': 17, 'type': 'Integer', 'values': {'unit': '', 'min': 0, 'max': 50000, 'scale': 3, 'step': 100}}, {'code': 'cur_current', 'dp_id': 18, 'type': 'Integer', 'values': {'unit': 'mA', 'min': 0, 'max': 30000, 'scale': 0, 'step': 1}}, {'code': 'cur_power', 'dp_id': 19, 'type': 'Integer', 'values': {'unit': 'W', 'min': 0, 'max': 50000, 'scale': 1, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 20, 'type': 'Integer', 'values': {'unit': 'V', 'min': 0, 'max': 5000, 'scale': 1, 'step': 1}}]

IP ist ok, da readings kamen; nur keine dynamischen Werte

jetzt im 3. Anlauf sieht es so aus :

[code]define TUYA_SP04 fhempy tuya IGzCi97RpN2Lf9cu 045074212462ab24e988 192.168.9.34 6e637c2cfed441d8 3.3
attr TUYA_SP04 alias SP04 Spuelmaschine
attr TUYA_SP04 dp_01 verbose5
attr TUYA_SP04 dp_09 countdown_1
attr TUYA_SP04 dp_17 add_ele
attr TUYA_SP04 dp_18 cur_current
attr TUYA_SP04 dp_19 cur_power
attr TUYA_SP04 dp_20 cur_voltage
attr TUYA_SP04 event-on-change-reading .*
attr TUYA_SP04 group tuya
attr TUYA_SP04 room -TUYA,Küche,TUYA Stromverbrauch,fhempy
attr TUYA_SP04 tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}]
attr TUYA_SP04 tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'add_ele', 'dp_id': 17, 'type': 'Integer', 'values': {'unit': '', 'min': 0, 'max': 50000, 'scale': 3, 'step': 100}}, {'code': 'cur_current', 'dp_id': 18, 'type': 'Integer', 'values': {'unit': 'mA', 'min': 0, 'max': 30000, 'scale': 0, 'step': 1}}, {'code': 'cur_power', 'dp_id': 19, 'type': 'Integer', 'values': {'unit': 'W', 'min': 0, 'max': 50000, 'scale': 1, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 20, 'type': 'Integer', 'values': {'unit': 'V', 'min': 0, 'max': 5000, 'scale': 1, 'step': 1}}]
#   DEF        tuya IGzCi97RpN2Lf9cu 045074212462ab24e988 192.168.9.34 6e637c2cfed441d8 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   045074212462ab24e988
#   FHEMPYTYPE tuya
#   FUUID      63f8d9d1-f33f-fd5f-6e90-0338c5a483982238
#   IODev      local_pybinding
#   NAME       TUYA_SP04
#   NR         2122
#   PYTHONTYPE tuya
#   STATE      ready
#   TYPE       fhempy
#   eventCount 3
#   READINGS:
#     2023-02-24 17:26:30   active_time     1573754287
#     2023-02-24 17:27:59   add_ele         0.023
#     2023-02-24 17:26:30   biz_type        18
#     2023-02-24 17:26:30   category        cz
#     2023-02-24 17:49:49   countdown_1     0.0
#     2023-02-24 17:26:30   create_time     1572954162
#     2023-02-24 17:27:59   cur_current     46.0
#     2023-02-24 17:27:59   cur_power       5.3
#     2023-02-24 17:27:59   cur_voltage     231.7
#     2023-02-24 17:27:59   energy          0.0
#     2023-02-24 17:26:30   icon            https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2023-02-24 17:26:30   id              045074212462ab24e988
#     2023-02-24 17:26:30   ip              46.5.205.127
#     2023-02-24 17:26:30   lat             48.5585
#     2023-02-24 17:26:30   local_key       6e637c2cfed441d8
#     2023-02-24 17:26:30   lon             9.2025
#     2023-02-24 17:26:30   model           SP1-C/16A/带计电量/gosund
#     2023-02-24 17:26:30   name            SP04 Spuelmaschine
#     2023-02-24 19:04:43   online          1
#     2023-02-24 17:26:30   owner_id        3389434
#     2023-02-24 17:26:30   product_id      IGzCi97RpN2Lf9cu
#     2023-02-24 17:26:30   product_name    Smart Socket
#     2023-02-24 19:04:43   state           ready
#     2023-02-24 17:26:30   sub             off
#     2023-02-24 17:26:30   time_zone       +01:00
#     2023-02-24 17:26:30   uid             eu1548823829280mLHX1
#     2023-02-24 17:26:30   update_time     1677182847
#     2023-02-24 17:26:30   uuid            045074212462ab24e988
#   args:
#     TUYA_SP04
#     fhempy
#     tuya
#     IGzCi97RpN2Lf9cu
#     045074212462ab24e988
#     192.168.9.34
#     6e637c2cfed441d8
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate TUYA_SP04 ready
setstate TUYA_SP04 2023-02-24 17:26:30 active_time 1573754287
setstate TUYA_SP04 2023-02-24 17:27:59 add_ele 0.023
setstate TUYA_SP04 2023-02-24 17:26:30 biz_type 18
setstate TUYA_SP04 2023-02-24 17:26:30 category cz
setstate TUYA_SP04 2023-02-24 17:49:49 countdown_1 0.0
setstate TUYA_SP04 2023-02-24 17:26:30 create_time 1572954162
setstate TUYA_SP04 2023-02-24 17:27:59 cur_current 46.0
setstate TUYA_SP04 2023-02-24 17:27:59 cur_power 5.3
setstate TUYA_SP04 2023-02-24 17:27:59 cur_voltage 231.7
setstate TUYA_SP04 2023-02-24 17:27:59 energy 0.0
setstate TUYA_SP04 2023-02-24 17:26:30 icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
setstate TUYA_SP04 2023-02-24 17:26:30 id 045074212462ab24e988
setstate TUYA_SP04 2023-02-24 17:26:30 ip 46.5.205.127
setstate TUYA_SP04 2023-02-24 17:26:30 lat 48.5585
setstate TUYA_SP04 2023-02-24 17:26:30 local_key 6e637c2cfed441d8
setstate TUYA_SP04 2023-02-24 17:26:30 lon 9.2025
setstate TUYA_SP04 2023-02-24 17:26:30 model SP1-C/16A/带计电量/gosund
setstate TUYA_SP04 2023-02-24 17:26:30 name SP04 Spuelmaschine
setstate TUYA_SP04 2023-02-24 19:04:43 online 1
setstate TUYA_SP04 2023-02-24 17:26:30 owner_id 3389434
setstate TUYA_SP04 2023-02-24 17:26:30 product_id IGzCi97RpN2Lf9cu
setstate TUYA_SP04 2023-02-24 17:26:30 product_name Smart Socket
setstate TUYA_SP04 2023-02-24 19:04:43 state ready
setstate TUYA_SP04 2023-02-24 17:26:30 sub off
setstate TUYA_SP04 2023-02-24 17:26:30 time_zone +01:00
setstate TUYA_SP04 2023-02-24 17:26:30 uid eu1548823829280mLHX1
setstate TUYA_SP04 2023-02-24 17:26:30 update_time 1677182847
setstate TUYA_SP04 2023-02-24 17:26:30 uuid 045074212462ab24e988

[/code]
als nun endlich  dyn. Werte


und das fhempy-log:

2023-02-24 19:02:32,071 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 19:02:32,315 - WARNING  - asyncio: socket.send() raised exception.
2023-02-24 19:04:01,122 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.606...
2023-02-24 19:04:01,127 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-02-24 19:04:01,169 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-02-24 19:04:07,656 - INFO     - websockets.server: connection open
2023-02-24 19:04:07,656 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-02-24 19:04:28,860 - ERROR    - TUYA_STF3: Failed create_device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 547, in create_device
    await self._create_cloudmapping_dev()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 442, in _create_cloudmapping_dev
    await self.retrieve_tuya_specs()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 417, in retrieve_tuya_specs
    spec = await self.get_tuya_dev_specification()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 371, in get_tuya_dev_specification
    return resp["result"]
KeyError: 'result'

fmhe.log ist ok

mal sehen , ob energy noch kommt





Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 24 Februar 2023, 21:11:05
energy ist eh schon da, nur eben noch 0.0. Bei 5 Watt Verbrauch dauert es eben etwas, bis sich bei energy was tut. energy ist in kWh und mit 3 Kommastellen. Bedeutet die 5Watt sollten 0.005 kWh in 1h ergeben.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 24 Februar 2023, 22:21:41
Zitat von: dominik am 24 Februar 2023, 21:11:05
energy ist eh schon da, nur eben noch 0.0. Bei 5 Watt Verbrauch dauert es eben etwas, bis sich bei energy was tut. energy ist in kWh und mit 3 Kommastellen. Bedeutet die 5Watt sollten 0.005 kWh in 1h ergeben.


komisch ist, dass jetzt 22:17 die Werte noch auf 17:xx stehen; sie wurden also nicht aktualisiert


[code]define TUYA_SP04 fhempy tuya IGzCi97RpN2Lf9cu 045074212462ab24e988 192.168.9.34 6e637c2cfed441d8 3.3
attr TUYA_SP04 DbLogInclude energy,cur_power
attr TUYA_SP04 alias SP04 Spuelmaschine
attr TUYA_SP04 devStateStyle style="text-align:left;;;;font-weight:bold;;;;"
attr TUYA_SP04 dp_01 switch_1
attr TUYA_SP04 dp_09 countdown_1
attr TUYA_SP04 dp_17 add_ele
attr TUYA_SP04 dp_18 cur_current
attr TUYA_SP04 dp_19 cur_power
attr TUYA_SP04 dp_20 cur_voltage
attr TUYA_SP04 event-min-interval energy:300,cur_power:300
attr TUYA_SP04 event-on-change-reading .*
attr TUYA_SP04 group Schalter (T),Schalter Strommessung
attr TUYA_SP04 room -TUYA,Küche,TUYA Stromverbrauch
attr TUYA_SP04 stateFormat E: energy kWh cP: cur_power W cV: cur_voltage V
attr TUYA_SP04 tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}]
attr TUYA_SP04 tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'add_ele', 'dp_id': 17, 'type': 'Integer', 'values': {'unit': '', 'min': 0, 'max': 50000, 'scale': 3, 'step': 100}}, {'code': 'cur_current', 'dp_id': 18, 'type': 'Integer', 'values': {'unit': 'mA', 'min': 0, 'max': 30000, 'scale': 0, 'step': 1}}, {'code': 'cur_power', 'dp_id': 19, 'type': 'Integer', 'values': {'unit': 'W', 'min': 0, 'max': 50000, 'scale': 1, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 20, 'type': 'Integer', 'values': {'unit': 'V', 'min': 0, 'max': 5000, 'scale': 1, 'step': 1}}]
attr TUYA_SP04 verbose 5
#   DEF        tuya IGzCi97RpN2Lf9cu 045074212462ab24e988 192.168.9.34 6e637c2cfed441d8 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   045074212462ab24e988
#   FHEMPYTYPE tuya
#   FUUID      63f8d9d1-f33f-fd5f-6e90-0338c5a483982238
#   IODev      local_pybinding
#   NAME       TUYA_SP04
#   NR         2122
#   PYTHONTYPE tuya
#   STATE      E: 0.0 kWh cP: 5.3 W cV: 231.7 V
#   TYPE       fhempy
#   eventCount 3
#   READINGS:
#     2023-02-24 17:26:30   active_time     1573754287
#     2023-02-24 17:27:59   add_ele         0.023
#     2023-02-24 17:26:30   biz_type        18
#     2023-02-24 17:26:30   category        cz
#     2023-02-24 17:49:49   countdown_1     0.0
#     2023-02-24 17:26:30   create_time     1572954162
#     2023-02-24 17:27:59   cur_current     46.0
#     2023-02-24 17:27:59   cur_power       5.3
#     2023-02-24 17:27:59   cur_voltage     231.7
#     2023-02-24 17:27:59   energy          0.0
#     2023-02-24 17:26:30   icon            https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
#     2023-02-24 17:26:30   id              045074212462ab24e988
#     2023-02-24 17:26:30   ip              46.5.205.127
#     2023-02-24 17:26:30   lat             48.5585
#     2023-02-24 17:26:30   local_key       6e637c2cfed441d8
#     2023-02-24 17:26:30   lon             9.2025
#     2023-02-24 17:26:30   model           SP1-C/16A/带计电量/gosund
#     2023-02-24 17:26:30   name            SP04 Spuelmaschine
#     2023-02-24 20:19:10   online          1
#     2023-02-24 17:26:30   owner_id        3389434
#     2023-02-24 17:26:30   product_id      IGzCi97RpN2Lf9cu
#     2023-02-24 17:26:30   product_name    Smart Socket
#     2023-02-24 20:19:10   state           ready
#     2023-02-24 17:26:30   sub             off
#     2023-02-24 17:26:30   time_zone       +01:00
#     2023-02-24 17:26:30   uid             eu1548823829280mLHX1
#     2023-02-24 17:26:30   update_time     1677182847
#     2023-02-24 17:26:30   uuid            045074212462ab24e988
#   args:
#     TUYA_SP04
#     fhempy
#     tuya
#     IGzCi97RpN2Lf9cu
#     045074212462ab24e988
#     192.168.9.34
#     6e637c2cfed441d8
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate TUYA_SP04 E: 0.0 kWh cP: 5.3 W cV: 231.7 V
setstate TUYA_SP04 2023-02-24 17:26:30 active_time 1573754287
setstate TUYA_SP04 2023-02-24 17:27:59 add_ele 0.023
setstate TUYA_SP04 2023-02-24 17:26:30 biz_type 18
setstate TUYA_SP04 2023-02-24 17:26:30 category cz
setstate TUYA_SP04 2023-02-24 17:49:49 countdown_1 0.0
setstate TUYA_SP04 2023-02-24 17:26:30 create_time 1572954162
setstate TUYA_SP04 2023-02-24 17:27:59 cur_current 46.0
setstate TUYA_SP04 2023-02-24 17:27:59 cur_power 5.3
setstate TUYA_SP04 2023-02-24 17:27:59 cur_voltage 231.7
setstate TUYA_SP04 2023-02-24 17:27:59 energy 0.0
setstate TUYA_SP04 2023-02-24 17:26:30 icon https://images.tuyaeu.com/smart/icon/1536752669ijospdb3eoq_0.png
setstate TUYA_SP04 2023-02-24 17:26:30 id 045074212462ab24e988
setstate TUYA_SP04 2023-02-24 17:26:30 ip 46.5.205.127
setstate TUYA_SP04 2023-02-24 17:26:30 lat 48.5585
setstate TUYA_SP04 2023-02-24 17:26:30 local_key 6e637c2cfed441d8
setstate TUYA_SP04 2023-02-24 17:26:30 lon 9.2025
setstate TUYA_SP04 2023-02-24 17:26:30 model SP1-C/16A/带计电量/gosund
setstate TUYA_SP04 2023-02-24 17:26:30 name SP04 Spuelmaschine
setstate TUYA_SP04 2023-02-24 20:19:10 online 1
setstate TUYA_SP04 2023-02-24 17:26:30 owner_id 3389434
setstate TUYA_SP04 2023-02-24 17:26:30 product_id IGzCi97RpN2Lf9cu
setstate TUYA_SP04 2023-02-24 17:26:30 product_name Smart Socket
setstate TUYA_SP04 2023-02-24 20:19:10 state ready
setstate TUYA_SP04 2023-02-24 17:26:30 sub off
setstate TUYA_SP04 2023-02-24 17:26:30 time_zone +01:00
setstate TUYA_SP04 2023-02-24 17:26:30 uid eu1548823829280mLHX1
setstate TUYA_SP04 2023-02-24 17:26:30 update_time 1677182847
setstate TUYA_SP04 2023-02-24 17:26:30 uuid 045074212462ab24e988

[/code]

alle anders SPs sind mit aktuellen Werten versehen

du kannst ja meinen SP04 auch sehen ..





Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 24 Februar 2023, 22:52:44
Kannst du den SP04 mal komplett zurücksetzen und neu verbinden. Irgendwie kommt mir das komisch vor, oder der hat eine sehr instabile WiFi Verbindung.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 24 Februar 2023, 22:56:03
Habe deinen Code hinzugefügt, aber es funktioniert nicht. Auch ein fhempy-Neustart hat daran nichts geändert.
Die Funktion für den Modus wird zwar unter den Readings mit dp_02 angezeigt, jedoch weder mit dem Namen noch in den Funktionen.

Hier das geänderte List des Device:
Internals:
   CFGFN     
   DEF        tuya 6awobc9jfnlwvqtw bf75378cf6e13718e0rvcj 192.168.178.169 7ada5a7cbf4a78e8 3.3 asfg5sj9aurr9nib73fx fc553d7a6bfa4a569bc69ed2aa6924ed
   DEVICEID   bf75378cf6e13718e0rvcj
   FHEMPYTYPE tuya
   FUUID      63f930a1-f33f-7706-e6bf-2d98d17785b09e27
   IODev      fhempy_local
   NAME       tuya_local_bf75378cf6e13718e0rvcj
   NR         404450
   PYTHONTYPE tuya
   STATE      on
   TYPE       fhempy
   eventCount 8
   READINGS:
     2023-02-24 22:48:18   active_time     1654518995
     2023-02-24 22:48:18   biz_type        18
     2023-02-24 22:48:18   category        fs
     2023-02-24 22:48:18   create_time     1627922506
     2023-02-24 22:49:42   dp_02           strong
     2023-02-24 22:49:36   dp_106          51
     2023-02-24 22:48:18   icon            smart/icon/bay1579257011827QOvk/05cb05801c69fa7b6bdacda9c7f21196.png
     2023-02-24 22:48:18   id              bf75378cf6e13718e0rvcj
     2023-02-24 22:48:18   ip              88.153.83.160
     2023-02-24 22:48:18   lat             51.0583
     2023-02-24 22:48:18   local_key       7ada5a7cbf4a78e8
     2023-02-24 22:48:18   lon             6.1030
     2023-02-24 22:48:18   name            Schlafzimmerventilator
     2023-02-24 22:48:18   online          1
     2023-02-24 22:48:18   owner_id        23921647
     2023-02-24 22:48:18   product_id      6awobc9jfnlwvqtw
     2023-02-24 22:48:18   product_name    ARC Humidifier
     2023-02-24 22:49:36   state           on
     2023-02-24 22:48:18   sub             0
     2023-02-24 22:48:18   switch          off
     2023-02-24 22:48:18   time_zone       +02:00
     2023-02-24 22:48:18   uid             eu1610479166063muAw8
     2023-02-24 22:48:18   update_time     1654518998
     2023-02-24 22:48:18   uuid            fd0c8a9f78a36684
   args:
     tuya_local_bf75378cf6e13718e0rvcj
     fhempy
     tuya
     6awobc9jfnlwvqtw
     bf75378cf6e13718e0rvcj
     192.168.178.169
     7ada5a7cbf4a78e8
     3.3
     asfg5sj9aurr9nib73fx
     fc553d7a6bfa4a569bc69ed2aa6924ed
   argsh:
Attributes:
   alias      Schlafzimmerventilator
   dp_01      switch
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}, 'desc': 'fan speed percent'}, {'code': 'switch_horizontal', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'switch horizontal'}{'code': 'modus', 'dp_id': 2, 'type': 'Enum', 'values': '{"range":["sleep","fresh","strong", "auto", "close"]}', 'desc': 'modus'}]
   tuya_spec_status [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}}, {'code': 'switch_horizontal', 'dp_id': 5, 'type': 'Boolean', 'values': {}}{'code': 'modus', 'dp_id': 2, 'type': 'Enum', 'values': '{"range":["sleep","fresh","strong", "auto", "close"]}', 'desc': 'modus'}]


Was mich irritiert ist das Wort Switch unterhalb der Funktionen und das bei den Attributen nur dp_01 auf switch angepasst wird.
Hat sich da vielleicht ein Fehler in der ersten Funktion in den beiden Attributen eingeschlichen? Ich weiß wie schnell ein fehlendes Zeichen eine ganze Webseite auf den Kopf stellen kann.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 24 Februar 2023, 23:02:05
Da fehlt ein Komma
Zitat'switch horizontal'},{'code': 'modus', 'd

Kopier die Inhalte von den tuya Attribute in einen online json validator (https://jsonlint.com/), dann siehst du ob die Syntax passt.

Nach dem fhempy Neustart kannst du dann das Attribut dp_02 auf modus setzen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 25 Februar 2023, 10:39:01
Zitat von: dominik am 24 Februar 2023, 22:52:44
Kannst du den SP04 mal komplett zurücksetzen und neu verbinden. Irgendwie kommt mir das komisch vor, oder der hat eine sehr instabile WiFi Verbindung.
ich habe

- den SP04 auch in der App neu angelernt.
- dann in FEHM DEvice gelöscht
- fhem shutdown restart

Nach ein paar Sekunden war er als _cloud vorhanden, ist schaltbar und zeigt aktuelle Werte

Wie kriege ich den nun lokal?

next step:
suche und create device SP04

nun sind beide da; nur _cloud mit aktuellen Werten

FHEMPYlog:

2023-02-25 10:40:17,667 - ERROR    - tuya_system: Exception raised by task: <Task finished name='Task-46153' coro=<FhemModule._run_coro() done, defined at /opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py:211> exception=OSError(98, 'Address already in use')>
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 219, in _handle_task_result
    task.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 213, in _run_coro
    await coro
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 781, in _scan_devices
    devices = await utils.run_blocking(
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 72, in run_blocking
    return await asyncio.get_event_loop().run_in_executor(pool, function)
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/opt/fhem/.local/lib/python3.9/site-packages/tinytuya/core.py", line 1561, in deviceScan
    return scanner.devices(verbose=verbose, maxretry=maxretry, color=color, poll=poll, forcescan=forcescan, byID=byID)
  File "/opt/fhem/.local/lib/python3.9/site-packages/tinytuya/scanner.py", line 147, in devices
    client.bind(("", UDPPORT))
OSError: [Errno 98] Address already in use


Update:
nach ein paar Minuten wird "save config" rot und _local wie _cloud voll funktionsfähig da :-)

das ist also mal ok :-)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 25 Februar 2023, 11:16:08
Was meinst du mit nach ein paar Minuten wird save config rot? Und bekommst du jetzt aktuelle Werte + Energy mit local?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 25 Februar 2023, 11:27:48
Zitat von: dominik am 25 Februar 2023, 11:16:08
Was meinst du mit nach ein paar Minuten wird save config rot? Und bekommst du jetzt aktuelle Werte + Energy mit local?

ich meine im Web-Frontend von FHEM ; das ist ja immer, wenn neue Devices erkannt wurden

und ja es sind alle dynamischen Werte aktuell:
tuya
SP04 Spuelmaschine
on
off
tuya_cloud
SP04 Spuelmaschine
on
off


dasselbe og. procedure habe ich mit JL05 gemacht, der sich nicht mehr gemeldet hatte
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 25 Februar 2023, 11:31:08
Ok, bedeutet alle Devices liefern jetzt lokal richtige Werte? Oder fehlt noch einer?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 25 Februar 2023, 11:56:57
Zitat von: dominik am 25 Februar 2023, 11:31:08
Ok, bedeutet alle Devices liefern jetzt lokal richtige Werte? Oder fehlt noch einer?

ja alle Devices liefern nun aktuelle Werte
habe zur Kontrolle verwendet:

stateFormat Verbrauch: [$name: energy] kWh, cPower [$name:cur_power] W, cVoltage [$name:cur_voltage] V, Time: [$name:cur_power:t]

ALLERDINGS:

bei manchen Geräte ist cur_power um Faktor 10 erhöht !!!!

aber das hast du ja schon gefixt?

ich müsste nun einzeln App versus FHEMPY prüfen ?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 25 Februar 2023, 13:05:17
parallel mache ich auf die Suched danach, warum die readings cur_power und energy nichr in die dbLog geschrieben werden

@stefanru
@Mitlesende

wie hast du das bei dir gelöst?

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: stefanru am 25 Februar 2023, 13:24:45
Hi Thomas,

ich arbeite bei mir mit DBLogInclude.
Ich gebe also bei jedem Device an was gelogged werden soll.
Zur Zeit speichere ich nur cur_power mit:
DbLogInclude cur_power:60:force

Das :60:force habe ich weil mir fhempy zu oft Daten liefert und ich nicht die DB überfüllen will

Letztens hat sich bei mir da auch etwas das Verhalten von fhempy geändert was events angeht.
Ich habe das hier: https://forum.fhem.de/index.php/topic,132154.0.html mit Heiko (DS_Starter) besprochen.

Wenn du mehrere Readings mit Zeit oder force haben willst musst du aber aufpassen und so etwas schreiben:
DbLogInclude
(Kessel|Ruecklauf|Vorlauf|Wasserumwaelz):600

Gruß,
Stefan

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 25 Februar 2023, 13:36:31
Bitte productids der Devices mit Faktor 10 liefern.
Titel: Antw:fhempy: tuya (lokal) - update
Beitrag von: thburkhart am 25 Februar 2023, 14:37:47
Zitat von: dominik am 25 Februar 2023, 13:36:31
Bitte productids der Devices mit Faktor 10 liefern.

37mnhia3pojleqfh  cur_power 10x cur_voltage 10x

wifvoilfrqeo6hvu cur_power 10x cur_voltage 10x

musste erst noch _clouds dazuholen, um die ProductId zu sehen.

könntest Du in _local zukünftig die ProductId auch als Attribut mitgeben ?

die Werte in _local und _cloud sind übrigens identisch und eben falsch
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 25 Februar 2023, 14:51:07
Zitat von: stefanru am 25 Februar 2023, 13:24:45
Hi Thomas,

ich arbeite bei mir mit DBLogInclude.
Ich gebe also bei jedem Device an was gelogged werden soll.
Zur Zeit speichere ich nur cur_power mit:
DbLogInclude cur_power:60:force

Das :60:force habe ich weil mir fhempy zu oft Daten liefert und ich nicht die DB überfüllen will

Letztens hat sich bei mir da auch etwas das Verhalten von fhempy geändert was events angeht.
Ich habe das hier: https://forum.fhem.de/index.php/topic,132154.0.html mit Heiko (DS_Starter) besprochen.

Wenn du mehrere Readings mit Zeit oder force haben willst musst du aber aufpassen und so etwas schreiben:
DbLogInclude
(Kessel|Ruecklauf|Vorlauf|Wasserumwaelz):600

Gruß,
Stefan
Hi Stefan,

dblogInclude verwende ich nun auch so

das von Heiko habe ich nicht verstanden:
ZitatUm regelmäßig einen Log-Eintrag zu erzeugen benutzt man "set <name> addLog ..." im DbLog.
Dieses Verfahren ist auch nicht neu.
wie würde der passende Befehl zu dbloginclude (energy|cur_power):600
aussehen?




Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 25 Februar 2023, 14:58:41
Habe das Komma ergänzt. Das mit dem Validator ist ein guter Tip.
Nach einem fhempy-Neustart wird jetzt ein Reading modus angezeigt. Allerdings ist der gesamte Bereich zur Auswahl der Set-Befehle verschwunden. Und bei der attributszuweisung von dp_02 auf modus kommt es zu folgender Fehlermeldung:
c69fa7b6bdacda9c7f21196.png
id
bf75378cf6e13718e0rvcj
ip
88.153.83.160
lat
51.0583
local_key
7ada5a7cbf4a78e8
lon
6.1030
modus
fresh
name
Schlafzimmerventilator
online
1
owner_id
23921647
product_id
6awobc9jfnlwvqtw
product_name
ARC Humidifier
state
on
sub
0
switch
off
switch_horizontal
off
time_zone
+02:00
uid
eu1610479166063muAw8
update_time
1654518998
uuid
fd0c8a9f78a36684
tuya_local_bf75378cf6e13718e0rvcj
dp_02

modus
Attributes
alias
Schlafzimmerventilator
dp_01
switch
group
tuya
room
fhempy
tuya_spec_functions
[{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}, 'desc': 'fan speed percent'}, {'code': 'switch_horizontal', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'switch horizontal'}, {'code': 'modus', 'dp_id': 2, 'type': 'Enum', 'values': '{"range":["sleep","fresh","strong", "auto", "close"]}', 'desc': 'modus'}]
tuya_spec_status
[{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}}, {'code': 'switch_horizontal', 'dp_id': 5, 'type': 'Boolean', 'values': {}}, {'code': 'modus', 'dp_id': 2, 'type': 'Enum', 'values': '{"range":["sleep","fresh","strong", "auto", "close"]}', 'desc': 'modus'}]
Help for fhempy device tuya Copy for forum.fhem.de
...



Failed to execute function Attr: Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 385, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 484, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 199, in Attr
    return await utils.handle_attr(self._conf_attr, self, hash, args, argsh)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 108, in handle_attr
    ret = await fct_call(hash)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 159, in set_attr_dp
    await self._generate_set()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 212, in _generate_set
    step = spec["step"] / (10 ** spec["scale"])
TypeError: unsupported operand type(s) for ** or pow(): 'int' and 'str'

Eine ähnliche Fehlermeldung kommt auch wenn man versucht dp_03 und dp_05 auf fan_speed_percent und switch_horizontal zuzuweisen. Weibliche letzteres zumindest noch als Reading angezeigt wird.
Titel: Antw:fhempy: tuya (lokal) - update
Beitrag von: dominik am 25 Februar 2023, 20:10:52
Zitat von: thburkhart am 25 Februar 2023, 14:37:47
37mnhia3pojleqfh  cur_power 10x cur_voltage 10x

wifvoilfrqeo6hvu cur_power 10x cur_voltage 10x

musste erst noch _clouds dazuholen, um die ProductId zu sehen.

könntest Du in _local zukünftig die ProductId auch als Attribut mitgeben ?

die Werte in _local und _cloud sind übrigens identisch und eben falsch

Beide productids sind jetzt bereits hinterlegt. Die productid siehst du im DEF, prüfe bitte ob du die korrekte hinterlegt hast.

Cloud ist sicher auch falsch? Das wundert mich sehr, das ist sehr unüblich.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 25 Februar 2023, 20:16:28
Zitat von: Superposchi am 25 Februar 2023, 14:58:41
Habe das Komma ergänzt. Das mit dem Validator ist ein guter Tip.
Nach einem fhempy-Neustart wird jetzt ein Reading modus angezeigt. Allerdings ist der gesamte Bereich zur Auswahl der Set-Befehle verschwunden. Und bei der attributszuweisung von dp_02 auf modus kommt es zu folgender Fehlermeldung:
c69fa7b6bdacda9c7f21196.png
id
bf75378cf6e13718e0rvcj
ip
88.153.83.160
lat
51.0583
local_key
7ada5a7cbf4a78e8
lon
6.1030
modus
fresh
name
Schlafzimmerventilator
online
1
owner_id
23921647
product_id
6awobc9jfnlwvqtw
product_name
ARC Humidifier
state
on
sub
0
switch
off
switch_horizontal
off
time_zone
+02:00
uid
eu1610479166063muAw8
update_time
1654518998
uuid
fd0c8a9f78a36684
tuya_local_bf75378cf6e13718e0rvcj
dp_02

modus
Attributes
alias
Schlafzimmerventilator
dp_01
switch
group
tuya
room
fhempy
tuya_spec_functions
[{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}, 'desc': 'fan speed percent'}, {'code': 'switch_horizontal', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'switch horizontal'}, {'code': 'modus', 'dp_id': 2, 'type': 'Enum', 'values': '{"range":["sleep","fresh","strong", "auto", "close"]}', 'desc': 'modus'}]
tuya_spec_status
[{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}}, {'code': 'switch_horizontal', 'dp_id': 5, 'type': 'Boolean', 'values': {}}, {'code': 'modus', 'dp_id': 2, 'type': 'Enum', 'values': '{"range":["sleep","fresh","strong", "auto", "close"]}', 'desc': 'modus'}]
Help for fhempy device tuya Copy for forum.fhem.de
...



Failed to execute function Attr: Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 385, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 484, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 199, in Attr
    return await utils.handle_attr(self._conf_attr, self, hash, args, argsh)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 108, in handle_attr
    ret = await fct_call(hash)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 159, in set_attr_dp
    await self._generate_set()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 212, in _generate_set
    step = spec["step"] / (10 ** spec["scale"])
TypeError: unsupported operand type(s) for ** or pow(): 'int' and 'str'

Eine ähnliche Fehlermeldung kommt auch wenn man versucht dp_03 und dp_05 auf fan_speed_percent und switch_horizontal zuzuweisen. Weibliche letzteres zumindest noch als Reading angezeigt wird.

Du hast unabsichtlich dp_03 values geändert. Schau mal wie es zuvor war, das values passt nicht.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: strategy am 25 Februar 2023, 22:01:48
Hallo zusammen,

ich habe ein seltsames Phänomen und hoffe Ihr habt eine Idee.
Nutze seit einigen Tagen tuya local für meine Aubess Steckdosen mit Strommessung.
Leider bekomme ich nach einigen Stunden keine Events mehr von den Devices und damit laufen meine DOIFs bzw. notifys nicht mehr.
Die Werte werden nach wie vor aktualisiert, aber es werden keine Events mehr erzeugt. Nach einem Neustart läuft dann wieder für einige Stunden alles normal und dann tritt dasselbe Phänomen wieder auf.

Bei allen übrigen Devices läuft der Event-Mechanismus normal weiter und bricht nicht nach der Zeit ab.

Irgendeine Idee??

Danke,
Matthias
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 25 Februar 2023, 22:02:57
Die Readings aktualisieren sich nur Events bekommst du keine? Hast du vielleicht event-* Attribute in Verwendung?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 25 Februar 2023, 22:08:07
ZitatDu hast unabsichtlich dp_03 values geändert. Schau mal wie es zuvor war, das values passt nicht.
Ich habe nichts verändert, das wurde genau so vom TUYA_System-Device angelegt.

Habe also kein "Original". Kannst du da mal bitte genauer sagen wie es auszusehen hat?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 25 Februar 2023, 22:12:22
Wahrscheinlich hat der JSON Online Validator das umgebaut. Ich glaub du hast dein Original hier schon gepostet gehabt, schau mal auf den letzten Seiten.

Folgendes musst du bei Integer beachten:
'values': '{"unit":"s","min":0,"max":86400,"scale":0,"step":1}'

Wie du siehst, ist vor der { ein ' und hinter dem } auch. Die min, max, scale, step Werte sind ohne Hochkomma. Eigentlich ist alles was in values drin steht ein string, der ein JSON beinhaltet. Etwas unschön gemacht von tuya.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 25 Februar 2023, 22:34:14
Also ich habe gerade den anderen Ventilator im Wohnzimmer noch mal neu angelegt. Beim automatischen Erstellen wird der Teil im Atribut folgendermaßen angelegt:
{'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': {'min': '1', 'max': '9', 'scale': '0', 'step': '1'}, 'desc': 'fan speed percent'},

Habe es jetzt nach deinem Beispiel abgeändert und den fhempy-server neugestartet. Nach längerer Wartezeit kam alles wie gewüsncht.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 25 Februar 2023, 23:11:54
Nachdem es bei den Ventilatoren funktioniert hat würde ich es gerne beim Luftbefeuchter auch vollenden.
Allerdings sind dort die Auswahlen (enum) etwas anders aufgebaut. In Fhem wird mir im entsprechenden Attribut nur 1,2,3,4 etc. angezeigt, in der App hingegen Off, 1 Stunde, 3 Stunden, 6 Stunden.

Gibt es eine Form von Alias so dass Auswahl und Beschriftung unterschiedlich sein können?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: strategy am 25 Februar 2023, 23:24:46
Zitat von: dominik am 25 Februar 2023, 22:02:57
Die Readings aktualisieren sich nur Events bekommst du keine? Hast du vielleicht event-* Attribute in Verwendung?

Ja, habe ich.
Das ist aber (aller voraussicht) nicht die Ursache, denn zum einen funktioniert ja anfänglich alles mit den gesetzten Attributen und zum anderen habe ich bereits ohne getestet.

Aktuell ist es wieder nicht mehr funktional. Dann kommen wirklich gar keine Events mehr durch, nicht mal ein On/Off des Schalters.
Keine Aktualisierungen mehr seit gestern 23h...


Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 25 Februar 2023, 23:25:24
Zitat von: Superposchi am 25 Februar 2023, 23:11:54
Nachdem es bei den Ventilatoren funktioniert hat würde ich es gerne beim Luftbefeuchter auch vollenden.
Allerdings sind dort die Auswahlen (enum) etwas anders aufgebaut. In Fhem wird mir im entsprechenden Attribut nur 1,2,3,4 etc. angezeigt, in der App hingegen Off, 1 Stunde, 3 Stunden, 6 Stunden.

Gibt es eine Form von Alias so dass Auswahl und Beschriftung unterschiedlich sein können?

Ja, das hatte ich schon gebaut, da es jemand anders wollte.

In values musst du translation einfügen
'values': '{"range":["1","2"], "translation": { "1": "Off","2": "1 Stunde"}}'
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 25 Februar 2023, 23:30:34
Zitat von: strategy am 25 Februar 2023, 23:24:46
Ja, habe ich.
Das ist aber (aller voraussicht) nicht die Ursache, denn zum einen funktioniert ja anfänglich alles mit den gesetzten Attributen und zum anderen habe ich bereits ohne getestet.

Aktuell ist es wieder nicht mehr funktional. Dann kommen wirklich gar keine Events mehr durch, nicht mal ein On/Off des Schalters.
Keine Aktualisierungen mehr seit gestern 23h...

Bitte beantworte auch meine erste Frage. Du erhältst Updates aber Events werden keine generiert?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: strategy am 25 Februar 2023, 23:35:21
Zitat von: dominik am 25 Februar 2023, 23:30:34
Bitte beantworte auch meine erste Frage. Du erhältst Updates aber Events werden keine generiert?

Ja, die Werte die aus dem Gerät kommen werden aktualisiert, UserReadings und über DOIF aktualisierte Readings leider nicht.
Auch das Statistics Modul aktualisiert nicht mehr...
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 25 Februar 2023, 23:50:28
Ok, dann liegt's aber nicht an fhempy. Lösch mal all deine event Attribute und mach einen fhem Neustart sicherheitshalber.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: strategy am 26 Februar 2023, 00:02:44
Zitat von: dominik am 25 Februar 2023, 23:50:28
Ok, dann liegt's aber nicht an fhempy. Lösch mal all deine event Attribute und mach einen fhem Neustart sicherheitshalber.

Ein Löschen aller Event-Attribute alleine bringt nichts.
Nachdem ich danach einen Neustart gemacht habe läuft es sofort wieder. Habe jetzt bis auf weiteres alle Event Attribute weggelassen.

Ich werde beobachten und berichten.

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: stefanru am 26 Februar 2023, 01:39:55
Hi Thomas,

das addlog brauchst du um wenn keine Events vom Tuya Device kommen trotzdem was in die DB zu schreiben.
Normalerweise bei den Power Readings wenn die Steckdose aus ist.
Machst du das nicht hast du keine Logwerte und der Graph geht vom letzten 0 Wert zu dem neuen Einschaltpunkt. Also so ein Dreieck über die Zeit in der die Steckdose eigentlich aus war. Das will man nicht.
Ich habe dafür ein AT angelegt das alle 15 minuten ein addlog auslöst.
Das addlog sieht dann so aus:
set logdb addLog Fernseher_bfb7810a3e397c5fa4u7ud:cur_power;

Hier mein ganzes AT.

Internals:
   COMMAND    set logdb addLog TYPE=MAX:FILTER=type=HeatingThermostat:(temperature|desiredTemperature|valveposition);
set logdb addLog Computer_Stefan_bf881b7977c814af88jmrc:cur_power;
set logdb addLog Fernseher_bfb7810a3e397c5fa4u7ud:cur_power;
set logdb addLog Fernseher_Schlafzimmer_bf4f644bc7dd2fc71d9q52:cur_power;
set logdb addLog Fernseher_Wohnzimmer_bf7bbcb9a4b03a2c97cqid:cur_power;
set logdb addLog Stefan_Tablet_bf0572e0fb6ccbe356ykuh:cur_power;
set logdb addLog Sybille_Tablet_bf68d9b41c16be3713vcc1:cur_power;

   DEF        +*00:15:00
set logdb addLog TYPE=MAX:FILTER=type=HeatingThermostat:(temperature|desiredTemperature|valveposition);
set logdb addLog Computer_Stefan_bf881b7977c814af88jmrc:cur_power;
set logdb addLog Fernseher_bfb7810a3e397c5fa4u7ud:cur_power;
set logdb addLog Fernseher_Schlafzimmer_bf4f644bc7dd2fc71d9q52:cur_power;
set logdb addLog Fernseher_Wohnzimmer_bf7bbcb9a4b03a2c97cqid:cur_power;
set logdb addLog Stefan_Tablet_bf0572e0fb6ccbe356ykuh:cur_power;
set logdb addLog Sybille_Tablet_bf68d9b41c16be3713vcc1:cur_power;


Wegen deiner Frage mit Plots und zeitlicher Auswertung, habe ich es jetzt doch bei mir gefunden.
Du kannst mit delta-d z.B. ein Tagesdelta spezifizieren:
stefan.stromzaehler:total_consumption::delta-d:$val=($val/1000)

Damit bekommst du die Tages Kilowatt aus einem energy reading.

Gruß,
Stefan
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 26 Februar 2023, 08:37:27
Warum nutzt ihr nicht einfach step beim SVG? Es macht ja keinen Sinn im Log immer den gleichen Wert reinzuschreiben.
Titel: Antw:fhempy: tuya (lokal) - update
Beitrag von: thburkhart am 26 Februar 2023, 11:25:09
Zitat von: dominik am 25 Februar 2023, 20:10:52
Beide productids sind jetzt bereits hinterlegt. Die productid siehst du im DEF, prüfe bitte ob du die korrekte hinterlegt hast.

Cloud ist sicher auch falsch? Das wundert mich sehr, das ist sehr unüblich.
ja habe ich erst später gesehen; bei den _cloud haben Sie ja ein eigenes reading, das ich in meiner readingsgroup darstellen kann

habe nun alle Schaltsteckdosen als _local  UND _cloud und bin am Vergleichen ;-)

konntest du für die beiden Fehlerkandiaten (Faktor10) eine Lösung finden ?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 26 Februar 2023, 11:28:19
Zitat von: dominik am 26 Februar 2023, 08:37:27
Warum nutzt ihr nicht einfach step beim SVG? Es macht ja keinen Sinn im Log immer den gleichen Wert reinzuschreiben.
hmm .. step ist doch nur Visualisierung ?
Titel: Antw:fhempy: tuya (lokal) - update
Beitrag von: dominik am 26 Februar 2023, 11:34:25
Zitat von: thburkhart am 26 Februar 2023, 11:25:09
ja habe ich erst später gesehen; bei den _cloud haben Sie ja ein eigenes reading, das ich in meiner readingsgroup darstellen kann

habe nun alle Schaltsteckdosen als _local  UND _cloud und bin am Vergleichen ;-)

konntest du für die beiden Fehlerkandiaten (Faktor10) eine Lösung finden ?

Wie schon geschrieben, beide sind jetzt bereits in local um Faktor 10 reduziert.
Daher nochmals die Frage, bei Cloud hast du auch Faktor 10?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 26 Februar 2023, 11:35:33
Zitat von: thburkhart am 26 Februar 2023, 11:28:19
hmm .. step ist doch nur Visualisierung ?
Richtig, darum ging es ja, um die Darstellung um Graphen.
Titel: Antw:fhempy: tuya (lokal) - update
Beitrag von: thburkhart am 26 Februar 2023, 12:12:30
Zitat von: dominik am 26 Februar 2023, 11:34:25
Wie schon geschrieben, beide sind jetzt bereits in local um Faktor 10 reduziert.
Daher nochmals die Frage, bei Cloud hast du auch Faktor 10?

ja
_cloud
[code]define TUYAC_JL35 fhempy tuya_cloud TUYA 8877821724a16014ef14
attr TUYAC_JL35 DbLogExclude .*
attr TUYAC_JL35 alias JL35c GL AXT1800
attr TUYAC_JL35 group Schalter (T),Schalter NAS,Schalter Router
attr TUYAC_JL35 room -TUYA,NAS
attr TUYAC_JL35 stateFormat Verbrauch: [$name:energy] kWh, cPower [$name:cur_power] W, cVoltage [$name:cur_voltage] V, Time: [$name:cur_power:t]
#   DEF        tuya_cloud TUYA 8877821724a16014ef14
#   DEVICEID   8877821724a16014ef14
#   FHEMPYTYPE tuya_cloud
#   FUUID      63fa2988-f33f-fd5f-717b-3d73f9c82dc82c00
#   IODev      local_pybinding
#   NAME       TUYAC_JL35
#   NR         2207
#   PYTHONTYPE tuya_cloud
#   STATE      Verbrauch: 0.0 kWh, cPower 57.0 W, cVoltage 2251.0 V, Time: 2023-02-26 12:09:07
#   TYPE       fhempy
#   eventCount 1954
#   READINGS:
#     2023-02-26 11:19:01   active_time     1639217540
#     2023-02-26 11:19:19   add_ele         10.0
#     2023-02-26 11:19:01   biz_type        18
#     2023-02-26 11:19:01   category        cz
#     2023-02-26 11:19:19   countdown_1     0.0
#     2023-02-26 11:19:01   create_time     1639217540
#     2023-02-26 12:09:02   cur_current     25.0
#     2023-02-26 12:09:07   cur_power       57.0
#     2023-02-26 12:09:17   cur_voltage     2251.0
#     2023-02-25 16:30:21   energy          0.0
#     2023-02-26 11:19:01   icon            https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
#     2023-02-26 11:19:01   id              8877821724a16014ef14
#     2023-02-26 11:19:01   ip              149.172.226.177
#     2023-02-26 11:19:01   lat             48.5585
#     2023-02-26 11:19:01   local_key       f3ac3693f76b2a96
#     2023-02-26 11:19:01   lon             9.2025
#     2023-02-26 11:19:01   model           欧规,10A,带计电量,支持酷客RF产测
#     2023-02-26 11:19:01   name            GL AXT1800 JL35
#     2023-02-26 11:19:01   online          on
#     2023-02-26 11:19:01   owner_id        3389434
#     2023-02-26 11:19:01   product_id      wifvoilfrqeo6hvu
#     2023-02-26 11:19:01   product_name    Smart Socket
#     2023-02-26 11:19:19   state           on
#     2023-02-26 11:19:01   sub             off
#     2023-02-26 11:19:01   time_zone       +01:00
#     2023-02-26 11:19:01   uid             eu1548823829280mLHX1
#     2023-02-26 11:19:01   update_time     1677319562
#     2023-02-26 11:19:01   uuid            8877821724a16014ef14
#   args:
#     tuya_cloud_8877821724a16014ef14
#     fhempy
#     tuya_cloud
#     TUYA
#     8877821724a16014ef14
#   argsh:
#
setstate TUYAC_JL35 Verbrauch: 0.0 kWh, cPower 57.0 W, cVoltage 2251.0 V, Time: 2023-02-26 12:09:07
setstate TUYAC_JL35 2023-02-26 11:19:01 active_time 1639217540
setstate TUYAC_JL35 2023-02-26 11:19:19 add_ele 10.0
setstate TUYAC_JL35 2023-02-26 11:19:01 biz_type 18
setstate TUYAC_JL35 2023-02-26 11:19:01 category cz
setstate TUYAC_JL35 2023-02-26 11:19:19 countdown_1 0.0
setstate TUYAC_JL35 2023-02-26 11:19:01 create_time 1639217540
setstate TUYAC_JL35 2023-02-26 12:09:02 cur_current 25.0
setstate TUYAC_JL35 2023-02-26 12:09:07 cur_power 57.0
setstate TUYAC_JL35 2023-02-26 12:09:17 cur_voltage 2251.0
setstate TUYAC_JL35 2023-02-25 16:30:21 energy 0.0
setstate TUYAC_JL35 2023-02-26 11:19:01 icon https://images.tuyaeu.com/smart/icon/ay1519551146071pEnBd/14c77e7f9b5760eae919b3cb216cf70f.png
setstate TUYAC_JL35 2023-02-26 11:19:01 id 8877821724a16014ef14
setstate TUYAC_JL35 2023-02-26 11:19:01 ip 149.172.226.177
setstate TUYAC_JL35 2023-02-26 11:19:01 lat 48.5585
setstate TUYAC_JL35 2023-02-26 11:19:01 local_key f3ac3693f76b2a96
setstate TUYAC_JL35 2023-02-26 11:19:01 lon 9.2025
setstate TUYAC_JL35 2023-02-26 11:19:01 model 欧规,10A,带计电量,支持酷客RF产测
setstate TUYAC_JL35 2023-02-26 11:19:01 name GL AXT1800 JL35
setstate TUYAC_JL35 2023-02-26 11:19:01 online on
setstate TUYAC_JL35 2023-02-26 11:19:01 owner_id 3389434
setstate TUYAC_JL35 2023-02-26 11:19:01 product_id wifvoilfrqeo6hvu
setstate TUYAC_JL35 2023-02-26 11:19:01 product_name Smart Socket
setstate TUYAC_JL35 2023-02-26 11:19:19 state on
setstate TUYAC_JL35 2023-02-26 11:19:01 sub off
setstate TUYAC_JL35 2023-02-26 11:19:01 time_zone +01:00
setstate TUYAC_JL35 2023-02-26 11:19:01 uid eu1548823829280mLHX1
setstate TUYAC_JL35 2023-02-26 11:19:01 update_time 1677319562
setstate TUYAC_JL35 2023-02-26 11:19:01 uuid 8877821724a16014ef14

[/code]

und local:
[code]define TUYA_JL35 fhempy tuya wifvoilfrqeo6hvu 8877821724a16014ef14 192.168.9.93 f3ac3693f76b2a96 3.3
attr TUYA_JL35 DbLogExclude .*
attr TUYA_JL35 DbLogInclude energy
attr TUYA_JL35 alias JL35l GL AXT1800
attr TUYA_JL35 dp_01 switch_1
attr TUYA_JL35 dp_02 countdown_1
attr TUYA_JL35 dp_03 add_ele
attr TUYA_JL35 dp_04 cur_current
attr TUYA_JL35 dp_05 cur_power
attr TUYA_JL35 dp_06 cur_voltage
attr TUYA_JL35 event-min-interval energy:3600
attr TUYA_JL35 group Schalter (T)
attr TUYA_JL35 room -TUYA
attr TUYA_JL35 stateFormat Verbrauch: [$name:energy] kWh, cPower [$name:cur_power] W, cVoltage [$name:cur_voltage] V, Time: [$name:cur_power:t]
attr TUYA_JL35 tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '秒', 'max': 86400, 'step': 1}, 'desc': 'countdown 1'}]
attr TUYA_JL35 tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '秒', 'max': 86400, 'step': 1}}, {'code': 'add_ele', 'dp_id': 3, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': '度', 'max': 500000, 'step': 100}}, {'code': 'cur_current', 'dp_id': 4, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'mA', 'max': 30000, 'step': 1}}, {'code': 'cur_power', 'dp_id': 5, 'type': 'Integer', 'values': {'min': 0, 'scale': 0, 'unit': 'W', 'max': 50000, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 6, 'type': 'Integer', 'values': {'min': 0, 'unit': 'V', 'scale': 0, 'max': 2500, 'step': 1}}]
#   DEF        tuya wifvoilfrqeo6hvu 8877821724a16014ef14 192.168.9.93 f3ac3693f76b2a96 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   8877821724a16014ef14
#   FHEMPYTYPE tuya
#   FUUID      63b40e2e-f33f-fd5f-a6fc-66b5fe95602f2212
#   IODev      local_pybinding
#   NAME       TUYA_JL35
#   NR         1759
#   PYTHONTYPE tuya
#   STATE      Verbrauch: 1.007 kWh, cPower 5.6 W, cVoltage 223.8 V, Time: 2023-02-26 12:10:27
#   TYPE       fhempy
#   eventCount 1969
#   Helper:
#     DBLOG:
#       cur_power:
#         dblog_THB:
#           TIME       1677396233.04058
#           VALUE      56.0
#       energy:
#         dblog_THB:
#           TIME       1677408343.26406
#           VALUE      1.005
#   READINGS:
#     2023-02-25 17:14:51   countdown_1     0.0
#     2023-02-26 12:10:17   cur_current     25.0
#     2023-02-26 12:10:27   cur_power       5.6
#     2023-02-26 12:10:17   cur_voltage     223.8
#     2023-02-25 17:14:51   dp_07           0
#     2023-02-26 12:06:57   energy          1.007
#     2023-02-26 11:18:57   online          1
#     2023-02-26 11:19:13   state           on
#     2023-02-25 17:14:51   switch_1        on
#   args:
#     TUYA_JL35
#     fhempy
#     tuya
#     wifvoilfrqeo6hvu
#     8877821724a16014ef14
#     192.168.9.93
#     f3ac3693f76b2a96
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#
setstate TUYA_JL35 Verbrauch: 1.007 kWh, cPower 5.6 W, cVoltage 223.8 V, Time: 2023-02-26 12:10:27
setstate TUYA_JL35 2023-02-25 17:14:51 countdown_1 0.0
setstate TUYA_JL35 2023-02-26 12:10:17 cur_current 25.0
setstate TUYA_JL35 2023-02-26 12:10:27 cur_power 5.6
setstate TUYA_JL35 2023-02-26 12:10:17 cur_voltage 223.8
setstate TUYA_JL35 2023-02-25 17:14:51 dp_07 0
setstate TUYA_JL35 2023-02-26 12:06:57 energy 1.007
setstate TUYA_JL35 2023-02-26 11:18:57 online 1
setstate TUYA_JL35 2023-02-26 11:19:13 state on
setstate TUYA_JL35 2023-02-25 17:14:51 switch_1 on

[/code]

wie kannst du das aus der ferne Fixen? ohne update von Fhempy
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 26 Februar 2023, 12:16:53
Was ist bei local falsch? Das ist doch korrekt, oder? Cloud ist falsch.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 26 Februar 2023, 13:29:26
Zitat von: dominik am 26 Februar 2023, 12:16:53
Was ist bei local falsch? Das ist doch korrekt, oder? Cloud ist falsch.

ja war nur zum Vergleich

_cloud ist -wie gefragt- in der Tat falsch ;-)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 26 Februar 2023, 14:40:32
Spannend dass die Cloud falsche Werte liefert. Das hatte ich noch nie. Smartlife zeigt es richtig an?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 26 Februar 2023, 15:00:31
Zitat von: dominik am 26 Februar 2023, 14:40:32
Spannend dass die Cloud falsche Werte liefert. Das hatte ich noch nie. Smartlife zeigt es richtig an?

ja spannend ; in der app stehen 5.6 Watt

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: stefanru am 26 Februar 2023, 16:42:14
Hi Dominik,

ja steps sieht gut aus.
Das sollte eigentlich gut passen und ich bräuchte kein addLog mehr.
Ich mach ja auch Berechnungen wie z.B. delta-d, aber auch der sollte dann den richtigen letzten Wert bekommen.

Danke für den Tip schau ich mal ob ich addLog loswerden kann.
Mir fällt da nur ein dass ich wenn keine Werte ab 0 Uhr kommen und die Heizung erst um 9 Uhr angeht von 0 bis 9 gar nichts im Plot hatte, wenn ich mich richtig erinnere.

Gruß,
Stefan
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 26 Februar 2023, 17:11:35
Also das mit dem Translation klappt noch nicht richtig. Habe jetzt den code für ein énum folgendermaßen geändert:
{'code': 'timer', 'dp_id': 13, 'type': 'Enum', 'values': '{"range":["0","1","2","3"], "translation": { "0": "Off","1": "1 Stunde","2": "3 Stunden","3": "6 Stunden"}}', 'desc': 'Timer'} bzw.
{'code': 'timer', 'dp_id': 13, 'type': 'Enum', 'values': '{"range":["0","1","2","3"], "translation": { "0": "Off","1": "1 Stunde","2": "3 Stunden","3": "6 Stunden"}}'}

In der Auswahl des Setbefehls kann ich unter Timer jetzt zwischen Off und 1 auswählen und zusätzlich gibt es als Alternativauswahl zu Timer nun noch "Stunde,3", "Stunde" und "Stunde,6".
Sieht für mich erstmal danach aus, dass dieAnführungszeichen irgendwo falsch gesetzt sind.

Könntest du das noch mal gegenchecken?

Der Validator meldet in jeden Codeteil immer einen Fehler in Zeile 1:
{
'code': 'timer',
'dp_id': 13,
'type': 'Enum',
'values': '{"range":["0","1","2","3"], "translation": { "0": "Off","1": "1 Stunde","2": "3 Stunden","3": "6 Stunden"}}',
'desc': 'Timer'
}

Error: Parse error on line 1:
{ 'code': 'timer', 'd
--^
Expecting 'STRING', '}', got 'undefined'

Die Code-Snippets funktionieren aber bis auf den genannten Punkt.

P.S. Bei einem weiteren Punkt funktioniert es richtig. Einziger Unterschied ist das die Alias keine eerzeichen enthalten. Kann das ein Problem sein?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 26 Februar 2023, 17:46:55
Genau, Leerzeichen dürfen keine drin sein, weil fhem keine Befehle mit Leerzeichen kennt.

@stefanru, für den Tagesübergang kannst du dir logproxy anschauen, damit geht das.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 26 Februar 2023, 17:50:42
Hallo Dominik,
hab es jetzt per Unterstrich gelöst. Sieht zwar nicht so schön aus, aber wenn's nicht anders geht muss das reichen.

Als letzte Eigenschaft bleibt mir noch die Farbe der LED. Mit welcher Funktion kann man eine Farbauswahl generieren, falls überhaupt möglich?
Und in den Readings wird der Farbwert mit "3600ff00fcffff" angegeben. Also nicht typisches Hex-Format. Sagt dir das was?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 26 Februar 2023, 18:48:47
Zitat von: dominik am 26 Februar 2023, 11:35:33
Richtig, darum ging es ja, um die Darstellung um Graphen.

mir geht es immer noch darum events für energy zu erzeugen

meinen JL35 musste ich eher diesbezüglich bändigen

[code]

define TUYA_JL35 fhempy tuya wifvoilfrqeo6hvu 8877821724a16014ef14 192.168.9.93
attr TUYA_JL35 DbLogExclude .*
attr TUYA_JL35 DbLogInclude energy
attr TUYA_JL35 alias JL35 GL AXT1800
attr TUYA_JL35 dp_01 switch_1
attr TUYA_JL35 dp_02 countdown_1
attr TUYA_JL35 dp_03 add_ele
attr TUYA_JL35 dp_04 cur_current
attr TUYA_JL35 dp_05 cur_power
attr TUYA_JL35 dp_06 cur_voltage
attr TUYA_JL35 event-min-interval energy:3600
attr TUYA_JL35 group Schalter (T)
attr TUYA_JL35 room -TUYA
attr TUYA_JL35 stateFormat Verbrauch: [$name:energy] kWh, cPower [$name:cur_power] W, cVoltage [$name:cur_voltage] V, Time: [$name:cur_power:t]

setstate TUYA_JL35 Verbrauch: 1.035 kWh, cPower 5.7 W, cVoltage 225.1 V, Time: 2023-02-26 18:38:15
setstate TUYA_JL35 2023-02-25 17:14:51 countdown_1 0.0
setstate TUYA_JL35 2023-02-26 18:38:15 cur_current 25.0
setstate TUYA_JL35 2023-02-26 18:38:15 cur_power 5.7
setstate TUYA_JL35 2023-02-26 18:38:00 cur_voltage 225.1
setstate TUYA_JL35 2023-02-25 17:14:51 dp_07 0
setstate TUYA_JL35 2023-02-26 18:30:54 energy 1.035
setstate TUYA_JL35 2023-02-26 17:43:05 online 1
setstate TUYA_JL35 2023-02-26 17:43:36 state on
setstate TUYA_JL35 2023-02-25 17:14:51 switch_1 on

[/code]

aber bei allen SPs klappt das nicht mit

attr TUYA_JL35 DbLogExclude .*
attr TUYA_JL35 DbLogInclude energy
attr TUYA_JL35 event-min-interval energy:3600


wie könnte ich den event für energy forcieren?

@stefanru
ich hab`s woill etwas mehr kapiert... ein schlichtes
+*01:00:00 set DbLog_THB addlog TYPE=fhempy:energy
schreibt nun wunderbar alle enery-Werte alle Stunde :-)

danke für den wertvollen Tip!



Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 26 Februar 2023, 21:19:30
Zitat von: Superposchi am 26 Februar 2023, 17:50:42
Hallo Dominik,
hab es jetzt per Unterstrich gelöst. Sieht zwar nicht so schön aus, aber wenn's nicht anders geht muss das reichen.

Als letzte Eigenschaft bleibt mir noch die Farbe der LED. Mit welcher Funktion kann man eine Farbauswahl generieren, falls überhaupt möglich?
Und in den Readings wird der Farbwert mit "3600ff00fcffff" angegeben. Also nicht typisches Hex-Format. Sagt dir das was?

Ich denke das ist colour_data. Probier mal:
functions: {'code': 'colour_data', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}, 'desc': 'colour data'}
status: {'code': 'colour_data', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}

Btw, wenn dann alles funktioniert, poste bitte die beiden tuya_spec_... Attribute. Ich würde es dann in die mappings.py aufnehmen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 26 Februar 2023, 21:20:33
Zitat von: thburkhart am 26 Februar 2023, 18:48:47
mir geht es immer noch darum events für energy zu erzeugen

meinen JL35 musste ich eher diesbezüglich bändigen

[code]

define TUYA_JL35 fhempy tuya wifvoilfrqeo6hvu 8877821724a16014ef14 192.168.9.93
attr TUYA_JL35 DbLogExclude .*
attr TUYA_JL35 DbLogInclude energy
attr TUYA_JL35 alias JL35 GL AXT1800
attr TUYA_JL35 dp_01 switch_1
attr TUYA_JL35 dp_02 countdown_1
attr TUYA_JL35 dp_03 add_ele
attr TUYA_JL35 dp_04 cur_current
attr TUYA_JL35 dp_05 cur_power
attr TUYA_JL35 dp_06 cur_voltage
attr TUYA_JL35 event-min-interval energy:3600
attr TUYA_JL35 group Schalter (T)
attr TUYA_JL35 room -TUYA
attr TUYA_JL35 stateFormat Verbrauch: [$name:energy] kWh, cPower [$name:cur_power] W, cVoltage [$name:cur_voltage] V, Time: [$name:cur_power:t]

setstate TUYA_JL35 Verbrauch: 1.035 kWh, cPower 5.7 W, cVoltage 225.1 V, Time: 2023-02-26 18:38:15
setstate TUYA_JL35 2023-02-25 17:14:51 countdown_1 0.0
setstate TUYA_JL35 2023-02-26 18:38:15 cur_current 25.0
setstate TUYA_JL35 2023-02-26 18:38:15 cur_power 5.7
setstate TUYA_JL35 2023-02-26 18:38:00 cur_voltage 225.1
setstate TUYA_JL35 2023-02-25 17:14:51 dp_07 0
setstate TUYA_JL35 2023-02-26 18:30:54 energy 1.035
setstate TUYA_JL35 2023-02-26 17:43:05 online 1
setstate TUYA_JL35 2023-02-26 17:43:36 state on
setstate TUYA_JL35 2023-02-25 17:14:51 switch_1 on

[/code]

aber bei allen SPs klappt das nicht mit

attr TUYA_JL35 DbLogExclude .*
attr TUYA_JL35 DbLogInclude energy
attr TUYA_JL35 event-min-interval energy:3600


wie könnte ich den event für energy forcieren?

@stefanru
ich hab`s woill etwas mehr kapiert... ein schlichtes
+*01:00:00 set DbLog_THB addlog TYPE=fhempy:energy
schreibt nun wunderbar alle enery-Werte alle Stunde :-)

danke für den wertvollen Tip!

Ist das jetzt erledigt oder noch was offen?

tuya_cloud sollte nun den richtigen Faktor liefern, bitte update machen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 26 Februar 2023, 21:32:35
Bei den Set-Befehlen wird es angezeigt, Eingaben werden aber nicht angenommen.
Bei den Readins wurde kein Reading "color_data" erzeugt.

Hier das Attribut, color_data ist der letzte Teil:
[{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'switch_led', 'dp_id': 11, 'type': 'Boolean', 'values': {}}, {'code': 'mode', 'dp_id': 103, 'type': 'Enum', 'values': '{"range":["small","big","off"]}'}, {'code': 'timer', 'dp_id': 13, 'type': 'Enum', 'values': '{"range":["0","1","2","3"], "translation": { "0": "Off","1": "1_Stunde","2": "3_Stunden","3": "6_Stunden"}}'}, {'code': 'colortype', 'dp_id': 110, 'type': 'Enum', 'values': '{"range":["1","2","3"], "translation": { "1": "Gradiant","2": "Fix","3": "Nachtlicht"}}'}, {'code': 'brightness', 'dp_id': 111, 'type': 'Integer', 'values': '{"min":1,"max":255,"scale":0,"step":1}'}, {'code': 'colour_data', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}]
Vielleicht findest du ja einen fehler, er hat nach dem Restart des fhempy-servers jedenfalls nicht gemuckt.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 26 Februar 2023, 21:35:13
dp 24 ist eh richtig? Ich hatte das nur von einen meiner Devices rauskopiert.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 26 Februar 2023, 21:43:09
Nein, es war DP_108 - ist mir auch nach dem schreiben aufgefallen.
mit dp_108 wird ein Reading erzeut und aus dem Set-Befehl auch eine Farbe übernommen. Allerdings nicht die Farbe die ausgewählt wurde.
Beispiel: ff0000 zeigt in der App schwarz an, bei 0000ff kommt ein Grünton (nicht das originale Grün, sondern ein Mischton).

Also sag mal die Hälfte hat ggklappt, grins.

PS: Habe mal drau geachtet, wenn der Wert über die Fhem-Oberfläche geändert wird, ändert sich zwar das Reading colour_data, nicht jedoch das Reading dp_108 in dem die 14-stellige Angabe steht.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 26 Februar 2023, 21:56:29
dp_108 kannst danach löschen. Es werden immer nur die benannten Readings verwenden, da im Normalfall die dp_xxx gar nicht existieren wenn tuya die richtigen Specs liefert.

Dann ist es vielleicht colour_data_v2
function: {'code': 'colour_data_v2', 'dp_id': 108, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}, 'desc': 'colour data v2'}
status: {'code': 'colour_data_v2', 'dp_id': 108, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 26 Februar 2023, 22:38:00
Zitat von: dominik am 26 Februar 2023, 21:20:33
Ist das jetzt erledigt oder noch was offen?

tuya_cloud sollte nun den richtigen Faktor liefern, bitte update machen.

ich suche noch 5 Devices, dich in _local noch keine Daten liefern

ich berichte dann

-cloud ist momentan auskommentiert
-cloud würde ich als workaround nehmen, falls ich es _local nicht schaffe
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 26 Februar 2023, 22:38:50
Hab es geändert und doppelt probiert, leider kommt dasDevice nach dem Neustart nicht über Initializing... hinaus.
Gibt es noch eine Alternative, sonst probiere ich es noch mal mit der ersten und teste was rum.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 26 Februar 2023, 22:41:24
Zitat von: Superposchi am 26 Februar 2023, 22:38:50
Hab es geändert und doppelt probiert, leider kommt dasDevice nach dem Neustart nicht über Initializing... hinaus.
Gibt es noch eine Alternative, sonst probiere ich es noch mal mit der ersten und teste was rum.
Dann ist wahrscheinlich colour_data eh richtig. Hast du danach die Helligkeit noch erhöht oder work_mode geändert, falls du den hast?

Andere Alternativen gibt es nicht. Aktuell gibt es von tuya nur colour_data und colour_data_v2.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 26 Februar 2023, 23:12:44
Also aufgrund des Hinweises hab ich mal drauf geachtet, die Helligkeit wird immer auf Null gesetzt wenn über Fhem die Farbe geändert wird.
Bei einer Änderung stimmen die Werte allerdings nicht zusammen. Mal so eine große Übersicht mit ein paar Beispielen:
Eingabe im Set-Befehl                Reading Colour_data                Reading dg_108                App-Darstellung
0000FF                                     -6f821979-6f82                       00ff11007c64ff                  Rot
FF0000                                     -6f821979-6f82                       00ff11007c64ff                  Rot
00FF00                                     -6f821979-6f82                       00ff11007c64ff                  Rot

Es wird also offensichtlich nach absetzen des Set-Befehls nichts übernommen.

Wenn in der App eine Farbe (ungefähre aAuswahl am Farbrad) eingestellt wird sieht es so aus:
Eingabe im Set-Befehl                Reading Colour_data                Reading dg_108                App-Darstellung
1C261C                                     1c261c261c26                        00ff11007c64ff                  Grün
1C261C                                    -103ee178f-103ee                   00ff11007c64ff                  Rot
397939                                     39793979-e6e77                     00ff11007c64ff                 Blau

Ich kann da keine Logik drin erkennen. Vielleicht sagt es dir ja was, du hast die Erfahrung mit TUYA.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: strategy am 27 Februar 2023, 07:54:47
Zur Vollständigkeit möchte ich hier noch die Lösung zu folgendem Problem teilen:

Zitat von: strategy am 25 Februar 2023, 22:01:48
Hallo zusammen,

ich habe ein seltsames Phänomen und hoffe Ihr habt eine Idee.
Nutze seit einigen Tagen tuya local für meine Aubess Steckdosen mit Strommessung.
Leider bekomme ich nach einigen Stunden keine Events mehr von den Devices und damit laufen meine DOIFs bzw. notifys nicht mehr.
Die Werte werden nach wie vor aktualisiert, aber es werden keine Events mehr erzeugt. Nach einem Neustart läuft dann wieder für einige Stunden alles normal und dann tritt dasselbe Phänomen wieder auf.

Bei allen übrigen Devices läuft der Event-Mechanismus normal weiter und bricht nicht nach der Zeit ab.

Irgendeine Idee??

Danke,
Matthias


Die Ursache hatte nichts mit fhempy oder tuya zu tun. Auslöser war ein nicht funktionierendes DOIF mit dem ich bestimmte tägliche und wöchentliche Statistiken berechne.
Anscheinend habe ich an meiner Konfiguration irgendetwas geändert, sodass dieses DOIF versucht hat eine geschützte Variable zu beschreiben. Das hat in folge den kompletten Eventmechanismus für dieses Device ausgehebelt.
Nach einem Neustart hat alles wieder funktioniert, aber lediglich bis zur nächsten Ausführung des DOIF. DOIF korrigiert, Problem gelöst.

Danke Euch

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: stefanru am 27 Februar 2023, 16:34:27
Hi Dominik, danke schaue mir LogProxy an.

Gruß,
Stefan
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 27 Februar 2023, 19:50:52
Zitat von: dominik am 26 Februar 2023, 21:20:33
Ist das jetzt erledigt oder noch was offen?

tuya_cloud sollte nun den richtigen Faktor liefern, bitte update machen.

Hallo Dominik,

ich habe nun ausgiebig getestet. Die rund 60 Strommesser zeigen nun cur_power Werte, die plausibel sind.  fhempy_local  bekommt wohl fast zeitgerecht die korrekten Werte.
Aber da wird es immer wieder mal Abweichungen geben.
Um die Daten mit der App monatsgenau synchron darstellen zu können, wäre eine Korrekturfunktion für die energy-Werte notwendig.
Dies auch, um die bestehen fehlerhaften Daten zu Korrigieren.

Dazu gäbe es wohl folgende Möglichkeiten:

a) Rücksetzen der Werte auf Null zu jedem Monatsanfang also zum 1.3.2023  00:00   (vorherige Daten sind ja in der dblog)
aa) durch benutzerdefinierte Befehl
b) separat am Monatsanfang startende Zähler energy01 bis energy12

a) könnte wohl schnell realisiert werden und ich könnte dann Ende März mit den Appdaten vergleichen.

Wie denkst du darüber?

Herzliche Grüße

Thomas

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 27 Februar 2023, 20:13:07
Zitat von: thburkhart am 27 Februar 2023, 19:50:52
Hallo Dominik,

ich habe nun ausgiebig getestet. Die rund 60 Strommesser zeigen nun cur_power Werte, die plausibel sind.  fhempy_local  bekommt wohl fast zeitgerecht die korrekten Werte.
Aber da wird es immer wieder mal Abweichungen geben.
Um die Daten mit der App monatsgenau synchron darstellen zu können, wäre eine Korrekturfunktion für die energy-Werte notwendig.
Dies auch, um die bestehen fehlerhaften Daten zu Korrigieren.

Dazu gäbe es wohl folgende Möglichkeiten:

a) Rücksetzen der Werte auf Null zu jedem Monatsanfang also zum 1.3.2023  00:00   (vorherige Daten sind ja in der dblog)
aa) durch benutzerdefinierte Befehl
b) separat am Monatsanfang startende Zähler energy01 bis energy12

a) könnte wohl schnell realisiert werden und ich könnte dann Ende März mit den Appdaten vergleichen.

Wie denkst du darüber?

Herzliche Grüße

Thomas

Du kannst statistics dafür verwenden, dann hast du jeweils monatsgenaue energy Werte in separaten Readings. energy muss dazu auch nicht zurückgesetzt werden. Ein reset_energy kann ich dennoch einbauen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 27 Februar 2023, 20:47:07
Zitat von: dominik am 27 Februar 2023, 20:13:07
Du kannst statistics dafür verwenden, dann hast du jeweils monatsgenaue energy Werte in separaten Readings. energy muss dazu auch nicht zurückgesetzt werden. Ein reset_energy kann ich dennoch einbauen.

super!
das muss man dann für jedes Device einzeln definieren:

gefunden habe ich in der Wiki:define myStatDevice statistics Wetterstation|Stromzaehler|Thermometer_.*

für die TUYAs also so was?

define TUYA_JL20 statistics energy|cur_power|cur_voltage .*

und dann kriege ich es nicht mehr zusammen:
attr myStatDevice deltaReadings total_energy
attr myStatDevice singularReadings Stromzaehler:total_energy:Delta:Hour|Stromzaehler:total_energy:Delta:Day|Stromzaehler:total_energy:Delta:Month|Stromzaehler:total_energy:Delta:Year


könntest Du bitte das Beispiel für TUYA_JL20 für den Dummen ergänzen? ;-)
die so erzeugten Readings müsste ich dann noch in die Dlog übertragen?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 27 Februar 2023, 20:56:49
Ich bin auch kein statistics Experte, ich habe es nur rudimentär in Verwendung :)

Bei mir:
define stateDev statistics tuya_local_xxxxxx|tuya_local_yyyyyy

Also einfach die Devices anführen. Wahrscheinlich geht tuya.* auch. Die Readings aufsplitten habe ich noch nicht probiert.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 27 Februar 2023, 21:00:00
Zitat von: Superposchi am 26 Februar 2023, 23:12:44
Also aufgrund des Hinweises hab ich mal drauf geachtet, die Helligkeit wird immer auf Null gesetzt wenn über Fhem die Farbe geändert wird.
Bei einer Änderung stimmen die Werte allerdings nicht zusammen. Mal so eine große Übersicht mit ein paar Beispielen:
Eingabe im Set-Befehl                Reading Colour_data                Reading dg_108                App-Darstellung
0000FF                                     -6f821979-6f82                       00ff11007c64ff                  Rot
FF0000                                     -6f821979-6f82                       00ff11007c64ff                  Rot
00FF00                                     -6f821979-6f82                       00ff11007c64ff                  Rot

Es wird also offensichtlich nach absetzen des Set-Befehls nichts übernommen.

Wenn in der App eine Farbe (ungefähre aAuswahl am Farbrad) eingestellt wird sieht es so aus:
Eingabe im Set-Befehl                Reading Colour_data                Reading dg_108                App-Darstellung
1C261C                                     1c261c261c26                        00ff11007c64ff                  Grün
1C261C                                    -103ee178f-103ee                   00ff11007c64ff                  Rot
397939                                     39793979-e6e77                     00ff11007c64ff                 Blau

Ich kann da keine Logik drin erkennen. Vielleicht sagt es dir ja was, du hast die Erfahrung mit TUYA.

Das sieht sehr eigenartig aus, vor allem die - im colour_data Reading. Lösche bitte nochmals das colour_data aus den Attributen, mach einen fhempy Neustart und dann setz die Farbe via App auf rot (komplett rot). Poste dann die Inhalte vom Reading dp_108. Selbiges für grün und blau.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 27 Februar 2023, 21:27:38
Zitat von: dominik am 27 Februar 2023, 20:56:49
Ich bin auch kein statistics Experte, ich habe es nur rudimentär in Verwendung :)

Bei mir:
define stateDev statistics tuya_local_xxxxxx|tuya_local_yyyyyy

Also einfach die Devices anführen. Wahrscheinlich geht tuya.* auch. Die Readings aufsplitten habe ich noch nicht probiert.

wow, das klappt :-) prinzipiell
[code]define TUYA_JL03 fhempy tuya 1hxNMF9lRQL2xpEA 22230808bcddc2135068 192.168.9.71 c0aa3a00c215aa39 3.1 x
attr TUYA_JL03 DbLogExclude .*
attr TUYA_JL03 DbLogInclude energy
attr TUYA_JL03 alias JL03 Fernseher Wohnzimmer
attr TUYA_JL03 dp_01 switch
attr TUYA_JL03 dp_02 countdown_1
attr TUYA_JL03 dp_04 cur_current
attr TUYA_JL03 dp_05 cur_power
attr TUYA_JL03 dp_06 cur_voltage
attr TUYA_JL03 event-min-interval energy:3600
attr TUYA_JL03 group Schalter (T),Schalter Medien
attr TUYA_JL03 room - Raum -> Wohnzimmer,-TUYA
attr TUYA_JL03 stateFormat Stat: [$name:statEnergy] V: [$name:energy] kWh, cP [$name:cur_power] W, cV [$name:cur_voltage] V, T: [$name:cur_power:t]
attr TUYA_JL03 tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}]
attr TUYA_JL03 tuya_spec_status [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'cur_current', 'dp_id': 4, 'type': 'Integer', 'values': {'unit': 'mA', 'min': 0, 'max': 30000, 'scale': 0, 'step': 1}}, {'code': 'cur_power', 'dp_id': 5, 'type': 'Integer', 'values': {'unit': 'W', 'min': 0, 'max': 50000, 'scale': 1, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 6, 'type': 'Integer', 'values': {'unit': 'V', 'min': 0, 'max': 5000, 'scale': 1, 'step': 1}}, {'code': 'countdown_1', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}]
#   DEF        tuya 1hxNMF9lRQL2xpEA 22230808bcddc2135068 192.168.9.71 c0aa3a00c215aa39 3.1 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   22230808bcddc2135068
#   FHEMPYTYPE tuya
#   FUUID      63a4acad-f33f-fd5f-8f22-4e9e8e639e6067ab
#   IODev      local_pybinding
#   NAME       TUYA_JL03
#   NR         1653
#   PYTHONTYPE tuya
#   STATE      Stat: Hour: 0.015 Day: 0.015 Month: 0.015 Year: 0.015 (since: 2023-02-27_21:10:28 ) V: 1.57 kWh, cP 41.0 W, cV 229.7 V, T: 2023-02-27 21:23:31
#   TYPE       fhempy
#   eventCount 3663
#   Helper:
#     DBLOG:
#       energy:
#         dblog_THB:
#           TIME       1677527855.70051
#           VALUE      1.54
#   READINGS:
#     2023-02-25 18:34:06   countdown_1     0.0
#     2023-02-27 21:23:31   cur_current     249.0
#     2023-02-27 21:23:31   cur_power       41.0
#     2023-02-27 21:23:25   cur_voltage     229.7
#     2023-02-27 21:23:17   energy          1.57
#     2023-02-27 18:13:37   online          1
#     2023-02-27 21:23:31   statEnergy      Hour: 0.015 Day: 0.015 Month: 0.015 Year: 0.015 (since: 2023-02-27_21:10:28 )
#     2023-02-27 18:56:24   state           on
#     2023-02-25 18:37:19   switch          on
#   args:
#     TUYA_JL03
#     fhempy
#     tuya
#     1hxNMF9lRQL2xpEA
#     22230808bcddc2135068
#     192.168.9.71
#     c0aa3a00c215aa39
#     3.1
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#   helper:
#     _98_statistics TUYA_SP02_Stat
#
setstate TUYA_JL03 Stat: Hour: 0.015 Day: 0.015 Month: 0.015 Year: 0.015 (since: 2023-02-27_21:10:28 ) V: 1.57 kWh, cP 41.0 W, cV 229.7 V, T: 2023-02-27 21:23:31
setstate TUYA_JL03 2023-02-25 18:34:06 countdown_1 0.0
setstate TUYA_JL03 2023-02-27 21:23:31 cur_current 249.0
setstate TUYA_JL03 2023-02-27 21:23:31 cur_power 41.0
setstate TUYA_JL03 2023-02-27 21:23:25 cur_voltage 229.7
setstate TUYA_JL03 2023-02-27 21:23:17 energy 1.57
setstate TUYA_JL03 2023-02-27 18:13:37 online 1
setstate TUYA_JL03 2023-02-27 21:23:31 statEnergy Hour: 0.015 Day: 0.015 Month: 0.015 Year: 0.015 (since: 2023-02-27_21:10:28 )
setstate TUYA_JL03 2023-02-27 18:56:24 state on
setstate TUYA_JL03 2023-02-25 18:37:19 switch on

[/code]

statEnergy      Hour: 0.015 Day: 0.015 Month: 0.015 Year: 0.015 (since: 2023-02-27_21:10:28 )

damit kann die DB wohl nichts anfangen ..
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 27 Februar 2023, 21:57:46
Probier es mal mit singularReadings Attribut. Zumindest laut commandref sollte das die Werte einzeln anzeigen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 27 Februar 2023, 22:34:53
Zitat von: dominik am 27 Februar 2023, 21:57:46
Probier es mal mit singularReadings Attribut. Zumindest laut commandref sollte das die Werte einzeln anzeigen.

gemacht und mit prefix

[code]define statistics_TUYA_SP_day statistics TUYA_SP.* statday
attr statistics_TUYA_SP_day deltaReadings TUYA.*:energy: Delta:(Day)
attr statistics_TUYA_SP_day room ,-TUYA,TUYA Stromverbrauch
attr statistics_TUYA_SP_day singularReadings TUYA_SP.*:energy:Delta:day
#   CFGFN     
#   DEF        TUYA_SP.* statday
#   DEV_REGEXP TUYA_SP.*
#   FUUID      63fd1828-f33f-fd5f-db50-ca1f234e19af24cb
#   NAME       statistics_TUYA_SP_day
#   NOTIFYDEV  global,TUYA_SP.*
#   NR         2848
#   NTFY_ORDER 10-statistics_TUYA_SP_day
#   PREFIX     statday
#   STATE      Updated stats for: TUYA_SP16
#   TYPE       statistics
#   eventCount 1890
#   Helper:
#     DBLOG:
#       monitoredDevicesfhempy:
#         dblog_THB:
#           TIME       1677531188.73647
#           VALUE      TUYA_SP13,TUYA_SP11,TUYA_SP06,TUYA_SP16,TUYA_SP01,TUYA_SP02,TUYA_SP03,TUYA_SP04,TUYA_SP05,TUYA_SP07,TUYA_SP08,TUYA_SP09,TUYA_SP10,TUYA_SP12,TUYA_SP14,TUYA_SP15
#       state:
#         dblog_THB:
#           TIME       1677533648.85036
#           VALUE      Updated stats for: TUYA_SP16
#   READINGS:
#     2023-02-27 21:53:08   monitoredDevicesfhempy TUYA_SP13,TUYA_SP11,TUYA_SP06,TUYA_SP16,TUYA_SP01,TUYA_SP02,TUYA_SP03,TUYA_SP04,TUYA_SP05,TUYA_SP07,TUYA_SP08,TUYA_SP09,TUYA_SP10,TUYA_SP12,TUYA_SP14,TUYA_SP15
#     2023-02-27 22:23:38   nextPeriodChangeCalc 2023-02-27 22:59:55
#     2023-02-27 22:34:08   state           Updated stats for: TUYA_SP16
#   fhem:
#     modulVersion $Date: 2022-07-12 07:25:06 +0200 (Tue, 12 Jul 2022) $
#     nextPeriodChangeTime 1677535195
#
setstate statistics_TUYA_SP_day Updated stats for: TUYA_SP16
setstate statistics_TUYA_SP_day 2023-02-27 22:34:00 .TUYA_SP01:energy LastValue: 0.664 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:23:38 .TUYA_SP02:energy LastValue: 10.023 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:29:57 .TUYA_SP03:energy LastValue: 2.12 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:25:02 .TUYA_SP04:energy LastValue: 1.0 ShowDate: 7 DecPlaces: 1
setstate statistics_TUYA_SP_day 2023-02-27 22:25:42 .TUYA_SP05:energy LastValue: 0.54 ShowDate: 7 DecPlaces: 2
setstate statistics_TUYA_SP_day 2023-02-27 22:34:04 .TUYA_SP06:energy LastValue: 4.636 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:23:39 .TUYA_SP07:energy LastValue: 0.373 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:23:39 .TUYA_SP08:energy LastValue: 40.462 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:23:39 .TUYA_SP09:stateDay lastTime: 1677533019 showDate: 1 (since: 2023-02-27_21:53:08) off: 1831 off_Count: 1 lastState: off
setstate statistics_TUYA_SP_day 2023-02-27 22:23:39 .TUYA_SP09:stateMonth off: 1831 (since: 2023-02-27_21:53:08) lastTime: 1677533019 showDate: 1 off_Count: 1 lastState: off
setstate statistics_TUYA_SP_day 2023-02-27 22:23:39 .TUYA_SP09:stateYear lastState: off (since: 2023-02-27_21:53:08) off: 1831 lastTime: 1677533019 showDate: 1 off_Count: 1
setstate statistics_TUYA_SP_day 2023-02-27 22:23:39 .TUYA_SP10:energy LastValue: 0.188 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:33:43 .TUYA_SP11:energy LastValue: 2.702 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:34:04 .TUYA_SP12:energy LastValue: 3.079 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:33:01 .TUYA_SP13:energy LastValue: 5.417 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:34:04 .TUYA_SP14:energy LastValue: 0.982 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:34:07 .TUYA_SP15:energy LastValue: 0.586 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:34:08 .TUYA_SP16:energy LastValue: 0.778 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 21:53:08 monitoredDevicesfhempy TUYA_SP13,TUYA_SP11,TUYA_SP06,TUYA_SP16,TUYA_SP01,TUYA_SP02,TUYA_SP03,TUYA_SP04,TUYA_SP05,TUYA_SP07,TUYA_SP08,TUYA_SP09,TUYA_SP10,TUYA_SP12,TUYA_SP14,TUYA_SP15
setstate statistics_TUYA_SP_day 2023-02-27 22:23:38 nextPeriodChangeCalc 2023-02-27 22:59:55
setstate statistics_TUYA_SP_day 2023-02-27 22:34:08 state Updated stats for: TUYA_SP16

[/code]

so bekomme ich zwar ein separates reading _day aber mit allen Perioden
statEnergy
Hour: 0.000 Day: 0.000 Month: 0.000 Year: 0.000 (since: 2023-02-27_21:53:07 )
2023-02-27 21:59:58
statEnergyLast
Hour: 0.000 Day: - Month: - Year: - (since: 2023-02-27_21:53:07 )
2023-02-27 21:59:58
statdayEnergy
Hour: 0.000 Day: 0.000 Month: 0.000 Year: 0.000 (since: )
2023-02-27 22:23:38



Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 27 Februar 2023, 22:36:55
am Elegantesten wäre es wohl doch, wenn die Monatsreadings vom Fhempy-Modul kämen ;-)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: tom0 am 27 Februar 2023, 22:43:44
Ich habe mal eine Frage in die Runde da ich keine Idee mehr habe, bei 2 Tuya Sensoren sitze ich schon lange immer wieder dran.
Basis ist ein Pi, Bullseye 32 bit, noch Python 3.9.2, pybinding 0.1.610, FHEM Updates vom Sonntag und noch keine Python venv für FHEM.
Seit Jahren parallel einen alten Pi mit FHEM2FHEM (meine Wetterstation blockiert sonst immer alles), alles feste IP's.
Geräte und Sensoren sind von vielen Herstellern gemischt, parallel seit rund 2 Wochen Home Assistant mit auf dem Pi, von wo ich mir einige Daten über MQTT hole (kein FHEM Plugin für Hoover/Haier/Candy gefunden).
Ich habe mehrere Tuya Temperatursensoren, Co Sensor etc. aber ich bekomme sie nicht auf Dauer zum funktionieren.
Wenn sie neu eingerichtet sind funktionieren sie meist für x Minuten bis Stunden, in Tuya cloud meist etwas länger als in Tuya local.
Über MQTT funktionieren sie wiederum x Minuten bis Stunden länger als in den Tuya Plugins.
In Home Assistant funktionieren sie wiederum in der Regel x Minuten bis Stunden länger.
Nach einen Neustart in der Regel wieder alles auf Anfang außer bei Tuya local, hier oft keine Funktion.
In der Handy App keine Probleme.
Parallel habe ich noch ein paar Aktoren für Tuya, die schalten ohne Probleme weiter, überall. Hoover/Haier/Candy macht auch keine Probleme.
Über ein doif löschen und wieder anlegen ist vermutlich keine optimale Lösung.

Jemand eine Idee wo ich noch suchen kann?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 27 Februar 2023, 22:47:54
Zitat von: tom0 am 27 Februar 2023, 22:43:44
Ich habe mal eine Frage in die Runde da ich keine Idee mehr habe, bei 2 Tuya Sensoren sitze ich schon lange immer wieder dran.
Basis ist ein Pi, Bullseye 32 bit, noch Python 3.9.2, pybinding 0.1.610, FHEM Updates vom Sonntag und noch keine Python venv für FHEM.
Seit Jahren parallel einen alten Pi mit FHEM2FHEM (meine Wetterstation blockiert sonst immer alles), alles feste IP's.
Geräte und Sensoren sind von vielen Herstellern gemischt, parallel seit rund 2 Wochen Home Assistant mit auf dem Pi, von wo ich mir einige Daten über MQTT hole (kein FHEM Plugin für Hoover/Haier/Candy gefunden).
Ich habe mehrere Tuya Temperatursensoren, Co Sensor etc. aber ich bekomme sie nicht auf Dauer zum funktionieren.
Wenn sie neu eingerichtet sind funktionieren sie meist für x Minuten bis Stunden, in Tuya cloud meist etwas länger als in Tuya local.
Über MQTT funktionieren sie wiederum x Minuten bis Stunden länger als in den Tuya Plugins.
In Home Assistant funktionieren sie wiederum in der Regel x Minuten bis Stunden länger.
Nach einen Neustart in der Regel wieder alles auf Anfang außer bei Tuya local, hier oft keine Funktion.
In der Handy App keine Probleme.
Parallel habe ich noch ein paar Aktoren für Tuya, die schalten ohne Probleme weiter, überall. Hoover/Haier/Candy macht auch keine Probleme.
Über ein doif löschen und wieder anlegen ist vermutlich keine optimale Lösung.

Jemand eine Idee wo ich noch suchen kann?

verwendest Du denn die aktuellste Version? update?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 27 Februar 2023, 23:19:08
In der App steht nur ein Farbrad zur Verfügung.  Eine exakte Auswahl ist daher nicht möglich. Ich kann nur versuchen so gut es geht.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 27 Februar 2023, 23:24:40
Zitat von: Superposchi am 27 Februar 2023, 23:19:08
In der App steht nur ein Farbrad zur Verfügung.  Eine exakte Auswahl ist daher nicht möglich. Ich kann nur versuchen so gut es geht.

worauf bezieht sich das ?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: tom0 am 27 Februar 2023, 23:48:10
Zitat von: thburkhart am 27 Februar 2023, 22:47:54
verwendest Du denn die aktuellste Version? update?

Hatte die Version von gestern und gerade ein Update gemacht.
Online wieder alle da, Offline diesmal einer nicht aktualisiert.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 27 Februar 2023, 23:50:38
Zitat von: tom0 am 27 Februar 2023, 23:48:10
Hatte die Version von gestern und gerade ein Update gemacht.
Online wieder alle da, Offline diesmal einer nicht aktualisiert.

es dauert manchmal ne ganze Weile
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: tom0 am 28 Februar 2023, 00:21:16
Zitat von: thburkhart am 27 Februar 2023, 23:50:38
es dauert manchmal ne ganze Weile

Kann nach einen Neustart oder Updates Minuten bis Stunden dauern. Offline hat diesmal ein Device keine Daten bekommen, Online alle aktuell.
Nach einer Neuinstallation eines Device funktioniert es wenigstens beim ersten Mal.
Es hat eine ganze Zeit gedauert bis ich dahinter gekommen bin weil ja nicht unbedingt alle auf einmal keine Daten bekommen. Ich habe erstmal den Fehler in meinen DOIF's und Notify's gesucht.

Komischerweise ist aber unabhängig von der Zeit immer die Reihenfolge FHEM Module, MQTT, Home Assistant.

Das einzige komische was mir aufgefallen ist das 2 Devices chinesische Zeichen im Namen haben, die FHEM Module zeigen den Namen mit chinesischen Zeichen.
MQTT zeigt hier Zeichencode (\u6e) und der MQTT Server übersetzt es anscheinend, zumindest kommt ein lesbarer Name bei raus.

Wenn die beiden nicht funktionieren würde mir ja noch einleuchten. Aber der Rest? Und die Aktoren lassen sich ja trotzdem schalten.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 28 Februar 2023, 08:30:56
kommt mir irgendwie bekannt vor, bis der finale Stand letztes WE erreicht wurde.

Teste mal, was passiert, wenn du alle devices mal auskommentierts oder löschst und dann alle wieder neu erkennen lässt.


Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 28 Februar 2023, 14:10:41
Zitat von: dominik am 27 Februar 2023, 20:13:07
Ein reset_energy kann ich dennoch einbauen.

@Dominik,
das wirst du wohl heute nicht mehr schaffen ;-)

@all
gibt es denn die Möglichkeit, in TUYA-Devices Readings selbst zu ändern oder anzulegen, um konkret die Monatswerte aus der Smartlife-App händisch einzutragen?

gefunden:-)

mit setreading TUYA_SP01 energy02 2000;setreading TUYA_SP02 energy02 2000;setreading TUYA_SP03 energy02 2000
werden die readings energy02 in den 3 SPs gesetzt :-)
Am Monatsende schreibe meine SmartLifeApp-Werte in eine Textdatei mit obiger Struktur (Trennung der Werte mit Semikolon) und kopiere diese in die Befehlszeile.
auf dieselbe weise kann ich natürlich "energy"  neu belegen; oder überschreibt fhempy dies wieder?

in die DB kriege ich die Werte per addlog und die statistics lasse ich parallel laufen

Ist das für Euch schlüssig oder doch zu simpel, zu kurz gedacht?

viele Grüße

Thomas


Titel: Antw:fhempy: tuya (lokal)
Beitrag von: tom0 am 28 Februar 2023, 14:59:44
Zitat von: thburkhart am 28 Februar 2023, 08:30:56
kommt mir irgendwie bekannt vor, bis der finale Stand letztes WE erreicht wurde.

Teste mal, was passiert, wenn du alle devices mal auskommentierts oder löschst und dann alle wieder neu erkennen lässt.

Dann funktioniert es in der Regel für x Minuten bis Stunden, wie nach einen Neustart, aber wenigstens 1x.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: tom0 am 28 Februar 2023, 15:31:08
Zitat von: thburkhart am 28 Februar 2023, 14:10:41
mit setreading TUYA_SP01 energy02 2000;setreading TUYA_SP02 energy02 2000;setreading TUYA_SP03 energy02 2000

Ich kenne es nur so das die Original Readings irgendwann, wenn es neue Werte gibt, mit den neuen Werten wieder überschrieben werden.
Das device könnte das ja nur über einen check mit einem "oldreadings" herausfinden und bei einem (Neustart, Coldstart oder wie man es ausdrücken möchte oder) Neuanlegen gibt es ja kein altes Reading.
Wenn das gewünschte Reading nicht existiert wird dieses erst beim schreiben des 1. Wertes angelegt, das sieht man ganz gut, wenn man Userreadings falsch angelegt hat und einen Coldstart macht.
Praxistip am Rande, vor allem gut Aufpassen mit "state" und "STATE" wenn man mit den Readings arbeitet.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: erdnar am 28 Februar 2023, 16:33:41
Zitat von: dominik am 22 Februar 2023, 21:54:40
Dass dein User ak das Home Directory /home/ak hat ist ja korrekt. Du musst mit dem fhem User das Home prüfen.
sudo -u fhem bash
echo $HOME

ak@nuki:~$ sudo -u fhem bash
fhem@nuki:~$ echo $HOME
/home/ak
fhem@nuki:~$

Das Ergebnis ist dasselbe... ???
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 28 Februar 2023, 16:56:41
Zitat von: tom0 am 28 Februar 2023, 15:31:08
Ich kenne es nur so das die Original Readings irgendwann, wenn es neue Werte gibt, mit den neuen Werten wieder überschrieben werden.

@dominik
in der Tat werden die mit setreading TUYA_JL.* energy 0 nullgesetzten Werte sofort wieder von fhempy Überschrieben.
Somit kommen um ein fhempy-seitiges Nullsetzen nicht herum; die bisherige energy-Werte sind ja falsch und sie werden auch nie richtig werden.

jedoch zu Ende gedacht.. in der dblog-Auswertung kann man ja ehedem nur Differenzen auswerten.
"energy" hat also nur Hilfsfunktion für die Deltaermittlung; man sieht "energy" ja nie an, wann der Startpunkt war.
So würde die gelegentliche Implementierung der Monatswerte "energyMM" mit Start Null am 01.MM 00:00:00 wirklich was nützen.

oder Denkfehler bei mir?


Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Nomo am 28 Februar 2023, 17:19:02
Ich beiß gleich in die Tischplatte. Der fhempy server verabschiedet sich ständig leise, die Tuya-Geräte melden "fhempy server offline" aber fhempy local und server devices strahlen grün. im fhem log steht nichts sinnvolles (zB, "fhempy: bin dann mal weg") und im fhempy log auch nicht. Habe jetzt erfolgreich 21 Tuya-Geräte aus der China-Cloud befreit und hinter dem Firewall versteckt, aber wenn der fhempy server sich immer verabschiedet (ohne leise "servus" zu sagen 😕 ) dann macht das keinen Spass mehr. Behindert auch ungemein das Debugger, warum die Devices nicht mehr von Alexa gesteuert werden können (läuft jetzt der server noch, oder nicht?).

HELP

Ich habe  0.1.606 aktualisiert, der update Knopf geht übrigens bei mir auch nicht...
Wohin kann ich schauen, um zu sehen, was hier los ist? Wenn der Server nach "shutdown restart" wieder läuft, gehen die Devices mit on/off problemlos. Wie gesagt, trotz genericDeviceType switch sagt Alexa "<Device Name> unterstützt das nicht". Das hat aber am Anfang bei manchen Devices schon funktioniert. Vielleicht, bevor ich den Firewall für die Tuyas in beiden Richtungen zugemacht habe...
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 März 2023, 21:00:13
Zitat von: thburkhart am 27 Februar 2023, 22:34:53
gemacht und mit prefix

[code]define statistics_TUYA_SP_day statistics TUYA_SP.* statday
attr statistics_TUYA_SP_day deltaReadings TUYA.*:energy: Delta:(Day)
attr statistics_TUYA_SP_day room ,-TUYA,TUYA Stromverbrauch
attr statistics_TUYA_SP_day singularReadings TUYA_SP.*:energy:Delta:day
#   CFGFN     
#   DEF        TUYA_SP.* statday
#   DEV_REGEXP TUYA_SP.*
#   FUUID      63fd1828-f33f-fd5f-db50-ca1f234e19af24cb
#   NAME       statistics_TUYA_SP_day
#   NOTIFYDEV  global,TUYA_SP.*
#   NR         2848
#   NTFY_ORDER 10-statistics_TUYA_SP_day
#   PREFIX     statday
#   STATE      Updated stats for: TUYA_SP16
#   TYPE       statistics
#   eventCount 1890
#   Helper:
#     DBLOG:
#       monitoredDevicesfhempy:
#         dblog_THB:
#           TIME       1677531188.73647
#           VALUE      TUYA_SP13,TUYA_SP11,TUYA_SP06,TUYA_SP16,TUYA_SP01,TUYA_SP02,TUYA_SP03,TUYA_SP04,TUYA_SP05,TUYA_SP07,TUYA_SP08,TUYA_SP09,TUYA_SP10,TUYA_SP12,TUYA_SP14,TUYA_SP15
#       state:
#         dblog_THB:
#           TIME       1677533648.85036
#           VALUE      Updated stats for: TUYA_SP16
#   READINGS:
#     2023-02-27 21:53:08   monitoredDevicesfhempy TUYA_SP13,TUYA_SP11,TUYA_SP06,TUYA_SP16,TUYA_SP01,TUYA_SP02,TUYA_SP03,TUYA_SP04,TUYA_SP05,TUYA_SP07,TUYA_SP08,TUYA_SP09,TUYA_SP10,TUYA_SP12,TUYA_SP14,TUYA_SP15
#     2023-02-27 22:23:38   nextPeriodChangeCalc 2023-02-27 22:59:55
#     2023-02-27 22:34:08   state           Updated stats for: TUYA_SP16
#   fhem:
#     modulVersion $Date: 2022-07-12 07:25:06 +0200 (Tue, 12 Jul 2022) $
#     nextPeriodChangeTime 1677535195
#
setstate statistics_TUYA_SP_day Updated stats for: TUYA_SP16
setstate statistics_TUYA_SP_day 2023-02-27 22:34:00 .TUYA_SP01:energy LastValue: 0.664 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:23:38 .TUYA_SP02:energy LastValue: 10.023 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:29:57 .TUYA_SP03:energy LastValue: 2.12 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:25:02 .TUYA_SP04:energy LastValue: 1.0 ShowDate: 7 DecPlaces: 1
setstate statistics_TUYA_SP_day 2023-02-27 22:25:42 .TUYA_SP05:energy LastValue: 0.54 ShowDate: 7 DecPlaces: 2
setstate statistics_TUYA_SP_day 2023-02-27 22:34:04 .TUYA_SP06:energy LastValue: 4.636 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:23:39 .TUYA_SP07:energy LastValue: 0.373 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:23:39 .TUYA_SP08:energy LastValue: 40.462 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:23:39 .TUYA_SP09:stateDay lastTime: 1677533019 showDate: 1 (since: 2023-02-27_21:53:08) off: 1831 off_Count: 1 lastState: off
setstate statistics_TUYA_SP_day 2023-02-27 22:23:39 .TUYA_SP09:stateMonth off: 1831 (since: 2023-02-27_21:53:08) lastTime: 1677533019 showDate: 1 off_Count: 1 lastState: off
setstate statistics_TUYA_SP_day 2023-02-27 22:23:39 .TUYA_SP09:stateYear lastState: off (since: 2023-02-27_21:53:08) off: 1831 lastTime: 1677533019 showDate: 1 off_Count: 1
setstate statistics_TUYA_SP_day 2023-02-27 22:23:39 .TUYA_SP10:energy LastValue: 0.188 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:33:43 .TUYA_SP11:energy LastValue: 2.702 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:34:04 .TUYA_SP12:energy LastValue: 3.079 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:33:01 .TUYA_SP13:energy LastValue: 5.417 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:34:04 .TUYA_SP14:energy LastValue: 0.982 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:34:07 .TUYA_SP15:energy LastValue: 0.586 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 22:34:08 .TUYA_SP16:energy LastValue: 0.778 ShowDate: 7 DecPlaces: 3
setstate statistics_TUYA_SP_day 2023-02-27 21:53:08 monitoredDevicesfhempy TUYA_SP13,TUYA_SP11,TUYA_SP06,TUYA_SP16,TUYA_SP01,TUYA_SP02,TUYA_SP03,TUYA_SP04,TUYA_SP05,TUYA_SP07,TUYA_SP08,TUYA_SP09,TUYA_SP10,TUYA_SP12,TUYA_SP14,TUYA_SP15
setstate statistics_TUYA_SP_day 2023-02-27 22:23:38 nextPeriodChangeCalc 2023-02-27 22:59:55
setstate statistics_TUYA_SP_day 2023-02-27 22:34:08 state Updated stats for: TUYA_SP16

[/code]

so bekomme ich zwar ein separates reading _day aber mit allen Perioden
statEnergy
Hour: 0.000 Day: 0.000 Month: 0.000 Year: 0.000 (since: 2023-02-27_21:53:07 )
2023-02-27 21:59:58
statEnergyLast
Hour: 0.000 Day: - Month: - Year: - (since: 2023-02-27_21:53:07 )
2023-02-27 21:59:58
statdayEnergy
Hour: 0.000 Day: 0.000 Month: 0.000 Year: 0.000 (since: )
2023-02-27 22:23:38


Mach noch das singularReadings Attribut auf
.*:energy:Delta:(Hour|Day|Month|Year)
dann hast du die einzelnen Readings :)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 März 2023, 21:04:19
Zitat von: thburkhart am 28 Februar 2023, 16:56:41
@dominik
in der Tat werden die mit setreading TUYA_JL.* energy 0 nullgesetzten Werte sofort wieder von fhempy Überschrieben.
Somit kommen um ein fhempy-seitiges Nullsetzen nicht herum; die bisherige energy-Werte sind ja falsch und sie werden auch nie richtig werden.

jedoch zu Ende gedacht.. in der dblog-Auswertung kann man ja ehedem nur Differenzen auswerten.
"energy" hat also nur Hilfsfunktion für die Deltaermittlung; man sieht "energy" ja nie an, wann der Startpunkt war.
So würde die gelegentliche Implementierung der Monatswerte "energyMM" mit Start Null am 01.MM 00:00:00 wirklich was nützen.

oder Denkfehler bei mir?
Ich denke mit meinem letzten Post zu singularReadings und der schon vorhandenen Implementierung von reset_energy solltest du jetzt schon alles machen können. Oder fehlt noch etwas? Eigentlich reicht singularReadings aus, weil dann das Delta eh über das Reading in die DB geschrieben wird - so wie ich dblog zumindest verstehe, nutze es selbst nicht.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 März 2023, 21:05:54
Zitat von: erdnar am 28 Februar 2023, 16:33:41

ak@nuki:~$ sudo -u fhem bash
fhem@nuki:~$ echo $HOME
/home/ak
fhem@nuki:~$

Das Ergebnis ist dasselbe... ???

Da hat es wohl was...bitte korrigiere die Installation, damit das $HOME Directory passt. Fragen dazu, bitte in einem anderen Thread. Danke
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 März 2023, 21:08:04
Zitat von: tom0 am 28 Februar 2023, 14:59:44
Dann funktioniert es in der Regel für x Minuten bis Stunden, wie nach einen Neustart, aber wenigstens 1x.
Ich gehe mal davon aus, dass die Devices nicht dauerhaft online sind. Die Devices gehen also nur kurz online um den Wert zu senden und sind danach wieder weg. Stell bitte mal sicher, dass sie immer die gleiche IP bekommen, weil nur damit können sie zumindest durch den laufenden Versuch zu connecten erkannt werden.

@Thomas, hast du nicht auch solche Devices? Laufen die jetzt sauber mit local?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 01 März 2023, 21:10:16
Zitat von: Nomo am 28 Februar 2023, 17:19:02
Ich beiß gleich in die Tischplatte. Der fhempy server verabschiedet sich ständig leise, die Tuya-Geräte melden "fhempy server offline" aber fhempy local und server devices strahlen grün. im fhem log steht nichts sinnvolles (zB, "fhempy: bin dann mal weg") und im fhempy log auch nicht. Habe jetzt erfolgreich 21 Tuya-Geräte aus der China-Cloud befreit und hinter dem Firewall versteckt, aber wenn der fhempy server sich immer verabschiedet (ohne leise "servus" zu sagen 😕 ) dann macht das keinen Spass mehr. Behindert auch ungemein das Debugger, warum die Devices nicht mehr von Alexa gesteuert werden können (läuft jetzt der server noch, oder nicht?).

HELP

Ich habe  0.1.606 aktualisiert, der update Knopf geht übrigens bei mir auch nicht...
Wohin kann ich schauen, um zu sehen, was hier los ist? Wenn der Server nach "shutdown restart" wieder läuft, gehen die Devices mit on/off problemlos. Wie gesagt, trotz genericDeviceType switch sagt Alexa "<Device Name> unterstützt das nicht". Das hat aber am Anfang bei manchen Devices schon funktioniert. Vielleicht, bevor ich den Firewall für die Tuyas in beiden Richtungen zugemacht habe...

fhempy.log anschauen und posten, wenn du mit dem Inhalt nicht schon selbst zur Lösung kommst. Bitte lass Alexa in diesem Thread außen vor, ich kann dich nur soweit unterstützen, dass deine Geräte aus FHEM mit fhempy gesteuert werden können. Der Alexa Zweig ist dann ein separates Thema.

...und weil die Frage nach der Steuerbarkeit von tuya local Devices mit Alexa im anderen Thread kam: Alles was sich mit FHEM steuern lässt, ist klarerweise auch mit alexa-fhem steuerbar. Ihr braucht nur die passenden homebridgeMappings. Alexa macht ja nix anderes als ein set an FHEM zu senden.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Nomo am 02 März 2023, 08:50:01
2023-03-01 22:33:25,057 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.606...
2023-03-01 22:33:25,063 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-03-01 22:33:25,142 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-03-01 22:33:26,793 - INFO     - websockets.server: connection open
2023-03-01 22:33:26,794 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1


22:44 abgestürzt, kein log Eintrag. Nix im syslog.
Danach sind bis auf ehem selber alle Prozesse mit user ehem weg: Alexa-fhem, Python/fhempy und der ssh.

:(

Reproduzieren kann ich das, wenn ich das fhem.cfg im Edit Files öffne, nichts ändere und safe drücke. Andere Abstürze passieren beim normalen Betrieb, aber leider sporadisch
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Nomo am 02 März 2023, 09:36:37
Hallo zusammen,

zunächst muss ich hier mal anmerken, dass ich es ganz großartig finde, dass es ein Modul gibt mit dem die Tuya Devices über fhem angesteuert werden können. Ich verwende ehem seit über 15 Jahren und habe nichts besseres für mich gefunden. Meine größte Hochachtung für alle, die dazu beitragen! Leider komme ich mit PERL oder Python nicht klar, bin irgendwann bei Objective C stehengeblieben (NeXT).
Nach gescheiterten Versuchen mit Tasmota und einer zerbrochenen Steckdose habe ich wie gesagt fhempy entdeckt und bin sehr erfreut über den Funktionsumfang. Leider funktioniert einiges nicht so einfach wie erhofft und ich finde die Dokumentation dazu nicht. Ich habe natürlich die Readme.md auf Github angeschaut, aber was zB tuya_spec_functions genau tut, erschliesst sich mir nicht.

Ich habe zB. ein paar 3fach Schaltsteckdosen und kann hier über fhemWeb nur den ersten Stecker steuern. "switch_2" etc. sind als Readings und set functions da, aber eigentlich möchte man ja für jeden Schalter eine Weboberfläche? Ich habe mir jetzt dummys angelegt mit notifys, aber da sehe ich natürlich nur den Status des dummies, nicht der Steckdose. Das geht bestimmt besser, aber ich finde das nicht. Ich habe nicht nur 1 oder 2 von den Steckdosenleisten 😕

Aber das Gute ist: Ich kann die meisten Steckdosen jetzt ohne China-Cloud steuern! 😊
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 02 März 2023, 12:21:28
Zitat von: dominik am 01 März 2023, 21:08:04
Ich gehe mal davon aus, dass die Devices nicht dauerhaft online sind. Die Devices gehen also nur kurz online um den Wert zu senden und sind danach wieder weg. Stell bitte mal sicher, dass sie immer die gleiche IP bekommen, weil nur damit können sie zumindest durch den laufenden Versuch zu connecten erkannt werden.

@Thomas, hast du nicht auch solche Devices? Laufen die jetzt sauber mit local?

ich habe aktuell nur Temp-04, der sich nicht aktualisieren will.
Das Phänomen, dass bei Editieren der fhem.cfg direkt aber auch Editieren der Divices im Web-frontend fhempy offline geht habe ich regelmässib. Da hilft dann nur ein shutdown restart

soeben habe ich das gemacht:

fhempy-Log:
2023-03-02 12:02:13,901 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.610...
2023-03-02 12:02:13,906 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-03-02 12:02:13,949 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-03-02 12:02:27,086 - INFO     - websockets.server: connection open
2023-03-02 12:02:27,087 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-03-02 12:02:40,496 - ERROR    - fhempy.lib.fhem: FHEM took 5113ms for readingsBeginUpdate($defs{'TUYA_JL29'});;readingsBulkUpdateIfChanged($defs{'TUYA_JL29'},'online','0');;readingsEndUpdate($defs{'TUYA_JL29'},1);;
2023-03-02 12:02:40,653 - ERROR    - fhempy.lib.fhem: FHEM took 5268ms for readingsBeginUpdate($defs{'TUYA_JL33'});;readingsBulkUpdateIfChanged($defs{'TUYA_JL33'},'online','0');;readingsEndUpdate($defs{'TUYA_JL33'},1);;
2023-03-02 12:02:40,809 - ERROR    - fhempy.lib.fhem: FHEM took 5424ms for readingsBeginUpdate($defs{'TUYA_JL30'});;readingsBulkUpdateIfChanged($defs{'TUYA_JL30'},'online','0');;readingsEndUpdate($defs{'TUYA_JL30'},1);;
2023-03-02 12:02:40,966 - ERROR    - fhempy.lib.fhem: FHEM took 5580ms for readingsBeginUpdate($defs{'TUYA_JL36'});;readingsBulkUpdateIfChanged($defs{'TUYA_JL36'},'online','0');;readingsEndUpdate($defs{'TUYA_JL36'},1);;
2023-03-02 12:02:41,019 - ERROR    - fhempy.lib.fhem: FHEM took 5631ms for readingsBeginUpdate($defs{'TUYA_MMG'});;readingsBulkUpdateIfChanged($defs{'TUYA_MMG'},'online','0');;readingsEndUpdate($defs{'TUYA_MMG'},1);;
2023-03-02 12:02:41,175 - ERROR    - fhempy.lib.fhem: FHEM took 5787ms for readingsBeginUpdate($defs{'TUYA_JL32'});;readingsBulkUpdateIfChanged($defs{'TUYA_JL32'},'online','0');;readingsEndUpdate($defs{'TUYA_JL32'},1);;
2023-03-02 12:02:41,331 - ERROR    - fhempy.lib.fhem: FHEM took 5942ms for readingsBeginUpdate($defs{'TUYA_JL35'});;readingsBulkUpdateIfChanged($defs{'TUYA_JL35'},'online','0');;readingsEndUpdate($defs{'TUYA_JL35'},1);;
2023-03-02 12:02:41,333 - ERROR    - fhempy.lib.fhem: FHEM took 5943ms for readingsBeginUpdate($defs{'TUYA_PS1'});;readingsBulkUpdateIfChanged($defs{'TUYA_PS1'},'online','0');;readingsEndUpdate($defs{'TUYA_PS1'},1);;
2023-03-02 12:02:41,385 - ERROR    - fhempy.lib.fhem: FHEM took 5995ms for readingsBeginUpdate($defs{'TUYA_PS7'});;readingsBulkUpdateIfChanged($defs{'TUYA_PS7'},'online','0');;readingsEndUpdate($defs{'TUYA_PS7'},1);;
2023-03-02 12:02:41,387 - ERROR    - fhempy.lib.fhem: FHEM took 5996ms for readingsBeginUpdate($defs{'TUYA_PS4'});;readingsBulkUpdateIfChanged($defs{'TUYA_PS4'},'online','0');;readingsEndUpdate($defs{'TUYA_PS4'},1);;
2023-03-02 12:02:41,389 - ERROR    - fhempy.lib.fhem: FHEM took 5997ms for readingsBeginUpdate($defs{'TUYA_SCHF2'});;readingsBulkUpdateIfChanged($defs{'TUYA_SCHF2'},'online','0');;readingsEndUpdate($defs{'TUYA_SCHF2'},1);;
2023-03-02 12:02:41,391 - ERROR    - fhempy.lib.fhem: FHEM took 5998ms for readingsBeginUpdate($defs{'TUYA_PS5'});;readingsBulkUpdateIfChanged($defs{'TUYA_PS5'},'online','0');;readingsEndUpdate($defs{'TUYA_PS5'},1);;
2023-03-02 12:02:41,444 - ERROR    - fhempy.lib.fhem: FHEM took 6050ms for readingsBeginUpdate($defs{'TUYA_SCHF1'});;readingsBulkUpdateIfChanged($defs{'TUYA_SCHF1'},'online','0');;readingsEndUpdate($defs{'TUYA_SCHF1'},1);;
2023-03-02 12:02:41,596 - ERROR    - fhempy.lib.fhem: FHEM took 6202ms for readingsBeginUpdate($defs{'TUYA_SP03'});;readingsBulkUpdateIfChanged($defs{'TUYA_SP03'},'online','0');;readingsEndUpdate($defs{'TUYA_SP03'},1);;
2023-03-02 12:02:41,649 - ERROR    - fhempy.lib.fhem: FHEM took 6254ms for readingsBeginUpdate($defs{'TUYA_SCHF3'});;readingsBulkUpdateIfChanged($defs{'TUYA_SCHF3'},'online','0');;readingsEndUpdate($defs{'TUYA_SCHF3'},1);;
2023-03-02 12:02:41,989 - ERROR    - fhempy.lib.fhem: FHEM took 6593ms for readingsBeginUpdate($defs{'TUYA_SP01'});;readingsBulkUpdateIfChanged($defs{'TUYA_SP01'},'online','0');;readingsEndUpdate($defs{'TUYA_SP01'},1);;
2023-03-02 12:02:41,991 - ERROR    - fhempy.lib.fhem: FHEM took 6594ms for readingsBeginUpdate($defs{'TUYA_SP02'});;readingsBulkUpdateIfChanged($defs{'TUYA_SP02'},'online','0');;readingsEndUpdate($defs{'TUYA_SP02'},1);;
2023-03-02 12:02:42,259 - ERROR    - fhempy.lib.fhem: FHEM took 6862ms for readingsBeginUpdate($defs{'TUYA_SP04'});;readingsBulkUpdateIfChanged($defs{'TUYA_SP04'},'online','0');;readingsEndUpdate($defs{'TUYA_SP04'},1);;
2023-03-02 12:02:42,412 - ERROR    - fhempy.lib.fhem: FHEM took 7013ms for readingsBeginUpdate($defs{'TUYA_SP05'});;readingsBulkUpdateIfChanged($defs{'TUYA_SP05'},'online','0');;readingsEndUpdate($defs{'TUYA_SP05'},1);;
2023-03-02 12:02:42,564 - ERROR    - fhempy.lib.fhem: FHEM took 7165ms for readingsBeginUpdate($defs{'TUYA_SP06'});;readingsBulkUpdateIfChanged($defs{'TUYA_SP06'},'online','0');;readingsEndUpdate($defs{'TUYA_SP06'},1);;
2023-03-02 12:02:42,717 - ERROR    - fhempy.lib.fhem: FHEM took 7317ms for readingsBeginUpdate($defs{'TUYA_SP07'});;readingsBulkUpdateIfChanged($defs{'TUYA_SP07'},'online','0');;readingsEndUpdate($defs{'TUYA_SP07'},1);;
2023-03-02 12:02:42,870 - ERROR    - fhempy.lib.fhem: FHEM took 7469ms for readingsBeginUpdate($defs{'TUYA_SP10'});;readingsBulkUpdateIfChanged($defs{'TUYA_SP10'},'online','0');;readingsEndUpdate($defs{'TUYA_SP10'},1);;
2023-03-02 12:02:43,024 - ERROR    - fhempy.lib.fhem: FHEM took 7623ms for readingsBeginUpdate($defs{'TUYA_SP09'});;readingsBulkUpdateIfChanged($defs{'TUYA_SP09'},'online','0');;readingsEndUpdate($defs{'TUYA_SP09'},1);;
2023-03-02 12:02:43,026 - ERROR    - fhempy.lib.fhem: FHEM took 7624ms for readingsBeginUpdate($defs{'TUYA_SP08'});;readingsBulkUpdateIfChanged($defs{'TUYA_SP08'},'online','0');;readingsEndUpdate($defs{'TUYA_SP08'},1);;
2023-03-02 12:02:43,178 - ERROR    - fhempy.lib.fhem: FHEM took 7776ms for readingsBeginUpdate($defs{'TUYA_SP12'});;readingsBulkUpdateIfChanged($defs{'TUYA_SP12'},'online','0');;readingsEndUpdate($defs{'TUYA_SP12'},1);;
2023-03-02 12:02:43,330 - ERROR    - fhempy.lib.fhem: FHEM took 7927ms for readingsBeginUpdate($defs{'TUYA_SP11'});;readingsBulkUpdateIfChanged($defs{'TUYA_SP11'},'online','0');;readingsEndUpdate($defs{'TUYA_SP11'},1);;
2023-03-02 12:02:43,482 - ERROR    - fhempy.lib.fhem: FHEM took 8078ms for readingsBeginUpdate($defs{'TUYA_SP13'});;readingsBulkUpdateIfChanged($defs{'TUYA_SP13'},'online','0');;readingsEndUpdate($defs{'TUYA_SP13'},1);;
2023-03-02 12:02:43,635 - ERROR    - fhempy.lib.fhem: FHEM took 8230ms for readingsBeginUpdate($defs{'TUYA_SP15'});;readingsBulkUpdateIfChanged($defs{'TUYA_SP15'},'online','0');;readingsEndUpdate($defs{'TUYA_SP15'},1);;
2023-03-02 12:02:43,787 - ERROR    - fhempy.lib.fhem: FHEM took 8381ms for readingsBeginUpdate($defs{'TUYA_SP14'});;readingsBulkUpdateIfChanged($defs{'TUYA_SP14'},'online','0');;readingsEndUpdate($defs{'TUYA_SP14'},1);;
2023-03-02 12:02:43,940 - ERROR    - fhempy.lib.fhem: FHEM took 8533ms for readingsBeginUpdate($defs{'TUYA_SP16'});;readingsBulkUpdateIfChanged($defs{'TUYA_SP16'},'online','0');;readingsEndUpdate($defs{'TUYA_SP16'},1);;
2023-03-02 12:02:43,993 - ERROR    - fhempy.lib.fhem: FHEM took 8586ms for readingsBeginUpdate($defs{'TUYA_STF01'});;readingsBulkUpdateIfChanged($defs{'TUYA_STF01'},'online','0');;readingsEndUpdate($defs{'TUYA_STF01'},1);;
2023-03-02 12:02:44,046 - ERROR    - fhempy.lib.fhem: FHEM took 8638ms for readingsBeginUpdate($defs{'TUYA_STF03'});;readingsBulkUpdateIfChanged($defs{'TUYA_STF03'},'online','0');;readingsEndUpdate($defs{'TUYA_STF03'},1);;
2023-03-02 12:02:44,099 - ERROR    - fhempy.lib.fhem: FHEM took 8690ms for readingsBeginUpdate($defs{'TUYA_STF02'});;readingsBulkUpdateIfChanged($defs{'TUYA_STF02'},'online','0');;readingsEndUpdate($defs{'TUYA_STF02'},1);;
2023-03-02 12:02:44,100 - ERROR    - fhempy.lib.fhem: FHEM took 8691ms for ReadingsVal('TUYA_STF04', 'energy', '0')
2023-03-02 12:02:44,102 - ERROR    - fhempy.lib.fhem: FHEM took 8692ms for ReadingsVal('TUYA_Temp01', 'energy', '0')
2023-03-02 12:02:44,103 - ERROR    - fhempy.lib.fhem: FHEM took 8693ms for ReadingsVal('TUYA_Temp03', 'energy', '0')
2023-03-02 12:02:44,105 - ERROR    - fhempy.lib.fhem: FHEM took 8693ms for ReadingsVal('TUYA_Temp02', 'energy', '0')
2023-03-02 12:02:44,239 - ERROR    - fhempy.lib.fhem: FHEM took 8827ms for ReadingsVal('TUYA_Temp05', 'energy', '0')
2023-03-02 12:02:44,240 - ERROR    - fhempy.lib.fhem: FHEM took 8827ms for ReadingsVal('TUYA_Temp04', 'energy', '0')
2023-03-02 12:02:44,242 - ERROR    - fhempy.lib.fhem: FHEM took 8828ms for ReadingsVal('TUYA_Temp06', 'energy', '0')
2023-03-02 12:02:44,294 - ERROR    - fhempy.lib.fhem: FHEM took 8879ms for readingsSingleUpdate($defs{'TUYA'},'state','connecting',1)
2023-03-02 12:02:44,337 - ERROR    - fhempy.lib.fhem: FHEM took 8922ms for readingsSingleUpdate($defs{'TUYAC_Camera1'},'state','ready',1)
2023-03-02 12:02:44,337 - ERROR    - fhempy.lib.fhem: FHEM took 8922ms for readingsSingleUpdate($defs{'TUYAC_Camera2'},'state','ready',1)
2023-03-02 12:02:44,338 - ERROR    - fhempy.lib.fhem: FHEM took 8922ms for ReadingsVal('TUYA_Temp07', 'energy', '0')
2023-03-02 12:02:44,339 - ERROR    - fhempy.lib.fhem: FHEM took 8922ms for ReadingsVal('tuya_cloud_104380002462ab30258d', 'energy', '0')
2023-03-02 12:02:44,339 - ERROR    - fhempy.lib.fhem: FHEM took 8894ms for ReadingsVal('TUYA_BULB01', 'energy', '0')
2023-03-02 12:02:44,340 - ERROR    - fhempy.lib.fhem: FHEM took 8892ms for ReadingsVal('tuya_cloud_4530056170039f4a87e5', 'energy', '0')
2023-03-02 12:02:44,342 - ERROR    - fhempy.lib.fhem: FHEM took 8839ms for ReadingsVal('TUYA_EMYLO1', 'energy', '0')
2023-03-02 12:02:44,343 - ERROR    - fhempy.lib.fhem: FHEM took 8837ms for ReadingsVal('tuya_cloud_5062137624a1600b6d62', 'energy', '0')
2023-03-02 12:02:44,344 - ERROR    - fhempy.lib.fhem: FHEM took 8785ms for ReadingsVal('TUYA_BULB02', 'energy', '0')
2023-03-02 12:02:44,345 - ERROR    - fhempy.lib.fhem: FHEM took 8733ms for ReadingsVal('TUYA_DIY1', 'energy', '0')
2023-03-02 12:02:44,346 - ERROR    - fhempy.lib.fhem: FHEM took 8680ms for ReadingsVal('TUYA_DIY4', 'energy', '0')
2023-03-02 12:02:44,347 - ERROR    - fhempy.lib.fhem: FHEM took 8627ms for ReadingsVal('TUYA_EMYLO2', 'energy', '0')
2023-03-02 12:02:44,348 - ERROR    - fhempy.lib.fhem: FHEM took 8627ms for readingsSingleUpdate($defs{'TUYAC_Camera3'},'state','ready',1)
2023-03-02 12:02:44,349 - ERROR    - fhempy.lib.fhem: FHEM took 8575ms for ReadingsVal('TUYA_EMYLO4', 'energy', '0')
2023-03-02 12:02:44,350 - ERROR    - fhempy.lib.fhem: FHEM took 8523ms for ReadingsVal('TUYA_EMYLO3', 'energy', '0')
2023-03-02 12:02:44,351 - ERROR    - fhempy.lib.fhem: FHEM took 8470ms for ReadingsVal('TUYA_DIY3', 'energy', '0')
2023-03-02 12:02:44,372 - ERROR    - fhempy.lib.fhem: FHEM took 8490ms for readingsSingleUpdate($defs{'TUYA_EMYLOD2'},'state','Change DEF and use IP instead of \'offline\'',1)
2023-03-02 12:02:44,374 - ERROR    - fhempy.lib.fhem: FHEM took 8490ms for readingsSingleUpdate($defs{'TUYAC_Camera4'},'state','ready',1)
2023-03-02 12:02:44,376 - ERROR    - fhempy.lib.fhem: FHEM took 8336ms for ReadingsVal('TUYA_JL04', 'energy', '0')
2023-03-02 12:02:44,378 - ERROR    - fhempy.lib.fhem: FHEM took 8181ms for ReadingsVal('TUYA_JL03', 'energy', '0')
2023-03-02 12:02:44,379 - ERROR    - fhempy.lib.fhem: FHEM took 8176ms for readingsSingleUpdate($defs{'TUYAC_Camera5'},'state','ready',1)
2023-03-02 12:02:44,381 - ERROR    - fhempy.lib.fhem: FHEM took 8022ms for ReadingsVal('TUYA_JL02', 'energy', '0')
2023-03-02 12:02:44,383 - ERROR    - fhempy.lib.fhem: FHEM took 8022ms for readingsSingleUpdate($defs{'TUYAC_Camera6'},'state','ready',1)
2023-03-02 12:02:44,448 - ERROR    - fhempy.lib.fhem: FHEM took 8086ms for readingsSingleUpdate($defs{'TUYAC_PIR01'},'state','ready',1)
2023-03-02 12:02:44,502 - ERROR    - fhempy.lib.fhem: FHEM took 8138ms for readingsSingleUpdate($defs{'TUYAC_PIR02'},'state','ready',1)
2023-03-02 12:02:44,555 - ERROR    - fhempy.lib.fhem: FHEM took 8190ms for readingsSingleUpdate($defs{'TUYAC_Relais01'},'state','ready',1)
2023-03-02 12:02:44,610 - ERROR    - fhempy.lib.fhem: FHEM took 8243ms for readingsSingleUpdate($defs{'TUYAC_PIR03'},'state','ready',1)
2023-03-02 12:02:44,611 - ERROR    - fhempy.lib.fhem: FHEM took 8088ms for ReadingsVal('TUYA_JL05', 'energy', '0')
2023-03-02 12:02:44,665 - ERROR    - fhempy.lib.fhem: FHEM took 8140ms for readingsSingleUpdate($defs{'TUYAC_SensorSmoke01'},'state','ready',1)
2023-03-02 12:02:44,666 - ERROR    - fhempy.lib.fhem: FHEM took 8141ms for readingsSingleUpdate($defs{'TUYAC_SensorT01'},'state','ready',1)
2023-03-02 12:02:44,668 - ERROR    - fhempy.lib.fhem: FHEM took 8141ms for readingsSingleUpdate($defs{'TUYAC_SensorT03'},'state','ready',1)
2023-03-02 12:02:44,670 - ERROR    - fhempy.lib.fhem: FHEM took 8141ms for ReadingsVal('TUYA_JL13', 'energy', '0')
2023-03-02 12:02:44,672 - ERROR    - fhempy.lib.fhem: FHEM took 8141ms for readingsSingleUpdate($defs{'TUYAC_SensorT02'},'state','ready',1)
2023-03-02 12:02:44,725 - ERROR    - fhempy.lib.fhem: FHEM took 8191ms for readingsSingleUpdate($defs{'tuya_system'},'state','ready',1)
2023-03-02 12:02:44,731 - ERROR    - fhempy.lib.fhem: FHEM took 8041ms for ReadingsVal('TUYA_JL10Z', 'energy', '0')
2023-03-02 12:02:44,783 - ERROR    - fhempy.lib.fhem: FHEM took 8092ms for readingsSingleUpdate($defs{'TUYAC_SensorW01'},'state','ready',1)
2023-03-02 12:02:44,837 - ERROR    - fhempy.lib.fhem: FHEM took 8144ms for readingsSingleUpdate($defs{'TUYAC_SensorT05'},'state','ready',1)
2023-03-02 12:02:44,893 - ERROR    - fhempy.lib.fhem: FHEM took 8199ms for readingsSingleUpdate($defs{'TUYAC_SensorT04'},'state','ready',1)
2023-03-02 12:02:44,895 - ERROR    - fhempy.lib.fhem: FHEM took 8198ms for ReadingsVal('TUYA_JL14', 'energy', '0')
2023-03-02 12:02:44,949 - ERROR    - fhempy.lib.fhem: FHEM took 8251ms for readingsSingleUpdate($defs{'TUYAC_SensorW03'},'state','ready',1)
2023-03-02 12:02:45,002 - ERROR    - fhempy.lib.fhem: FHEM took 8303ms for readingsSingleUpdate($defs{'TUYAC_SensorW02'},'state','ready',1)
2023-03-02 12:02:45,004 - ERROR    - fhempy.lib.fhem: FHEM took 8148ms for ReadingsVal('TUYA_JL06', 'energy', '0')
2023-03-02 12:02:45,057 - ERROR    - fhempy.lib.fhem: FHEM took 8199ms for readingsSingleUpdate($defs{'TUYAC_SensorW04'},'state','ready',1)
2023-03-02 12:02:45,058 - ERROR    - fhempy.lib.fhem: FHEM took 8199ms for ReadingsVal('TUYA_JL08', 'energy', '0')
2023-03-02 12:02:45,060 - ERROR    - fhempy.lib.fhem: FHEM took 8044ms for ReadingsVal('TUYA_JL09', 'energy', '0')
2023-03-02 12:02:45,114 - ERROR    - fhempy.lib.fhem: FHEM took 7830ms for readingsSingleUpdate($defs{'TUYAC_Sir01'},'state','ready',1)
2023-03-02 12:02:45,167 - ERROR    - fhempy.lib.fhem: FHEM took 7881ms for readingsSingleUpdate($defs{'TUYAC_Sir02'},'state','ready',1)
2023-03-02 12:02:45,168 - ERROR    - fhempy.lib.fhem: FHEM took 7881ms for readingsSingleUpdate($defs{'TUYAC_Sir03'},'state','ready',1)
2023-03-02 12:02:45,222 - ERROR    - fhempy.lib.fhem: FHEM took 7934ms for readingsSingleUpdate($defs{'TUYA_BULB03'},'state','ready',1)
2023-03-02 12:02:45,223 - ERROR    - fhempy.lib.fhem: FHEM took 7933ms for ReadingsVal('TUYA_JL07', 'energy', '0')
2023-03-02 12:02:45,385 - ERROR    - fhempy.lib.fhem: FHEM took 8093ms for readingsSingleUpdate($defs{'TUYA_JL19'},'state','ready',1)
2023-03-02 12:02:45,906 - ERROR    - fhempy.lib.fhem: FHEM took 8454ms for ReadingsVal('TUYA_JL12Z', 'energy', '0')
2023-03-02 12:02:45,910 - ERROR    - fhempy.lib.fhem: FHEM took 8456ms for readingsSingleUpdate($defs{'TUYA_JL25'},'state','ready',1)
2023-03-02 12:02:45,913 - ERROR    - fhempy.lib.fhem: FHEM took 8302ms for ReadingsVal('TUYA_JL11Z', 'energy', '0')
2023-03-02 12:02:45,917 - ERROR    - fhempy.lib.fhem: FHEM took 8149ms for ReadingsVal('TUYA_JL15', 'energy', '0')
2023-03-02 12:02:45,920 - ERROR    - fhempy.lib.fhem: FHEM took 7995ms for ReadingsVal('TUYA_JL18', 'energy', '0')
2023-03-02 12:02:45,923 - ERROR    - fhempy.lib.fhem: FHEM took 7842ms for ReadingsVal('TUYA_JL21', 'energy', '0')
2023-03-02 12:02:45,927 - ERROR    - fhempy.lib.fhem: FHEM took 7844ms for readingsSingleUpdate($defs{'TUYA_SCHFF4'},'state','ready',1)
2023-03-02 12:02:45,929 - ERROR    - fhempy.lib.fhem: FHEM took 7690ms for ReadingsVal('TUYA_JL20', 'energy', '0')
2023-03-02 12:02:45,932 - ERROR    - fhempy.lib.fhem: FHEM took 7537ms for ReadingsVal('TUYA_JL22', 'energy', '0')
2023-03-02 12:02:45,934 - ERROR    - fhempy.lib.fhem: FHEM took 7382ms for ReadingsVal('TUYA_JL24', 'energy', '0')
2023-03-02 12:02:45,936 - ERROR    - fhempy.lib.fhem: FHEM took 7229ms for ReadingsVal('TUYA_JL28', 'energy', '0')
2023-03-02 12:02:45,939 - ERROR    - fhempy.lib.fhem: FHEM took 7075ms for ReadingsVal('TUYA_JL26', 'energy', '0')
2023-03-02 12:02:45,943 - ERROR    - fhempy.lib.fhem: FHEM took 7027ms for ReadingsVal('TUYA_PS3', 'energy', '0')
2023-03-02 12:02:45,944 - ERROR    - fhempy.lib.fhem: FHEM took 6872ms for ReadingsVal('TUYA_JL27', 'energy', '0')
2023-03-02 12:02:45,948 - ERROR    - fhempy.lib.fhem: FHEM took 6873ms for ReadingsVal('TUYA_JL31', 'energy', '0')
2023-03-02 12:02:45,949 - ERROR    - fhempy.lib.fhem: FHEM took 5608ms for ReadingsVal('TUYA_JL34', 'energy', '0')
2023-03-02 12:02:45,949 - ERROR    - fhempy.lib.fhem: FHEM took 5452ms for ReadingsVal('TUYA_JL29', 'energy', '0')
2023-03-02 12:02:45,951 - ERROR    - fhempy.lib.fhem: FHEM took 5297ms for ReadingsVal('TUYA_JL33', 'energy', '0')
2023-03-02 12:02:45,955 - ERROR    - fhempy.lib.fhem: FHEM took 5146ms for ReadingsVal('TUYA_JL30', 'energy', '0')
2023-03-02 12:02:54,992 - ERROR    - fhempy.lib.fhem: FHEM took 5303ms for readingsSingleUpdate($defs{'TUYA_SP01'},'state','Initializing...',1)
2023-03-02 12:02:54,994 - ERROR    - fhempy.lib.fhem: FHEM took 5263ms for readingsSingleUpdate($defs{'TUYA_SP02'},'state','Initializing...',1)
2023-03-02 12:02:55,107 - ERROR    - fhempy.lib.fhem: FHEM took 5366ms for readingsSingleUpdate($defs{'TUYA_SP04'},'state','Initializing...',1)
2023-03-02 12:02:55,264 - ERROR    - fhempy.lib.fhem: FHEM took 5523ms for readingsSingleUpdate($defs{'TUYA_SP05'},'state','Initializing...',1)
2023-03-02 12:02:55,432 - ERROR    - fhempy.lib.fhem: FHEM took 5620ms for readingsSingleUpdate($defs{'TUYA_SP06'},'state','Initializing...',1)
2023-03-02 12:02:55,437 - ERROR    - fhempy.lib.fhem: FHEM took 5610ms for AttrVal('TUYA_BULB01', 'tuya_spec_functions', '[]')
2023-03-02 12:02:55,439 - ERROR    - fhempy.lib.fhem: FHEM took 5607ms for AttrVal('TUYA_DIY1', 'tuya_spec_functions', '[]')
2023-03-02 12:02:55,440 - ERROR    - fhempy.lib.fhem: FHEM took 5577ms for AttrVal('TUYA_DIY4', 'tuya_spec_functions', '[]')
2023-03-02 12:02:55,441 - ERROR    - fhempy.lib.fhem: FHEM took 5570ms for AttrVal('TUYA_EMYLO4', 'tuya_spec_functions', '[]')
2023-03-02 12:02:55,603 - ERROR    - fhempy.lib.fhem: FHEM took 5730ms for readingsSingleUpdate($defs{'TUYA_SP07'},'state','Initializing...',1)
2023-03-02 12:02:55,760 - ERROR    - fhempy.lib.fhem: FHEM took 5885ms for readingsSingleUpdate($defs{'TUYA_SP09'},'state','Initializing...',1)
2023-03-02 12:02:55,762 - ERROR    - fhempy.lib.fhem: FHEM took 5886ms for AttrVal('TUYA_EMYLO2', 'tuya_spec_functions', '[]')
2023-03-02 12:02:55,918 - ERROR    - fhempy.lib.fhem: FHEM took 6041ms for readingsSingleUpdate($defs{'TUYA_SP10'},'state','Initializing...',1)
2023-03-02 12:02:55,920 - ERROR    - fhempy.lib.fhem: FHEM took 6043ms for readingsSingleUpdate($defs{'TUYA_SP08'},'state','Initializing...',1)
2023-03-02 12:02:56,147 - ERROR    - fhempy.lib.fhem: FHEM took 6269ms for AttrVal('TUYA_EMYLO1', 'tuya_spec_functions', '[]')
2023-03-02 12:02:56,309 - ERROR    - fhempy.lib.fhem: FHEM took 6430ms for readingsSingleUpdate($defs{'TUYA_SP12'},'state','Initializing...',1)
2023-03-02 12:02:56,311 - ERROR    - fhempy.lib.fhem: FHEM took 6431ms for AttrVal('TUYA_EMYLO3', 'tuya_spec_functions', '[]')
2023-03-02 12:02:56,313 - ERROR    - fhempy.lib.fhem: FHEM took 6433ms for AttrVal('TUYA_BULB02', 'tuya_spec_functions', '[]')
2023-03-02 12:02:56,315 - ERROR    - fhempy.lib.fhem: FHEM took 6434ms for AttrVal('TUYA_JL03', 'tuya_spec_functions', '[]')
2023-03-02 12:02:56,317 - ERROR    - fhempy.lib.fhem: FHEM took 6436ms for AttrVal('TUYA_DIY3', 'tuya_spec_functions', '[]')
2023-03-02 12:02:56,478 - ERROR    - fhempy.lib.fhem: FHEM took 6563ms for readingsSingleUpdate($defs{'TUYA_SP15'},'state','Initializing...',1)
2023-03-02 12:02:56,635 - ERROR    - fhempy.lib.fhem: FHEM took 6719ms for readingsSingleUpdate($defs{'TUYA_SP11'},'state','Initializing...',1)
2023-03-02 12:02:56,794 - ERROR    - fhempy.lib.fhem: FHEM took 6877ms for readingsSingleUpdate($defs{'TUYA_SP14'},'state','Initializing...',1)
2023-03-02 12:02:56,796 - ERROR    - fhempy.lib.fhem: FHEM took 6877ms for AttrVal('TUYA_JL02', 'tuya_spec_functions', '[]')
2023-03-02 12:02:56,954 - ERROR    - fhempy.lib.fhem: FHEM took 6991ms for readingsSingleUpdate($defs{'TUYA_SP16'},'state','Initializing...',1)
2023-03-02 12:02:57,222 - ERROR    - fhempy.lib.fhem: FHEM took 7259ms for readingsSingleUpdate($defs{'TUYA_SP13'},'state','Initializing...',1)
2023-03-02 12:02:57,277 - ERROR    - fhempy.lib.fhem: FHEM took 7313ms for readingsSingleUpdate($defs{'TUYA_STF01'},'state','Initializing...',1)
2023-03-02 12:02:57,333 - ERROR    - fhempy.lib.fhem: FHEM took 7368ms for readingsSingleUpdate($defs{'TUYA_STF03'},'state','Initializing...',1)
2023-03-02 12:02:57,390 - ERROR    - fhempy.lib.fhem: FHEM took 7376ms for readingsSingleUpdate($defs{'TUYA_STF02'},'state','Initializing...',1)
2023-03-02 12:02:57,392 - ERROR    - fhempy.lib.fhem: FHEM took 7296ms for AttrVal('TUYA_JL10Z', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,394 - ERROR    - fhempy.lib.fhem: FHEM took 7127ms for AttrVal('TUYA_JL04', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,395 - ERROR    - fhempy.lib.fhem: FHEM took 7016ms for AttrVal('TUYA_JL13', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,397 - ERROR    - fhempy.lib.fhem: FHEM took 6855ms for AttrVal('TUYA_JL05', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,399 - ERROR    - fhempy.lib.fhem: FHEM took 6855ms for AttrVal('TUYA_JL14', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,406 - ERROR    - fhempy.lib.fhem: FHEM took 6701ms for AttrVal('TUYA_JL06', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,408 - ERROR    - fhempy.lib.fhem: FHEM took 6700ms for AttrVal('TUYA_JL08', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,410 - ERROR    - fhempy.lib.fhem: FHEM took 6700ms for AttrVal('TUYA_JL07', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,411 - ERROR    - fhempy.lib.fhem: FHEM took 6533ms for AttrVal('TUYA_JL11Z', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,413 - ERROR    - fhempy.lib.fhem: FHEM took 6370ms for AttrVal('TUYA_JL09', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,415 - ERROR    - fhempy.lib.fhem: FHEM took 6210ms for AttrVal('TUYA_JL12Z', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,416 - ERROR    - fhempy.lib.fhem: FHEM took 6045ms for AttrVal('TUYA_JL21', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,418 - ERROR    - fhempy.lib.fhem: FHEM took 5880ms for AttrVal('TUYA_JL18', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,420 - ERROR    - fhempy.lib.fhem: FHEM took 5716ms for AttrVal('TUYA_JL15', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,422 - ERROR    - fhempy.lib.fhem: FHEM took 5552ms for AttrVal('TUYA_JL22', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,424 - ERROR    - fhempy.lib.fhem: FHEM took 5391ms for AttrVal('TUYA_JL20', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,425 - ERROR    - fhempy.lib.fhem: FHEM took 5229ms for AttrVal('TUYA_JL26', 'tuya_spec_functions', '[]')
2023-03-02 12:02:57,427 - ERROR    - fhempy.lib.fhem: FHEM took 5068ms for AttrVal('TUYA_JL24', 'tuya_spec_functions', '[]')
2023-03-02 12:03:32,303 - ERROR    - fhempy.lib.fhem: FHEM took 5364ms for readingsEndUpdate($defs{'TUYAC_SensorSmoke01'},1);;
2023-03-02 12:03:32,308 - ERROR    - fhempy.lib.fhem: FHEM took 5369ms for AttrVal('TUYA_BULB02', 'dp_22', '')
2023-03-02 12:03:32,309 - ERROR    - fhempy.lib.fhem: FHEM took 5369ms for AttrVal('TUYA_JL04', 'dp_02', '')
2023-03-02 12:03:32,309 - ERROR    - fhempy.lib.fhem: FHEM took 5369ms for AttrVal('TUYA_JL13', 'dp_01', '')
2023-03-02 12:03:32,311 - ERROR    - fhempy.lib.fhem: FHEM took 5369ms for AttrVal('TUYA_JL05', 'dp_02', '')
2023-03-02 12:03:32,313 - ERROR    - fhempy.lib.fhem: FHEM took 5371ms for AttrVal('TUYA_JL14', 'dp_02', '')
2023-03-02 12:03:32,472 - ERROR    - fhempy.lib.fhem: FHEM took 5526ms for readingsBulkUpdate($defs{'TUYAC_Camera4'},'uuid','pp015a98aab5e0f9f587');;
2023-03-02 12:03:32,474 - ERROR    - fhempy.lib.fhem: FHEM took 5527ms for AttrVal('TUYA_JL08', 'dp_02', '')
2023-03-02 12:03:32,475 - ERROR    - fhempy.lib.fhem: FHEM took 5527ms for AttrVal('TUYA_JL07', 'dp_02', '')
2023-03-02 12:03:32,477 - ERROR    - fhempy.lib.fhem: FHEM took 5528ms for AttrVal('TUYA_JL21', 'dp_03', '')
2023-03-02 12:03:32,478 - ERROR    - fhempy.lib.fhem: FHEM took 5458ms for readingsBeginUpdate($defs{'TUYAC_Camera6'});;
2023-03-02 12:03:32,480 - ERROR    - fhempy.lib.fhem: FHEM took 5407ms for readingsBeginUpdate($defs{'TUYA_JL30'});;
2023-03-02 12:03:33,731 - ERROR    - fhempy.lib.fhem: FHEM took 5212ms for readingsEndUpdate($defs{'TUYA_Temp05'},1);;
2023-03-02 12:03:33,736 - ERROR    - fhempy.lib.fhem: FHEM took 5216ms for readingsBulkUpdate($defs{'TUYAC_SensorT04'},'battery_state','high');;
2023-03-02 12:03:33,737 - ERROR    - fhempy.lib.fhem: FHEM took 5216ms for readingsBulkUpdateIfChanged($defs{'TUYA_JL08'},'online','1');;
2023-03-02 12:03:33,740 - ERROR    - fhempy.lib.fhem: FHEM took 5218ms for readingsBulkUpdate($defs{'TUYA_BULB03'},'work_mode','scene');;
2023-03-02 12:03:33,740 - ERROR    - fhempy.lib.fhem: FHEM took 5218ms for readingsBulkUpdate($defs{'TUYAC_PIR03'},'online','on');;


fhem.log:
2023.03.02 11:09:03 3: Watchdog WDT_BAD_F2 triggered
2023.03.02 11:55:53 2: DbLog dblog_THB - Wait for last database cycle due to shutdown ...
2023.03.02 11:55:53 1: Server shutdown delayed due to dblog_THB for max 10 sec
2023.03.02 11:55:53 2: DbLog dblog_THB - Last database write cycle done
2023.03.02 11:55:54 0: Server shutdown
2023.03.02 11:55:54 2: DbLog dblog_THB - stopping SubProcess PID >14567< ...
2023.03.02 11:55:54 2: DbLog dblog_THB - SubProcess PID >14567< stopped
2023.03.02 11:55:56 1: Including fhem.cfg
2023.03.02 11:55:57 2: DbLog dblog_THB - Subprocess >15903< initialized ... ready for non-blocking operation
2023.03.02 11:55:58 3: telnetPort: port 7072 opened
2023.03.02 11:55:58 3: WEB: port 8083 opened
2023.03.02 11:55:58 3: WEBphone: port 8084 opened
2023.03.02 11:55:58 3: WEBtablet: port 8085 opened
2023.03.02 11:55:58 3: TelegramBot_Define TelegramBotTHB: called
2023.03.02 11:55:58 3: BindingsIo v1.0.1
2023.03.02 11:55:58 3: fhempyServer v1.0.0
2023.03.02 11:55:58 3: fhempy v1.0.0 (tuya_cloud: TUYA)
2023.03.02 11:55:58 3: fhempy v1.0.0 (tuya: tuya_system)
2023.03.02 11:55:58 3: Opening CUL_0 device /dev/ttyACM0
2023.03.02 11:55:58 3: Setting CUL_0 serial parameters to 9600,8,N,1
2023.03.02 11:55:59 3: CUL_0: Possible commands: BbCFiAZNkGMKUYRTVWXefmLltux
2023.03.02 11:55:59 3: CUL_0 device opened
2023.03.02 11:55:59 2: Switched CUL_0 rfmode to MAX
2023.03.02 11:55:59 3: Opening JLLaCR device /dev/ttyUSB0
2023.03.02 11:55:59 3: Setting JLLaCR serial parameters to 57600,8,N,1
2023.03.02 11:56:00 3: JLLaCR device opened
2023.03.02 11:56:00 1: PERL WARNING: Use of uninitialized value in numeric ge (>=) at ./FHEM/12_OilFox.pm line 387, <$fh> line 553.
2023.03.02 11:56:00 2: LOGIN TOKEN MISSING OR EXPIRED
2023.03.02 11:56:00 3: myOilFox - email set to bkt@gmx.net
2023.03.02 11:56:00 3: myOilFox - set interval: 36000
2023.03.02 11:56:00 3: myOilFox - password set to thbbkt25
2023.03.02 11:56:00 3: powerfox: Defined with URL https://bkt%40gmx.net:thbbkt25@backend.powerfox.energy/api/2.0/my/246f283cfeac/current and interval 60 featurelevel 6.2
2023.03.02 11:56:16 2: eventTypes: loaded 17612 lines from ./log/eventTypes.txt
2023.03.02 11:56:16 3: TX29_00: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_01: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_02: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_03: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_04: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_05: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_06: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_07: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_08: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_09: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_10: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_11: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_12: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX25IT_13: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_14: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_15: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_16: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_17: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_18: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_19: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_20: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_21: I/O device is JLLaCR
2023.03.02 11:56:16 3: TX29DTH_22: I/O device is JLLaCR
2023.03.02 11:56:16 3: HUEDevice2: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice4: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice5: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice6: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice7: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice8: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice10: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice17: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice18: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice19: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice20: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice22: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice23: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice24: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice25: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice27: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice28: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice29: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice30: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice31: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice32: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice33: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice38: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice39: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice40: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice41: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup0: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup1: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup2: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup3: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup4: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup5: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup6: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup7: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup8: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup9: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup10: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup11: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup12: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup13: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup14: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup15: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup16: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup17: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup18: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup19: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup20: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup21: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup22: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup23: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup24: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup25: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup26: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup27: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup28: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup29: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup30: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice44: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEGroup31: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUESensor6: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUESensor8: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUESensor10: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUESensor13: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUESensor24: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUESensor27: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUESensor34: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUESensor37: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUESensor45: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice45: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice46: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice47: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice48: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice49: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice50: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice51: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUESensor91: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUESensor110: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUESensor1: I/O device is hueBridge1
2023.03.02 11:56:16 3: HUEDevice52: I/O device is hueBridge1
2023.03.02 11:56:16 1: MaxTemp: WT
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_BULB01)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_BULB02)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYA_BULB03)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera1)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera2)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera3)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera4)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera5)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera6)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_DIY1)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_DIY3)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_DIY4)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_EMYLO1)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_EMYLO2)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_EMYLOD2)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_EMYLO3)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_EMYLO4)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL02)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL03)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL04)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL05)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL06)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL07)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL08)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL09)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL10Z)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL11Z)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL12Z)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL13)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL14)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL15)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL18)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYA_JL19)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL20)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL21)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL22)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL24)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYA_JL25)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL26)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL27)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL28)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL29)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL30)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL31)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL32)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL33)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL34)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL35)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_JL36)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_PS1)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_PS3)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_PS4)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_PS5)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_PS7)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SCHF1)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SCHF2)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SCHF3)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYA_SCHFF4)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SP01)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SP02)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SP03)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SP04)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SP05)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SP06)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SP07)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SP08)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SP09)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SP10)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SP11)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SP12)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SP13)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SP14)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SP15)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_SP16)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_PIR01)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_PIR02)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_PIR03)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT01)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT02)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT03)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT04)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT05)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorW01)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorW02)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorW03)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorW04)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Sir01)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Sir02)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Sir03)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Relais01)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorSmoke01)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_STF01)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_STF02)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_STF03)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYA_STF04)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya: TUYA_MMG)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp01)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp02)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp03)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp04)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp05)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp06)
2023.03.02 11:56:17 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp07)
2023.03.02 11:56:18 1: PERL WARNING: Useless use of anonymous hash ({}) in void context at (eval 125) line 1, <$fh> line 6356.
2023.03.02 11:56:18 3: SST (SamsungSmartThingsConnector): define - CONNECTOR defined as SamsungSmartThingsConnector
2023.03.02 11:56:18 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_5062137624a1600b6d62)
2023.03.02 11:56:18 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_4530056170039f4a87e5)
2023.03.02 11:56:18 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_104380002462ab30258d)
2023.03.02 11:56:18 1: Including ./log/fhem.save
2023.03.02 11:56:22 1: Messages collected while initializing FHEM:SecurityCheck:
  WEBtablet is not password protected
  WEBphone is not password protected
  WEB is not password protected
  telnetPort is not password protected

Protect this FHEM installation by defining an allowed device with define allowed allowed
You can disable this message with attr global motd none

2023.03.02 11:56:22 2: Deleting fhempy-2023-02-20.log
2023.03.02 11:56:23 2: alexa: starting alexa-fhem: /usr/local/bin/alexa-fhem -c ./alexa-fhem.cfg
2023.03.02 11:56:23 3: alexa: starting
2023.03.02 11:56:23 3: alexa: using logfile: ./log/alexa-2023-03-02.log
2023.03.02 11:56:23 2: hueBridge1: autocreate: created 0/0/0 devices (ignored 0/2/26)
2023.03.02 11:56:24 3: n_global_INITIALIZED return value: Unknown command <set, try help.
2023.03.02 11:56:24 2: alexa: starting alexa-fhem: /usr/local/bin/alexa-fhem -c ./alexa-fhem.cfg
2023.03.02 11:56:24 0: Featurelevel: 6.2
2023.03.02 11:56:24 0: Server started with 539 defined entities (fhem.pl:27268/2023-02-24 perl:5.032001 os:linux user:fhem pid:15902)
2023.03.02 11:56:24 3: DbLog dblog_THB - DB connection parameters are initialized in the SubProcess
2023.03.02 11:56:25 1: PERL WARNING: devspec2array *: Unknown verb pattern '' in regex; marked by <-- HERE in m/^(*) <-- HERE $/ at fhem.pl line 1352.
2023.03.02 11:56:25 1: PERL WARNING: ^* matches null string many times in regex; marked by <-- HERE in m/^* <-- HERE :.*RSSI.*$/ at ./FHEM/93_DbLog.pm line 1297.
2023.03.02 11:56:27 3: DbLog dblog_THB - DB connection parameters are stored in SubProcess
2023.03.02 11:56:28 3: alexa: read: end of file reached while sysread
2023.03.02 11:56:28 3: alexa: stopped
2023.03.02 11:56:28 2: alexa: starting alexa-fhem: /usr/local/bin/alexa-fhem -c ./alexa-fhem.cfg
2023.03.02 11:56:28 3: alexa: starting
2023.03.02 11:56:28 3: alexa: using logfile: ./log/alexa-2023-03-02.log
2023.03.02 11:56:29 2: AttrTemplates: got 258 entries
2023.03.02 11:56:37 2: hueBridge1: http request failed: https://192.168.9.179/eventstream/clip/v2: empty answer received
2023.03.02 11:56:37 2: hueBridge1: EventStream: terminated; retrying later
2023.03.02 11:56:37 2: hueBridge1: http request failed: https://192.168.9.179/auth/v1: empty answer received
2023.03.02 11:56:41 2: {"token_type":"Bearer","access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJiNmU5ZDg5Ni1kMzMwLTRiMWYtODVhNS0wYjk4NGQyZWJiMDQiLCJhdWQiOiJVU0VSIiwic2NvcGUiOiJDVVNUT01FUl9BUEkiLCJpc3MiOiJvaWxmb3guaW8iLCJleHAiOjE2Nzc3NTU0OTYsImp0aSI6IjUxMzBmYjc5LWU1OGQtNDA4Mi04ODUxLTdmMzg4YzY4ZGE0ZiIsImVtYWlsIjoiYmt0QGdteC5uZXQifQ.TCEVWr01QcNLoqKvNPhVTaFD4NPs_ODJ6dx5cbROU7OVvuTqz1PMQYb4oy8FZUMhkcvmOnUfR9MRT13UMOv0ww","refresh_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzY29wZSI6IkNVU1RPTUVSX0FQSSIsImlzcyI6Im9pbGZveC5pbyIsImV4cCI6MTY3OTA1MDU5NiwianRpIjoiNGZiZTJhYTEtZmE0MC00NmQzLWIyMjgtZWNkYWEyMTU0NzQ0In0.VuLl8VJLQfsS5jJ79scCTh_lW2XUvzXvT-kar5H8R-o89NGaDIyGDf9-zDIcEd1hy7OqZjdFxp7fuzvG40l8og"}
2023.03.02 11:56:48 2: hueBridge1: http request failed: read from https://192.168.9.179:443 timed out
2023.03.02 11:56:56 3: DbLog dblog_THB - SubProcess connected to fhem
2023.03.02 11:59:01 2: hueBridge1: EventStream: event for unknown device received, trying to refresh resouces
2023.03.02 11:59:02 2: hueBridge1: autocreate: created 0/0/0 devices (ignored 0/2/26)
2023.03.02 12:01:42 2: DbLog dblog_THB - Wait for last database cycle due to shutdown ...
2023.03.02 12:01:42 1: Server shutdown delayed due to dblog_THB,alexa for max 10 sec
2023.03.02 12:01:42 2: DbLog dblog_THB - Last database write cycle done
2023.03.02 12:01:44 3: alexa: read: end of file reached while sysread
2023.03.02 12:01:44 3: alexa: stopped
2023.03.02 12:01:44 0: Server shutdown
2023.03.02 12:01:44 2: DbLog dblog_THB - stopping SubProcess PID >15903< ...
2023.03.02 12:01:44 2: DbLog dblog_THB - SubProcess PID >15903< stopped
2023.03.02 12:01:46 1: Including fhem.cfg
2023.03.02 12:01:47 2: DbLog dblog_THB - Subprocess >16495< initialized ... ready for non-blocking operation
2023.03.02 12:01:48 3: telnetPort: port 7072 opened
2023.03.02 12:01:48 3: WEB: port 8083 opened
2023.03.02 12:01:48 3: WEBphone: port 8084 opened
2023.03.02 12:01:48 3: WEBtablet: port 8085 opened
2023.03.02 12:01:48 3: TelegramBot_Define TelegramBotTHB: called
2023.03.02 12:01:48 3: BindingsIo v1.0.1
2023.03.02 12:01:48 3: fhempyServer v1.0.0
2023.03.02 12:01:49 3: fhempy v1.0.0 (tuya_cloud: TUYA)
2023.03.02 12:01:49 3: fhempy v1.0.0 (tuya: tuya_system)
2023.03.02 12:01:49 3: Opening CUL_0 device /dev/ttyACM0
2023.03.02 12:01:49 3: Setting CUL_0 serial parameters to 9600,8,N,1
2023.03.02 12:01:49 3: CUL_0: Possible commands: BbCFiAZNkGMKUYRTVWXefmLltux
2023.03.02 12:01:49 3: CUL_0 device opened
2023.03.02 12:01:49 2: Switched CUL_0 rfmode to MAX
2023.03.02 12:01:49 3: Opening JLLaCR device /dev/ttyUSB0
2023.03.02 12:01:49 3: Setting JLLaCR serial parameters to 57600,8,N,1
2023.03.02 12:01:50 3: JLLaCR device opened
2023.03.02 12:01:50 1: PERL WARNING: Use of uninitialized value in numeric ge (>=) at ./FHEM/12_OilFox.pm line 387, <$fh> line 553.
2023.03.02 12:01:50 2: LOGIN TOKEN MISSING OR EXPIRED
2023.03.02 12:01:50 3: myOilFox - email set to bkt@gmx.net
2023.03.02 12:01:50 3: myOilFox - set interval: 36000
2023.03.02 12:01:50 3: myOilFox - password set to thbbkt25
2023.03.02 12:01:50 3: powerfox: Defined with URL https://bkt%40gmx.net:thbbkt25@backend.powerfox.energy/api/2.0/my/246f283cfeac/current and interval 60 featurelevel 6.2
2023.03.02 12:02:06 2: eventTypes: loaded 17614 lines from ./log/eventTypes.txt
2023.03.02 12:02:06 3: TX29_00: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_01: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_02: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_03: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_04: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_05: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_06: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_07: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_08: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_09: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_10: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_11: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_12: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX25IT_13: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_14: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_15: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_16: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_17: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_18: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_19: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_20: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_21: I/O device is JLLaCR
2023.03.02 12:02:06 3: TX29DTH_22: I/O device is JLLaCR
2023.03.02 12:02:06 3: HUEDevice2: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice4: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice5: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice6: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice7: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice8: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice10: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice17: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice18: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice19: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice20: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice22: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice23: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice24: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice25: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice27: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice28: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice29: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice30: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice31: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice32: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice33: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice38: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice39: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice40: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice41: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup0: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup1: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup2: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup3: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup4: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup5: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup6: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup7: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup8: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup9: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup10: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup11: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup12: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup13: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup14: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup15: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup16: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup17: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup18: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup19: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup20: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup21: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup22: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup23: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup24: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup25: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup26: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup27: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup28: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup29: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup30: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice44: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEGroup31: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUESensor6: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUESensor8: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUESensor10: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUESensor13: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUESensor24: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUESensor27: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUESensor34: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUESensor37: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUESensor45: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice45: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice46: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice47: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice48: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice49: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice50: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice51: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUESensor91: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUESensor110: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUESensor1: I/O device is hueBridge1
2023.03.02 12:02:06 3: HUEDevice52: I/O device is hueBridge1
2023.03.02 12:02:06 1: MaxTemp: WT
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya: TUYA_BULB01)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya: TUYA_BULB02)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya_cloud: TUYA_BULB03)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera1)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera2)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera3)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera4)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera5)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera6)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya: TUYA_DIY1)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya: TUYA_DIY3)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya: TUYA_DIY4)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya: TUYA_EMYLO1)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya: TUYA_EMYLO2)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya: TUYA_EMYLOD2)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya: TUYA_EMYLO3)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya: TUYA_EMYLO4)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya: TUYA_JL02)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya: TUYA_JL03)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya: TUYA_JL04)
2023.03.02 12:02:07 3: fhempy v1.0.0 (tuya: TUYA_JL05)

usw
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 März 2023, 19:50:28
Zitat von: Nomo am 02 März 2023, 09:36:37
Hallo zusammen,

zunächst muss ich hier mal anmerken, dass ich es ganz großartig finde, dass es ein Modul gibt mit dem die Tuya Devices über fhem angesteuert werden können. Ich verwende ehem seit über 15 Jahren und habe nichts besseres für mich gefunden. Meine größte Hochachtung für alle, die dazu beitragen! Leider komme ich mit PERL oder Python nicht klar, bin irgendwann bei Objective C stehengeblieben (NeXT).
Nach gescheiterten Versuchen mit Tasmota und einer zerbrochenen Steckdose habe ich wie gesagt fhempy entdeckt und bin sehr erfreut über den Funktionsumfang. Leider funktioniert einiges nicht so einfach wie erhofft und ich finde die Dokumentation dazu nicht. Ich habe natürlich die Readme.md auf Github angeschaut, aber was zB tuya_spec_functions genau tut, erschliesst sich mir nicht.

Ich habe zB. ein paar 3fach Schaltsteckdosen und kann hier über fhemWeb nur den ersten Stecker steuern. "switch_2" etc. sind als Readings und set functions da, aber eigentlich möchte man ja für jeden Schalter eine Weboberfläche? Ich habe mir jetzt dummys angelegt mit notifys, aber da sehe ich natürlich nur den Status des dummies, nicht der Steckdose. Das geht bestimmt besser, aber ich finde das nicht. Ich habe nicht nur 1 oder 2 von den Steckdosenleisten 😕

Aber das Gute ist: Ich kann die meisten Steckdosen jetzt ohne China-Cloud steuern! 😊

In fhempy kann man das nicht einfach so aufteilen. Wenn es dir nur um die Steuerbarkeit in fhemweb geht, dann ist vielleicht webCmd sinnvoll, wo du 3 Schalter machst. Oder ansonsten über DOIF weiter Schalter generieren die dann fhempy schalten.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 März 2023, 19:53:46
Zitat von: Nomo am 02 März 2023, 08:50:01
2023-03-01 22:33:25,057 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.606...
2023-03-01 22:33:25,063 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-03-01 22:33:25,142 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-03-01 22:33:26,793 - INFO     - websockets.server: connection open
2023-03-01 22:33:26,794 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1


22:44 abgestürzt, kein log Eintrag. Nix im syslog.
Danach sind bis auf ehem selber alle Prozesse mit user ehem weg: Alexa-fhem, Python/fhempy und der ssh.

:(

Reproduzieren kann ich das, wenn ich das fhem.cfg im Edit Files öffne, nichts ändere und safe drücke. Andere Abstürze passieren beim normalen Betrieb, aber leider sporadisch
Beim reread der Config kann ich mir gut vorstellen, dass es zu Problemen kommt. Beim Editieren in fhemweb darf das aber nicht vorkommen.

Wenn alle fhem Prozesse weg sind, hat es wahrscheinlich nichts mit fhempy zu tun. Das dürfte dann am fhem Hauptprozess liegen. Zur Analyse kannst du ja mal alle Devices auskommentieren und nach und nach wieder hinzugeben, damit du das fehlerhafte Device identifizierst.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 März 2023, 19:59:18
@Thomas, bitte code-Tag einfügen. Bei welchem Editieren von einem Device im FHEM Web crashed es? Das darf nicht passieren. Ein Reload der Config kann durchaus Probleme machen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 02 März 2023, 20:03:22
Zitat von: dominik am 02 März 2023, 19:59:18
@Thomas, bitte code-Tag einfügen. Bei welchem Editieren von einem Device im FHEM Web crashed es? Das darf nicht passieren. Ein Reload der Config kann durchaus Probleme machen.

ich habe keine TUYA-Devices sondern umfangreich Rollo-Devices.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 02 März 2023, 20:15:48
Bei deinem "Fehler" oben war FHEM für 5-8 Sekunden blockiert, was hast du da gemacht?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 02 März 2023, 21:19:04
Zitat von: Nomo am 02 März 2023, 09:36:37
Hallo zusammen,

zunächst muss ich hier mal anmerken, dass ich es ganz großartig finde, dass es ein Modul gibt mit dem die Tuya Devices über fhem angesteuert werden können. Ich verwende ehem seit über 15 Jahren und habe nichts besseres für mich gefunden. Meine größte Hochachtung für alle, die dazu beitragen! Leider komme ich mit PERL oder Python nicht klar, bin irgendwann bei Objective C stehengeblieben (NeXT).
Nach gescheiterten Versuchen mit Tasmota und einer zerbrochenen Steckdose habe ich wie gesagt fhempy entdeckt und bin sehr erfreut über den Funktionsumfang. Leider funktioniert einiges nicht so einfach wie erhofft und ich finde die Dokumentation dazu nicht. Ich habe natürlich die Readme.md auf Github angeschaut, aber was zB tuya_spec_functions genau tut, erschliesst sich mir nicht.

Ich habe zB. ein paar 3fach Schaltsteckdosen und kann hier über fhemWeb nur den ersten Stecker steuern. "switch_2" etc. sind als Readings und set functions da, aber eigentlich möchte man ja für jeden Schalter eine Weboberfläche? Ich habe mir jetzt dummys angelegt mit notifys, aber da sehe ich natürlich nur den Status des dummies, nicht der Steckdose. Das geht bestimmt besser, aber ich finde das nicht. Ich habe nicht nur 1 oder 2 von den Steckdosenleisten 😕

Aber das Gute ist: Ich kann die meisten Steckdosen jetzt ohne China-Cloud steuern! 😊

Ich habe eine Doppel Steckdose und kann diese jetzt über die Oberfläche beide getrennt schalten und bekomme den Status angezeigt

Gelöst über devStateIcon
Vielleicht hilft es dir!!
DevStateIcon
1.on:message_socket@green:+off
1.off:message_socket@red:+on
2.on:message_socket@green:switch_2+off
2.off:message_socket@red:switch_2+on


Und
StateFormat
1:state
2:switch_2


Bei Fragen einfach melden
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Nomo am 03 März 2023, 00:19:18
Ich steh ganz mächtig auf der Leitung. Meine Tuya Devices stehen jetzt alle auf "ready" und lassen sich nicht mehr steuern.
Historie:
1. Alle Tuyas in Smartlife aufgenommen und mit tuya cloud synchronisiert
2. mit tuya system Scan_devices alle erkannt, aber ohne IP. Alle Tuyas konnten geschaltet werden, über die cloud denke ich.
3. Alle IP Adressen aus der Fritz!Box in fhem.cfg kopiert und die Tuyas für das internet gesperrt, die Tuyas konnten lokal bedient werden
4. Wegen Urlaub und weil die Alexa das Aquarium mit einem Futterautomat und dem Filter über Tuya steuert, habe ich diese Tuyas wieder ans Internet gelassen. Alexa konnte sie wieder mit Routinen steuern
5. Weil die alexaNames identisch waren mit den Namen der Smartlife App, waren die Devices nicht nur doppelt bei Alexa, sondern auch mit dem gleichen Namen 😕
6. Alle Devices aus der Smartlife gelöscht, leider gehen die Tuyas nicht über Alexa und fhempy: "Das Gerät unterstützt das nicht"  >:( über fhemWeb können die Tuyas aber problemlos gesteuert werden
7. Mir war so, als ob die Tuyas am Anfang lokal über Alexa-fhem angesteuert werden konnten. Da ich damals einige noch an der cloud hatte, wollte ich versuchen 2 Dosen wieder an die Cloud zu lassen um das zu testen. Ergebnis: Die 2 Dosen zeigen nur noch ready und lassen sich auch über fhemWeb nicht mehr steuern  >:(
8. Ein neuer Scan scheitert mit 'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 1106: 'permission deny'". Im Netz findet man dazu, dass die cloud die Devices nicht finden kann. Stimmt, sind ja hinterm Firewall.
9. Firewall kurz auf, scan geht immer noch nicht. Und alle Tuya-Devices sind nicht mehr ansprechbar, auch nicht nach dem einschalten der Firewall, also dem gleichen Zustand wie vorher 🤮
Die Einträge in der fhem.cfg sind unverändert. Shutdown restart - unverändert "ready" statt on/off

Eine gute Nachricht: mein fhempy server scheint nur noch nach einem save der fhem.cfg abzustürzen. Das ist im Moment mein kleinstes Problem

Hat irgendjemand eine Ahnung, wie ich die Tuya-Devices wieder aktivieren kann? Oder mir erklären, was genau da passiert ist? Ich würde das echt gerne verstehen, wenn möglich.
Wenn ich die alle lösche, sind ja auch die IP-Adressen weg, das wäre unschön. Und die fhem.cfg-Einträge waren ja auch richtig. Ok, ich würde die perspektivisch schon auch wieder verbal über Alexa-fhem steuern wollen, daran bin ich ja eigentlich gescheitert.
Was habe ich nicht gemacht: Ich habe keine Mappings geändert oder die automatisch angelegten Tuya-Devices verändert, bis auf die IP-Adresse.
@Tueftler1983, Du hattest in einem Post auch den Fehler "Err': '913', 'Payload': "Error from Tuya Cloud: Code 1106: 'permission deny" beschrieben, bei einem Bekannten? Hast Du die Ursache gefunden?
Ich habe den Authorization Key nicht angefasst, der passt immer noch. Wo wird denn die Config der Devices noch verändert, wenn nicht in der fhem.cfg? Die wurde ja nicht geändert? Trotzdem verhalten sich die Devices jetzt anders?

Jetzt kommt folgendes im fhempy-log

2023-03-03 00:13:34,151 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.613...
2023-03-03 00:13:34,157 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-03-03 00:13:34,235 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-03-03 00:13:35,967 - INFO     - websockets.server: connection open
2023-03-03 00:13:35,968 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-03-03 00:13:48,128 - ERROR    - asyncio: Task was destroyed but it is pending!
task: <Task pending name='Task-844' coro=<main() running at /opt/fhem/.local/lib/python3.9/site-packages/tinytuya/__init__.py:226> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7412be98>()]>>
2023-03-03 00:14:07,340 - WARNING  - asyncio: socket.send() raised exception.
2023-03-03 00:14:07,344 - WARNING  - asyncio: socket.send() raised exception.
2023-03-03 00:14:07,348 - WARNING  - asyncio: socket.send() raised exception.
2023-03-03 00:14:08,240 - WARNING  - asyncio: socket.send() raised exception.
2023-03-03 00:14:08,242 - WARNING  - asyncio: socket.send() raised exception.
2023-03-03 00:14:08,460 - WARNING  - asyncio: socket.send() raised exception.
2023-03-03 00:14:13,257 - WARNING  - asyncio: socket.send() raised exception.



Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 03 März 2023, 10:51:08
Hallo Dominik,
musste leider etwas dringendes zwischendurch erledigen, daher erst jetzt eine Rückmeldung zu deiner Frage.:
Habe wie gewünscht das colour_data gelöscht und den fhempy-Server neu gestartet und in der App (so gut es geht via Farbradauswahl) Rot eingestellt, das Reading dp_108 zeigt "ff0026015f64ff" an.
Für Grün wird "22ff00006f64ff" angezeigt und für Blau "0048ff00df64ff".

Ich hoffe das hilft dir weiter, ich kann mit diesen Angaben (14 Zeichen) gar nichts anfangen. HEX wären 6, max. 8 wenn eine Transparenz dazu käme, bei einem Bereich mit zwei HEX-Werten wären es dann 12 oder 16, aber 14 Zeichen kenne ich gar nicht.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 03 März 2023, 14:38:02
Zitat von: Nomo am 03 März 2023, 00:19:18
Ich steh ganz mächtig auf der Leitung. Meine Tuya Devices stehen jetzt alle auf "ready" und lassen sich nicht mehr steuern.
Historie:
1. Alle Tuyas in Smartlife aufgenommen und mit tuya cloud synchronisiert
2. mit tuya system Scan_devices alle erkannt, aber ohne IP. Alle Tuyas konnten geschaltet werden, über die cloud denke ich.
3. Alle IP Adressen aus der Fritz!Box in fhem.cfg kopiert und die Tuyas für das internet gesperrt, die Tuyas konnten lokal bedient werden
4. Wegen Urlaub und weil die Alexa das Aquarium mit einem Futterautomat und dem Filter über Tuya steuert, habe ich diese Tuyas wieder ans Internet gelassen. Alexa konnte sie wieder mit Routinen steuern
5. Weil die alexaNames identisch waren mit den Namen der Smartlife App, waren die Devices nicht nur doppelt bei Alexa, sondern auch mit dem gleichen Namen 😕
6. Alle Devices aus der Smartlife gelöscht, leider gehen die Tuyas nicht über Alexa und fhempy: "Das Gerät unterstützt das nicht"  >:( über fhemWeb können die Tuyas aber problemlos gesteuert werden
7. Mir war so, als ob die Tuyas am Anfang lokal über Alexa-fhem angesteuert werden konnten. Da ich damals einige noch an der cloud hatte, wollte ich versuchen 2 Dosen wieder an die Cloud zu lassen um das zu testen. Ergebnis: Die 2 Dosen zeigen nur noch ready und lassen sich auch über fhemWeb nicht mehr steuern  >:(
8. Ein neuer Scan scheitert mit 'Error': 'Error Response from Tuya Cloud', 'Err': '913', 'Payload': "Error from Tuya Cloud: Code 1106: 'permission deny'". Im Netz findet man dazu, dass die cloud die Devices nicht finden kann. Stimmt, sind ja hinterm Firewall.
9. Firewall kurz auf, scan geht immer noch nicht. Und alle Tuya-Devices sind nicht mehr ansprechbar, auch nicht nach dem einschalten der Firewall, also dem gleichen Zustand wie vorher 🤮
Die Einträge in der fhem.cfg sind unverändert. Shutdown restart - unverändert "ready" statt on/off

Eine gute Nachricht: mein fhempy server scheint nur noch nach einem save der fhem.cfg abzustürzen. Das ist im Moment mein kleinstes Problem

Hat irgendjemand eine Ahnung, wie ich die Tuya-Devices wieder aktivieren kann? Oder mir erklären, was genau da passiert ist? Ich würde das echt gerne verstehen, wenn möglich.
Wenn ich die alle lösche, sind ja auch die IP-Adressen weg, das wäre unschön. Und die fhem.cfg-Einträge waren ja auch richtig. Ok, ich würde die perspektivisch schon auch wieder verbal über Alexa-fhem steuern wollen, daran bin ich ja eigentlich gescheitert.
Was habe ich nicht gemacht: Ich habe keine Mappings geändert oder die automatisch angelegten Tuya-Devices verändert, bis auf die IP-Adresse.
@Tueftler1983, Du hattest in einem Post auch den Fehler "Err': '913', 'Payload': "Error from Tuya Cloud: Code 1106: 'permission deny" beschrieben, bei einem Bekannten? Hast Du die Ursache gefunden?
Ich habe den Authorization Key nicht angefasst, der passt immer noch. Wo wird denn die Config der Devices noch verändert, wenn nicht in der fhem.cfg? Die wurde ja nicht geändert? Trotzdem verhalten sich die Devices jetzt anders?

Jetzt kommt folgendes im fhempy-log

2023-03-03 00:13:34,151 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.613...
2023-03-03 00:13:34,157 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-03-03 00:13:34,235 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-03-03 00:13:35,967 - INFO     - websockets.server: connection open
2023-03-03 00:13:35,968 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-03-03 00:13:48,128 - ERROR    - asyncio: Task was destroyed but it is pending!
task: <Task pending name='Task-844' coro=<main() running at /opt/fhem/.local/lib/python3.9/site-packages/tinytuya/__init__.py:226> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7412be98>()]>>
2023-03-03 00:14:07,340 - WARNING  - asyncio: socket.send() raised exception.
2023-03-03 00:14:07,344 - WARNING  - asyncio: socket.send() raised exception.
2023-03-03 00:14:07,348 - WARNING  - asyncio: socket.send() raised exception.
2023-03-03 00:14:08,240 - WARNING  - asyncio: socket.send() raised exception.
2023-03-03 00:14:08,242 - WARNING  - asyncio: socket.send() raised exception.
2023-03-03 00:14:08,460 - WARNING  - asyncio: socket.send() raised exception.
2023-03-03 00:14:13,257 - WARNING  - asyncio: socket.send() raised exception.

Payload': "Error from Tuya Cloud: Code 1106: 'permission deny'
Da kann nur API SECRET/KEY und/oder region falsch sein.

Wegen der Alexa Thematik nochmals:
JEDES Devices welches du in FHEM hast, lässt sich natürlich auch via alexa-fhem steuern. Vorausgesetzt die homebridgeMappings passen. Dieses Thema bitte daher im Alexa Thread behandeln.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 03 März 2023, 14:45:06
Zitat von: Superposchi am 03 März 2023, 10:51:08
Hallo Dominik,
musste leider etwas dringendes zwischendurch erledigen, daher erst jetzt eine Rückmeldung zu deiner Frage.:
Habe wie gewünscht das colour_data gelöscht und den fhempy-Server neu gestartet und in der App (so gut es geht via Farbradauswahl) Rot eingestellt, das Reading dp_108 zeigt "ff0026015f64ff" an.
Für Grün wird "22ff00006f64ff" angezeigt und für Blau "0048ff00df64ff".

Ich hoffe das hilft dir weiter, ich kann mit diesen Angaben (14 Zeichen) gar nichts anfangen. HEX wären 6, max. 8 wenn eine Transparenz dazu käme, bei einem Bereich mit zwei HEX-Werten wären es dann 12 oder 16, aber 14 Zeichen kenne ich gar nicht.

Danke, damit ist colour_data richtig und nicht v2. Bitte Attribute setzen, fhempy Update machen und dann sollte es klappen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 03 März 2023, 18:31:34
Hallo Dominik,

ich habe einen Rauchmelder, der auch über die Scan Funktion erkannt wurde. Ich habe für die MAC (aus der Tuy App herausgelesen) eine feste IP vergeben.

Das Teil bleibt leider im state ready stehen.
Wenn ich das Teil mit Rauch / Wasserdampf auslöse bekomme ich eine Warnung auf die Tuya App aber im FHEM passiert nichts.

Wie kann ich das Teil zur Zusammenarbeit bewegen?


Internals:
   CFGFN     
   DEF        tuya kscbebaf3s1eogvt bff9f2e87b10fc29f8klp0 192.168.179.226 c74547fd64e661e3 3.3 API_KEY API_SECRET
   DEVICEID   bff9f2e87b10fc29f8klp0
   FHEMPYTYPE tuya
   FUUID      64022cf8-f33f-3305-3a4f-adc8ee9ce1e4e199
   IODev      fhempy_local
   NAME       tuya_local_bff9f2e87b10fc29f8klp0
   NR         1734
   PYTHONTYPE tuya
   STATE      ready
   TYPE       fhempy
   eventCount 5
   READINGS:
     2023-03-03 18:23:24   active_time     1677863288
     2023-03-03 18:23:24   biz_type        0
     2023-03-03 18:23:24   category        ywbj
     2023-03-03 18:23:24   create_time     1677863288
     2023-03-03 18:23:24   icon            smart/icon/ay15427647462366edzT/dbba10135e4616a3c17cb4a0c3e6bceb.png
     2023-03-03 18:23:24   id              bff9f2e87b10fc29f8klp0
     2023-03-03 18:23:24   ip              84.181.31.69
     2023-03-03 18:23:24   lat             0.0000
     2023-03-03 18:23:24   local_key       c74547fd64e661e3
     2023-03-03 18:23:24   lon             0.0000
     2023-03-03 18:23:24   name            WIFI Smoke alarm
     2023-03-03 18:23:24   online          1
     2023-03-03 18:23:24   owner_id        60699953
     2023-03-03 18:23:24   product_id      kscbebaf3s1eogvt
     2023-03-03 18:23:24   product_name    WIFI Smoke alarm
     2023-03-03 18:23:40   state           ready
     2023-03-03 18:23:24   sub             0
     2023-03-03 18:23:24   time_zone       +01:00
     2023-03-03 18:23:24   uid             eu1657214536858UvzcG
     2023-03-03 18:23:24   update_time     1677863292
     2023-03-03 18:23:24   uuid            72abe938a969e8d2
   args:
     tuya_local_bff9f2e87b10fc29f8klp0
     fhempy
     tuya
     kscbebaf3s1eogvt
     bff9f2e87b10fc29f8klp0
     192.168.179.226
     c74547fd64e661e3
     3.3
     mrhacrhhkjayq4gjhf7y
     3ea6d5f6213e4bcfa3d4a51e51d8d35a
   argsh:
Attributes:
   alias      WIFI Smoke alarm
   dp_01      smoke_sensor_status
   dp_15      battery_percentage
   dp_16      muffling
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'muffling', 'dp_id': 16, 'type': 'Boolean', 'values': {}, 'desc': 'muffling'}]
   tuya_spec_status [{'code': 'smoke_sensor_status', 'dp_id': 1, 'type': 'Enum', 'values': {'range': ['alarm', 'normal']}}, {'code': 'battery_percentage', 'dp_id': 15, 'type': 'Integer', 'values': {'unit': '%', 'min': 0, 'max': 100, 'scale': 0, 'step': 1}}, {'code': 'muffling', 'dp_id': 16, 'type': 'Boolean', 'values': {}}]
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 03 März 2023, 21:10:58
Die IP passt auch ganz sicher? Schon mal getestet wenn er online geht, ob er diese IP erhält?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Nomo am 03 März 2023, 22:57:29
ZitatPayload': "Error from Tuya Cloud: Code 1106: 'permission deny'
Da kann nur API SECRET/KEY und/oder region falsch sein.
API Secret/KEY geprüft. Region Data Center : Central Europe Data Center, sieht gut aus.
Im übrigen hat tuya_system mit genau dieser config bereits die ganzen Devices aus der tuya cloud gelesen. Ich lege meine Hand dafür ins Feuer, dass es die gleichen Zugangsdaten sind, Buchstabe für Buchstabe geprüft.

Muss dann wohl doch was anderes sein.

Muss ich fhempy jetzt neu installieren? Vorher löschen? Weil niemand weiß, welche geheime db/config Datei vergrützt ist? Die gleiche fhem.cfg definition mit allen Attributen geht plötzlich nicht mehr weil ich kurz die Firewall geöffnet habe? Wo hat sich das System das gemerkt?

Kann ich fhempy einfach restlos deinstallieren und wieder neu aufsetzen, oder ist das schwierig? In den Sourcen sehe ich install scripts, aber keine uninstall scripts. Kein makefile? kein make clean?

Fun fact: Nicht alle Tuya devices gehen nicht mehr: Die 3fach Steckdosen gehen lokal problemlos. Und die waren auch genauso in der Filtergruppe, die kurz Zugang zum Internet/Tuya Cloud hatte. Jetzt wieder eingesperrt, aber die gehen einfach. Alle Einfach-Steckdosen nicht, egal welche Product ID (habe mehrere unterschiedliche).
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 03 März 2023, 23:10:15
Schick mir bitte deine tuya iot cloud Zugangsdaten per PN, damit geht die Analyse am schnellsten...
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 04 März 2023, 10:13:23
Ich glaube das ist ein IP-Problem mit dem Rauchmelder.
Das Teil wird bei den active dhcp leases im Router nicht aufgeführt.

Da die Dinger ja nur selten mal am Netz sind, muss ich nun mal sehen, wie ich das Teil erwische.

In der Tuya App kann ich mir ja eine MAC Adresse anzeigen lassen. Ist das die von dem Device oder die von der externen IP?

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 04 März 2023, 12:53:00
Zitat von: denis.robel am 04 März 2023, 10:13:23
Ich glaube das ist ein IP-Problem mit dem Rauchmelder.
Das Teil wird bei den active dhcp leases im Router nicht aufgeführt.

Da die Dinger ja nur selten mal am Netz sind, muss ich nun mal sehen, wie ich das Teil erwische.

In der Tuya App kann ich mir ja eine MAC Adresse anzeigen lassen. Ist das die von dem Device oder die von der externen IP?

IP: ist die externe IP
MAC: ist meist die Device ID ; der Router zeigt Sie meist als ESP-xxxxxx, wobei xxxxxx die letzten 6 Stellen der ID sind
In der Fritzbox lasse ich die zugehörige interne IP fest zuordnen
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: tom0 am 04 März 2023, 16:17:08
Zitat von: dominik am 01 März 2023, 21:08:04
immer die gleiche IP

Ist korrekt, die sind nicht immer online, alle haben eine feste IP.

PS.: Ich habe 2 Sensoren wo sich der Minutenabstand einstellen lässt wann sie senden. Was ist sinnvoll damit es möglichst die lokalen Leseversuche trifft?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 04 März 2023, 18:53:10
ich kapiere es nicht so richtig: ich kann den Rauchmelder in der Tuya App anlegen und bekomme auch von dem Teil Nachrichten auf das Telefon, aber ich sehe keine IP im Router...
Sehr spooky.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 04 März 2023, 19:35:15
Zitat von: tom0 am 04 März 2023, 16:17:08
Ist korrekt, die sind nicht immer online, alle haben eine feste IP.

PS.: Ich habe 2 Sensoren wo sich der Minutenabstand einstellen lässt wann sie senden. Was ist sinnvoll damit es möglichst die lokalen Leseversuche trifft?

Das spielt keine Rolle, es wird immer für 15s versucht eine Verbindung aufzubauen. Klappt das nicht, wird sofort wieder versucht sich zu verbinden.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 04 März 2023, 20:31:57
Wie ist das, wenn ein Alarm ausgelöst wird? Dann muss doch sofort eine Verbindung zum Senden aufgebaut werden.
Auf alle Fälle zeigt mir Wireshark in Kombination mit der MAC aus der Tuya App eine lokale IP mit UDF Traffic an.

Wenn ich die dann einstelle, klappt es trotzdem nicht,dasDevice bleibt bei ready stehen und im State ändert sich nichts.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 04 März 2023, 20:56:05
Ich hab mir heute einen Rauchmelder geholt und teste dann damit morgen.
Den hier: https://www.action.com/de-de/p/lsc-smart-connect-rauchmelder/
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 04 März 2023, 21:05:49
Ich bin mal gespannt, was Deine Tests ergeben.

ich habe den https://de.aliexpress.com/item/1005005167970091.html?spm=a2g0o.order_list.order_list_main.5.21ef1802Bj3hGL&gatewayAdapt=glo2deu (https://de.aliexpress.com/item/1005005167970091.html?spm=a2g0o.order_list.order_list_main.5.21ef1802Bj3hGL&gatewayAdapt=glo2deu).
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 05 März 2023, 17:35:48
Hallo Dominik,

ich habe noch eine Tuya IR-Bridge. Besteht da auch irgendwie die Möglichkeit das Teil an FHEM anzubinden?

Weiterhin hab ich in der Tuya-App gesehen, dass man Geräte teilen kann mit andern Tuya Accounts.
Könnte Dir das was nutzen, wenn jemand mit Dir einige Devices teilt ?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 06 März 2023, 17:23:28
Hi Dominik,

wenn ich versuche bei den Thermostaten Temperaturen mit Nachkomma einzustellen kommt folgened Fehlermeldung:

Failed to execute function Set: Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 385, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 484, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 203, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 313, in handle_set
    final_params[param] = convert2format(
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 221, in convert2format
    return int(value)
ValueError: invalid literal for int() with base 10: '19.5'
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 März 2023, 21:33:55
Zitat von: Christian83 am 06 März 2023, 17:23:28
Hi Dominik,

wenn ich versuche bei den Thermostaten Temperaturen mit Nachkomma einzustellen kommt folgened Fehlermeldung:

Failed to execute function Set: Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 385, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 484, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 203, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 313, in handle_set
    final_params[param] = convert2format(
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 221, in convert2format
    return int(value)
ValueError: invalid literal for int() with base 10: '19.5'


Poste bitte die beiden tuya_spec Attribute von diesem Device.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 06 März 2023, 21:36:35
Zitat von: denis.robel am 05 März 2023, 17:35:48
Hallo Dominik,

ich habe noch eine Tuya IR-Bridge. Besteht da auch irgendwie die Möglichkeit das Teil an FHEM anzubinden?

Weiterhin hab ich in der Tuya-App gesehen, dass man Geräte teilen kann mit andern Tuya Accounts.
Könnte Dir das was nutzen, wenn jemand mit Dir einige Devices teilt ?

Teilen habe ich schon mal versucht, das klappt leider nicht.

IR-Bridge sollte gehen, aber davor muss ich noch die passiven Devices fixen und auf den letzten tinytuya Code aktualisieren...wird also noch etwas dauern. Hier siehst du wie es tinytuya macht:
https://github.com/jasonacox/tinytuya/tree/master/tinytuya/Contrib#irremotecontroldevice
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 06 März 2023, 23:24:56
Hab das colour_data wieder hinzugefügt, aber noch nicht kontrolliert ob es funktioniert. Mache ich morgen und berichte dann.

Für die Ventilatoren fehlen mir aber noch zwei Readings, einmal den Restwert des Filters und zum anderen die aktuelle Luftqualität pm2,5. Beides wird als dp_xx-Reading angegeben, sollte aber der Sauberkeit wegen richtig benannt werden. Ich vermute mal da kommen die Tuya-specs für einen String zum Tragen oder gibt es eine Funktion für numerische Inhalte.

In beiden Fällen bräuchte ich die richtige Syntex um die beiden Attribute zu erweitern.
Gibt es keine Übersicht der Syntex aller 5 Funktionen?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 06 März 2023, 23:46:42
Zitat von: denis.robel am 05 März 2023, 17:35:48

ich habe noch eine Tuya IR-Bridge. Besteht da auch irgendwie die Möglichkeit das Teil an FHEM anzubinden?


was macht die IR-Bridge genauer? etwa als Fernbedienung für Fernseher etc. anlernbar?
bei AMAZON bestellbar?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 07 März 2023, 08:44:37
Zitat von: dominik am 06 März 2023, 21:33:55
Poste bitte die beiden tuya_spec Attribute von diesem Device.

attr ThermoWC tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'child_lock', 'dp_id': 6, 'type': 'Boolean', 'values': {}, 'desc': 'child lock'}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 10, 'max': 70, 'scale': 1, 'step': 5}, 'desc': 'temp set'}, {'code': 'eco', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'eco'}, {'code': 'upper_temp', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 100, 'scale': 0, 'step': 5}, 'desc': 'upper temp'}]
attr ThermoWC tuya_spec_status [{'code': 'eco', 'dp_id': 5, 'type': 'Boolean', 'values': {}}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 10, 'max': 70, 'scale': 1, 'step': 5}}, {'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'child_lock', 'dp_id': 6, 'type': 'Boolean', 'values': {}}, {'code': 'upper_temp', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 100, 'scale': 0, 'step': 5}}]
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 07 März 2023, 16:55:58
@thburkhart
mit der IR Bridge kann ich den Fernseher und die Stereoanlage steuern...
Bestellt hab ich bei a..express als Versuch.

Ich hatte mal ne Broadlink bridge, aber die war irgendwie defekt und das tuya Teil war gerade für 5 Euronen im Angebot. Hätte nicht gedacht, das das Teil funktioniert - tut es aber.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Maxel am 07 März 2023, 17:20:02
Hallo Dominik,

Danke für Einbindung in Fhem.
Ich habe mir folgende Tuya Sirene
https://de.aliexpress.com/item/1005003912413242.html?spm=a2g0o.order_detail.order_detail_item.3.6e916368zVtISD&gatewayAdapt=glo2deu

zugelegt. Sie kann auch die Temperatur und Feuchtigkeit messen. Grenzwerte können dazu einen Alarm erzeugen. Sie hat 18 verschiedene Melodien, 3 verschiedene Lautstärken und verschiedene Abspiellänge. Diese möchte ich gern in fhem tuay local integrieren. Leider bleibt diese bei dem state "Initializing..." hängen. Hast due eine Idee woran es liegen kann?

Viele Grüße

Maxel



Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 07 März 2023, 20:12:07
Zitat von: Christian83 am 07 März 2023, 08:44:37
attr ThermoWC tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'child_lock', 'dp_id': 6, 'type': 'Boolean', 'values': {}, 'desc': 'child lock'}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 10, 'max': 70, 'scale': 1, 'step': 5}, 'desc': 'temp set'}, {'code': 'eco', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'eco'}, {'code': 'upper_temp', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 100, 'scale': 0, 'step': 5}, 'desc': 'upper temp'}]
attr ThermoWC tuya_spec_status [{'code': 'eco', 'dp_id': 5, 'type': 'Boolean', 'values': {}}, {'code': 'temp_set', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '℃', 'min': 10, 'max': 70, 'scale': 1, 'step': 5}}, {'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'child_lock', 'dp_id': 6, 'type': 'Boolean', 'values': {}}, {'code': 'upper_temp', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 100, 'scale': 0, 'step': 5}}]


Poste bitte noch die product_id und das Reading temp_set. Wird dort die Temperatur richtig angezeigt?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 07 März 2023, 20:14:18
Zitat von: Maxel am 07 März 2023, 17:20:02
Hallo Dominik,

Danke für Einbindung in Fhem.
Ich habe mir folgende Tuya Sirene
https://de.aliexpress.com/item/1005003912413242.html?spm=a2g0o.order_detail.order_detail_item.3.6e916368zVtISD&gatewayAdapt=glo2deu

zugelegt. Sie kann auch die Temperatur und Feuchtigkeit messen. Grenzwerte können dazu einen Alarm erzeugen. Sie hat 18 verschiedene Melodien, 3 verschiedene Lautstärken und verschiedene Abspiellänge. Diese möchte ich gern in fhem tuay local integrieren. Leider bleibt diese bei dem state "Initializing..." hängen. Hast due eine Idee woran es liegen kann?

Viele Grüße

Maxel
Das ist auch ein passives Device (=batteriebetrieben). Die funktionieren aktuell nicht sauber, muss ich noch korrigieren.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 07 März 2023, 21:32:17
Zitat von: dominik am 07 März 2023, 20:12:07
Poste bitte noch die product_id und das Reading temp_set. Wird dort die Temperatur richtig angezeigt?

define ThermoWC fhempy tuya IAYz2WK1th0cMLmL 30000443e8db84ba8ec5 192.168.0.206

#   READINGS:
#     2023-01-17 12:08:51   child_lock      off
#     2023-03-06 16:03:45   dp_04           1
#     2023-01-27 08:44:48   dp_101          AAYiAAgeAAgeAAgeAQgnABciAAYiAAgoAAgoAAgoAQgnABcgAAYiAAgoAAgoAAgoAQgnABcg
#     2023-01-17 12:08:51   dp_102          0
#     2023-01-17 12:08:51   dp_104          1
#     2023-01-17 12:08:51   eco             off
#     2023-02-26 12:49:56   online          1
#     2023-03-05 14:21:29   state           on
#     2023-01-19 17:00:53   switch          on
#     2023-03-07 08:00:00   temp_set        19.0
#     2023-03-07 20:47:15   temperature     18.5
#     2023-03-07 20:47:15   upper_temp      3.7



temp_set zeigt die richtige Temperatur
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 07 März 2023, 22:11:08
Kann es sein, dass der Fehler nur bei .5 auftritt? Ganze Werte wie 19 oder 20 funktionieren, oder? In Version 0.1.619 sollte auch .5 funktionieren, ist in paar Minuten online.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 07 März 2023, 22:13:31
Zitat von: dominik am 07 März 2023, 22:11:08
Kann es sein, dass der Fehler nur bei .5 auftritt? Ganze Werte wie 19 oder 20 funktionieren, oder? In Version 0.1.619 sollte auch .5 funktionieren, ist in paar Minuten online.

Ja Ganzzahlen funktionieren. Nur bei .5 ist das Problem.

Edit: War das Problem. Funktioniert jetzt.
Wär noch schön, wenn der Slider für die set Funktion das jetzt auch könnte.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 11 März 2023, 13:35:26
Slider sollte nun angepasst sein.

@thburkhart, kannst du bitte nochmals testen was deine passiven Devices sagen? Ich habe nun bisschen was angepasst und den Code auch auf tinytuya 1.11.0 Basis gehoben.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 11 März 2023, 14:15:17
@dominik: der Device Scan funktioniert nicht mehr. Der Scan wird nicht fertig und ich kann im Menu nicht Devices anlegen auswählen.
Kann es sein, dass die durch die IR Bridge angelegten virtuellen Devices (TV und iDual) den Scan beeinträchtigen?

Der Scan findet 9 Devices davon sind 7 reale Hardware und 2 virtuell und es geht nicht weiter.
Tuya Sytem bleit mit dem Status "found 9 devices, start local scan..." stehen, jetzt schon seit einer Stunde.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 11 März 2023, 14:56:56
Schau bitte im fhempy Log was für ein Fehler kommt. Ich denke du hast das Update genau zu einem Zeitpunkt gemacht, wo ich diesen Fehler noch drin hatte :)

Probier mal
sudo -u fhem bash
pip3 uninstall aiotinytuya

Danach fhempy restart, dann wird aiotinytuya nochmals installiert.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 11 März 2023, 15:19:42
Sieht so aus, dass ich ein schlechtes Timing hatte.
Jetzt funktioniert es. Danke für die Hinweise.

Nur der Rauchmelder und die IR Bridge bleiben mit Status "initializing ..." stehen.
Aber die Teile haben ja eh noch nicht funktioniert mit fhempy_local .
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 11 März 2023, 15:22:03
Was passiert, wenn du beim Rauchmelder einen Testalarm auslöst?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 11 März 2023, 15:35:12
Leider nichts, das ist ja das Komische...
Eigentlich hätte ich erwartet, dass der Status wechselt oder Ready steht.

Ich werde noch einmal die IP prüfen, hatte ich aber schon einmal gemacht.
Aber dazu komme ich heute Abend.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 11 März 2023, 15:45:35
Ja, er sollte eigentlich auf ready gehen und Werte liefern.

Ich bringe meinen Rauchmelder leider auch nicht lokal dran. Mit einem anderen hatte es schon mal funktioniert, nur habe ich den gerade nicht zur Hand. Bin mal gespannt was die Temperatursensoren von thburkhart sagen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Christian83 am 11 März 2023, 17:42:49
Zitat von: dominik am 11 März 2023, 13:35:26
Slider sollte nun angepasst sein.


Slider passt. Super. Danke.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 11 März 2023, 18:07:47
Zitat von: dominik am 11 März 2023, 15:45:35
Ja, er sollte eigentlich auf ready gehen und Werte liefern.

Hab jetzt die IP's gecheckt: i.O. aber der Status bleibt Initializing...

Beim Auslösen eines Alarms des RM leider passiert nichts.

Wenn ich die Batterien raus nehme und wieder einlege kann ich den RM ca. 5 Sekunden anpingen, dann geht das Teil offline. In dieser Zeit schafft es fhempy nicht, das Teil zu initialisieren.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 11 März 2023, 18:30:21
Zitat von: denis.robel am 11 März 2023, 18:07:47
Hab jetzt die IP's gecheckt: i.O. aber der Status bleibt Initializing...

Beim Auslösen eines Alarms des RM leider passiert nichts.

Wenn ich die Batterien raus nehme und wieder einlege kann ich den RM ca. 5 Sekunden anpingen, dann geht das Teil offline. In dieser Zeit schafft es fhempy nicht, das Teil zu initialisieren.
Kannst du bitte im fhempy Log schauen ob was drin steht?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 11 März 2023, 20:36:39
Im fhempy log steht leider nichts drinn...
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: McShire am 11 März 2023, 22:16:19
Hallo zusammen,
ich habe jetzt von Tuya Cloud auf Tuya local umgestellt. Dabei ist zur Temperaturerfassung ein
Tuya Thermometer im Einsatz.
Solange das device im Cloud-Betrieb engesetzt war, wurde die Temperatur in einem Reading ausgegeben
und konnte als Wert so eingesetzt werden [tuya_cloud_bf83ed4ad555b0f4eciu49:va_temperature]

jetzt im local Betrieb ist das Reading im device nicht vorhanden, sondern kann offenbar mit einer Funktion
ausgegeben werden [tuya_local_bf83ed4ad555b0f4eciu49:????]
Ich möchte gerne das homatic-Thermometer in der Zeile
$tempist = [HM_876F96:temperature] + $tempkorr;
durch das Tuya-Thermometer ersetzen.
Kann mir jemand sagen, was ich da statt  [HM_876F96:temperature] einsetzen muss.

unten das list vom Tuya-Thermometer:


Internals:
   CFGFN     
   DEF        tuya lf36y5nwb8jkxwgg bf83ed4ad555b0f4eciu49 192.168.178.18 0f1ab266ab8d41e1 3.3 5xmvn7d9yt9crdfwfget e1eca018ed9a415caa693cbe305ebe12
   DEVICEID   bf83ed4ad555b0f4eciu49
   FHEMPYTYPE tuya
   FUUID      640ccf07-f33f-f21b-3eb5-57fab5a21c88e68c
   IODev      fhempy_local
   NAME       tuya_local_bf83ed4ad555b0f4eciu49
   NR         1155
   PYTHONTYPE tuya
   STATE      ready
   TYPE       fhempy
   eventCount 7
   READINGS:
     2023-03-11 20:34:32   active_time     1678470955
     2023-03-11 20:34:32   biz_type        0
     2023-03-11 20:34:32   category        wsdcg
     2023-03-11 20:34:32   create_time     1678119275
     2023-03-11 20:34:32   icon            smart/icon/ay1525749833414yotNt/d9d4ceec63cb81ff6e8c8d6c2fb4edb3.png
     2023-03-11 20:34:32   id              bf83ed4ad555b0f4eciu49
     2023-03-11 20:34:32   ip              80.187.110.134
     2023-03-11 20:34:32   lat             51.9471
     2023-03-11 20:34:32   local_key       0f1ab266ab8d41e1
     2023-03-11 20:34:32   lon             9.1007
     2023-03-11 20:34:32   model           TH01 CB3S
     2023-03-11 20:34:32   name            T & H Sensor
     2023-03-11 20:34:32   online          1
     2023-03-11 20:34:32   owner_id        74793151
     2023-03-11 20:34:32   product_id      lf36y5nwb8jkxwgg
     2023-03-11 20:34:32   product_name    T & H Sensor
     2023-03-11 20:34:50   state           ready
     2023-03-11 20:34:32   sub             0
     2023-03-11 20:34:32   time_zone       +01:00
     2023-03-11 20:34:32   uid             eu1671185047381zzmmx
     2023-03-11 20:34:32   update_time     1678470955
     2023-03-11 20:34:32   uuid            193b6f95a7ab96d6
   args:
     tuya_local_bf83ed4ad555b0f4eciu49
     fhempy
     tuya
     lf36y5nwb8jkxwgg
     bf83ed4ad555b0f4eciu49
     192.168.178.18
     0f1ab266ab8d41e1
     3.3
     5xmvn7d9yt9crdfwfget
     e1eca018ed9a415caa693cbe305ebe12
   argsh:
Attributes:
   alias      T & H Sensor
   dp_01      va_temperature
   dp_02      va_humidity
   dp_03      battery_state
   dp_09      temp_unit_convert
   group      tuya
   room       fhempy_local
   tuya_spec_functions [{'code': 'temp_unit_convert', 'dp_id': 9, 'type': 'Enum', 'values': {'range': ['c', 'f']}, 'desc': 'temp unit convert'}]
   tuya_spec_status [{'code': 'va_temperature', 'dp_id': 1, 'type': 'Integer', 'values': {'unit': '℃', 'min': -200, 'max': 600, 'scale': 1, 'step': 1}}, {'code': 'va_humidity', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '%', 'min': 0, 'max': 100, 'scale': 0, 'step': 1}}, {'code': 'battery_state', 'dp_id': 3, 'type': 'Enum', 'values': {'range': ['low', 'middle', 'high']}}, {'code': 'temp_unit_convert', 'dp_id': 9, 'type': 'Enum', 'values': {'range': ['c', 'f']}}]


Viele Grüße
Werner

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 11 März 2023, 22:42:50
@Denis
Ich habe einen Fehler gefunden. Mach bitte nochmals
sudo -u fhem bash
pip3 uninstall aiotinytuya

Danach fhempy restart und lass mich dann wissen was beim Rauchmelder kommt wenn du einen Testalarm machst.

@McShire
Passive Devices (=batteriebetrieben) funktionieren aktuell nicht sauber. Ich habe gerade einen Fix eingespielt, teste es bitte damit. Bitte folge der Anleitung die ich für Denis oben geschrieben habe.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 12 März 2023, 12:01:35
Zitat von: dominik am 11 März 2023, 22:42:50
@Denis
Ich habe einen Fehler gefunden. Mach bitte nochmals
sudo -u fhem bash
pip3 uninstall aiotinytuya

jetzt passt es und der smoke_sensor_status wechselt jetzt zwischen normal und alarm .

Well done !!!! Damit geht jetzt der Rauchsensor auch lokal. Danke für die Arbeit.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 12 März 2023, 12:03:51
Super! :) Bin schon gespannt ob es mit meinem auch geht, hab ihn leider gerade nicht parat zum Testen.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: McShire am 12 März 2023, 20:42:19
Zitat von: dominik am 11 März 2023, 22:42:50
@McShire
Passive Devices (=batteriebetrieben) funktionieren aktuell nicht sauber. Ich habe gerade einen Fix eingespielt, teste es bitte damit. Bitte folge der Anleitung die ich für Denis oben geschrieben habe.

Hallo Dominik,
welche Anleitung oben ist gemeint?
Als device über die Cloud betrieben, funktioniert alles bestens.
Aber, wie beschrieben, local gibt es Readings, für die in den Attributen irgendwelche Funktionen stehen. Leider is local wegen des schlechten Internetempfangs die bessere Lösung. Da ist jetzt
vor Ort ein lokales WLan und ein separater Raspi.
Viele Grüße
Werner
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 12 März 2023, 20:47:06
Zitat von: McShire am 12 März 2023, 20:42:19
Hallo Dominik,
welche Anleitung oben ist gemeint?
Als device über die Cloud betrieben, funktioniert alles bestens.
Aber, wie beschrieben, local gibt es Readings, für die in den Attributen irgendwelche Funktionen stehen. Leider is local wegen des schlechten Internetempfangs die bessere Lösung. Da ist jetzt
vor Ort ein lokales WLan und ein separater Raspi.
Viele Grüße
Werner

sudo -u fhem bash
pip3 uninstall aiotinytuya
fhempy restart danach
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: McShire am 12 März 2023, 22:18:23
Hallo Dominik,
es hat sich leider nichts geändert, die Readings und Attribute sind noch dieselben.
Kann es sein, dass die Ausgaben so gewollt sind und man über die Funktionen und den Status
die Werte bekommen kann?
Ich habe da etwas gefunden, bin leider unwissend und kann damit nichts anfangen.
https://developer.tuya.com/en/docs/cloud/68c2e82f73?id=Kag2ybtxwlb9w
Viele Grüße
Werner
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: dominik am 12 März 2023, 22:25:07
Du musst warten bis die Devices etwas schicken. Die sind offline und wachen nur kurz auf wenn sie ein Signal schicken. Solange sie das nicht machen, steht es auf Initializing...

Die tuya Cloud API (dein Link) hat mit local nix zu tun. Über die Cloud bekommt man natürlich alle Werte sofort, weil die dort gespeichert sind.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: McShire am 13 März 2023, 04:16:31
Ich bin erst nächstes Wochende wieder vor Ort. Ich melde mich dann wieder.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 13 März 2023, 12:18:59
Hallo Dominik,

ich habe leider keine Vorlage für die Syntex für einen String. Ist das so richtig?
{'code': 'airquality', 'dp_id': 106, 'type': 'String', 'values': '{}', 'desc': 'airquality'}

Es handelt sich dabei nur um einen auszulesenden Wert, der nicht geschalter werden kann. Muss der dann bei den tuya_spec_functions auch aufgenommen werden oder reicht es ihn bei tuya_spec_status einzutragen?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: tom0 am 13 März 2023, 22:51:55
Zitat von: dominik am 12 März 2023, 22:25:07
Die sind offline und wachen nur kurz auf wenn sie ein Signal schicken. ... Über die Cloud bekommt man natürlich alle Werte sofort, weil die dort gespeichert sind.

Auch wenn die Antwort für jemand anderes bestimmt war, irgendwie trifft selbst nach einiger Zeit kein Lesevorgang meine Sensoren. Nach jedem Neustart / Update / Neuinstallieren geht es immer x Minuten bis Stunden (wenn überhaupt), leider nicht verlässlich. Gibt es eine Möglichkeit bei den Sensoren aktiv die Daten aus der Cloud zu holen, z.B. einstellbar alle 5 Minuten?
Titel: Antw:fhempy: tuya (lokal) - Fehlende Szenenauswahl
Beitrag von: muma am 14 März 2023, 13:27:36
Hi,
habe eine RGB/CCT Wandlampe installiert und mit tuya local in FHEM aufgenommen. Ich kann die Lampe schalten und auch Farben ändern.
Ich kann auch den work_mode auf scene stellen. Allerdings fehlt mir eine Möglichkeit die Scene anhand ihrer Nummer auszuwählen. Der Datenpunkt scene_data_v2 ist noch angeboten, dieser velrnagt aber neben der Nummer der scene auch ihre Einstellungen. Reine Angabe der scene Nr führt zu einer Fehlermeldung.

2 Fragen dazu:
- Es gibt wohl einen tuya Befehl scene_select. Dieser ist aber nicht als DP am Device hinterlegt. Kann man den noch nachkonfigurieren oder ist das fest von tuya gesetzt?
- Könnte mir alternativ jemand mit der korrekten syntax für den "set DEVICENAME scene_data_v2 ..." helfen? Was genau muss ich da als Parameter einfügen? Bin etwas lost  :-[

{
"code": "scene_data_v2",
"dp_id": 25,
"type": "Json",
"values": {
"scene_num": {
"min": 1,
"scale": 0,
"max": 8,
"step": 1
},
"scene_units": {
"unit_change_mode": {
"range": [
"static",
"jump",
"gradient"
]
},
"unit_switch_duration": {
"min": 0,
"scale": 0,
"max": 100,
"step": 1
},
"unit_gradient_duration": {
"min": 0,
"scale": 0,
"max": 100,
"step": 1
},
"bright": {
"min": 0,
"scale": 0,
"max": 1000,
"step": 1
},
"temperature": {
"min": 0,
"scale": 0,
"max": 1000,
"step": 1
},
"h": {
"min": 0,
"scale": 0,
"unit": "",
"max": 360,
"step": 1
},
"s": {
"min": 0,
"scale": 0,
"unit": "",
"max": 1000,
"step": 1
},
"v": {
"min": 0,
"scale": 0,
"unit": "",
"max": 1000,
"step": 1
}
}
},
"desc": "scene data v2"
}
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 14 März 2023, 19:52:32
Zitat von: denis.robel am 07 März 2023, 16:55:58
@thburkhart
mit der IR Bridge kann ich den Fernseher und die Stereoanlage steuern...
Bestellt hab ich bei a..express als Versuch.

Ich hatte mal ne Broadlink bridge, aber die war irgendwie defekt und das tuya Teil war gerade für 5 Euronen im Angebot. Hätte nicht gedacht, das das Teil funktioniert - tut es aber.

kannst du bitte Link zum Produkt posten?
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 14 März 2023, 20:00:58
hallo zusammen,

inzwischen habe ich auf Grund der katastrophalen Energiewerte des alten einen neuen Kühlschrank besorgt ;-)

Nun versuche ich vergeblich, auch für cur_power Events zu erhalten.
Die JL-Steckdosen liefern die; nicht jeoch keiner meiner SPxx.
Das sind die welche zwar in der SmartLife App im Energy-Monitor dargestellt werden (hur diese).

Wie könnte ich diese in FHEM dazu überreden, auch cur_power Events zu liefern?

hier die DEF:

[code]define TUYA_SP12 fhempy tuya IGzCi97RpN2Lf9cu 00673231e09806cb13b0 192.168.9.57 b5614e736a41adec 3.3
attr TUYA_SP12 DbLogExclude .*
attr TUYA_SP12 DbLogInclude energy,cur_power
attr TUYA_SP12 alias SP12 TH Sued1
attr TUYA_SP12 dp_01 switch_1
attr TUYA_SP12 dp_09 countdown_1
attr TUYA_SP12 dp_17 add_ele
attr TUYA_SP12 dp_18 cur_current
attr TUYA_SP12 dp_19 cur_power
attr TUYA_SP12 dp_20 cur_voltage
attr TUYA_SP12 event-min-interval energy:3600,cur_power:600
attr TUYA_SP12 group Schalter (T),Schalter Strang,Schalter Strommessung
attr TUYA_SP12 room - Raum -> Thomas,-TUYA,TUYA Stromverbrauch
attr TUYA_SP12 stateFormat Verbrauch: [$name:energy] kWh, cPower [$name:cur_power] W, cVoltage [$name:cur_voltage] V, Time: [$name:cur_power:t]
attr TUYA_SP12 tuya_spec_functions [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch 1'}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}]
attr TUYA_SP12 tuya_spec_status [{'code': 'switch_1', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'countdown_1', 'dp_id': 9, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'add_ele', 'dp_id': 17, 'type': 'Integer', 'values': {'unit': '', 'min': 0, 'max': 50000, 'scale': 3, 'step': 100}}, {'code': 'cur_current', 'dp_id': 18, 'type': 'Integer', 'values': {'unit': 'mA', 'min': 0, 'max': 30000, 'scale': 0, 'step': 1}}, {'code': 'cur_power', 'dp_id': 19, 'type': 'Integer', 'values': {'unit': 'W', 'min': 0, 'max': 50000, 'scale': 1, 'step': 1}}, {'code': 'cur_voltage', 'dp_id': 20, 'type': 'Integer', 'values': {'unit': 'V', 'min': 0, 'max': 5000, 'scale': 1, 'step': 1}}]
#   DEF        tuya IGzCi97RpN2Lf9cu 00673231e09806cb13b0 192.168.9.57 b5614e736a41adec 3.3 ea8453wdazquzfl08l0e 8a4b27dd759d4c6a9456aa8155d2a0ea
#   DEVICEID   00673231e09806cb13b0
#   FHEMPYTYPE tuya
#   FUUID      63a35f57-f33f-fd5f-d28c-f30c68bc093a1f03
#   IODev      local_pybinding
#   NAME       TUYA_SP12
#   NR         1753
#   PYTHONTYPE tuya
#   STATE      Verbrauch: 7.566 kWh, cPower 18.0 W, cVoltage 225.9 V, Time: 2023-03-14 19:50:24
#   TYPE       fhempy
#   eventCount 779
#   READINGS:
#     2023-01-30 07:59:14   countdown_1     0.0
#     2023-03-14 19:47:02   cur_current     134.0
#     2023-03-14 19:50:24   cur_power       18.0
#     2023-03-14 19:45:31   cur_voltage     225.9
#     2023-01-30 07:59:14   dp_21           1
#     2023-01-30 07:59:14   dp_22           721
#     2023-01-30 07:59:14   dp_23           30787
#     2023-01-30 07:59:14   dp_24           20947
#     2023-01-30 07:59:14   dp_25           995
#     2023-03-14 19:48:26   energy          7.566
#     2023-02-28 16:26:01   energy2212      0
#     2023-03-14 09:47:18   online          1
#     2023-03-14 19:50:24   statEnergy      Hour: 0.014 Day: 0.170 Month: 4.106 Year: 4.120 (since: 2023-02-28 )
#     2023-03-14 18:59:57   statEnergyLast  Hour: 0.018 Day: 0.151 Month: 0.014 Year: - (since: 2023-02-28 )
#     2023-02-28 21:18:13   statdayEnergy   Hour: 0.005 Day: 0.050 Month: 0.050 Year: 0.050 (since:  )
#     2023-02-28 21:00:02   statdayEnergyLast Hour: 0.001 Day: - Month: - Year: -
#     2023-03-14 09:48:25   state           on
#     2023-01-30 07:59:14   switch_1        on
#   args:
#     TUYA_SP12
#     fhempy
#     tuya
#     IGzCi97RpN2Lf9cu
#     00673231e09806cb13b0
#     192.168.9.57
#     b5614e736a41adec
#     3.3
#     ea8453wdazquzfl08l0e
#     8a4b27dd759d4c6a9456aa8155d2a0ea
#   argsh:
#   helper:
#     _98_statistics statistics_TUYA_SP_all
#
setstate TUYA_SP12 Verbrauch: 7.566 kWh, cPower 18.0 W, cVoltage 225.9 V, Time: 2023-03-14 19:50:24
setstate TUYA_SP12 2023-01-30 07:59:14 countdown_1 0.0
setstate TUYA_SP12 2023-03-14 19:47:02 cur_current 134.0
setstate TUYA_SP12 2023-03-14 19:50:24 cur_power 18.0
setstate TUYA_SP12 2023-03-14 19:45:31 cur_voltage 225.9
setstate TUYA_SP12 2023-01-30 07:59:14 dp_21 1
setstate TUYA_SP12 2023-01-30 07:59:14 dp_22 721
setstate TUYA_SP12 2023-01-30 07:59:14 dp_23 30787
setstate TUYA_SP12 2023-01-30 07:59:14 dp_24 20947
setstate TUYA_SP12 2023-01-30 07:59:14 dp_25 995
setstate TUYA_SP12 2023-03-14 19:48:26 energy 7.566
setstate TUYA_SP12 2023-02-28 16:26:01 energy2212 0
setstate TUYA_SP12 2023-03-14 09:47:18 online 1
setstate TUYA_SP12 2023-03-14 19:50:24 statEnergy Hour: 0.014 Day: 0.170 Month: 4.106 Year: 4.120 (since: 2023-02-28 )
setstate TUYA_SP12 2023-03-14 18:59:57 statEnergyLast Hour: 0.018 Day: 0.151 Month: 0.014 Year: - (since: 2023-02-28 )
setstate TUYA_SP12 2023-02-28 21:18:13 statdayEnergy Hour: 0.005 Day: 0.050 Month: 0.050 Year: 0.050 (since:  )
setstate TUYA_SP12 2023-02-28 21:00:02 statdayEnergyLast Hour: 0.001 Day: - Month: - Year: -
setstate TUYA_SP12 2023-03-14 09:48:25 state on
setstate TUYA_SP12 2023-01-30 07:59:14 switch_1 on

[/code]

viele Grüße

Thomas
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: stefanru am 14 März 2023, 23:50:59
Hi Thomas,

was genau meinst du?
Das reading wird aktualisiert ohne Event?
Das ist ja seltsam?
Hast du es mal mit event-on-change-reading probiert.

Meine Steckdosen liefern bei jedem reading das geupdated wird ein Event.

Ah ich sehe gerade du verwendest:
attr TUYA_SP12 event-min-interval energy:3600,cur_power:600
Eventuell hat das etwas damit zu tun.

Gruß,
Stefan
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Nomo am 15 März 2023, 15:05:59
Liebe Tuya-Nutzer, da die Alexa-Experten keine Idee haben, wollte ich noch mal hier fragen:


Genauere Beschreibung des Problems hier: https://forum.fhem.de/index.php/topic,132700.msg1268151.html#msg1268151 (https://forum.fhem.de/index.php/topic,132700.msg1268151.html#msg1268151)

Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 15 März 2023, 15:18:02
Zitat von: Nomo am 15 März 2023, 15:05:59
Liebe Tuya-Nutzer, da die Alexa-Experten keine Idee haben, wollte ich noch mal hier fragen:


  • Steuert ihr die Tuya Devices auch mit Alexa-fhem?
  • Wenn ja, wie bekommt man das hin, dass Alexa bei den Steckdosen die on/off settings "findet"?

Genauere Beschreibung des Problems hier: https://forum.fhem.de/index.php/topic,132700.msg1268151.html#msg1268151 (https://forum.fhem.de/index.php/topic,132700.msg1268151.html#msg1268151)

Alexa hat doch automatisch und zuverlässig alle Tuya-Devices über den Smart Life Skill
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Nomo am 15 März 2023, 18:26:41
Ja richtig.

Wenn man chinesische IOT-Server mag. Die Zugriff auf dein Netzwerk haben. Und die Geräte zu DDoS Parties verführen könnten. Oder einfach mal ausgeschaltet werden können.

Oder so.

Ich habe den Smart Life Skill jetzt entfernt, dank Dominiks tuya_system geht es jetzt ohne China. Meine Dosen sind jetzt nicht mehr von aussen erreichbar.

Die Lösung war das mapping (siehe den anderen Thread).
Wäre natürlich cool, wenn das Teil des creates von tuya_system wäre. Dann könnte man die neuen Tuyas sofort über Alexa steuern 😊
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Superposchi am 15 März 2023, 20:09:21
Hallo Dominik,

du hattest mich gebeten dir die Specs zu melden wenn alles fertig ist. Ich denke das ist nun der Fall, also hier die Specs.
Für den Luftbefeuchter:
name - Luftbefeuchter
product_id - yodwo2ujgwbgjaio
product_name - Smart Aroma Diffuser
uid - eu1610479166063muAw8
uuid - db1f4ce74abacf7b

tuya_spec_functions:
[{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'switch_led', 'dp_id': 11, 'type': 'Boolean', 'values': {}, 'desc': 'switch led'}, {'code': 'mode', 'dp_id': 103, 'type': 'Enum', 'values': '{"range":["small","big","off"]}', 'desc': 'mode'}, {'code': 'timer', 'dp_id': 13, 'type': 'Enum', 'values': '{"range":["0","1","2","3"], "translation": { "0": "Off","1": "1_Stunde","2": "3_Stunden","3": "6_Stunden"}}', 'desc': 'Timer'}, {'code': 'colortype', 'dp_id': 110, 'type': 'Enum', 'values': '{"range":["1","2","3"], "translation": { "1": "Gradiant","2": "Fix","3": "Nachtlicht"}}', 'desc': 'colortype'}, {'code': 'brightness', 'dp_id': 111, 'type': 'Integer', 'values': '{"min":1,"max":255,"scale":0,"step":1}', 'desc': 'brightness'}, {'code': 'colour_data', 'dp_id': 108, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}, 'desc': 'colour data'}]

tuya_spec_status:
[{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'switch_led', 'dp_id': 11, 'type': 'Boolean', 'values': {}}, {'code': 'mode', 'dp_id': 103, 'type': 'Enum', 'values': '{"range":["small","big","off"]}'}, {'code': 'timer', 'dp_id': 13, 'type': 'Enum', 'values': '{"range":["0","1","2","3"], "translation": { "0": "Off","1": "1_Stunde","2": "3_Stunden","3": "6_Stunden"}}'}, {'code': 'colortype', 'dp_id': 110, 'type': 'Enum', 'values': '{"range":["1","2","3"], "translation": { "1": "Gradiant","2": "Fix","3": "Nachtlicht"}}'}, {'code': 'brightness', 'dp_id': 111, 'type': 'Integer', 'values': '{"min":1,"max":255,"scale":0,"step":1}'}, {'code': 'timer_minutes', 'dp_id': 14, 'type': 'String', 'values': {}}, {'code': 'colour_data', 'dp_id': 108, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}]


Folgendes Reading konnte keiner Eigenschaft/Funktion zugewiesen werden:
dp_109    -   white
dp_12    -   0


Für die Ventilatoren (Marke Djive):
name - Schlafzimmerventilator
product_id - 6awobc9jfnlwvqtw
product_name - ARC Humidifier
uid - eu1610479166063muAw8
uuid - fd0c8a9f78a36684

[{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'Gerätestatus'}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': '{"min":1,"max":9,"scale":0,"step":1}', 'desc': 'Lüftergeschwindigkeit'}, {'code': 'oszilation', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'Oszilation'}, {'code': 'mode', 'dp_id': 2, 'type': 'Enum', 'values': '{"range":["sleep","fresh","strong","auto","close"]}', 'desc': 'Mode'}, {'code': 'uv_desinfection', 'dp_id': 102, 'type': 'Boolean', 'values': {}, 'desc': 'UV-Desinfektion'}, {'code': 'water_strength', 'dp_id': 105, 'type': 'Enum', 'values': '{"range":["1","2","3","auto","close"]}', 'desc': 'Wasserstärke'}, {'code': 'signals', 'dp_id': 13, 'type': 'Boolean', 'values': {}, 'desc': 'Signaltöne'}, {'code': 'timer', 'dp_id': 22, 'type': 'Enum', 'values': '{"range":["cancel","1","2","3","4","5","6","7","8"]}', 'desc': 'Timer'}]


[{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': '{"min":1,"max":9,"scale":0,"step":1}'}, {'code': 'oszilation', 'dp_id': 5, 'type': 'Boolean', 'values': {}}, {'code': 'mode', 'dp_id': 2, 'type': 'Enum', 'values': '{"range":["sleep","fresh","strong","auto","close"]}'}, {'code': 'uv_desinfection', 'dp_id': 102, 'type': 'Boolean', 'values': {}}, {'code': 'water_strength', 'dp_id': 105, 'type': 'Enum', 'values': '{"range":["1","2","3","auto","close"]}'}, {'code': 'signals', 'dp_id': 13, 'type': 'Boolean', 'values': {}}, {'code': 'timer', 'dp_id': 22, 'type': 'Enum', 'values': '{"range":["cancel","1","2","3","4","5","6","7","8"]}'}, {'code': 'filter_remaining', 'dp_id': 103, 'type': 'String', 'values': {}}, {'code': 'airquality', 'dp_id': 101, 'type': 'String', 'values': {}}, {'code': 'humidity', 'dp_id': 106, 'type': 'String', 'values': {}}, {'code': 'timer_minutes', 'dp_id': 23, 'type': 'String', 'values': {}}]


Folgendes Reading konnte keiner Eigenschaft/Funktion zugewiesen werden:
dp_24   -   0

Brauchst du weitere Angaben zur Zuordnung bitte Melden.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: Gisbert am 15 März 2023, 20:20:15
Hallo dominik,

ich mache jeweils ein Update, sobald eins verfügbar ist. Spricht etwas dagegen, dass das Device dies eigenständig macht, ggf. gesteuert über ein Attribut "always_update" "yes|no"?

Viele Grüße Gisbert
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 15 März 2023, 21:26:28
Zitat von: thburkhart am 14 März 2023, 19:52:32
kannst du bitte Link zum Produkt posten?

https://www.aliexpress.com/item/4000074370296.html?spm=a2g0o.order_list.order_list_main.23.2fbc5c5fjXiHOU (https://www.aliexpress.com/item/4000074370296.html?spm=a2g0o.order_list.order_list_main.23.2fbc5c5fjXiHOU)
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 15 März 2023, 22:02:21
perfekt

bekam ein Angebot für 69 cent :-)

danke für den Tipp!

VG

Thomas


Titel: Antw:fhempy: tuya (lokal)
Beitrag von: denis.robel am 16 März 2023, 18:34:48
Zitat von: thburkhart am 15 März 2023, 22:02:21
perfekt

bekam ein Angebot für 69 cent :-)

danke für den Tipp!

VG

Thomas

Bitte beachte, dass das Teil noch nicht mit fhempy funktioniert. Es gibt aber schon einen Lösungsansatz unter Python. Den hat Dominik ja schon gepostet.
Meine Aussage bezog sich auf die Sartlife App.

Falls das unter fhempy nicht klappen sollte, das Teil zum Laufen zu bewegen, dann hab ich ein schickes Gehäuse und nen LED Transmitter und könnte dann einen ESP32 rein tüdeln.
Titel: Antw:fhempy: tuya (lokal)
Beitrag von: thburkhart am 16 März 2023, 21:31:05
Zitat von: denis.robel am 16 März 2023, 18:34:48
Bitte beachte, dass das Teil noch nicht mit fhempy funktioniert. Es gibt aber schon einen Lösungsansatz unter Python. Den hat Dominik ja schon gepostet.
Meine Aussage bezog sich auf die Sartlife App.

Falls das unter fhempy nicht klappen sollte, das Teil zum Laufen zu bewegen, dann hab ich ein schickes Gehäuse und nen LED Transmitter und könnte dann einen ESP32 rein tüdeln.

mir reicht SmartLife und Alexa vollkommen. Wichtig ist mir die Sprachsteuerung um z.B. die Sender umzuschalten.
Bin gespannt.

Nochmals danke

Thomas


habe Inzwischen ein wohl ähnliches Teil über Anmazon bekommen.
Die Grundfernbedienung klappt.
Wie kann man z.B über Alexa auf ZDF schalten?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 19 März 2023, 19:59:31
Hallo.
gibts möglichkeit von tuya cams bilder abzuspeichern?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: SouzA am 22 März 2023, 09:42:13
Hallo liebe Leute,

habe hier nun endlich den ECO-DIM.07 WIFI integriert bekommen.
Der lässt sich laut Standardkonfig mit bright_value_1 von 0 bis 1000 dimmen.
Kriegt man es irgendwie hin, dass
1. man die Prozent also "pct" einstellen kann
und
2. es wirklich Prozent von 0 bis 100 sind?

Thx für eine kurze Rückmeldung.

Bis denn
SouzA

EDIT:
Der Grund für die Frage ist der, dass das Device zwar vom gassistant erkannt wird und on/off funktioniert. Dimmen halt nur nicht...
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Matt1185 am 22 März 2023, 10:46:01
Hallo Zusammen,

ich hab diese Bewegungsmelder:
https://a.aliexpress.com/_EuU6qd1

Sie werden beim scan gefunden und ich kann sie als devices anlegen. Die richtige IP Adresse habe ich eingetragen. Dann bekomme ich genau einmal ein Update der readings und dann nie wieder.

Sollten solche passiven Devices mittlerweile laufen?

Vielen Dank,
Matthias
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: muma am 22 März 2023, 16:53:04
Hallo zusammen,
habe bei mir eine Tuya basierte Einbau LED am laufen. Beim Blick in den Eventlog ist mir aufgefallen, dass hier das Rading colour_data_v2 zyklisch alle 60s erscheint.
Ist das normal?

2023-03-22 16:34:35 fhempy tuya_local_ colour_data_v2: 2c2c2c
2023-03-22 16:35:35 fhempy tuya_local_ colour_data_v2: 2c2c2c
2023-03-22 16:36:35 fhempy tuya_local_ colour_data_v2: 2c2c2c
2023-03-22 16:37:35 fhempy tuya_local_ colour_data_v2: 2c2c2c
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: McShire am 22 März 2023, 21:01:35
Zitat von: dominik am 12 März 2023, 22:25:07Du musst warten bis die Devices etwas schicken. Die sind offline und wachen nur kurz auf wenn sie ein Signal schicken. Solange sie das nicht machen, steht es auf Initializing...

Die tuya Cloud API (dein Link) hat mit local nix zu tun. Über die Cloud bekommt man natürlich alle Werte sofort, weil die dort gespeichert sind.

Hallo Dominik,
ich war jetzt einige Tage vor Ort und habe alles, leider erfolglos, ausprobiert.
Über die Cloud funktioniert das Thermometer einwandfrei, local leider nicht.
Das Thermometer sendet, die IP stimmt, das kann ich im Router sehen.
Das Device im fhem empfängt auch die Nachricht, auch das kann man sehen.
Nach delete und neu create werden die ganzen Readings erst nach dem Empfang vom Thermometer gesetzt.
Dabei aber nicht die Readings va_temperature und va_humidity.
Dafür stehen unten in den Attributen Definitionen dazu.
Hier noch einmal die lists dazu.

local:
Internals:
   CFGFN     
   DEF        tuya lf36y5nwb8jkxwgg bf83ed4ad555b0f4eciu49 192.168.178.18 cba0918e366e6318 3.3 5xmvn7d9yt9crdfwfget e1eca018ed9a415caa693cbe305ebe12
   DEVICEID   bf83ed4ad555b0f4eciu49
   FHEMPYTYPE tuya
   FUUID      641afde2-f33f-f21b-4322-f74886dd08cfb098
   IODev      fhempy_local
   NAME       tuya_local_bf83ed4ad555b0f4eciu49
   NR         1095
   PYTHONTYPE tuya
   STATE      ready
   TYPE       fhempy
   eventCount 6
   READINGS:
     2023-03-22 14:10:37   active_time     1679081993
     2023-03-22 14:10:37   biz_type        0
     2023-03-22 14:10:37   category        wsdcg
     2023-03-22 14:10:37   create_time     1678119275
     2023-03-22 14:10:37   icon            smart/icon/ay1525749833414yotNt/d9d4ceec63cb81ff6e8c8d6c2fb4edb3.png
     2023-03-22 14:10:37   id              bf83ed4ad555b0f4eciu49
     2023-03-22 14:10:37   ip              80.187.111.149
     2023-03-22 14:10:37   lat             52.0985
     2023-03-22 14:10:37   local_key       cba0918e366e6318
     2023-03-22 14:10:37   lon             8.1747
     2023-03-22 14:10:37   model           TH01 CB3S
     2023-03-22 14:10:37   name            T & H Sensor
     2023-03-22 14:32:03   online          1
     2023-03-22 14:10:37   owner_id        74793151
     2023-03-22 14:10:37   product_id      lf36y5nwb8jkxwgg
     2023-03-22 14:10:37   product_name    TH01CB3S
     2023-03-22 14:32:03   state           ready
     2023-03-22 14:10:37   sub             0
     2023-03-22 14:10:37   time_zone       +01:00
     2023-03-22 14:10:37   uid             eu1671185047381zzmmx
     2023-03-22 14:10:37   update_time     1679081993
     2023-03-22 14:10:37   uuid            193b6f95a7ab96d6
   args:
     tuya_local_bf83ed4ad555b0f4eciu49
     fhempy
     tuya
     lf36y5nwb8jkxwgg
     bf83ed4ad555b0f4eciu49
     192.168.178.18
     cba0918e366e6318
     3.3
     5xmvn7d9yt9crdfwfget
     e1eca018ed9a415caa693cbe305ebe12
   argsh:
Attributes:
   alias      T & H Sensor
   dp_01      va_temperature
   dp_02      va_humidity
   dp_03      battery_state
   dp_09      temp_unit_convert
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'temp_unit_convert', 'dp_id': 9, 'type': 'Enum', 'values': {'range': ['c', 'f']}, 'desc': 'temp unit convert'}]
   tuya_spec_status [{'code': 'va_temperature', 'dp_id': 1, 'type': 'Integer', 'values': {'unit': '℃', 'min': -200, 'max': 600, 'scale': 1, 'step': 1}}, {'code': 'va_humidity', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '%', 'min': 0, 'max': 100, 'scale': 0, 'step': 1}}, {'code': 'battery_state', 'dp_id': 3, 'type': 'Enum', 'values': {'range': ['low', 'middle', 'high']}}, {'code': 'temp_unit_convert', 'dp_id': 9, 'type': 'Enum', 'values': {'range': ['c', 'f']}}]

cloud:
Internals:
   DEF        tuya_cloud tuya_cloud_connector bf83ed4ad555b0f4eciu49
   DEVICEID   bf83ed4ad555b0f4eciu49
   FHEMPYTYPE tuya_cloud
   FUUID      640b7470-f33f-f21b-afb0-43ab967fa99fadb8
   IODev      fhempy_local
   NAME       tuya_cloud_bf83ed4ad555b0f4eciu49
   NR         1069
   PYTHONTYPE tuya_cloud
   STATE      ready
   TYPE       fhempy
   eventCount 4
   READINGS:
     2023-03-22 14:06:06   active_time     1679081993
     2023-03-22 14:31:57   battery_state   middle
     2023-03-22 14:06:06   biz_type        0
     2023-03-22 14:06:06   category        wsdcg
     2023-03-22 14:06:06   create_time     1678119275
     2023-03-22 14:06:06   icon            https://images.tuyaeu.com/smart/icon/ay1525749833414yotNt/d9d4ceec63cb81ff6e8c8d6c2fb4edb3.png
     2023-03-22 14:06:06   id              bf83ed4ad555b0f4eciu49
     2023-03-22 14:06:06   ip              80.187.111.149
     2023-03-22 14:06:06   lat             52.0985
     2023-03-22 14:06:06   local_key       cba0918e366e6318
     2023-03-22 14:06:06   lon             8.1747
     2023-03-22 14:06:06   model           TH01 CB3S
     2023-03-22 14:06:06   name            T & H Sensor
     2023-03-22 14:06:06   online          on
     2023-03-22 14:06:06   owner_id        74793151
     2023-03-22 14:06:06   product_id      lf36y5nwb8jkxwgg
     2023-03-22 14:06:06   product_name    T & H Sensor
     2023-03-22 14:05:53   state           ready
     2023-03-22 14:06:06   sub             off
     2023-03-22 14:31:57   temp_unit_convert c
     2023-03-22 14:06:06   time_zone       +01:00
     2023-03-22 14:06:06   uid             eu1671185047381zzmmx
     2023-03-22 14:06:06   update_time     1679081993
     2023-03-22 14:06:06   uuid            193b6f95a7ab96d6
     2023-03-22 14:31:57   va_humidity     59.0
     2023-03-22 14:31:57   va_temperature  15.0
   args:
     tuya_cloud_bf83ed4ad555b0f4eciu49
     fhempy
     tuya_cloud
     tuya_cloud_connector
     bf83ed4ad555b0f4eciu49
   argsh:
Attributes:
   alias      T & H Sensor
   group      tuya_cloud
   icon       temp_temperature
   room       fhempy

Siehst Du eine Möglichkeit, im local Betrieb die Temperatur zu bekommen,
damit ich dort nicht mehr auf das mobile schlechte Internet angewiesen bin.

Viele Grüße
Werner
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: denis.robel am 23 März 2023, 19:00:10
@Dominik

seit einer der letzten Versionen, welche weiß ich leider nicht mehr, bleibt der Rauchmelder wieder bloß auf Status Initializing... stehen.

Hast Du da was geändert?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: denis.robel am 23 März 2023, 22:54:09
@Dominik

falscher Alarm, das Teil war aus der Cloud abgemeldet. Keine Ahnung warum.
Hab es nochmal neu in der Tuya App angelegt und jetzt geht es wieder (mit fhempy 0.1.639)
Keine Ahnung was da los war...
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Superposchi am 28 März 2023, 18:08:29
Hallo, hab da mal wieder ein kleines Problem. Seit neuestem wird das Reading "filter_remaining" nicht mehr gelistet obwohl es in tuya_spec_status vorhanden ist und auch bei den Attributen richtig zugewiesen wird.
Ist irgendwann nach einem fhempy-Neustart verschwunden. Ich wüsste nicht, dass ich was am Device verändert habe.

Hier das List, vielleicht kann ja jemand den Fehler finden:
Internals:
   CFGFN     
   DEF        tuya 6awobc9jfnlwvqtw bf934a1eb83b21bc25uo4x 192.168.178.171 9d214ad6b3b2a7e9 3.3 asfg5sj9aurr9nib73fx fc553d7a6bfa4a569bc69ed2aa6924ed
   DEVICEID   bf934a1eb83b21bc25uo4x
   FHEMPYTYPE tuya
   FUUID      6420940d-f33f-7706-df0b-5611c8195d829785
   IODev      fhempy_local
   NAME       tuya_local_bf934a1eb83b21bc25uo4x
   NR         366836
   PYTHONTYPE tuya
   STATE      on
   TYPE       fhempy
   eventCount 925
   OLDREADINGS:
   READINGS:
     2023-03-26 20:50:54   active_time     1654519182
     2023-03-28 18:04:11   airquality      7
     2023-03-26 20:50:54   biz_type        18
     2023-03-26 20:50:54   category        fs
     2023-03-26 20:50:54   create_time     1651829119
     2023-03-26 21:55:31   desinfection    off
     2023-03-26 20:54:09   dp_24           0
     2023-03-26 20:54:09   fan_speed_percent 1.0
     2023-03-28 18:01:27   humidity        34
     2023-03-26 20:50:54   icon            smart/icon/bay1579257011827QOvk/05cb05801c69fa7b6bdacda9c7f21196.png
     2023-03-26 20:50:54   id              bf934a1eb83b21bc25uo4x
     2023-03-26 20:50:54   ip              88.153.83.160
     2023-03-26 20:50:54   lat             51.0583
     2023-03-26 20:50:54   local_key       9d214ad6b3b2a7e9
     2023-03-26 20:50:54   lon             6.1030
     2023-03-26 22:41:26   mode            close
     2023-03-26 20:50:54   model           ARC Humidifier
     2023-03-26 20:50:54   name            Wohnzimmerventilator
     2023-03-28 18:03:49   online          1
     2023-03-26 20:55:56   oszilation      off
     2023-03-26 20:50:54   owner_id        23921647
     2023-03-26 20:50:54   product_id      6awobc9jfnlwvqtw
     2023-03-26 20:50:54   product_name    ARC Humidifier
     2023-03-26 20:55:50   signals         off
     2023-03-28 18:03:55   state           on
     2023-03-26 20:50:54   sub             0
     2023-03-26 20:50:54   switch          on
     2023-03-26 20:50:54   time_zone       +02:00
     2023-03-26 20:56:06   timer           cancel
     2023-03-26 20:56:06   timer_minutes   0
     2023-03-26 20:50:54   uid             eu1610479166063muAw8
     2023-03-26 20:50:54   update_time     1654519186
     2023-03-26 20:50:54   uuid            f3e5852aa7804328
     2023-03-26 22:41:27   water_strength  close
   args:
     tuya_local_bf934a1eb83b21bc25uo4x
     fhempy
     tuya
     6awobc9jfnlwvqtw
     bf934a1eb83b21bc25uo4x
     192.168.178.171
     9d214ad6b3b2a7e9
     3.3
     asfg5sj9aurr9nib73fx
     fc553d7a6bfa4a569bc69ed2aa6924ed
   argsh:
Attributes:
   alias      Wohnzimmerventilator
   cmdIcon    on:general_an off:general_aus
   devStateIcon aus:ios-off:an an:ios-on-blue:aus off:ios-off:on on:ios-on-green:off
   dp_01      switch
   dp_02      mode
   dp_03      fan_speed_percent
   dp_05      oszilation
   dp_101     airquality
   dp_102     desinfection
   dp_103     filter_remaining
   dp_105     water_strength
   dp_106     humidity
   dp_13      signals
   dp_22      timer
   dp_23      timer_minutes
   group      Geräte
   icon       Ventilator_fett
   room       Wohnung->Wohnzimmer,fhempy
   tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'Gerätestatus'}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': '{"min":1,"max":9,"scale":0,"step":1}', 'desc': 'Lüftergeschwindigkeit'}, {'code': 'oszilation', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'Oszilation'}, {'code': 'mode', 'dp_id': 2, 'type': 'Enum', 'values': '{"range":["sleep","fresh","strong","auto","close"]}', 'desc': 'Mode'}, {'code': 'desinfection', 'dp_id': 102, 'type': 'Boolean', 'values': {}, 'desc': 'Desinfektion'}, {'code': 'water_strength', 'dp_id': 105, 'type': 'Enum', 'values': '{"range":["1","2","3","auto","close"]}', 'desc': 'Wasserstärke'}, {'code': 'signals', 'dp_id': 13, 'type': 'Boolean', 'values': {}, 'desc': 'Signaltöne'}, {'code': 'timer', 'dp_id': 22, 'type': 'Enum', 'values': '{"range":["cancel","1","2","3","4","5","6","7","8"]}', 'desc': 'Timer'}]
   tuya_spec_status [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': '{"min":1,"max":9,"scale":0,"step":1}'}, {'code': 'oszilation', 'dp_id': 5, 'type': 'Boolean', 'values': {}}, {'code': 'mode', 'dp_id': 2, 'type': 'Enum', 'values': '{"range":["sleep","fresh","strong","auto","close"]}'}, {'code': 'desinfection', 'dp_id': 102, 'type': 'Boolean', 'values': {}}, {'code': 'water_strength', 'dp_id': 105, 'type': 'Enum', 'values': '{"range":["1","2","3","auto","close"]}'}, {'code': 'signals', 'dp_id': 13, 'type': 'Boolean', 'values': {}}, {'code': 'timer', 'dp_id': 22, 'type': 'Enum', 'values': '{"range":["cancel","1","2","3","4","5","6","7","8"]}'}, {'code': 'airquality', 'dp_id': 101, 'type': 'String', 'values': {}}, {'code': 'humidity', 'dp_id': 106, 'type': 'String', 'values': {}}, {'code': 'timer_minutes', 'dp_id': 23, 'type': 'String', 'values': {}}, {'code': 'filter_remaining', 'dp_id': 103, 'type': 'String', 'values': {}}]
   webCmd     ::fan_speed_percent: ::::: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :on:off
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 02 April 2023, 10:37:02
Hallo.
Wie schaffe ich es , die 2 getrennten Schalter für USB und Schuko im webcmd darzustellen? wie bei sonoff z.b.

kann leider kein bild hochladen
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 05 April 2023, 21:35:41
Zitat von: satprofi am 02 April 2023, 10:37:02Hallo.
Wie schaffe ich es , die 2 getrennten Schalter für USB und Schuko im webcmd darzustellen? wie bei sonoff z.b.

kann leider kein bild hochladen
Das geht wahrscheinlich mit devStateIcon. Schau dir dazu die Doku an bzw. Devices die es nutzen - z.B. beim BindingsIo Device.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 05 April 2023, 21:38:29
Zitat von: Superposchi am 28 März 2023, 18:08:29Hallo, hab da mal wieder ein kleines Problem. Seit neuestem wird das Reading "filter_remaining" nicht mehr gelistet obwohl es in tuya_spec_status vorhanden ist und auch bei den Attributen richtig zugewiesen wird.
Ist irgendwann nach einem fhempy-Neustart verschwunden. Ich wüsste nicht, dass ich was am Device verändert habe.

Hier das List, vielleicht kann ja jemand den Fehler finden:
Internals:
   CFGFN     
   DEF        tuya 6awobc9jfnlwvqtw bf934a1eb83b21bc25uo4x 192.168.178.171 9d214ad6b3b2a7e9 3.3 asfg5sj9aurr9nib73fx fc553d7a6bfa4a569bc69ed2aa6924ed
   DEVICEID   bf934a1eb83b21bc25uo4x
   FHEMPYTYPE tuya
   FUUID      6420940d-f33f-7706-df0b-5611c8195d829785
   IODev      fhempy_local
   NAME       tuya_local_bf934a1eb83b21bc25uo4x
   NR         366836
   PYTHONTYPE tuya
   STATE      on
   TYPE       fhempy
   eventCount 925
   OLDREADINGS:
   READINGS:
     2023-03-26 20:50:54   active_time     1654519182
     2023-03-28 18:04:11   airquality      7
     2023-03-26 20:50:54   biz_type        18
     2023-03-26 20:50:54   category        fs
     2023-03-26 20:50:54   create_time     1651829119
     2023-03-26 21:55:31   desinfection    off
     2023-03-26 20:54:09   dp_24           0
     2023-03-26 20:54:09   fan_speed_percent 1.0
     2023-03-28 18:01:27   humidity        34
     2023-03-26 20:50:54   icon            smart/icon/bay1579257011827QOvk/05cb05801c69fa7b6bdacda9c7f21196.png
     2023-03-26 20:50:54   id              bf934a1eb83b21bc25uo4x
     2023-03-26 20:50:54   ip              88.153.83.160
     2023-03-26 20:50:54   lat             51.0583
     2023-03-26 20:50:54   local_key       9d214ad6b3b2a7e9
     2023-03-26 20:50:54   lon             6.1030
     2023-03-26 22:41:26   mode            close
     2023-03-26 20:50:54   model           ARC Humidifier
     2023-03-26 20:50:54   name            Wohnzimmerventilator
     2023-03-28 18:03:49   online          1
     2023-03-26 20:55:56   oszilation      off
     2023-03-26 20:50:54   owner_id        23921647
     2023-03-26 20:50:54   product_id      6awobc9jfnlwvqtw
     2023-03-26 20:50:54   product_name    ARC Humidifier
     2023-03-26 20:55:50   signals         off
     2023-03-28 18:03:55   state           on
     2023-03-26 20:50:54   sub             0
     2023-03-26 20:50:54   switch          on
     2023-03-26 20:50:54   time_zone       +02:00
     2023-03-26 20:56:06   timer           cancel
     2023-03-26 20:56:06   timer_minutes   0
     2023-03-26 20:50:54   uid             eu1610479166063muAw8
     2023-03-26 20:50:54   update_time     1654519186
     2023-03-26 20:50:54   uuid            f3e5852aa7804328
     2023-03-26 22:41:27   water_strength  close
   args:
     tuya_local_bf934a1eb83b21bc25uo4x
     fhempy
     tuya
     6awobc9jfnlwvqtw
     bf934a1eb83b21bc25uo4x
     192.168.178.171
     9d214ad6b3b2a7e9
     3.3
     asfg5sj9aurr9nib73fx
     fc553d7a6bfa4a569bc69ed2aa6924ed
   argsh:
Attributes:
   alias      Wohnzimmerventilator
   cmdIcon    on:general_an off:general_aus
   devStateIcon aus:ios-off:an an:ios-on-blue:aus off:ios-off:on on:ios-on-green:off
   dp_01      switch
   dp_02      mode
   dp_03      fan_speed_percent
   dp_05      oszilation
   dp_101     airquality
   dp_102     desinfection
   dp_103     filter_remaining
   dp_105     water_strength
   dp_106     humidity
   dp_13      signals
   dp_22      timer
   dp_23      timer_minutes
   group      Geräte
   icon       Ventilator_fett
   room       Wohnung->Wohnzimmer,fhempy
   tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'Gerätestatus'}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': '{"min":1,"max":9,"scale":0,"step":1}', 'desc': 'Lüftergeschwindigkeit'}, {'code': 'oszilation', 'dp_id': 5, 'type': 'Boolean', 'values': {}, 'desc': 'Oszilation'}, {'code': 'mode', 'dp_id': 2, 'type': 'Enum', 'values': '{"range":["sleep","fresh","strong","auto","close"]}', 'desc': 'Mode'}, {'code': 'desinfection', 'dp_id': 102, 'type': 'Boolean', 'values': {}, 'desc': 'Desinfektion'}, {'code': 'water_strength', 'dp_id': 105, 'type': 'Enum', 'values': '{"range":["1","2","3","auto","close"]}', 'desc': 'Wasserstärke'}, {'code': 'signals', 'dp_id': 13, 'type': 'Boolean', 'values': {}, 'desc': 'Signaltöne'}, {'code': 'timer', 'dp_id': 22, 'type': 'Enum', 'values': '{"range":["cancel","1","2","3","4","5","6","7","8"]}', 'desc': 'Timer'}]
   tuya_spec_status [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'fan_speed_percent', 'dp_id': 3, 'type': 'Integer', 'values': '{"min":1,"max":9,"scale":0,"step":1}'}, {'code': 'oszilation', 'dp_id': 5, 'type': 'Boolean', 'values': {}}, {'code': 'mode', 'dp_id': 2, 'type': 'Enum', 'values': '{"range":["sleep","fresh","strong","auto","close"]}'}, {'code': 'desinfection', 'dp_id': 102, 'type': 'Boolean', 'values': {}}, {'code': 'water_strength', 'dp_id': 105, 'type': 'Enum', 'values': '{"range":["1","2","3","auto","close"]}'}, {'code': 'signals', 'dp_id': 13, 'type': 'Boolean', 'values': {}}, {'code': 'timer', 'dp_id': 22, 'type': 'Enum', 'values': '{"range":["cancel","1","2","3","4","5","6","7","8"]}'}, {'code': 'airquality', 'dp_id': 101, 'type': 'String', 'values': {}}, {'code': 'humidity', 'dp_id': 106, 'type': 'String', 'values': {}}, {'code': 'timer_minutes', 'dp_id': 23, 'type': 'String', 'values': {}}, {'code': 'filter_remaining', 'dp_id': 103, 'type': 'String', 'values': {}}]
   webCmd     ::fan_speed_percent: ::::: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :on:off

Mach mal einen Neustart vom Device, vielleicht schickt es dann wieder einen Wert? Eventuell wird der Wert nur bei Änderung vom Device übermittelt.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 05 April 2023, 21:40:50
Zitat von: McShire am 22 März 2023, 21:01:35
Zitat von: dominik am 12 März 2023, 22:25:07Du musst warten bis die Devices etwas schicken. Die sind offline und wachen nur kurz auf wenn sie ein Signal schicken. Solange sie das nicht machen, steht es auf Initializing...

Die tuya Cloud API (dein Link) hat mit local nix zu tun. Über die Cloud bekommt man natürlich alle Werte sofort, weil die dort gespeichert sind.

Hallo Dominik,
ich war jetzt einige Tage vor Ort und habe alles, leider erfolglos, ausprobiert.
Über die Cloud funktioniert das Thermometer einwandfrei, local leider nicht.
Das Thermometer sendet, die IP stimmt, das kann ich im Router sehen.
Das Device im fhem empfängt auch die Nachricht, auch das kann man sehen.
Nach delete und neu create werden die ganzen Readings erst nach dem Empfang vom Thermometer gesetzt.
Dabei aber nicht die Readings va_temperature und va_humidity.
Dafür stehen unten in den Attributen Definitionen dazu.
Hier noch einmal die lists dazu.

local:
Internals:
   CFGFN     
   DEF        tuya lf36y5nwb8jkxwgg bf83ed4ad555b0f4eciu49 192.168.178.18 cba0918e366e6318 3.3 5xmvn7d9yt9crdfwfget e1eca018ed9a415caa693cbe305ebe12
   DEVICEID   bf83ed4ad555b0f4eciu49
   FHEMPYTYPE tuya
   FUUID      641afde2-f33f-f21b-4322-f74886dd08cfb098
   IODev      fhempy_local
   NAME       tuya_local_bf83ed4ad555b0f4eciu49
   NR         1095
   PYTHONTYPE tuya
   STATE      ready
   TYPE       fhempy
   eventCount 6
   READINGS:
     2023-03-22 14:10:37   active_time     1679081993
     2023-03-22 14:10:37   biz_type        0
     2023-03-22 14:10:37   category        wsdcg
     2023-03-22 14:10:37   create_time     1678119275
     2023-03-22 14:10:37   icon            smart/icon/ay1525749833414yotNt/d9d4ceec63cb81ff6e8c8d6c2fb4edb3.png
     2023-03-22 14:10:37   id              bf83ed4ad555b0f4eciu49
     2023-03-22 14:10:37   ip              80.187.111.149
     2023-03-22 14:10:37   lat             52.0985
     2023-03-22 14:10:37   local_key       cba0918e366e6318
     2023-03-22 14:10:37   lon             8.1747
     2023-03-22 14:10:37   model           TH01 CB3S
     2023-03-22 14:10:37   name            T & H Sensor
     2023-03-22 14:32:03   online          1
     2023-03-22 14:10:37   owner_id        74793151
     2023-03-22 14:10:37   product_id      lf36y5nwb8jkxwgg
     2023-03-22 14:10:37   product_name    TH01CB3S
     2023-03-22 14:32:03   state           ready
     2023-03-22 14:10:37   sub             0
     2023-03-22 14:10:37   time_zone       +01:00
     2023-03-22 14:10:37   uid             eu1671185047381zzmmx
     2023-03-22 14:10:37   update_time     1679081993
     2023-03-22 14:10:37   uuid            193b6f95a7ab96d6
   args:
     tuya_local_bf83ed4ad555b0f4eciu49
     fhempy
     tuya
     lf36y5nwb8jkxwgg
     bf83ed4ad555b0f4eciu49
     192.168.178.18
     cba0918e366e6318
     3.3
     5xmvn7d9yt9crdfwfget
     e1eca018ed9a415caa693cbe305ebe12
   argsh:
Attributes:
   alias      T & H Sensor
   dp_01      va_temperature
   dp_02      va_humidity
   dp_03      battery_state
   dp_09      temp_unit_convert
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'temp_unit_convert', 'dp_id': 9, 'type': 'Enum', 'values': {'range': ['c', 'f']}, 'desc': 'temp unit convert'}]
   tuya_spec_status [{'code': 'va_temperature', 'dp_id': 1, 'type': 'Integer', 'values': {'unit': '℃', 'min': -200, 'max': 600, 'scale': 1, 'step': 1}}, {'code': 'va_humidity', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '%', 'min': 0, 'max': 100, 'scale': 0, 'step': 1}}, {'code': 'battery_state', 'dp_id': 3, 'type': 'Enum', 'values': {'range': ['low', 'middle', 'high']}}, {'code': 'temp_unit_convert', 'dp_id': 9, 'type': 'Enum', 'values': {'range': ['c', 'f']}}]

cloud:
Internals:
   DEF        tuya_cloud tuya_cloud_connector bf83ed4ad555b0f4eciu49
   DEVICEID   bf83ed4ad555b0f4eciu49
   FHEMPYTYPE tuya_cloud
   FUUID      640b7470-f33f-f21b-afb0-43ab967fa99fadb8
   IODev      fhempy_local
   NAME       tuya_cloud_bf83ed4ad555b0f4eciu49
   NR         1069
   PYTHONTYPE tuya_cloud
   STATE      ready
   TYPE       fhempy
   eventCount 4
   READINGS:
     2023-03-22 14:06:06   active_time     1679081993
     2023-03-22 14:31:57   battery_state   middle
     2023-03-22 14:06:06   biz_type        0
     2023-03-22 14:06:06   category        wsdcg
     2023-03-22 14:06:06   create_time     1678119275
     2023-03-22 14:06:06   icon            https://images.tuyaeu.com/smart/icon/ay1525749833414yotNt/d9d4ceec63cb81ff6e8c8d6c2fb4edb3.png
     2023-03-22 14:06:06   id              bf83ed4ad555b0f4eciu49
     2023-03-22 14:06:06   ip              80.187.111.149
     2023-03-22 14:06:06   lat             52.0985
     2023-03-22 14:06:06   local_key       cba0918e366e6318
     2023-03-22 14:06:06   lon             8.1747
     2023-03-22 14:06:06   model           TH01 CB3S
     2023-03-22 14:06:06   name            T & H Sensor
     2023-03-22 14:06:06   online          on
     2023-03-22 14:06:06   owner_id        74793151
     2023-03-22 14:06:06   product_id      lf36y5nwb8jkxwgg
     2023-03-22 14:06:06   product_name    T & H Sensor
     2023-03-22 14:05:53   state           ready
     2023-03-22 14:06:06   sub             off
     2023-03-22 14:31:57   temp_unit_convert c
     2023-03-22 14:06:06   time_zone       +01:00
     2023-03-22 14:06:06   uid             eu1671185047381zzmmx
     2023-03-22 14:06:06   update_time     1679081993
     2023-03-22 14:06:06   uuid            193b6f95a7ab96d6
     2023-03-22 14:31:57   va_humidity     59.0
     2023-03-22 14:31:57   va_temperature  15.0
   args:
     tuya_cloud_bf83ed4ad555b0f4eciu49
     fhempy
     tuya_cloud
     tuya_cloud_connector
     bf83ed4ad555b0f4eciu49
   argsh:
Attributes:
   alias      T & H Sensor
   group      tuya_cloud
   icon       temp_temperature
   room       fhempy

Siehst Du eine Möglichkeit, im local Betrieb die Temperatur zu bekommen,
damit ich dort nicht mehr auf das mobile schlechte Internet angewiesen bin.

Viele Grüße
Werner

Du schreibst, das Device empfängt die Nachricht. Woran kannst du das erkennen? Die Temperatur wird wahrscheinlich nur stündlich übermittelt. Ich gehe davon aus, dass du lang genug gewartet hast :)
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 05 April 2023, 21:42:29
Zitat von: muma am 22 März 2023, 16:53:04Hallo zusammen,
habe bei mir eine Tuya basierte Einbau LED am laufen. Beim Blick in den Eventlog ist mir aufgefallen, dass hier das Rading colour_data_v2 zyklisch alle 60s erscheint.
Ist das normal?

2023-03-22 16:34:35 fhempy tuya_local_ colour_data_v2: 2c2c2c
2023-03-22 16:35:35 fhempy tuya_local_ colour_data_v2: 2c2c2c
2023-03-22 16:36:35 fhempy tuya_local_ colour_data_v2: 2c2c2c
2023-03-22 16:37:35 fhempy tuya_local_ colour_data_v2: 2c2c2c
Ja, alle 60s wird ein "sende mir mal alles" Befehl an das Device geschickt. Das soll nur verhindern, dass ein Device mal kein Update schickt. Ich empfehle "event-on-change-reading .*", dann ist auch Ruhe im Log.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 05 April 2023, 21:45:23
Zitat von: Matt1185 am 22 März 2023, 10:46:01Hallo Zusammen,

ich hab diese Bewegungsmelder:
https://a.aliexpress.com/_EuU6qd1

Sie werden beim scan gefunden und ich kann sie als devices anlegen. Die richtige IP Adresse habe ich eingetragen. Dann bekomme ich genau einmal ein Update der readings und dann nie wieder.

Sollten solche passiven Devices mittlerweile laufen?

Vielen Dank,
Matthias

Ja, sollten laufen. Wobei ich mit meinem Rauchmelder auch noch Probleme habe :( denis.robel sein Rauchmelder läuft.
Bekommst du wirklich 1x ein Update der Readings? Ich denke das sind nur die Standardreadings, aber kein "motion" Reading oder so?

Generell meine Empfehlung an alle:
Bewegungsmelder, Türsensoren, etc. besser als Zigbee Device kaufen und mit Zigbee2MQTT integrieren - fragen dazu gerne in einem anderen Thread. Das ist super stabil und erfordert keinen WLAN Aufbau beim Senden von Signalen.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 05 April 2023, 22:04:52
Zitat von: SouzA am 22 März 2023, 09:42:13Hallo liebe Leute,

habe hier nun endlich den ECO-DIM.07 WIFI integriert bekommen.
Der lässt sich laut Standardkonfig mit bright_value_1 von 0 bis 1000 dimmen.
Kriegt man es irgendwie hin, dass
1. man die Prozent also "pct" einstellen kann
und
2. es wirklich Prozent von 0 bis 100 sind?

Thx für eine kurze Rückmeldung.

Bis denn
SouzA

EDIT:
Der Grund für die Frage ist der, dass das Device zwar vom gassistant erkannt wird und on/off funktioniert. Dimmen halt nur nicht...
Das kann ich leider nicht so einfach anpassen. Diese Ranges werden von Tuya vorgegeben und ich versuche daran nichts zu ändern, damit das Modul einfach sehr generisch bleibt.
Versuch mal folgendes im homebridgeMapping
{
  "Brightness": {
    "cmd": "bright_value_1",
    "reading": "bright_value_1",
    "max": 1000,
    "maxValue": 100
  }
}
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 05 April 2023, 22:05:43
Zitat von: satprofi am 19 März 2023, 19:59:31Hallo.
gibts möglichkeit von tuya cams bilder abzuspeichern?
Über tuya cloud müsste es möglich sein, ich habe mich damit aber noch nicht beschäftigt.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 07 April 2023, 17:15:34
hallo. heute neue lampe besorgt. tuya cloud hat sie sofort gefunden, tuya lokal aber findet sie nicht. x mal gescannt, uodate, restart, nichts hilft. findet keine lokalen geräte. was mach ich falsch?

So, habe sie jetzt manuel definiert, soweit ok. aber lässt sich nicht steuern.
LSC Lampe, hats damit Probleme?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 07 April 2023, 22:05:29
Mit "findet sie nicht" meinst du, dass sie als "offline" angelegt wird, oder? Wenn du dann die IP einträgst (nicht vergessen im Router statisch zu vergeben) wird sie auch nicht erkannt?

Ansonsten bitte mal resetten probieren.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 07 April 2023, 22:58:21
Das Device FHEMPYTYPE tuya meldet:
STATE fhempy server offline
Ich bin mir keiner Änderung bewußt. Was liegt hier vor, und wie kann man die Sache wieder zum Laufen zu bekommen?

Viele Grüße Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 07 April 2023, 23:47:51
Schau mal ins fhempy Log ob dort ein Fehler ersichtlich ist und prüfe ob fhempy_local connected ist.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 08 April 2023, 00:09:40
Hallo dominik,

fhempy_local ist nicht verbunden
state Installing fhempy (15min)... 2023-04-05 22:20:59
Im log steht heute Abend, ich hab mehrfach versucht upzudaten und neu zu starten:
2023-04-07 22:44:48,477 - INFO    - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 22:44:48,484 - INFO    - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 22:44:48,534 - INFO    - websockets.server: server listening on 0.0.0.0:15733
2023-04-07 23:11:45,459 - INFO    - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 23:11:45,465 - INFO    - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 23:11:45,514 - INFO    - websockets.server: server listening on 0.0.0.0:15733
2023-04-07 23:12:10,890 - INFO    - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 23:12:10,897 - INFO    - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 23:12:10,945 - INFO    - websockets.server: server listening on 0.0.0.0:15733
2023-04-07 23:12:37,623 - INFO    - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 23:12:37,630 - INFO    - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 23:12:37,678 - INFO    - websockets.server: server listening on 0.0.0.0:15733
2023-04-07 23:24:44,126 - INFO    - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 23:24:44,132 - INFO    - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 23:24:44,181 - INFO    - websockets.server: server listening on 0.0.0.0:15733

Viele Grüße Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 08 April 2023, 00:20:30
Hallo dominik,

ich hab Fhem neu gestartet, zuvor ein Fhem-Update durchgeführt, damit es sich lohnt.

Nachdem Fhem neu gestartet wurde, lief auch fhem-py wieder.

Was kann die Ursache für das widerspenstige Verhalten von fhem-py verursacht haben?

Viele Grüße Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 08 April 2023, 07:19:15
Zitat von: dominik am 07 April 2023, 22:05:29Mit "findet sie nicht" meinst du, dass sie als "offline" angelegt wird, oder? Wenn du dann die IP einträgst (nicht vergessen im Router statisch zu vergeben) wird sie auch nicht erkannt?

Ansonsten bitte mal resetten probieren.
nein, sie wird gar nicht angelegt.
manuell schon, auch online. nur schslten etc. geht dann auch nicht. denke die specs, erc. passen dann nicht


Internals:
   DEF        tuya ffyhi3mbqgceowhk bf68a96ec  xxxxx192.168.0.144 8a3537312679a385 3.3 jusdy3nvba47r4v1c4sv cce6628286ff4289a78c37532ce5bbed
   DEVICEID   bf68a96ec365177aacaxrv
   FHEMPYTYPE tuya
   FUUID      64303b82-f33f-6462-6ff5-e93706cbc953ceeb
   IODev      local_pybinding
   NAME       tuya_local_bf68a96ec365177aacaxrv
   NR         609
   PYTHONTYPE tuya
   STATE      ready
   TYPE       fhempy
   READINGS:
     2023-04-07 18:25:58   online          1
     2023-04-07 18:25:58   state           ready
   args:
     tuya_local_bf68a96ec365177aacaxrv
     fhempy
     tuya
     ffyhi3mbqgceowhk
     bf68a96ec365177aacaxrv
     192.168.0.144
     8a3537312679a385
     3.3
     xxxxxx
     xxxxxx
    
   argsh:
Attributes:
   IODev      local_pybinding
   alias      Licht_Eingangstuer
   dp_20      switch_led
   dp_21      work_mode
   dp_22      bright_value_v2
   dp_23      temp_value_v2
   dp_24      colour_data_v2
   dp_25      scene_data_v2
   dp_26      countdown_1
   dp_28      control_data
   dp_41      remote_switch
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}, 'desc': 'switch led'}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}, 'desc': 'work mode'}, {'code': 'bright_value_v2', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'bright value v2'}, {'code': 'temp_value_v2', 'dp_id': 23, 'type': 'Integer', 'values': {'min': 0, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'temp value v2'}, {'code': 'colour_data_v2', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}, 'desc': 'colour data v2'}, {'code': 'scene_data_v2', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, 'desc': 'scene data v2'}, {'code': 'countdown_1', 'dp_id': 26, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}, {'code': 'control_data', 'dp_id': 28, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}, 'desc': 'control data'}, {'code': 'remote_switch', 'dp_id': 41, 'type': 'Boolean', 'values': {}, 'desc': 'remote switch'}]
   tuya_spec_status [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}}, {'code': 'bright_value_v2', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'temp_value_v2', 'dp_id': 23, 'type': 'Integer', 'values': {'min': 0, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'colour_data_v2', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, {'code': 'scene_data_v2', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}}, {'code': 'countdown_1', 'dp_id': 26, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'control_data', 'dp_id': 28, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}}, {'code': 'remote_switch', 'dp_id': 41, 'type': 'Boolean', 'values': {}}]

Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 08 April 2023, 08:25:52
Zitat von: Gisbert am 08 April 2023, 00:20:30Hallo dominik,

ich hab Fhem neu gestartet, zuvor ein Fhem-Update durchgeführt, damit es sich lohnt.

Nachdem Fhem neu gestartet wurde, lief auch fhem-py wieder.

Was kann die Ursache für das widerspenstige Verhalten von fhem-py verursacht haben?

Viele Grüße Gisbert

danke für den tip.
Habe Raspbi neu gestartet, jetzt erkennt er die devices wieder.

gestriges log nach fhempy update
2023-04-07 16:52:05,582 - ERROR    - tuya_cloud_bf68a96ec365177aacaxrv: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya_cloud/tuya_cloud_device.py", line 339, in update_readings_dict
    st_name, json.loads(status_dic[st_name])
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2023-04-07 17:01:51,821 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2023-04-07 17:01:51,824 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2023-04-07 17:02:41,559 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2023-04-07 17:02:41,581 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-04-07 17:02:41,626 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-07 17:02:41,628 - INFO     - websockets.server: server closing
2023-04-07 17:02:51,644 - INFO     - websockets.server: connection closed
2023-04-07 17:02:51,645 - INFO     - websockets.server: server closed
2023-04-07 17:02:51,652 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-04-07 17:02:56,710 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 17:02:56,731 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 17:02:56,884 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-07 17:03:02,187 - INFO     - websockets.server: connection open
2023-04-07 17:03:02,189 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-07 17:36:55,664 - ERROR    - fhempy.lib.pkg_installer: manifest.json not found!
2023-04-07 17:38:34,846 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2023-04-07 17:38:34,849 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2023-04-07 17:39:21,992 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2023-04-07 17:39:22,217 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-04-07 17:39:22,227 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-07 17:39:22,229 - INFO     - websockets.server: server closing
2023-04-07 17:39:32,246 - INFO     - websockets.server: connection closed
2023-04-07 17:39:32,247 - INFO     - websockets.server: server closed
2023-04-07 17:39:32,254 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-04-07 17:39:36,904 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 17:39:36,915 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 17:39:37,027 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-07 17:39:43,302 - INFO     - websockets.server: connection open
2023-04-07 17:39:43,304 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-07 17:41:05,955 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:41:10,971 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:41:15,767 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:42:54,184 - ERROR    - fhempy.lib.fhem: NO RESPONSE since 180s: AttrVal('tuya_local_bf9bd42998622a09a0sgzg', 'tuya_spec_functions', '')
2023-04-07 17:43:26,458 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:43:31,474 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:43:36,043 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:46:27,077 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:46:40,379 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to execute function Set: Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 385, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 484, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 208, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 335, in handle_set
    return await fct_call(hash, final_params)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in set_create_device
    nameid = params["name"]


Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 08 April 2023, 08:35:54
Zitat von: Gisbert am 08 April 2023, 00:20:30Hallo dominik,

ich hab Fhem neu gestartet, zuvor ein Fhem-Update durchgeführt, damit es sich lohnt.

Nachdem Fhem neu gestartet wurde, lief auch fhem-py wieder.

Was kann die Ursache für das widerspenstige Verhalten von fhem-py verursacht haben?

Viele Grüße Gisbert

Das ist jetzt schwer zu sagen woran es lag. fhempy hat bei dir alle ca. 20s neu gestartet. Eventuell lässt sich im syslog noch was dazu finden? Das Log bringt leider keine Fehlermeldung. Kann es sein, dass es von außen gekillt wurde? Irgendein Monitoring Prozess?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 08 April 2023, 08:40:08
Zitat von: satprofi am 08 April 2023, 08:25:52
Zitat von: Gisbert am 08 April 2023, 00:20:30Hallo dominik,

ich hab Fhem neu gestartet, zuvor ein Fhem-Update durchgeführt, damit es sich lohnt.

Nachdem Fhem neu gestartet wurde, lief auch fhem-py wieder.

Was kann die Ursache für das widerspenstige Verhalten von fhem-py verursacht haben?

Viele Grüße Gisbert

danke für den tip.
Habe Raspbi neu gestartet, jetzt erkennt er die devices wieder.

gestriges log nach fhempy update
2023-04-07 16:52:05,582 - ERROR    - tuya_cloud_bf68a96ec365177aacaxrv: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya_cloud/tuya_cloud_device.py", line 339, in update_readings_dict
    st_name, json.loads(status_dic[st_name])
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2023-04-07 17:01:51,821 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2023-04-07 17:01:51,824 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2023-04-07 17:02:41,559 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2023-04-07 17:02:41,581 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-04-07 17:02:41,626 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-07 17:02:41,628 - INFO     - websockets.server: server closing
2023-04-07 17:02:51,644 - INFO     - websockets.server: connection closed
2023-04-07 17:02:51,645 - INFO     - websockets.server: server closed
2023-04-07 17:02:51,652 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-04-07 17:02:56,710 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 17:02:56,731 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 17:02:56,884 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-07 17:03:02,187 - INFO     - websockets.server: connection open
2023-04-07 17:03:02,189 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-07 17:36:55,664 - ERROR    - fhempy.lib.pkg_installer: manifest.json not found!
2023-04-07 17:38:34,846 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2023-04-07 17:38:34,849 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2023-04-07 17:39:21,992 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2023-04-07 17:39:22,217 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-04-07 17:39:22,227 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-07 17:39:22,229 - INFO     - websockets.server: server closing
2023-04-07 17:39:32,246 - INFO     - websockets.server: connection closed
2023-04-07 17:39:32,247 - INFO     - websockets.server: server closed
2023-04-07 17:39:32,254 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-04-07 17:39:36,904 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 17:39:36,915 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 17:39:37,027 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-07 17:39:43,302 - INFO     - websockets.server: connection open
2023-04-07 17:39:43,304 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-07 17:41:05,955 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:41:10,971 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:41:15,767 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:42:54,184 - ERROR    - fhempy.lib.fhem: NO RESPONSE since 180s: AttrVal('tuya_local_bf9bd42998622a09a0sgzg', 'tuya_spec_functions', '')
2023-04-07 17:43:26,458 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:43:31,474 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:43:36,043 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:46:27,077 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:46:40,379 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to execute function Set: Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 385, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 484, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 208, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 335, in handle_set
    return await fct_call(hash, final_params)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in set_create_device
    nameid = params["name"]



Danke für das Log. Kann es sein, dass da noch was fehlt aus dem Log? Die letzte Zeile zeigt nämlich keinen Fehler, der sollte im Traceback aber immer in der letzten Zeile stehen.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 08 April 2023, 11:18:47
Zitat von: dominik am 08 April 2023, 08:40:08Danke für das Log. Kann es sein, dass da noch was fehlt aus dem Log? Die letzte Zeile zeigt nämlich keinen Fehler, der sollte im Traceback aber immer in der letzten Zeile stehen.

Hallo.
Das Log von gestern
2023-04-07 16:52:05,582 - ERROR    - tuya_cloud_bf68a96ec365177aacaxrv: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya_cloud/tuya_cloud_device.py", line 339, in update_readings_dict
    st_name, json.loads(status_dic[st_name])
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2023-04-07 17:01:51,821 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2023-04-07 17:01:51,824 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2023-04-07 17:02:41,559 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2023-04-07 17:02:41,581 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-04-07 17:02:41,626 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-07 17:02:41,628 - INFO     - websockets.server: server closing
2023-04-07 17:02:51,644 - INFO     - websockets.server: connection closed
2023-04-07 17:02:51,645 - INFO     - websockets.server: server closed
2023-04-07 17:02:51,652 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-04-07 17:02:56,710 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 17:02:56,731 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 17:02:56,884 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-07 17:03:02,187 - INFO     - websockets.server: connection open
2023-04-07 17:03:02,189 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-07 17:36:55,664 - ERROR    - fhempy.lib.pkg_installer: manifest.json not found!
2023-04-07 17:38:34,846 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2023-04-07 17:38:34,849 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2023-04-07 17:39:21,992 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2023-04-07 17:39:22,217 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-04-07 17:39:22,227 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-07 17:39:22,229 - INFO     - websockets.server: server closing
2023-04-07 17:39:32,246 - INFO     - websockets.server: connection closed
2023-04-07 17:39:32,247 - INFO     - websockets.server: server closed
2023-04-07 17:39:32,254 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-04-07 17:39:36,904 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 17:39:36,915 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 17:39:37,027 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-07 17:39:43,302 - INFO     - websockets.server: connection open
2023-04-07 17:39:43,304 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-07 17:41:05,955 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:41:10,971 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:41:15,767 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:42:54,184 - ERROR    - fhempy.lib.fhem: NO RESPONSE since 180s: AttrVal('tuya_local_bf9bd42998622a09a0sgzg', 'tuya_spec_functions', '')
2023-04-07 17:43:26,458 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:43:31,474 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:43:36,043 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:46:27,077 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:46:40,379 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to execute function Set: Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 385, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 484, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 208, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 335, in handle_set
    return await fct_call(hash, final_params)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in set_create_device
    nameid = params["name"]
KeyError: 'name'
 with hash: {'defargs': ['tuya_system', 'fhempy', 'tuya', 'setup', 'xxxxxxxx', 'xxxxxxx', 'bfb727311ed41a0cc8ycsq'], 'function': 'Set', 'msgtype': 'function', 'defargsh': {}, 'FHEMPYTYPE': 'tuya', 'argsh': {}, 'NAME': 'tuya_system', 'id': '48020038', 'args': ['tuya_system', 'create_device'], 'PYTHONTYPE': 'tuya'}
2023-04-07 17:49:23,199 - ERROR    - fhempy.lib.pkg_installer: manifest.json not found!
2023-04-07 17:52:27,669 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2023-04-07 17:52:27,672 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2023-04-07 17:53:14,155 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2023-04-07 17:53:14,177 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-04-07 17:53:14,187 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-07 17:53:14,189 - INFO     - websockets.server: server closing
2023-04-07 17:53:24,198 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 968, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1038, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1113, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1170, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/framing.py", line 69, in read
    data = await reader(2)
  File "/usr/lib/python3.9/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.9/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 221, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 249, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 323, in handle_function
    await self.sendBackReturn(hash, "")
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 127, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 635, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 953, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2023-04-07 17:53:24,215 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message with hash: {'args': ['tuya_local_bf68a96ec365177aacaxrv', '?'], 'id': '42506295', 'PYTHONTYPE': 'tuya', 'NAME': 'tuya_local_bf68a96ec365177aacaxrv', 'FHEMPYTYPE': 'tuya', 'argsh': {}, 'defargsh': {}, 'defargs': ['tuya_local_bf68a96ec365177aacaxrv', 'fhempy', 'tuya', 'ffyhi3mbqgceowhk', 'bf68a96ec365177aacaxrv', '192.168.0.144', '8a3537312679a385', '3.3', 'xxxxxxx', 'xxxxxxx'], 'msgtype': 'function', 'function': 'Set'}
2023-04-07 17:53:24,216 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"args":["tuya_local_bf68a96ec365177aacaxrv","?"],"id":"42506295","PYTHONTYPE":"tuya","NAME":"tuya_local_bf68a96ec365177aacaxrv","FHEMPYTYPE":"tuya","argsh":{},"defargsh":{},"defargs":["tuya_local_bf68a96ec365177aacaxrv","fhempy","tuya","ffyhi3mbqgceowhk","bf68a96ec365177aacaxrv","192.168.0.144","8a3537312679a385","3.3","xxxxxx","xxxxxxx"],"msgtype":"function","function":"Set"}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 968, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1038, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1113, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1170, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/framing.py", line 69, in read
    data = await reader(2)
  File "/usr/lib/python3.9/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.9/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 221, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 249, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 323, in handle_function
    await self.sendBackReturn(hash, "")
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 127, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 635, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 953, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 190, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 224, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 139, in sendBackError
    duration = (time.time() - id_received_timestamp[retHash["id"]]) * 1000
KeyError: '42506295'
2023-04-07 17:53:24,222 - INFO     - websockets.server: connection closed
2023-04-07 17:53:24,223 - INFO     - websockets.server: server closed
2023-04-07 17:53:24,230 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-04-07 17:53:28,805 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 17:53:28,816 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 17:53:28,930 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-07 17:53:34,780 - INFO     - websockets.server: connection open
2023-04-07 17:53:34,782 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-07 17:55:34,352 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:55:39,368 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:55:44,166 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:55:44,382 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:55:49,397 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:56:19,059 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:56:19,552 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:56:24,230 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:56:49,679 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:56:54,274 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:56:54,693 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:04:00,116 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to execute function Set: Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 385, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 484, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 208, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 334, in handle_set
    fct_call = getattr(obj, fct_name)
AttributeError: 'tuya' object has no attribute 'set_json'
 with hash: {'defargs': ['tuya_local_bf68a96ec365177aacaxrv', 'fhempy', 'tuya', 'ffyhi3mbqgceowhk', 'bf68a96ec365177aacaxrv', '192.168.0.144', '8a3537312679a385', '3.3', 'xxxxxxx', 'xxxxxxxx'], 'function': 'Set', 'msgtype': 'function', 'argsh': {}, 'FHEMPYTYPE': 'tuya', 'defargsh': {}, 'NAME': 'tuya_local_bf68a96ec365177aacaxrv', 'id': '5810187', 'args': ['tuya_local_bf68a96ec365177aacaxrv', 'control_data', '1'], 'PYTHONTYPE': 'tuya'}
2023-04-07 18:04:28,356 - ERROR    - asyncio: Task was destroyed but it is pending!
task: <Task pending name='Task-2155' coro=<main() running at /opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/__init__.py:166> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x748017a8>()]>>
2023-04-07 18:04:41,058 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:04:44,992 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:04:46,071 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:04:51,086 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:04:55,006 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:04:56,101 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:01,118 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:05,019 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:06,132 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:11,150 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:15,034 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:16,165 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:19,243 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:21,180 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:25,049 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:26,194 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:31,212 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:35,063 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:36,228 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:41,242 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:45,076 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:46,257 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:51,274 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:55,091 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:56,288 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:01,306 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:05,105 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:06,321 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:11,335 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:15,118 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:16,351 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:19,257 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:21,366 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:25,132 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:26,381 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:31,397 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:35,146 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:36,412 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:41,425 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:45,160 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:46,441 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:51,458 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:55,174 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:56,473 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:01,490 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:05,187 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:06,504 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:11,520 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:15,201 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:16,536 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:19,271 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:21,552 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:25,218 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:26,566 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:31,584 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:35,232 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:36,599 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:41,614 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:45,247 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:46,629 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:51,645 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:55,263 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:56,660 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:01,677 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:05,278 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:06,692 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:11,709 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:15,292 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:16,724 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:19,288 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:21,740 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:25,307 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:26,755 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:31,790 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:35,322 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:36,803 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:41,817 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:45,337 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:46,830 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:51,847 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:55,351 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:56,860 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:01,877 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:05,365 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:06,890 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:11,908 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:15,380 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:16,922 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:19,303 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:21,939 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:25,393 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:26,952 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:31,969 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:35,407 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:36,983 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:41,997 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:45,421 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:47,010 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:52,027 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:55,435 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:57,041 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:58,166 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:00,414 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:02,063 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:04,485 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:05,449 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:07,077 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:12,094 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:15,463 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:17,109 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:19,319 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:22,126 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:25,479 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:27,139 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:32,157 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:35,493 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:37,171 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:42,205 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:45,507 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:47,218 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:52,235 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:55,521 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:57,248 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:02,265 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:05,535 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:07,278 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:12,295 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:15,549 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:17,308 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:19,332 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:22,324 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:25,563 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:27,338 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:32,356 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:35,578 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:37,369 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:42,385 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:45,593 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:47,398 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:52,415 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:55,607 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:57,430 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:02,445 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:05,622 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:07,458 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:12,472 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:15,636 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:17,485 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:19,346 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:22,502 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:25,651 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:27,516 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:32,533 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:35,665 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:37,546 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:42,560 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:45,679 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:47,573 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:52,590 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:55,697 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:57,604 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:02,620 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:05,712 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:07,634 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:12,651 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:15,726 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:17,665 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:19,361 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:22,682 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:25,740 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:27,696 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:32,712 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:35,754 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:37,726 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:42,743 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:45,769 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:47,757 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:52,775 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:55,782 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:57,788 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:02,805 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:05,796 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:07,819 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:12,836 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:15,810 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:17,849 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:19,375 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:22,866 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:25,825 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:27,880 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:32,898 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:35,840 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:37,923 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:42,937 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:45,855 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:47,951 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:52,968 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:55,869 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:57,982 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:02,999 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:05,883 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:08,012 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:13,030 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:15,898 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:18,043 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:19,391 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:23,063 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:25,912 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:28,077 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:33,094 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:35,926 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:38,108 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:43,122 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:45,940 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:48,139 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:53,157 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:55,958 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:58,171 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:03,188 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:05,972 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:08,202 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:13,218 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:15,986 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:18,232 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:19,408 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:23,250 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:26,000 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:28,264 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:33,281 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:36,015 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:38,295 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:43,310 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:46,029 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:48,323 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:53,341 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:56,044 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:58,355 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:03,371 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:06,058 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:08,385 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:13,399 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:16,073 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:18,414 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:19,423 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:23,432 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:26,088 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:28,446 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:33,463 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:36,103 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:38,477 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:43,492 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:46,117 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:48,506 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:53,524 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:56,132 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:58,539 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:03,555 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:06,146 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:08,569 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:13,587 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:16,160 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:18,601 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:19,439 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:23,618 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:26,174 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:28,633 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:33,650 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:36,190 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:38,664 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:43,682 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:46,204 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:48,696 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:53,714 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:56,219 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:58,728 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:03,746 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:06,234 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:08,759 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:13,775 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:16,248 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:18,789 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:19,453 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:23,810 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:26,265 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:28,824 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:33,842 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:36,279 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:38,856 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:43,872 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:46,294 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:48,886 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:53,901 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:56,309 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:58,916 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:03,934 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:06,324 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:08,950 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:13,965 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:16,339 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:18,979 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:19,468 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:23,992 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:26,353 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:29,026 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:34,043 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:36,367 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:39,058 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:44,074 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:46,381 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:49,088 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:54,105 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:56,397 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:59,119 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:04,136 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:06,412 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:09,151 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:14,168 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:16,426 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:19,189 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:19,483 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:24,206 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:26,441 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:29,222 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:34,236 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:36,457 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:39,251 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:44,269 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:46,472 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:49,283 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:54,301 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:56,487 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:59,316 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:04,333 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:06,502 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:09,347 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:14,364 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:16,516 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:19,379 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:19,497 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:24,398 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:26,530 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:29,415 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:34,433 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:36,544 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:39,447 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:44,463 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:46,558 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:49,479 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:54,494 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:56,573 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:59,509 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:04,526 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:06,588 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:09,541 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:14,558 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:16,603 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:19,515 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:19,571 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:24,590 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:26,620 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:29,605 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:34,622 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:36,634 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:39,637 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:44,655 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:46,648 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:49,670 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:54,687 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:56,664 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:59,703 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:04,718 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:06,679 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:09,733 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:14,748 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:16,692 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:19,530 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:19,761 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:24,779 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:26,708 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:29,793 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:34,812 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:36,722 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:39,826 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:44,843 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:46,736 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:49,858 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:25:42,238 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 18:25:42,249 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 18:25:42,374 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-07 18:25:42,806 - INFO     - websockets.server: connection open
2023-04-07 18:25:42,808 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-07 18:27:14,779 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:27:14,900 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:27:19,915 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:27:49,681 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:27:50,104 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:27:54,838 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:27:55,117 - WARNING  - asyncio: socket.send() raised exception.

und heute nach neustart


2023-04-08 07:35:00,722 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-08 07:35:00,734 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-08 07:35:00,900 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-08 07:35:09,758 - INFO     - websockets.server: connection open
2023-04-08 07:35:09,759 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-08 07:35:23,804 - ERROR    - tuya_local_bf68a96ec365177aacaxrv: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 531, in setup_connection
    self._connected_device = await asyncio.wait_for(connect_fct, timeout=15)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/__init__.py", line 206, in connect
    await device.start_socket()
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py", line 917, in start_socket
    raise ex
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py", line 894, in start_socket
    self.reader, self.writer = await asyncio.open_connection(
  File "/usr/lib/python3.9/asyncio/streams.py", line 52, in open_connection
    transport, _ = await loop.create_connection(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
    return await fut
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.0.144', 6668)
2023-04-08 07:35:34,193 - ERROR    - tuya_cloud_bf68a96ec365177aacaxrv: Extra data: line 1 column 2 (char 1)
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya_cloud/tuya_cloud_device.py", line 314, in update_readings_arr
    status["code"], json.loads(status["value"])
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 2 (char 1)
2023-04-08 07:40:01,784 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-08 07:40:01,797 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-08 07:40:01,992 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-08 07:40:11,433 - INFO     - websockets.server: connection open
2023-04-08 07:40:11,435 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-08 07:40:26,880 - ERROR    - tuya_cloud_bf68a96ec365177aacaxrv: Extra data: line 1 column 2 (char 1)
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya_cloud/tuya_cloud_device.py", line 314, in update_readings_arr
    status["code"], json.loads(status["value"])
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 2 (char 1)
2023-04-08 07:41:18,267 - WARNING  - asyncio: socket.send() raised exception.
2023-04-08 07:41:18,518 - WARNING  - asyncio: socket.send() raised exception.
2023-04-08 07:41:23,343 - WARNING  - asyncio: socket.send() raised exception.
2023-04-08 07:41:23,532 - WARNING  - asyncio: socket.send() raised exception.
2023-04-08 08:13:43,967 - WARNING  - asyncio: socket.send() raised exception.
2023-04-08 08:13:45,935 - WARNING  - asyncio: socket.send() raised exception.
2023-04-08 08:26:49,751 - WARNING  - tuya_local_bf68a96ec365177aacaxrv: dp_28 in spec but not found locally. This should be reported to TuYa
2023-04-08 08:28:25,068 - ERROR    - fhempy.lib.fhem: FHEM took 6457ms for readingsBeginUpdate($defs{'tuya_local_bfe4369aa3daab28e1r83q'});;
2023-04-08 08:28:25,077 - ERROR    - fhempy.lib.fhem: FHEM took 6324ms for readingsBeginUpdate($defs{'tuya_local_bf50219899eabfb485synp'});;
2023-04-08 08:28:25,084 - ERROR    - fhempy.lib.fhem: FHEM took 6186ms for readingsBeginUpdate($defs{'tuya_local_bfb727311ed41a0cc8ycsq'});;
2023-04-08 08:28:25,093 - ERROR    - fhempy.lib.fhem: FHEM took 5827ms for readingsBeginUpdate($defs{'tuya_local_bffee61d5656c19f0e6zas'});;
2023-04-08 08:34:25,454 - ERROR    - fhempy.lib.fhem: FHEM took 6777ms for readingsBeginUpdate($defs{'tuya_local_bfe4369aa3daab28e1r83q'});;
2023-04-08 08:34:25,459 - ERROR    - fhempy.lib.fhem: FHEM took 6627ms for readingsBeginUpdate($defs{'tuya_local_bf50219899eabfb485synp'});;
2023-04-08 08:34:25,465 - ERROR    - fhempy.lib.fhem: FHEM took 6481ms for readingsBeginUpdate($defs{'tuya_local_bfb727311ed41a0cc8ycsq'});;
2023-04-08 09:39:57,818 - ERROR    - tuya_cloud_bf68a96ec365177aacaxrv: Extra data: line 1 column 2 (char 1)
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya_cloud/tuya_cloud_device.py", line 339, in update_readings_dict
    st_name, json.loads(status_dic[st_name])
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 2 (char 1)
/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py:968: RuntimeWarning: coroutine 'XenonDevice._negotiate_session_key' was never awaited
  if self._negotiate_session_key():
RuntimeWarning: Enable tracemalloc to get the object allocation traceback


Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 08 April 2023, 11:41:44
Zitat von: dominik am 05 April 2023, 21:45:23Generell meine Empfehlung an alle:
Bewegungsmelder, Türsensoren, etc. besser als Zigbee Device kaufen und mit Zigbee2MQTT integrieren - fragen dazu gerne in einem anderen Thread. Das ist super stabil und erfordert keinen WLAN Aufbau beim Senden von Signalen.

wo findet man dazu Anleitungen? LIDL verkauft nur Zigbee
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 08 April 2023, 12:17:43
Zitat von: satprofi am 08 April 2023, 11:41:44
Zitat von: dominik am 05 April 2023, 21:45:23Generell meine Empfehlung an alle:
Bewegungsmelder, Türsensoren, etc. besser als Zigbee Device kaufen und mit Zigbee2MQTT integrieren - fragen dazu gerne in einem anderen Thread. Das ist super stabil und erfordert keinen WLAN Aufbau beim Senden von Signalen.

wo findet man dazu Anleitungen? LIDL verkauft nur Zigbee
https://www.zigbee2mqtt.io/guide/getting-started/

Den Server kann man mit fhempy laufen lassen:
define z2m fhempy zigbee2mqtt
Damit kann man dann bequem Updates machen, was sonst etwas umständlich ist.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 08 April 2023, 12:21:07
Zitat von: satprofi am 08 April 2023, 11:18:47
Zitat von: dominik am 08 April 2023, 08:40:08Danke für das Log. Kann es sein, dass da noch was fehlt aus dem Log? Die letzte Zeile zeigt nämlich keinen Fehler, der sollte im Traceback aber immer in der letzten Zeile stehen.

Hallo.
Das Log von gestern
2023-04-07 16:52:05,582 - ERROR    - tuya_cloud_bf68a96ec365177aacaxrv: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya_cloud/tuya_cloud_device.py", line 339, in update_readings_dict
    st_name, json.loads(status_dic[st_name])
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2023-04-07 17:01:51,821 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2023-04-07 17:01:51,824 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2023-04-07 17:02:41,559 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2023-04-07 17:02:41,581 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-04-07 17:02:41,626 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-07 17:02:41,628 - INFO     - websockets.server: server closing
2023-04-07 17:02:51,644 - INFO     - websockets.server: connection closed
2023-04-07 17:02:51,645 - INFO     - websockets.server: server closed
2023-04-07 17:02:51,652 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-04-07 17:02:56,710 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 17:02:56,731 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 17:02:56,884 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-07 17:03:02,187 - INFO     - websockets.server: connection open
2023-04-07 17:03:02,189 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-07 17:36:55,664 - ERROR    - fhempy.lib.pkg_installer: manifest.json not found!
2023-04-07 17:38:34,846 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2023-04-07 17:38:34,849 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2023-04-07 17:39:21,992 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2023-04-07 17:39:22,217 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-04-07 17:39:22,227 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-07 17:39:22,229 - INFO     - websockets.server: server closing
2023-04-07 17:39:32,246 - INFO     - websockets.server: connection closed
2023-04-07 17:39:32,247 - INFO     - websockets.server: server closed
2023-04-07 17:39:32,254 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-04-07 17:39:36,904 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 17:39:36,915 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 17:39:37,027 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-07 17:39:43,302 - INFO     - websockets.server: connection open
2023-04-07 17:39:43,304 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-07 17:41:05,955 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:41:10,971 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:41:15,767 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:42:54,184 - ERROR    - fhempy.lib.fhem: NO RESPONSE since 180s: AttrVal('tuya_local_bf9bd42998622a09a0sgzg', 'tuya_spec_functions', '')
2023-04-07 17:43:26,458 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:43:31,474 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:43:36,043 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:46:27,077 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:46:40,379 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to execute function Set: Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 385, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 484, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 208, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 335, in handle_set
    return await fct_call(hash, final_params)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 262, in set_create_device
    nameid = params["name"]
KeyError: 'name'
 with hash: {'defargs': ['tuya_system', 'fhempy', 'tuya', 'setup', 'xxxxxxxx', 'xxxxxxx', 'bfb727311ed41a0cc8ycsq'], 'function': 'Set', 'msgtype': 'function', 'defargsh': {}, 'FHEMPYTYPE': 'tuya', 'argsh': {}, 'NAME': 'tuya_system', 'id': '48020038', 'args': ['tuya_system', 'create_device'], 'PYTHONTYPE': 'tuya'}
2023-04-07 17:49:23,199 - ERROR    - fhempy.lib.pkg_installer: manifest.json not found!
2023-04-07 17:52:27,669 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2023-04-07 17:52:27,672 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2023-04-07 17:53:14,155 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2023-04-07 17:53:14,177 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-04-07 17:53:14,187 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-07 17:53:14,189 - INFO     - websockets.server: server closing
2023-04-07 17:53:24,198 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 968, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1038, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1113, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1170, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/framing.py", line 69, in read
    data = await reader(2)
  File "/usr/lib/python3.9/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.9/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 221, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 249, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 323, in handle_function
    await self.sendBackReturn(hash, "")
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 127, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 635, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 953, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received
2023-04-07 17:53:24,215 - ERROR    - fhempy.lib.fhem_pythonbinding: fhempy failed to handle message with hash: {'args': ['tuya_local_bf68a96ec365177aacaxrv', '?'], 'id': '42506295', 'PYTHONTYPE': 'tuya', 'NAME': 'tuya_local_bf68a96ec365177aacaxrv', 'FHEMPYTYPE': 'tuya', 'argsh': {}, 'defargsh': {}, 'defargs': ['tuya_local_bf68a96ec365177aacaxrv', 'fhempy', 'tuya', 'ffyhi3mbqgceowhk', 'bf68a96ec365177aacaxrv', '192.168.0.144', '8a3537312679a385', '3.3', 'xxxxxxx', 'xxxxxxx'], 'msgtype': 'function', 'function': 'Set'}
2023-04-07 17:53:24,216 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message: {"args":["tuya_local_bf68a96ec365177aacaxrv","?"],"id":"42506295","PYTHONTYPE":"tuya","NAME":"tuya_local_bf68a96ec365177aacaxrv","FHEMPYTYPE":"tuya","argsh":{},"defargsh":{},"defargs":["tuya_local_bf68a96ec365177aacaxrv","fhempy","tuya","ffyhi3mbqgceowhk","bf68a96ec365177aacaxrv","192.168.0.144","8a3537312679a385","3.3","xxxxxx","xxxxxxx"],"msgtype":"function","function":"Set"}
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 968, in transfer_data
    message = await self.read_message()
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1038, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1113, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1170, in read_frame
    frame = await Frame.read(
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/framing.py", line 69, in read
    data = await reader(2)
  File "/usr/lib/python3.9/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/lib/python3.9/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 221, in _onMessage
    await self.handle_message(msg, hash)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 249, in handle_message
    await self.handle_function(hash, msg)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 323, in handle_function
    await self.sendBackReturn(hash, "")
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 127, in sendBackReturn
    await self.wsconnection.send(msg.encode("utf-8"))
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 635, in send
    await self.ensure_open()
  File "/opt/fhem/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 953, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1001 (going away); no close frame received

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 190, in onMessage
    await self._onMessage(payload)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 224, in _onMessage
    await self.sendBackError(hash, "fhempy failed to handle message")
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 139, in sendBackError
    duration = (time.time() - id_received_timestamp[retHash["id"]]) * 1000
KeyError: '42506295'
2023-04-07 17:53:24,222 - INFO     - websockets.server: connection closed
2023-04-07 17:53:24,223 - INFO     - websockets.server: server closed
2023-04-07 17:53:24,230 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-04-07 17:53:28,805 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 17:53:28,816 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 17:53:28,930 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-07 17:53:34,780 - INFO     - websockets.server: connection open
2023-04-07 17:53:34,782 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-07 17:55:34,352 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:55:39,368 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:55:44,166 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:55:44,382 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:55:49,397 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:56:19,059 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:56:19,552 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:56:24,230 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:56:49,679 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:56:54,274 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 17:56:54,693 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:04:00,116 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to execute function Set: Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 385, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 484, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 208, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 334, in handle_set
    fct_call = getattr(obj, fct_name)
AttributeError: 'tuya' object has no attribute 'set_json'
 with hash: {'defargs': ['tuya_local_bf68a96ec365177aacaxrv', 'fhempy', 'tuya', 'ffyhi3mbqgceowhk', 'bf68a96ec365177aacaxrv', '192.168.0.144', '8a3537312679a385', '3.3', 'xxxxxxx', 'xxxxxxxx'], 'function': 'Set', 'msgtype': 'function', 'argsh': {}, 'FHEMPYTYPE': 'tuya', 'defargsh': {}, 'NAME': 'tuya_local_bf68a96ec365177aacaxrv', 'id': '5810187', 'args': ['tuya_local_bf68a96ec365177aacaxrv', 'control_data', '1'], 'PYTHONTYPE': 'tuya'}
2023-04-07 18:04:28,356 - ERROR    - asyncio: Task was destroyed but it is pending!
task: <Task pending name='Task-2155' coro=<main() running at /opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/__init__.py:166> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x748017a8>()]>>
2023-04-07 18:04:41,058 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:04:44,992 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:04:46,071 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:04:51,086 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:04:55,006 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:04:56,101 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:01,118 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:05,019 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:06,132 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:11,150 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:15,034 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:16,165 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:19,243 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:21,180 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:25,049 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:26,194 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:31,212 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:35,063 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:36,228 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:41,242 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:45,076 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:46,257 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:51,274 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:55,091 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:05:56,288 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:01,306 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:05,105 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:06,321 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:11,335 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:15,118 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:16,351 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:19,257 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:21,366 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:25,132 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:26,381 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:31,397 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:35,146 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:36,412 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:41,425 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:45,160 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:46,441 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:51,458 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:55,174 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:06:56,473 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:01,490 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:05,187 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:06,504 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:11,520 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:15,201 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:16,536 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:19,271 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:21,552 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:25,218 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:26,566 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:31,584 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:35,232 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:36,599 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:41,614 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:45,247 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:46,629 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:51,645 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:55,263 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:07:56,660 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:01,677 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:05,278 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:06,692 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:11,709 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:15,292 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:16,724 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:19,288 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:21,740 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:25,307 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:26,755 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:31,790 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:35,322 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:36,803 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:41,817 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:45,337 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:46,830 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:51,847 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:55,351 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:08:56,860 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:01,877 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:05,365 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:06,890 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:11,908 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:15,380 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:16,922 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:19,303 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:21,939 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:25,393 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:26,952 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:31,969 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:35,407 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:36,983 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:41,997 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:45,421 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:47,010 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:52,027 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:55,435 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:57,041 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:09:58,166 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:00,414 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:02,063 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:04,485 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:05,449 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:07,077 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:12,094 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:15,463 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:17,109 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:19,319 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:22,126 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:25,479 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:27,139 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:32,157 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:35,493 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:37,171 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:42,205 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:45,507 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:47,218 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:52,235 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:55,521 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:10:57,248 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:02,265 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:05,535 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:07,278 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:12,295 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:15,549 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:17,308 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:19,332 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:22,324 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:25,563 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:27,338 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:32,356 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:35,578 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:37,369 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:42,385 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:45,593 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:47,398 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:52,415 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:55,607 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:11:57,430 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:02,445 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:05,622 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:07,458 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:12,472 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:15,636 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:17,485 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:19,346 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:22,502 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:25,651 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:27,516 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:32,533 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:35,665 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:37,546 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:42,560 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:45,679 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:47,573 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:52,590 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:55,697 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:12:57,604 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:02,620 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:05,712 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:07,634 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:12,651 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:15,726 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:17,665 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:19,361 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:22,682 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:25,740 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:27,696 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:32,712 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:35,754 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:37,726 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:42,743 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:45,769 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:47,757 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:52,775 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:55,782 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:13:57,788 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:02,805 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:05,796 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:07,819 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:12,836 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:15,810 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:17,849 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:19,375 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:22,866 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:25,825 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:27,880 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:32,898 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:35,840 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:37,923 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:42,937 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:45,855 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:47,951 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:52,968 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:55,869 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:14:57,982 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:02,999 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:05,883 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:08,012 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:13,030 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:15,898 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:18,043 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:19,391 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:23,063 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:25,912 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:28,077 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:33,094 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:35,926 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:38,108 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:43,122 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:45,940 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:48,139 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:53,157 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:55,958 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:15:58,171 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:03,188 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:05,972 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:08,202 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:13,218 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:15,986 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:18,232 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:19,408 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:23,250 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:26,000 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:28,264 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:33,281 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:36,015 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:38,295 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:43,310 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:46,029 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:48,323 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:53,341 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:56,044 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:16:58,355 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:03,371 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:06,058 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:08,385 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:13,399 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:16,073 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:18,414 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:19,423 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:23,432 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:26,088 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:28,446 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:33,463 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:36,103 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:38,477 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:43,492 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:46,117 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:48,506 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:53,524 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:56,132 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:17:58,539 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:03,555 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:06,146 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:08,569 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:13,587 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:16,160 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:18,601 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:19,439 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:23,618 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:26,174 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:28,633 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:33,650 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:36,190 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:38,664 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:43,682 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:46,204 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:48,696 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:53,714 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:56,219 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:18:58,728 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:03,746 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:06,234 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:08,759 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:13,775 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:16,248 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:18,789 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:19,453 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:23,810 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:26,265 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:28,824 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:33,842 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:36,279 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:38,856 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:43,872 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:46,294 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:48,886 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:53,901 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:56,309 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:19:58,916 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:03,934 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:06,324 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:08,950 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:13,965 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:16,339 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:18,979 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:19,468 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:23,992 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:26,353 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:29,026 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:34,043 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:36,367 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:39,058 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:44,074 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:46,381 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:49,088 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:54,105 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:56,397 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:20:59,119 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:04,136 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:06,412 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:09,151 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:14,168 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:16,426 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:19,189 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:19,483 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:24,206 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:26,441 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:29,222 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:34,236 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:36,457 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:39,251 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:44,269 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:46,472 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:49,283 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:54,301 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:56,487 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:21:59,316 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:04,333 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:06,502 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:09,347 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:14,364 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:16,516 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:19,379 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:19,497 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:24,398 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:26,530 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:29,415 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:34,433 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:36,544 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:39,447 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:44,463 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:46,558 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:49,479 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:54,494 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:56,573 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:22:59,509 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:04,526 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:06,588 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:09,541 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:14,558 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:16,603 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:19,515 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:19,571 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:24,590 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:26,620 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:29,605 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:34,622 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:36,634 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:39,637 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:44,655 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:46,648 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:49,670 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:54,687 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:56,664 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:23:59,703 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:04,718 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:06,679 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:09,733 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:14,748 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:16,692 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:19,530 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:19,761 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:24,779 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:26,708 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:29,793 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:34,812 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:36,722 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:39,826 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:44,843 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:46,736 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:24:49,858 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:25:42,238 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-07 18:25:42,249 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-07 18:25:42,374 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-07 18:25:42,806 - INFO     - websockets.server: connection open
2023-04-07 18:25:42,808 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-07 18:27:14,779 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:27:14,900 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:27:19,915 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:27:49,681 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:27:50,104 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:27:54,838 - WARNING  - asyncio: socket.send() raised exception.
2023-04-07 18:27:55,117 - WARNING  - asyncio: socket.send() raised exception.

und heute nach neustart


2023-04-08 07:35:00,722 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-08 07:35:00,734 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-08 07:35:00,900 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-08 07:35:09,758 - INFO     - websockets.server: connection open
2023-04-08 07:35:09,759 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-08 07:35:23,804 - ERROR    - tuya_local_bf68a96ec365177aacaxrv: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 531, in setup_connection
    self._connected_device = await asyncio.wait_for(connect_fct, timeout=15)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/__init__.py", line 206, in connect
    await device.start_socket()
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py", line 917, in start_socket
    raise ex
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py", line 894, in start_socket
    self.reader, self.writer = await asyncio.open_connection(
  File "/usr/lib/python3.9/asyncio/streams.py", line 52, in open_connection
    transport, _ = await loop.create_connection(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
    return await fut
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.0.144', 6668)
2023-04-08 07:35:34,193 - ERROR    - tuya_cloud_bf68a96ec365177aacaxrv: Extra data: line 1 column 2 (char 1)
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya_cloud/tuya_cloud_device.py", line 314, in update_readings_arr
    status["code"], json.loads(status["value"])
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 2 (char 1)
2023-04-08 07:40:01,784 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.643...
2023-04-08 07:40:01,797 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-08 07:40:01,992 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-08 07:40:11,433 - INFO     - websockets.server: connection open
2023-04-08 07:40:11,435 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-08 07:40:26,880 - ERROR    - tuya_cloud_bf68a96ec365177aacaxrv: Extra data: line 1 column 2 (char 1)
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya_cloud/tuya_cloud_device.py", line 314, in update_readings_arr
    status["code"], json.loads(status["value"])
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 2 (char 1)
2023-04-08 07:41:18,267 - WARNING  - asyncio: socket.send() raised exception.
2023-04-08 07:41:18,518 - WARNING  - asyncio: socket.send() raised exception.
2023-04-08 07:41:23,343 - WARNING  - asyncio: socket.send() raised exception.
2023-04-08 07:41:23,532 - WARNING  - asyncio: socket.send() raised exception.
2023-04-08 08:13:43,967 - WARNING  - asyncio: socket.send() raised exception.
2023-04-08 08:13:45,935 - WARNING  - asyncio: socket.send() raised exception.
2023-04-08 08:26:49,751 - WARNING  - tuya_local_bf68a96ec365177aacaxrv: dp_28 in spec but not found locally. This should be reported to TuYa
2023-04-08 08:28:25,068 - ERROR    - fhempy.lib.fhem: FHEM took 6457ms for readingsBeginUpdate($defs{'tuya_local_bfe4369aa3daab28e1r83q'});;
2023-04-08 08:28:25,077 - ERROR    - fhempy.lib.fhem: FHEM took 6324ms for readingsBeginUpdate($defs{'tuya_local_bf50219899eabfb485synp'});;
2023-04-08 08:28:25,084 - ERROR    - fhempy.lib.fhem: FHEM took 6186ms for readingsBeginUpdate($defs{'tuya_local_bfb727311ed41a0cc8ycsq'});;
2023-04-08 08:28:25,093 - ERROR    - fhempy.lib.fhem: FHEM took 5827ms for readingsBeginUpdate($defs{'tuya_local_bffee61d5656c19f0e6zas'});;
2023-04-08 08:34:25,454 - ERROR    - fhempy.lib.fhem: FHEM took 6777ms for readingsBeginUpdate($defs{'tuya_local_bfe4369aa3daab28e1r83q'});;
2023-04-08 08:34:25,459 - ERROR    - fhempy.lib.fhem: FHEM took 6627ms for readingsBeginUpdate($defs{'tuya_local_bf50219899eabfb485synp'});;
2023-04-08 08:34:25,465 - ERROR    - fhempy.lib.fhem: FHEM took 6481ms for readingsBeginUpdate($defs{'tuya_local_bfb727311ed41a0cc8ycsq'});;
2023-04-08 09:39:57,818 - ERROR    - tuya_cloud_bf68a96ec365177aacaxrv: Extra data: line 1 column 2 (char 1)
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya_cloud/tuya_cloud_device.py", line 339, in update_readings_dict
    st_name, json.loads(status_dic[st_name])
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 2 (char 1)
/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py:968: RuntimeWarning: coroutine 'XenonDevice._negotiate_session_key' was never awaited
  if self._negotiate_session_key():
RuntimeWarning: Enable tracemalloc to get the object allocation traceback




Mach bitte
sudo -u fhem bash
pip3 uninstall aiotinytuya

Danach einen fhempy restart. Es wird aiotinytuya dann neu installiert und da sollte der Fix drin sein.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 08 April 2023, 12:43:20
Zitat von: dominik am 08 April 2023, 08:35:54Hallo dominik,

ich hab Fhem neu gestartet, zuvor ein Fhem-Update durchgeführt, damit es sich lohnt.

Nachdem Fhem neu gestartet wurde, lief auch fhem-py wieder.

Was kann die Ursache für das widerspenstige Verhalten von fhem-py verursacht haben?

Viele Grüße Gisbert

Das ist jetzt schwer zu sagen woran es lag. fhempy hat bei dir alle ca. 20s neu gestartet. Eventuell lässt sich im syslog noch was dazu finden? Das Log bringt leider keine Fehlermeldung. Kann es sein, dass es von außen gekillt wurde? Irgendein Monitoring Prozess?

Hallo dominik,

ich halte es für wenig wahrscheinlich, dass der Prozess von außen gestoppt wurde. Ein Monitoring läuft nicht für fhempy (alle Devices, die damit zu tun haben).

Viele Grüße Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 08 April 2023, 12:48:36
Zitat von: Gisbert am 08 April 2023, 12:43:20
Zitat von: dominik am 08 April 2023, 08:35:54Hallo dominik,

ich hab Fhem neu gestartet, zuvor ein Fhem-Update durchgeführt, damit es sich lohnt.

Nachdem Fhem neu gestartet wurde, lief auch fhem-py wieder.

Was kann die Ursache für das widerspenstige Verhalten von fhem-py verursacht haben?

Viele Grüße Gisbert

Das ist jetzt schwer zu sagen woran es lag. fhempy hat bei dir alle ca. 20s neu gestartet. Eventuell lässt sich im syslog noch was dazu finden? Das Log bringt leider keine Fehlermeldung. Kann es sein, dass es von außen gekillt wurde? Irgendein Monitoring Prozess?

Hallo dominik,

ich halte es für wenig wahrscheinlich, dass der Prozess von außen gestoppt wurde. Ein Monitoring läuft nicht für fhempy (alle Devices, die damit zu tun haben).

Viele Grüße Gisbert
Ok, sollte es nochmals auftreten, dann bitte fhempy, fhem und syslog Log posten. Dann sollte sich hoffentlich was finden lassen.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 10 April 2023, 05:34:25
Hallo dominik,

der gleiche Fehler ist wieder aufgetreten
log-file:
2023.04.10 00:17:16.293 3:  fhempyserver_15733: starting
2023.04.10 00:17:16.357 3:  fhempyserver_15733: using logfile: ./log/fhempy-2023-04-10.log
2023.04.10 00:17:18.432 3:  fhempyserver_15733: read: end of file reached while sysread
2023.04.10 00:17:18.435 3:  fhempyserver_15733: stopped
2023.04.10 00:17:18.483 3:  fhempyserver_15733: starting
2023.04.10 00:17:18.547 2:  Deleting fhempy-2023-03-30.log
2023.04.10 00:17:18.548 3:  fhempyserver_15733: using logfile: ./log/fhempy-2023-04-10.log
2023.04.10 00:18:48.218 0:  Server shutdown
2023.04.10 00:18:48.256 1:  Shutdown executed

fhempy-logfile:
2023-04-10 00:17:17,916 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.644...
2023-04-10 00:17:17,923 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-10 00:17:17,972 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-10 00:17:20,227 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.644...
2023-04-10 00:17:20,234 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-10 00:17:20,282 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-10 00:19:17,057 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.644...
2023-04-10 00:19:17,064 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-10 00:19:17,116 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-10 00:19:26,524 - INFO     - websockets.server: connection open
2023-04-10 00:19:26,526 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1

syslog:
HPT610FHEM@HPT610:~$ sudo cat /var/log/messages fhem
Apr  9 00:10:11 HPT610 rsyslogd: [origin software="rsyslogd" swVersion="8.2102.0" x-pid="525" x-info="https:
//www.rsyslog.com"] rsyslogd was HUPed
Apr  9 21:40:28 HPT610 kernel: [130354.105646] Attempt to set a LOCK_MAND lock via flock(2). This support ha
s been removed and the request ignored.
cat: fhem: No such file or directory

Viele Grüße Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 10 April 2023, 15:01:51
Mach bitte folgendes
FHEM
set fhempyserver_15733 stop

Console
sudo -u fhem bash
cd /opt/fhem
FHEM/bindings/python/bin/fhempy --local

Danach kommt der gleiche Output wie im Log, es sollte aber hoffentlich auch ein Fehler ersichtlich sein, warum es neu startet.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: McShire am 10 April 2023, 22:51:17
Hallo Dominik und hallo alle, die Probleme mit passiven Sensoren etc haben, z.B. Mattias,

Ich habe einen Temperatur- und Feuchtesensor von Tuya und betreibe ihn jetzt local.
Vorher fehlten immer die Readings mit den Daten, die der Sensor ausgibt.
Dabei war die Vorgehensweise immer nach Anleitung und dann warten auf das Sensorsignal, damit die Readings vervollständigt wurden.

Ich war jetzt wieder vor Ort und habe mich damit ausführlich beschäftigt.
Der Sensor hat jetzt die richtigen Daten in den Readings und liefert auch immer aktuelle Daten.

Ich empfehle folgende Vorgehensweise:
Am Sensor ist ein reset bzw setup Knopfschalter. Diesen länger als 5s gedrückt halten, dann wird das Device zurückgesetzt.
Gleichzeitig kommt bei mir die Frage in der Smartphone App: Device entfernen. Dieses bejahen.
Anschließend das Device in der App, in der Tuya Development Platform und in FHEM löschen, falls noch irgendwo vorhanden.
In FHEM auch das cloud Device, falls vorhanden. Es sollten in keinem Eintrag irgendwo noch aus den bisherigen Versuchen
irgendwelche Daten oder Einstellungen zu dem device gespeichert sein, die dann beim Neuanlegen übernommen werden.

Danach das device in der App und der Development platform neu hinzufügen.
Dann set tuya_system scan_devices ausführen.
   Im state wird angezeigt: found x devices, start local scan...
                                  x = Anzahl devices in der dev platform
jetzt den reset/setup knopf für 1-2 Sekunden drücken (keine 5 s!),
   damit sendet das device ein Signal, das vom Scan erfaßt wird
   im state wird jetzt angezeigt: x devices found localy
                                  x ist die Anzahl der devices, die online sind.
Jetzt prüfen, ob x der Anzahl der online devices einschließlich dem
   neuen Sensor entspricht, dann wurde der Sensor erfaßt. Beachte, sind
   weitere passive devices im Einsatz, dann sind diese i.a offline und
   nicht in x enthalten
Falls x kleiner ist wurde der Sensor nicht erfaßt, den scan und Knopf drücken
   wiederholen.
Ist x ok, dann set tuya_system create_device nnnnnnnn ausführen,
   nnnnnnn ist das neue device, aus dem pull-up auswählen.
das neue device öffnen und prüfen, ob in der Def die ip eingetragen ist und
   nicht "offline". Dann ist alles ok und bei mir hat es dann funktioniert.

Wenn offline eingetragen ist, hilft auch das Eintragen der ip nicht. Es muss
   einschließlich Löschen alles wiederholt werden, da sonst das device
   nicht neu angelegt wird.

Vielleicht funktioniert das bei Euch auch. Viel Erfolg damit
Werner

Titel: Aw: fhempy: tuya (lokal)
Beitrag von: SouzA am 13 April 2023, 12:21:43
Zitat von: dominik am 05 April 2023, 22:04:52
Zitat von: SouzA am 22 März 2023, 09:42:13Hallo liebe Leute,

habe hier nun endlich den ECO-DIM.07 WIFI integriert bekommen.
Der lässt sich laut Standardkonfig mit bright_value_1 von 0 bis 1000 dimmen.
Kriegt man es irgendwie hin, dass
1. man die Prozent also "pct" einstellen kann
und
2. es wirklich Prozent von 0 bis 100 sind?

Thx für eine kurze Rückmeldung.

Bis denn
SouzA

EDIT:
Der Grund für die Frage ist der, dass das Device zwar vom gassistant erkannt wird und on/off funktioniert. Dimmen halt nur nicht...
Das kann ich leider nicht so einfach anpassen. Diese Ranges werden von Tuya vorgegeben und ich versuche daran nichts zu ändern, damit das Modul einfach sehr generisch bleibt.
Versuch mal folgendes im homebridgeMapping
{
  "Brightness": {
    "cmd": "bright_value_1",
    "reading": "bright_value_1",
    "max": 1000,
    "maxValue": 100
  }
}


Danke Dominik,
das hat geklappt.
Jetzt funktioniert der Dimmer einwandfrei!

Thx und bis denn
SouzA
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 13 April 2023, 18:17:38
Hallo zusammen,
nach dem ich mich aufraffen konnte und fhempy installiert habe wollte ich nun meine vier Tuya Geräte einbinden.

"fhem_local" und "fhempyserver_15733" sind als Grün markiert.
"tuya_system" zeigt "ready" an.

Aber irgendwie stehe ich auf den Schlauch.
Autocreate ist an.
Wo tauchen denn gefundene Geräte auf? Und wie lange dauert eine Tasse Kaffee :)?

Unter https://github.com/fhempy/fhempy/blob/master/FHEM/bindings/python/fhempy/lib/tuya/README.md (https://github.com/fhempy/fhempy/blob/master/FHEM/bindings/python/fhempy/lib/tuya/README.md)
steht
Zitatdefine tuya_system fhempy tuya setup API_KEY API_SECRET DEVICE_ID

In der Tuya-IOT finde ich nirgend etwas von "API-KEY" oder "API_SECRET".

Ist hier
ZitatIndustry : Smart Home

Data Center : Central Europe Data Center

Authorization Key

Access ID/Client ID: s7rxxxxxxxxxxxx > API_KEY
Access Secret/Client Secret: 282xxxxxxxxxxxxxxxxxxxxxxxxxxx > API_SECRET
Project Code: p16xxxxxxxxxxxxxxxxxxx
gemeint?

Ich habe hier
Zitatdefmod tuya_system fhempy tuya setup s7rxxxxxxxxxxxx 282xxxxxxxxxxxxxxxxxxxxxxxxxxx 1323440510521cfbab65
eingegeben. Die Device-ID ist aus der Übersicht bei Tuya-IOT.

Im GIT heisst es auch noch:
Zitatset tuya_system start_scan
Die Option "start_scan" gibt es nicht.
Nur "scan_device" :)

Vielleicht liegt es auch an Corona von 2022  ::)

Wer kann mir über die Strasse helfen?

Gruss Gerd
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: thburkhart am 13 April 2023, 21:49:33
Hallo Dominik,

eben stelle ich fest, dass wohl seit 7.4.23 meine Stecker SP xx nicht mehr aktualisiert werden. Dies aus heiterem Himmel.

fhempy-log:

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 531, in setup_connection
    self._connected_device = await asyncio.wait_for(connect_fct, timeout=15)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
2023-04-13 21:39:38,879 - ERROR    - TUYA_JL22: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/__init__.py", line 206, in connect
    await device.start_socket()
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py", line 894, in start_socket
    self.reader, self.writer = await asyncio.open_connection(
  File "/usr/lib/python3.9/asyncio/streams.py", line 52, in open_connection
    transport, _ = await loop.create_connection(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
    return await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
    fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 531, in setup_connection
    self._connected_device = await asyncio.wait_for(connect_fct, timeout=15)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
2023-04-13 21:39:38,880 - ERROR    - TUYA_JL32: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/__init__.py", line 206, in connect
    await device.start_socket()
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py", line 894, in start_socket
    self.reader, self.writer = await asyncio.open_connection(
  File "/usr/lib/python3.9/asyncio/streams.py", line 52, in open_connection
    transport, _ = await loop.create_connection(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
    return await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
    fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 531, in setup_connection
    self._connected_device = await asyncio.wait_for(connect_fct, timeout=15)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
2023-04-13 21:39:38,914 - ERROR    - TUYA_STF03: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/__init__.py", line 206, in connect
    await device.start_socket()
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py", line 894, in start_socket
    self.reader, self.writer = await asyncio.open_connection(
  File "/usr/lib/python3.9/asyncio/streams.py", line 52, in open_connection
    transport, _ = await loop.create_connection(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
    return await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
    fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 531, in setup_connection
    self._connected_device = await asyncio.wait_for(connect_fct, timeout=15)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
2023-04-13 21:40:01,180 - ERROR    - fhempy.lib.fhem: FHEM took 5916ms for readingsEndUpdate($defs{'TUYA_Temp01'},1);;
2023-04-13 21:40:01,345 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for readingsBulkUpdate($defs{'TUYAC_SensorT01'},'uuid','60381718500291bade80');;
2023-04-13 21:40:01,347 - ERROR    - fhempy.lib.fhem: FHEM took 6076ms for readingsBulkUpdate($defs{'TUYA_Temp02'},'uuid','6dd6a80de96b319f');;
2023-04-13 21:40:01,348 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for readingsBulkUpdate($defs{'TUYAC_Camera3'},'uuid','jdwsb2635b381294a0df');;
2023-04-13 21:40:01,350 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for readingsBulkUpdate($defs{'TUYA_BULB03'},'wakeup_mode','AAA=');;
2023-04-13 21:40:01,352 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for readingsBulkUpdate($defs{'tuya_cloud_4530056170039f4a87e5'},'countdown_1','0.0');;
2023-04-13 21:40:01,353 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for readingsBulkUpdate($defs{'TUYAC_SensorW03'},'update_time','1635130148');;
2023-04-13 21:40:01,355 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_JL26', 'dp_06', '')
2023-04-13 21:40:01,357 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_JL21', 'dp_06', '')
2023-04-13 21:40:01,358 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_SP02', 'dp_20', '')
2023-04-13 21:40:01,360 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_JL18', 'dp_06', '')
2023-04-13 21:40:01,361 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_JL20', 'dp_06', '')
2023-04-13 21:40:01,363 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_SP01', 'dp_20', '')
2023-04-13 21:40:01,364 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_SP05', 'dp_20', '')
2023-04-13 21:40:01,366 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_PS5', 'dp_104', '')
2023-04-13 21:40:01,367 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_SP07', 'dp_20', '')
2023-04-13 21:40:01,369 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_SP11', 'dp_21', '')
2023-04-13 21:40:01,371 - ERROR    - fhempy.lib.fhem: FHEM took 6054ms for readingsBeginUpdate($defs{'TUYAC_SensorT04'});;
2023-04-13 21:40:01,372 - ERROR    - fhempy.lib.fhem: FHEM took 6035ms for readingsBeginUpdate($defs{'TUYA_SCHFF4'});;
2023-04-13 21:40:01,374 - ERROR    - fhempy.lib.fhem: FHEM took 5999ms for readingsBeginUpdate($defs{'TUYAC_Camera1'});;
2023-04-13 21:40:01,377 - ERROR    - fhempy.lib.fhem: FHEM took 5104ms for foreach my $fhem_dev (sort keys %main::defs) {  return 1 if(defined($main::defs{$fhem_dev}{FHEMPYTYPE}) && $main::defs{$fhem_dev}{FHEMPYTYPE} eq 'tuya_cloud' && defined($main::defs{$fhem_dev}{DEVICEID}) && $main::defs{$fhem_dev}{DEVICEID} eq '045074212cf432ca0721');;}return 0;;
2023-04-13 21:40:02,471 - ERROR    - fhempy.lib.fhem: FHEM took 6022ms for readingsEndUpdate($defs{'TUYA_Temp10'},1);;
2023-04-13 21:40:02,698 - ERROR    - fhempy.lib.fhem: FHEM took 5157ms for AttrVal('TUYA_BULB02', 'dp_23', '')
2023-04-13 21:40:02,699 - ERROR    - fhempy.lib.fhem: FHEM took 5158ms for readingsBulkUpdate($defs{'TUYA_Temp06'},'uuid','a4c138739dae10fb');;
2023-04-13 21:40:02,701 - ERROR    - fhempy.lib.fhem: FHEM took 5158ms for AttrVal('TUYA_BULB01', 'dp_23', '')
2023-04-13 21:40:02,702 - ERROR    - fhempy.lib.fhem: FHEM took 5158ms for readingsBeginUpdate($defs{'TUYA_JL07'});;
2023-04-13 21:40:02,704 - ERROR    - fhempy.lib.fhem: FHEM took 5157ms for readingsBeginUpdate($defs{'TUYA_JL04'});;
2023-04-13 21:40:02,706 - ERROR    - fhempy.lib.fhem: FHEM took 5158ms for readingsBeginUpdate($defs{'TUYA_JL08'});;
2023-04-13 21:40:02,707 - ERROR    - fhempy.lib.fhem: FHEM took 5159ms for AttrVal('TUYA_JL24', 'dp_06', '')
2023-04-13 21:40:02,709 - ERROR    - fhempy.lib.fhem: FHEM took 5161ms for readingsBeginUpdate($defs{'TUYA_JL02'});;
2023-04-13 21:40:02,711 - ERROR    - fhempy.lib.fhem: FHEM took 5162ms for AttrVal('TUYA_JL27', 'dp_04', '')
2023-04-13 21:40:02,712 - ERROR    - fhempy.lib.fhem: FHEM took 5163ms for readingsBeginUpdate($defs{'TUYA_JL03'});;
2023-04-13 21:40:02,714 - ERROR    - fhempy.lib.fhem: FHEM took 5164ms for AttrVal('TUYA_JL35', 'dp_06', '')
2023-04-13 21:40:02,715 - ERROR    - fhempy.lib.fhem: FHEM took 5165ms for AttrVal('TUYA_JL36', 'dp_06', '')
2023-04-13 21:40:02,717 - ERROR    - fhempy.lib.fhem: FHEM took 5166ms for AttrVal('TUYA_JL33', 'dp_06', '')
2023-04-13 21:40:02,719 - ERROR    - fhempy.lib.fhem: FHEM took 5167ms for AttrVal('TUYA_JL28', 'dp_06', '')
2023-04-13 21:40:02,723 - ERROR    - fhempy.lib.fhem: FHEM took 5171ms for AttrVal('TUYA_JL34', 'dp_06', '')
2023-04-13 21:40:02,724 - ERROR    - fhempy.lib.fhem: FHEM took 5171ms for readingsBulkUpdate($defs{'TUYAC_SensorW04'},'state','normal');;
2023-04-13 21:40:02,725 - ERROR    - fhempy.lib.fhem: FHEM took 5171ms for AttrVal('TUYA_SP06', 'dp_20', '')
2023-04-13 21:40:02,727 - ERROR    - fhempy.lib.fhem: FHEM took 5172ms for AttrVal('TUYA_SP12', 'dp_20', '')
2023-04-13 21:40:02,727 - ERROR    - fhempy.lib.fhem: FHEM took 5172ms for AttrVal('TUYA_JL15', 'dp_01', '')
2023-04-13 21:40:02,729 - ERROR    - fhempy.lib.fhem: FHEM took 5173ms for AttrVal('TUYA_SP13', 'dp_20', '')
2023-04-13 21:40:02,730 - ERROR    - fhempy.lib.fhem: FHEM took 5174ms for AttrVal('TUYA_SP15', 'dp_20', '')
2023-04-13 21:40:02,732 - ERROR    - fhempy.lib.fhem: FHEM took 5161ms for readingsBeginUpdate($defs{'tuya_cloud_104380002462ab30258d'});;
2023-04-13 21:40:13,975 - ERROR    - fhempy.lib.fhem: FHEM took 5409ms for AttrVal('TUYA_PS5', 'dp_04', '')
2023-04-13 21:40:14,429 - ERROR    - fhempy.lib.fhem: FHEM took 5860ms for readingsEndUpdate($defs{'TUYA_SP01'},1);;
2023-04-13 21:40:14,648 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for readingsEndUpdate($defs{'TUYA_SP05'},1);;
2023-04-13 21:40:14,650 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_SP11', 'dp_09', '')
2023-04-13 21:40:14,651 - ERROR    - fhempy.lib.fhem: FHEM took 6079ms for readingsBulkUpdate($defs{'TUYAC_Camera4'},'basic_osd','on');;
2023-04-13 21:40:14,865 - ERROR    - fhempy.lib.fhem: FHEM took 6291ms for readingsEndUpdate($defs{'TUYA_SP07'},1);;
2023-04-13 21:40:15,035 - ERROR    - fhempy.lib.fhem: FHEM took 6460ms for readingsBulkUpdate($defs{'TUYAC_Camera1'},'sd_storge','121882|7340|114542');;
2023-04-13 21:40:15,037 - ERROR    - fhempy.lib.fhem: FHEM took 5958ms for AttrVal('TUYA_BULB02', 'dp_22', '')
2023-04-13 21:40:15,254 - ERROR    - fhempy.lib.fhem: FHEM took 6174ms for readingsEndUpdate($defs{'TUYA_SP10'},1);;
2023-04-13 21:40:15,299 - ERROR    - fhempy.lib.fhem: FHEM took 6216ms for readingsBulkUpdate($defs{'TUYAC_Sir03'},'AlarmPeriod','15.0');;
2023-04-13 21:40:15,313 - ERROR    - fhempy.lib.fhem: FHEM took 6229ms for readingsEndUpdate($defs{'TUYAC_SensorW03'},1);;
2023-04-13 21:40:15,470 - ERROR    - fhempy.lib.fhem: FHEM took 6384ms for readingsEndUpdate($defs{'TUYA_Temp06'},1);;
2023-04-13 21:40:15,537 - ERROR    - fhempy.lib.fhem: FHEM took 6450ms for AttrVal('TUYA_BULB01', 'dp_22', '')
2023-04-13 21:40:15,759 - ERROR    - fhempy.lib.fhem: FHEM took 6670ms for readingsEndUpdate($defs{'TUYA_JL24'},1);;
2023-04-13 21:40:15,981 - ERROR    - fhempy.lib.fhem: FHEM took 6841ms for readingsEndUpdate($defs{'TUYA_JL35'},1);;
2023-04-13 21:40:16,203 - ERROR    - fhempy.lib.fhem: FHEM took 7063ms for readingsEndUpdate($defs{'TUYA_JL36'},1);;
2023-04-13 21:40:16,424 - ERROR    - fhempy.lib.fhem: FHEM took 7284ms for readingsEndUpdate($defs{'TUYA_JL33'},1);;
2023-04-13 21:40:19,083 - ERROR    - fhempy.lib.fhem: FHEM took 9942ms for readingsEndUpdate($defs{'TUYA_JL28'},1);;
2023-04-13 21:40:19,305 - ERROR    - fhempy.lib.fhem: FHEM took 10004ms for readingsEndUpdate($defs{'TUYA_JL34'},1);;
2023-04-13 21:40:23,934 - ERROR    - fhempy.lib.fhem: FHEM took 14632ms for readingsEndUpdate($defs{'TUYA_SP06'},1);;
2023-04-13 21:40:24,151 - ERROR    - fhempy.lib.fhem: FHEM took 14849ms for readingsEndUpdate($defs{'TUYA_SP12'},1);;
2023-04-13 21:40:24,368 - ERROR    - fhempy.lib.fhem: FHEM took 15065ms for readingsEndUpdate($defs{'TUYA_SP13'},1);;
2023-04-13 21:40:24,583 - ERROR    - fhempy.lib.fhem: FHEM took 15279ms for readingsEndUpdate($defs{'TUYA_SP15'},1);;
2023-04-13 21:42:06,228 - ERROR    - root: TUYA_JL15: readingsBeginUpdate couldn't acquire lock, caused by readingsBeginUpdate without End or Single update inbetween
2023-04-13 21:42:06,494 - ERROR    - fhempy.lib.fhem: FHEM took 117189ms for readingsEndUpdate($defs{'tuya_cloud_104380002462ab30258d'},1);;
2023-04-13 21:42:06,496 - ERROR    - fhempy.lib.fhem: FHEM took 117190ms for readingsBulkUpdate($defs{'TUYA_JL25'},'cur_voltage','230.4');;
2023-04-13 21:42:06,497 - ERROR    - fhempy.lib.fhem: FHEM took 117190ms for AttrVal('TUYA_PS3', 'dp_04', '')
2023-04-13 21:42:06,718 - ERROR    - fhempy.lib.fhem: FHEM took 117411ms for readingsEndUpdate($defs{'TUYA_SP04'},1);;
2023-04-13 21:42:06,759 - ERROR    - fhempy.lib.fhem: FHEM took 117451ms for AttrVal('TUYA_PS7', 'dp_02', '')
2023-04-13 21:42:06,759 - ERROR    - fhempy.lib.fhem: FHEM took 117450ms for readingsBulkUpdateIfChanged($defs{'TUYA_JL15'},'cur_current','0.0');;
2023-04-13 21:42:06,760 - ERROR    - fhempy.lib.fhem: FHEM took 117450ms for AttrVal('TUYA_SP16', 'dp_09', '')
2023-04-13 21:42:06,945 - ERROR    - fhempy.lib.fhem: FHEM took 117635ms for readingsEndUpdate($defs{'TUYA_SP09'},1);;
2023-04-13 21:42:06,989 - ERROR    - fhempy.lib.fhem: FHEM took 117679ms for readingsEndUpdate($defs{'tuya_cloud_bfe074c7ede8a9ad830m5q'},1);;
2023-04-13 21:42:06,990 - ERROR    - fhempy.lib.fhem: FHEM took 116897ms for foreach my $fhem_dev (sort keys %main::defs) {  return 1 if(defined($main::defs{$fhem_dev}{FHEMPYTYPE}) && $main::defs{$fhem_dev}{FHEMPYTYPE} eq 'tuya_cloud' && defined($main::defs{$fhem_dev}{DEVICEID}) && $main::defs{$fhem_dev}{DEVICEID} eq '2053863070039f16cebe');;}return 0;;
2023-04-13 21:42:06,990 - ERROR    - fhempy.lib.fhem: FHEM took 116639ms for readingsBulkUpdateIfChanged($defs{'TUYA_JL27'},'state','on');;
2023-04-13 21:42:06,991 - ERROR    - fhempy.lib.fhem: FHEM took 116442ms for readingsBulkUpdate($defs{'TUYAC_Camera3'},'sd_format','on');;
2023-04-13 21:42:06,992 - ERROR    - fhempy.lib.fhem: FHEM took 114130ms for readingsBeginUpdate($defs{'TUYA_SP16'});;
2023-04-13 21:42:06,994 - ERROR    - fhempy.lib.fhem: FHEM took 113022ms for readingsBeginUpdate($defs{'TUYA_Temp02'});;
2023-04-13 21:42:06,995 - ERROR    - fhempy.lib.fhem: FHEM took 113019ms for AttrVal('TUYA_PS5', 'dp_101', '')
2023-04-13 21:42:06,996 - ERROR    - fhempy.lib.fhem: FHEM took 112345ms for AttrVal('TUYA_SP11', 'dp_17', '')
2023-04-13 21:42:06,997 - ERROR    - fhempy.lib.fhem: FHEM took 112345ms for readingsBulkUpdate($defs{'TUYAC_Camera4'},'motion_sensitivity','1');;
2023-04-13 21:42:06,998 - ERROR    - fhempy.lib.fhem: FHEM took 111962ms for readingsBulkUpdate($defs{'TUYAC_Camera1'},'sd_status','0.1');;
2023-04-13 21:42:06,999 - ERROR    - fhempy.lib.fhem: FHEM took 111961ms for AttrVal('TUYA_BULB02', 'dp_23', '')
2023-04-13 21:42:07,000 - ERROR    - fhempy.lib.fhem: FHEM took 111700ms for readingsBulkUpdate($defs{'TUYAC_Sir03'},'AlarmSwitch','off');;
2023-04-13 21:42:07,001 - ERROR    - fhempy.lib.fhem: FHEM took 111464ms for AttrVal('TUYA_BULB01', 'dp_23', '')
2023-04-13 21:42:07,002 - ERROR    - fhempy.lib.fhem: FHEM took 108167ms for readingsBeginUpdate($defs{'TUYA_Temp06'});;
2023-04-13 21:42:07,003 - ERROR    - fhempy.lib.fhem: FHEM took 103293ms for readingsBeginUpdate($defs{'TUYA_SP11'});;
2023-04-13 21:42:07,004 - ERROR    - fhempy.lib.fhem: FHEM took 103267ms for readingsBeginUpdate($defs{'TUYA_SCHF2'});;
2023-04-13 21:42:08,416 - ERROR    - root: TUYA_JL15: readingsBulkUpdateIfChanged without readingsBeginUpdate: readingsBulkUpdateIfChanged($defs{'TUYA_JL15'},'cur_voltage','229.4');;
2023-04-13 21:42:08,416 - ERROR    - root: TUYA_JL15: readingsBulkUpdateIfChanged without readingsBeginUpdate: readingsBulkUpdateIfChanged($defs{'TUYA_JL15'},'online','1');;
2023-04-13 21:42:08,449 - ERROR    - TUYA_JL15: Exception raised by task: <Task finished name='Task-10240' coro=<FhemModule._run_coro() done, defined at /opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py:216> exception=RuntimeError('Lock is not acquired.')>
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 224, in _handle_task_result
    task.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 218, in _run_coro
    await coro
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 409, in async_status_updated
    await self.update_readings(status)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 724, in update_readings
    await fhem.readingsEndUpdate(self.hash, 1)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem.py", line 180, in readingsEndUpdate
    update_locks[hash["NAME"]].release()
  File "/usr/lib/python3.9/asyncio/locks.py", line 146, in release
    raise RuntimeError('Lock is not acquired.')
RuntimeError: Lock is not acquired.
2023-04-13 21:43:00,664 - ERROR    - asyncio: Task was destroyed but it is pending!
task: <Task pending name='Task-4427' coro=<main() running at /opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/__init__.py:166> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xb1887cd0>()]>>
2023-04-13 21:43:09,032 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:09,715 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:14,727 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:19,045 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:19,739 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:23,802 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:24,751 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:29,057 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:29,764 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:34,775 - WARNING  - asyncio: socket.send() raised exception.

fhem-log:

2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP01, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP02, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 1.3, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP03, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 28.2, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP04, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP05, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP06, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP07, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 5.2, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP08, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP09, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP10, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 50.1, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP11, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 5.5, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP12, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 16.9, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP13, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 51.1, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP14, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 6.6, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP15, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 7.5, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP16, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 7.6, Unit:
2023.04.13 21:34:25 5: redefine at command DbLog_addlog_TUYA_SP_cur_power as +*00:10:00 set dblog_THB addLog TUYA_SP.*:cur_power
2023.04.13 21:34:25 5: exec at command DbLog_addlog_TUYA_JL_cur_power
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL02, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 2: DbLog dblog_THB - Device: "TUYA_JL03", reading: ".*" excluded by attribute DbLogExclude from addLog !
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL04, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 19.4, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL05, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL06, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL07, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL08, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 2: DbLog dblog_THB - addLog WARNING - Device: 'TUYA_JL09' -> new Reading 'cur_power' has no value - can't add it !
2023.04.13 21:34:25 2: DbLog dblog_THB - addLog WARNING - Device: 'TUYA_JL10Z' -> new Reading 'cur_power' has no value - can't add it !
2023.04.13 21:34:25 2: DbLog dblog_THB - addLog WARNING - Device: 'TUYA_JL11Z' -> new Reading 'cur_power' has no value - can't add it !
2023.04.13 21:34:25 2: DbLog dblog_THB - addLog WARNING - Device: 'TUYA_JL12Z' -> new Reading 'cur_power' has no value - can't add it !
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL13, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL14, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 56.9, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL15, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL18, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL19, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL20, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL21, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL22, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 10.1, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL24, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL25, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL26, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL27, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL28, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL29, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL30, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL31, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 9.7, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL32, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 9.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL33, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL34, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL35, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL36, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 5: redefine at command DbLog_addlog_TUYA_JL_cur_power as +*00:10:00 set dblog_THB addLog TUYA_JL.*:cur_power
2023.04.13 21:34:25 5: exec at command DbLog_addlog_TUYA_TEMP_va_temperature
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp01, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 21.5, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp02, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 19.6, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp03, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 22.1, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp04, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 7.8, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp05, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 8.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp06, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 21.2, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp07, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 20.6, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp08, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 10.6, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp09, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 7.4, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp10, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 7.6, Unit:
2023.04.13 21:34:25 5: redefine at command DbLog_addlog_TUYA_TEMP_va_temperature as +*00:10:00 set dblog_THB addLog TUYA_Temp.*:va_temperature
2023.04.13 21:36:42 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/10_BindingsIo.pm line 558.
2023.04.13 21:37:58 2: DbLog dblog_THB - Wait for last database cycle due to shutdown ...
2023.04.13 21:37:58 1: Server shutdown delayed due to dblog_THB,alexa for max 10 sec
2023.04.13 21:37:59 2: DbLog dblog_THB - Last database write cycle done
2023.04.13 21:38:01 3: alexa: read: end of file reached while sysread
2023.04.13 21:38:01 3: alexa: stopped
2023.04.13 21:38:01 0: Server shutdown
2023.04.13 21:38:01 2: DbLog dblog_THB - stopping SubProcess PID >20544< ...
2023.04.13 21:38:01 2: DbLog dblog_THB - SubProcess PID >20544< stopped
2023.04.13 21:38:04 1: Including fhem.cfg
2023.04.13 21:38:05 2: DbLog dblog_THB - Subprocess >22274< initialized ... ready for non-blocking operation
2023.04.13 21:38:06 3: telnetPort: port 7072 opened
2023.04.13 21:38:06 3: WEB: port 8083 opened
2023.04.13 21:38:06 3: WEBphone: port 8084 opened
2023.04.13 21:38:06 3: WEBtablet: port 8085 opened
2023.04.13 21:38:06 3: TelegramBot_Define TelegramBotTHB: called
2023.04.13 21:38:07 3: BindingsIo v1.0.1
2023.04.13 21:38:07 3: fhempyServer v1.0.0
2023.04.13 21:38:07 3: fhempy v1.0.0 (tuya_cloud: TUYA)
2023.04.13 21:38:07 3: fhempy v1.0.0 (tuya: tuya_system)
2023.04.13 21:38:07 3: Opening CUL_0 device /dev/ttyACM0
2023.04.13 21:38:07 3: Setting CUL_0 serial parameters to 9600,8,N,1
2023.04.13 21:38:07 3: CUL_0: Possible commands: BbCFiAZNkGMKUYRTVWXefmLltux
2023.04.13 21:38:07 3: CUL_0 device opened
2023.04.13 21:38:07 2: Switched CUL_0 rfmode to MAX
2023.04.13 21:38:07 3: Opening JLLaCR device /dev/ttyUSB0
2023.04.13 21:38:07 3: Setting JLLaCR serial parameters to 57600,8,N,1
2023.04.13 21:38:08 3: JLLaCR device opened
2023.04.13 21:38:08 1: PERL WARNING: Use of uninitialized value in numeric ge (>=) at ./FHEM/12_OilFox.pm line 387, <$fh> line 553.
2023.04.13 21:38:08 2: LOGIN TOKEN MISSING OR EXPIRED
2023.04.13 21:38:08 3: myOilFox - email set to bkt@gmx.net
2023.04.13 21:38:08 3: myOilFox - set interval: 36000
2023.04.13 21:38:08 3: myOilFox - password set to thbbkt25
2023.04.13 21:38:08 3: powerfox: Defined with URL https://bkt%40gmx.net:thbbkt25@backend.powerfox.energy/api/2.0/my/246f283cfeac/current and interval 60 featurelevel 6.2
2023.04.13 21:38:24 2: eventTypes: loaded 18314 lines from ./log/eventTypes.txt
2023.04.13 21:38:24 3: TX29_00: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_01: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_02: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_03: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_04: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_05: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_06: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_07: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_08: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_09: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_10: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_11: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_12: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX25IT_13: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_14: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_15: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_16: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_17: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_18: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_19: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_20: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_21: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_22: I/O device is JLLaCR
2023.04.13 21:38:24 3: HUEDevice2: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice4: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice5: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice6: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice7: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice8: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice10: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice17: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice18: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice19: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice20: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice22: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice23: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice24: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice25: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice27: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice28: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice29: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice30: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice31: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice32: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice33: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice38: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice39: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice40: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice41: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup0: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup1: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup2: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup3: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup4: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup5: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup6: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup7: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup8: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup9: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup10: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup11: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup12: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup13: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup14: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup15: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup16: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup17: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup18: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup19: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup20: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup21: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup22: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup23: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup24: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup25: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup26: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup27: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup28: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup29: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup30: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice44: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup31: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor6: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor8: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor10: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor13: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor24: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor27: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor34: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor37: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor45: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice45: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice46: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice47: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice48: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice49: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice50: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice51: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor91: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor110: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor1: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice52: I/O device is hueBridge1
2023.04.13 21:38:24 1: MaxTemp: WT
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_BULB01)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_BULB02)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYA_BULB03)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera1)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera2)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera3)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera4)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera5)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera6)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_DIY1)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_DIY3)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_DIY4)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_EMYLO1)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_EMYLO2)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_EMYLOD2)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_EMYLO3)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_EMYLO4)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL02)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL03)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL04)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL05)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL06)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL07)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL08)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL09)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL10Z)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL11Z)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL12Z)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL13)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL14)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL15)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL18)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYA_JL19)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL20)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL21)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL22)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL24)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYA_JL25)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL26)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL27)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL28)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL29)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL30)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL31)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL32)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL33)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL34)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL35)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL36)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_PS1)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_PS3)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_PS4)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_PS5)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_PS7)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SCHF1)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SCHF2)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SCHF3)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYA_SCHFF4)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP01)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP02)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP03)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP04)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP05)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP06)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP07)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP08)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP09)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP10)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP11)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP12)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP13)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP14)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP15)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP16)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_PIR01)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_PIR02)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_PIR03)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT01)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT02)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT03)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT04)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT05)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorW01)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorW02)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorW03)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorW04)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Sir01)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Sir02)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Sir03)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Relais01)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorSmoke01)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya: TUYA_STF01)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya: TUYA_STF02)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya: TUYA_STF03)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_STF04)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya: TUYA_MMG)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp01)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp02)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp03)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp05)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp06)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp04)
2023.04.13 21:38:26 1: PERL WARNING: Useless use of anonymous hash ({}) in void context at (eval 125) line 1, <$fh> line 6354.
2023.04.13 21:38:26 3: SST (SamsungSmartThingsConnector): define - CONNECTOR defined as SamsungSmartThingsConnector
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_5062137624a1600b6d62)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_4530056170039f4a87e5)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_104380002462ab30258d)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp07)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_bfc65f1f693ce027f5avyd)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_bf95f50f98d37da7235vba)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_bfe6fb5a31840d5ca3dce6)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_bf8430ea7591b4d534d4dp)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp09)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp08)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp10)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_bf90689f7512fabbd0lonv)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_bf99dd6c52e2de4e07ckuw)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_bfe074c7ede8a9ad830m5q)
2023.04.13 21:38:26 1: Including ./log/fhem.save
2023.04.13 21:38:35 1: Messages collected while initializing FHEM:SecurityCheck:
  WEBphone is not password protected
  WEB is not password protected
  telnetPort is not password protected
  WEBtablet is not password protected

Protect this FHEM installation by defining an allowed device with define allowed allowed
You can disable this message with attr global motd none

2023.04.13 21:38:36 2: alexa: starting alexa-fhem: /usr/local/bin/alexa-fhem -c ./alexa-fhem.cfg
2023.04.13 21:38:36 3: alexa: starting
2023.04.13 21:38:36 3: alexa: using logfile: ./log/alexa-2023-04-13.log
2023.04.13 21:38:36 2: hueBridge1: autocreate: created 0/0/0 devices (ignored 0/2/26)
2023.04.13 21:38:37 3: n_global_INITIALIZED return value: Unknown command <set, try help.
2023.04.13 21:38:37 2: alexa: starting alexa-fhem: /usr/local/bin/alexa-fhem -c ./alexa-fhem.cfg
2023.04.13 21:38:37 0: Featurelevel: 6.2
2023.04.13 21:38:37 0: Server started with 583 defined entities (fhem.pl:27410/2023-04-07 perl:5.032001 os:linux user:fhem pid:22273)
2023.04.13 21:38:38 3: DbLog dblog_THB - DB connection parameters are initialized in the SubProcess
2023.04.13 21:38:38 1: PERL WARNING: devspec2array *: Unknown verb pattern '' in regex; marked by <-- HERE in m/^(*) <-- HERE $/ at fhem.pl line 1354.
2023.04.13 21:38:38 1: PERL WARNING: ^* matches null string many times in regex; marked by <-- HERE in m/^* <-- HERE :.*RSSI.*$/ at ./FHEM/93_DbLog.pm line 1299.
2023.04.13 21:38:45 3: DbLog dblog_THB - DB connection parameters are stored in SubProcess
2023.04.13 21:38:45 3: alexa: stopped
2023.04.13 21:38:45 2: alexa: starting alexa-fhem: /usr/local/bin/alexa-fhem -c ./alexa-fhem.cfg
2023.04.13 21:38:45 3: alexa: starting
2023.04.13 21:38:45 3: alexa: using logfile: ./log/alexa-2023-04-13.log
2023.04.13 21:38:50 2: hueBridge1: http request failed: https://192.168.9.179/auth/v1: empty answer received
2023.04.13 21:38:50 2: hueBridge1: http request failed: https://192.168.9.179/eventstream/clip/v2: empty answer received
2023.04.13 21:38:50 2: hueBridge1: EventStream: terminated; retrying later
2023.04.13 21:38:53 2: {"token_type":"Bearer","access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJiNmU5ZDg5Ni1kMzMwLTRiMWYtODVhNS0wYjk4NGQyZWJiMDQiLCJhdWQiOiJVU0VSIiwic2NvcGUiOiJDVVNUT01FUl9BUEkiLCJpc3MiOiJvaWxmb3guaW8iLCJleHAiOjE2ODE0MTU2MzAsImp0aSI6IjMyMmJiOTAzLTQ2YjItNDRjNi1iOTQ4LTNmMzVkNDIzOGZjNCIsImVtYWlsIjoiYmt0QGdteC5uZXQifQ.1qguJrFhk0oBsWEnXvsv6uvQXIc2TSbOHpHzXvTEGXO965eIRMISKqPja2P2srrdOfjFqa8kCDK4RR0-oPaG6w","refresh_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzY29wZSI6IkNVU1RPTUVSX0FQSSIsImlzcyI6Im9pbGZveC5pbyIsImV4cCI6MTY4MjcxMDczMCwianRpIjoiMTI1Y2QwMGYtZjBlZi00ZDI1LTgzNWYtMDY0NDdjNDczM2Y2In0.2iQ8mLVXhszQJggciutZq_htc-Q7U6tDloiOavbe2zPtjjNFDzqZq1MOwCxvS2CBdapcAKU1it8bvIzzSLgHLA"}
2023.04.13 21:38:54 2: AttrTemplates: got 259 entries
2023.04.13 21:39:01 2: hueBridge1: http request failed: read from https://192.168.9.179:443 timed out
2023.04.13 21:39:08 2: error while requesting https://api.oilfox.io/customer-api/v1/device - read from https://api.oilfox.io:443 timed out
2023.04.13 21:39:09 3: DbLog dblog_THB - SubProcess connected to fhem
2023.04.13 21:41:50 2: hueBridge1: EventStream: event for unknown device received, trying to refresh resouces
2023.04.13 21:41:51 2: hueBridge1: autocreate: created 0/0/0 devices (ignored 0/2/26)

UpdaTES HABE ICH ALLEGEMACHT:

LG

tHOMAS
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 14 April 2023, 00:12:04
Zitat von: Maista am 13 April 2023, 18:17:38Hallo zusammen,
nach dem ich mich aufraffen konnte und fhempy installiert habe wollte ich nun meine vier Tuya Geräte einbinden.

"fhem_local" und "fhempyserver_15733" sind als Grün markiert.
"tuya_system" zeigt "ready" an.

Aber irgendwie stehe ich auf den Schlauch.
Autocreate ist an.
Wo tauchen denn gefundene Geräte auf? Und wie lange dauert eine Tasse Kaffee :)?

Unter https://github.com/fhempy/fhempy/blob/master/FHEM/bindings/python/fhempy/lib/tuya/README.md (https://github.com/fhempy/fhempy/blob/master/FHEM/bindings/python/fhempy/lib/tuya/README.md)
steht
Zitatdefine tuya_system fhempy tuya setup API_KEY API_SECRET DEVICE_ID

In der Tuya-IOT finde ich nirgend etwas von "API-KEY" oder "API_SECRET".

Ist hier
ZitatIndustry : Smart Home

Data Center : Central Europe Data Center

Authorization Key

Access ID/Client ID: s7rxxxxxxxxxxxx > API_KEY
Access Secret/Client Secret: 282xxxxxxxxxxxxxxxxxxxxxxxxxxx > API_SECRET
Project Code: p16xxxxxxxxxxxxxxxxxxx
gemeint?

Ich habe hier
Zitatdefmod tuya_system fhempy tuya setup s7rxxxxxxxxxxxx 282xxxxxxxxxxxxxxxxxxxxxxxxxxx 1323440510521cfbab65
eingegeben. Die Device-ID ist aus der Übersicht bei Tuya-IOT.

Im GIT heisst es auch noch:
Zitatset tuya_system start_scan
Die Option "start_scan" gibt es nicht.
Nur "scan_device" :)

Vielleicht liegt es auch an Corona von 2022  ::)

Wer kann mir über die Strasse helfen?

Gruss Gerd
Deine Interpretation von API KEY und SECRET ist richtig. Tuya hatte die Bezeichnung irgendwann geändert, in der Doku steht es leider noch alt. Was passiert wenn du scan_devices drückst?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 14 April 2023, 00:14:25
Zitat von: thburkhart am 13 April 2023, 21:49:33Hallo Dominik,

eben stelle ich fest, dass wohl seit 7.4.23 meine Stecker SP xx nicht mehr aktualisiert werden. Dies aus heiterem Himmel.

fhempy-log:

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 531, in setup_connection
    self._connected_device = await asyncio.wait_for(connect_fct, timeout=15)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
2023-04-13 21:39:38,879 - ERROR    - TUYA_JL22: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/__init__.py", line 206, in connect
    await device.start_socket()
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py", line 894, in start_socket
    self.reader, self.writer = await asyncio.open_connection(
  File "/usr/lib/python3.9/asyncio/streams.py", line 52, in open_connection
    transport, _ = await loop.create_connection(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
    return await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
    fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 531, in setup_connection
    self._connected_device = await asyncio.wait_for(connect_fct, timeout=15)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
2023-04-13 21:39:38,880 - ERROR    - TUYA_JL32: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/__init__.py", line 206, in connect
    await device.start_socket()
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py", line 894, in start_socket
    self.reader, self.writer = await asyncio.open_connection(
  File "/usr/lib/python3.9/asyncio/streams.py", line 52, in open_connection
    transport, _ = await loop.create_connection(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
    return await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
    fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 531, in setup_connection
    self._connected_device = await asyncio.wait_for(connect_fct, timeout=15)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
2023-04-13 21:39:38,914 - ERROR    - TUYA_STF03: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/__init__.py", line 206, in connect
    await device.start_socket()
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py", line 894, in start_socket
    self.reader, self.writer = await asyncio.open_connection(
  File "/usr/lib/python3.9/asyncio/streams.py", line 52, in open_connection
    transport, _ = await loop.create_connection(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
    return await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
    fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 531, in setup_connection
    self._connected_device = await asyncio.wait_for(connect_fct, timeout=15)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
2023-04-13 21:40:01,180 - ERROR    - fhempy.lib.fhem: FHEM took 5916ms for readingsEndUpdate($defs{'TUYA_Temp01'},1);;
2023-04-13 21:40:01,345 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for readingsBulkUpdate($defs{'TUYAC_SensorT01'},'uuid','60381718500291bade80');;
2023-04-13 21:40:01,347 - ERROR    - fhempy.lib.fhem: FHEM took 6076ms for readingsBulkUpdate($defs{'TUYA_Temp02'},'uuid','6dd6a80de96b319f');;
2023-04-13 21:40:01,348 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for readingsBulkUpdate($defs{'TUYAC_Camera3'},'uuid','jdwsb2635b381294a0df');;
2023-04-13 21:40:01,350 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for readingsBulkUpdate($defs{'TUYA_BULB03'},'wakeup_mode','AAA=');;
2023-04-13 21:40:01,352 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for readingsBulkUpdate($defs{'tuya_cloud_4530056170039f4a87e5'},'countdown_1','0.0');;
2023-04-13 21:40:01,353 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for readingsBulkUpdate($defs{'TUYAC_SensorW03'},'update_time','1635130148');;
2023-04-13 21:40:01,355 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_JL26', 'dp_06', '')
2023-04-13 21:40:01,357 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_JL21', 'dp_06', '')
2023-04-13 21:40:01,358 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_SP02', 'dp_20', '')
2023-04-13 21:40:01,360 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_JL18', 'dp_06', '')
2023-04-13 21:40:01,361 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_JL20', 'dp_06', '')
2023-04-13 21:40:01,363 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_SP01', 'dp_20', '')
2023-04-13 21:40:01,364 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_SP05', 'dp_20', '')
2023-04-13 21:40:01,366 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_PS5', 'dp_104', '')
2023-04-13 21:40:01,367 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_SP07', 'dp_20', '')
2023-04-13 21:40:01,369 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_SP11', 'dp_21', '')
2023-04-13 21:40:01,371 - ERROR    - fhempy.lib.fhem: FHEM took 6054ms for readingsBeginUpdate($defs{'TUYAC_SensorT04'});;
2023-04-13 21:40:01,372 - ERROR    - fhempy.lib.fhem: FHEM took 6035ms for readingsBeginUpdate($defs{'TUYA_SCHFF4'});;
2023-04-13 21:40:01,374 - ERROR    - fhempy.lib.fhem: FHEM took 5999ms for readingsBeginUpdate($defs{'TUYAC_Camera1'});;
2023-04-13 21:40:01,377 - ERROR    - fhempy.lib.fhem: FHEM took 5104ms for foreach my $fhem_dev (sort keys %main::defs) {  return 1 if(defined($main::defs{$fhem_dev}{FHEMPYTYPE}) && $main::defs{$fhem_dev}{FHEMPYTYPE} eq 'tuya_cloud' && defined($main::defs{$fhem_dev}{DEVICEID}) && $main::defs{$fhem_dev}{DEVICEID} eq '045074212cf432ca0721');;}return 0;;
2023-04-13 21:40:02,471 - ERROR    - fhempy.lib.fhem: FHEM took 6022ms for readingsEndUpdate($defs{'TUYA_Temp10'},1);;
2023-04-13 21:40:02,698 - ERROR    - fhempy.lib.fhem: FHEM took 5157ms for AttrVal('TUYA_BULB02', 'dp_23', '')
2023-04-13 21:40:02,699 - ERROR    - fhempy.lib.fhem: FHEM took 5158ms for readingsBulkUpdate($defs{'TUYA_Temp06'},'uuid','a4c138739dae10fb');;
2023-04-13 21:40:02,701 - ERROR    - fhempy.lib.fhem: FHEM took 5158ms for AttrVal('TUYA_BULB01', 'dp_23', '')
2023-04-13 21:40:02,702 - ERROR    - fhempy.lib.fhem: FHEM took 5158ms for readingsBeginUpdate($defs{'TUYA_JL07'});;
2023-04-13 21:40:02,704 - ERROR    - fhempy.lib.fhem: FHEM took 5157ms for readingsBeginUpdate($defs{'TUYA_JL04'});;
2023-04-13 21:40:02,706 - ERROR    - fhempy.lib.fhem: FHEM took 5158ms for readingsBeginUpdate($defs{'TUYA_JL08'});;
2023-04-13 21:40:02,707 - ERROR    - fhempy.lib.fhem: FHEM took 5159ms for AttrVal('TUYA_JL24', 'dp_06', '')
2023-04-13 21:40:02,709 - ERROR    - fhempy.lib.fhem: FHEM took 5161ms for readingsBeginUpdate($defs{'TUYA_JL02'});;
2023-04-13 21:40:02,711 - ERROR    - fhempy.lib.fhem: FHEM took 5162ms for AttrVal('TUYA_JL27', 'dp_04', '')
2023-04-13 21:40:02,712 - ERROR    - fhempy.lib.fhem: FHEM took 5163ms for readingsBeginUpdate($defs{'TUYA_JL03'});;
2023-04-13 21:40:02,714 - ERROR    - fhempy.lib.fhem: FHEM took 5164ms for AttrVal('TUYA_JL35', 'dp_06', '')
2023-04-13 21:40:02,715 - ERROR    - fhempy.lib.fhem: FHEM took 5165ms for AttrVal('TUYA_JL36', 'dp_06', '')
2023-04-13 21:40:02,717 - ERROR    - fhempy.lib.fhem: FHEM took 5166ms for AttrVal('TUYA_JL33', 'dp_06', '')
2023-04-13 21:40:02,719 - ERROR    - fhempy.lib.fhem: FHEM took 5167ms for AttrVal('TUYA_JL28', 'dp_06', '')
2023-04-13 21:40:02,723 - ERROR    - fhempy.lib.fhem: FHEM took 5171ms for AttrVal('TUYA_JL34', 'dp_06', '')
2023-04-13 21:40:02,724 - ERROR    - fhempy.lib.fhem: FHEM took 5171ms for readingsBulkUpdate($defs{'TUYAC_SensorW04'},'state','normal');;
2023-04-13 21:40:02,725 - ERROR    - fhempy.lib.fhem: FHEM took 5171ms for AttrVal('TUYA_SP06', 'dp_20', '')
2023-04-13 21:40:02,727 - ERROR    - fhempy.lib.fhem: FHEM took 5172ms for AttrVal('TUYA_SP12', 'dp_20', '')
2023-04-13 21:40:02,727 - ERROR    - fhempy.lib.fhem: FHEM took 5172ms for AttrVal('TUYA_JL15', 'dp_01', '')
2023-04-13 21:40:02,729 - ERROR    - fhempy.lib.fhem: FHEM took 5173ms for AttrVal('TUYA_SP13', 'dp_20', '')
2023-04-13 21:40:02,730 - ERROR    - fhempy.lib.fhem: FHEM took 5174ms for AttrVal('TUYA_SP15', 'dp_20', '')
2023-04-13 21:40:02,732 - ERROR    - fhempy.lib.fhem: FHEM took 5161ms for readingsBeginUpdate($defs{'tuya_cloud_104380002462ab30258d'});;
2023-04-13 21:40:13,975 - ERROR    - fhempy.lib.fhem: FHEM took 5409ms for AttrVal('TUYA_PS5', 'dp_04', '')
2023-04-13 21:40:14,429 - ERROR    - fhempy.lib.fhem: FHEM took 5860ms for readingsEndUpdate($defs{'TUYA_SP01'},1);;
2023-04-13 21:40:14,648 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for readingsEndUpdate($defs{'TUYA_SP05'},1);;
2023-04-13 21:40:14,650 - ERROR    - fhempy.lib.fhem: FHEM took 6078ms for AttrVal('TUYA_SP11', 'dp_09', '')
2023-04-13 21:40:14,651 - ERROR    - fhempy.lib.fhem: FHEM took 6079ms for readingsBulkUpdate($defs{'TUYAC_Camera4'},'basic_osd','on');;
2023-04-13 21:40:14,865 - ERROR    - fhempy.lib.fhem: FHEM took 6291ms for readingsEndUpdate($defs{'TUYA_SP07'},1);;
2023-04-13 21:40:15,035 - ERROR    - fhempy.lib.fhem: FHEM took 6460ms for readingsBulkUpdate($defs{'TUYAC_Camera1'},'sd_storge','121882|7340|114542');;
2023-04-13 21:40:15,037 - ERROR    - fhempy.lib.fhem: FHEM took 5958ms for AttrVal('TUYA_BULB02', 'dp_22', '')
2023-04-13 21:40:15,254 - ERROR    - fhempy.lib.fhem: FHEM took 6174ms for readingsEndUpdate($defs{'TUYA_SP10'},1);;
2023-04-13 21:40:15,299 - ERROR    - fhempy.lib.fhem: FHEM took 6216ms for readingsBulkUpdate($defs{'TUYAC_Sir03'},'AlarmPeriod','15.0');;
2023-04-13 21:40:15,313 - ERROR    - fhempy.lib.fhem: FHEM took 6229ms for readingsEndUpdate($defs{'TUYAC_SensorW03'},1);;
2023-04-13 21:40:15,470 - ERROR    - fhempy.lib.fhem: FHEM took 6384ms for readingsEndUpdate($defs{'TUYA_Temp06'},1);;
2023-04-13 21:40:15,537 - ERROR    - fhempy.lib.fhem: FHEM took 6450ms for AttrVal('TUYA_BULB01', 'dp_22', '')
2023-04-13 21:40:15,759 - ERROR    - fhempy.lib.fhem: FHEM took 6670ms for readingsEndUpdate($defs{'TUYA_JL24'},1);;
2023-04-13 21:40:15,981 - ERROR    - fhempy.lib.fhem: FHEM took 6841ms for readingsEndUpdate($defs{'TUYA_JL35'},1);;
2023-04-13 21:40:16,203 - ERROR    - fhempy.lib.fhem: FHEM took 7063ms for readingsEndUpdate($defs{'TUYA_JL36'},1);;
2023-04-13 21:40:16,424 - ERROR    - fhempy.lib.fhem: FHEM took 7284ms for readingsEndUpdate($defs{'TUYA_JL33'},1);;
2023-04-13 21:40:19,083 - ERROR    - fhempy.lib.fhem: FHEM took 9942ms for readingsEndUpdate($defs{'TUYA_JL28'},1);;
2023-04-13 21:40:19,305 - ERROR    - fhempy.lib.fhem: FHEM took 10004ms for readingsEndUpdate($defs{'TUYA_JL34'},1);;
2023-04-13 21:40:23,934 - ERROR    - fhempy.lib.fhem: FHEM took 14632ms for readingsEndUpdate($defs{'TUYA_SP06'},1);;
2023-04-13 21:40:24,151 - ERROR    - fhempy.lib.fhem: FHEM took 14849ms for readingsEndUpdate($defs{'TUYA_SP12'},1);;
2023-04-13 21:40:24,368 - ERROR    - fhempy.lib.fhem: FHEM took 15065ms for readingsEndUpdate($defs{'TUYA_SP13'},1);;
2023-04-13 21:40:24,583 - ERROR    - fhempy.lib.fhem: FHEM took 15279ms for readingsEndUpdate($defs{'TUYA_SP15'},1);;
2023-04-13 21:42:06,228 - ERROR    - root: TUYA_JL15: readingsBeginUpdate couldn't acquire lock, caused by readingsBeginUpdate without End or Single update inbetween
2023-04-13 21:42:06,494 - ERROR    - fhempy.lib.fhem: FHEM took 117189ms for readingsEndUpdate($defs{'tuya_cloud_104380002462ab30258d'},1);;
2023-04-13 21:42:06,496 - ERROR    - fhempy.lib.fhem: FHEM took 117190ms for readingsBulkUpdate($defs{'TUYA_JL25'},'cur_voltage','230.4');;
2023-04-13 21:42:06,497 - ERROR    - fhempy.lib.fhem: FHEM took 117190ms for AttrVal('TUYA_PS3', 'dp_04', '')
2023-04-13 21:42:06,718 - ERROR    - fhempy.lib.fhem: FHEM took 117411ms for readingsEndUpdate($defs{'TUYA_SP04'},1);;
2023-04-13 21:42:06,759 - ERROR    - fhempy.lib.fhem: FHEM took 117451ms for AttrVal('TUYA_PS7', 'dp_02', '')
2023-04-13 21:42:06,759 - ERROR    - fhempy.lib.fhem: FHEM took 117450ms for readingsBulkUpdateIfChanged($defs{'TUYA_JL15'},'cur_current','0.0');;
2023-04-13 21:42:06,760 - ERROR    - fhempy.lib.fhem: FHEM took 117450ms for AttrVal('TUYA_SP16', 'dp_09', '')
2023-04-13 21:42:06,945 - ERROR    - fhempy.lib.fhem: FHEM took 117635ms for readingsEndUpdate($defs{'TUYA_SP09'},1);;
2023-04-13 21:42:06,989 - ERROR    - fhempy.lib.fhem: FHEM took 117679ms for readingsEndUpdate($defs{'tuya_cloud_bfe074c7ede8a9ad830m5q'},1);;
2023-04-13 21:42:06,990 - ERROR    - fhempy.lib.fhem: FHEM took 116897ms for foreach my $fhem_dev (sort keys %main::defs) {  return 1 if(defined($main::defs{$fhem_dev}{FHEMPYTYPE}) && $main::defs{$fhem_dev}{FHEMPYTYPE} eq 'tuya_cloud' && defined($main::defs{$fhem_dev}{DEVICEID}) && $main::defs{$fhem_dev}{DEVICEID} eq '2053863070039f16cebe');;}return 0;;
2023-04-13 21:42:06,990 - ERROR    - fhempy.lib.fhem: FHEM took 116639ms for readingsBulkUpdateIfChanged($defs{'TUYA_JL27'},'state','on');;
2023-04-13 21:42:06,991 - ERROR    - fhempy.lib.fhem: FHEM took 116442ms for readingsBulkUpdate($defs{'TUYAC_Camera3'},'sd_format','on');;
2023-04-13 21:42:06,992 - ERROR    - fhempy.lib.fhem: FHEM took 114130ms for readingsBeginUpdate($defs{'TUYA_SP16'});;
2023-04-13 21:42:06,994 - ERROR    - fhempy.lib.fhem: FHEM took 113022ms for readingsBeginUpdate($defs{'TUYA_Temp02'});;
2023-04-13 21:42:06,995 - ERROR    - fhempy.lib.fhem: FHEM took 113019ms for AttrVal('TUYA_PS5', 'dp_101', '')
2023-04-13 21:42:06,996 - ERROR    - fhempy.lib.fhem: FHEM took 112345ms for AttrVal('TUYA_SP11', 'dp_17', '')
2023-04-13 21:42:06,997 - ERROR    - fhempy.lib.fhem: FHEM took 112345ms for readingsBulkUpdate($defs{'TUYAC_Camera4'},'motion_sensitivity','1');;
2023-04-13 21:42:06,998 - ERROR    - fhempy.lib.fhem: FHEM took 111962ms for readingsBulkUpdate($defs{'TUYAC_Camera1'},'sd_status','0.1');;
2023-04-13 21:42:06,999 - ERROR    - fhempy.lib.fhem: FHEM took 111961ms for AttrVal('TUYA_BULB02', 'dp_23', '')
2023-04-13 21:42:07,000 - ERROR    - fhempy.lib.fhem: FHEM took 111700ms for readingsBulkUpdate($defs{'TUYAC_Sir03'},'AlarmSwitch','off');;
2023-04-13 21:42:07,001 - ERROR    - fhempy.lib.fhem: FHEM took 111464ms for AttrVal('TUYA_BULB01', 'dp_23', '')
2023-04-13 21:42:07,002 - ERROR    - fhempy.lib.fhem: FHEM took 108167ms for readingsBeginUpdate($defs{'TUYA_Temp06'});;
2023-04-13 21:42:07,003 - ERROR    - fhempy.lib.fhem: FHEM took 103293ms for readingsBeginUpdate($defs{'TUYA_SP11'});;
2023-04-13 21:42:07,004 - ERROR    - fhempy.lib.fhem: FHEM took 103267ms for readingsBeginUpdate($defs{'TUYA_SCHF2'});;
2023-04-13 21:42:08,416 - ERROR    - root: TUYA_JL15: readingsBulkUpdateIfChanged without readingsBeginUpdate: readingsBulkUpdateIfChanged($defs{'TUYA_JL15'},'cur_voltage','229.4');;
2023-04-13 21:42:08,416 - ERROR    - root: TUYA_JL15: readingsBulkUpdateIfChanged without readingsBeginUpdate: readingsBulkUpdateIfChanged($defs{'TUYA_JL15'},'online','1');;
2023-04-13 21:42:08,449 - ERROR    - TUYA_JL15: Exception raised by task: <Task finished name='Task-10240' coro=<FhemModule._run_coro() done, defined at /opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py:216> exception=RuntimeError('Lock is not acquired.')>
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 224, in _handle_task_result
    task.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 218, in _run_coro
    await coro
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 409, in async_status_updated
    await self.update_readings(status)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 724, in update_readings
    await fhem.readingsEndUpdate(self.hash, 1)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem.py", line 180, in readingsEndUpdate
    update_locks[hash["NAME"]].release()
  File "/usr/lib/python3.9/asyncio/locks.py", line 146, in release
    raise RuntimeError('Lock is not acquired.')
RuntimeError: Lock is not acquired.
2023-04-13 21:43:00,664 - ERROR    - asyncio: Task was destroyed but it is pending!
task: <Task pending name='Task-4427' coro=<main() running at /opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/__init__.py:166> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xb1887cd0>()]>>
2023-04-13 21:43:09,032 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:09,715 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:14,727 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:19,045 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:19,739 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:23,802 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:24,751 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:29,057 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:29,764 - WARNING  - asyncio: socket.send() raised exception.
2023-04-13 21:43:34,775 - WARNING  - asyncio: socket.send() raised exception.

fhem-log:

2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP01, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP02, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 1.3, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP03, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 28.2, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP04, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP05, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP06, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP07, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 5.2, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP08, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP09, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP10, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 50.1, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP11, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 5.5, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP12, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 16.9, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP13, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 51.1, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP14, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 6.6, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP15, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 7.5, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_SP16, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 7.6, Unit:
2023.04.13 21:34:25 5: redefine at command DbLog_addlog_TUYA_SP_cur_power as +*00:10:00 set dblog_THB addLog TUYA_SP.*:cur_power
2023.04.13 21:34:25 5: exec at command DbLog_addlog_TUYA_JL_cur_power
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL02, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 2: DbLog dblog_THB - Device: "TUYA_JL03", reading: ".*" excluded by attribute DbLogExclude from addLog !
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL04, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 19.4, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL05, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL06, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL07, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL08, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 2: DbLog dblog_THB - addLog WARNING - Device: 'TUYA_JL09' -> new Reading 'cur_power' has no value - can't add it !
2023.04.13 21:34:25 2: DbLog dblog_THB - addLog WARNING - Device: 'TUYA_JL10Z' -> new Reading 'cur_power' has no value - can't add it !
2023.04.13 21:34:25 2: DbLog dblog_THB - addLog WARNING - Device: 'TUYA_JL11Z' -> new Reading 'cur_power' has no value - can't add it !
2023.04.13 21:34:25 2: DbLog dblog_THB - addLog WARNING - Device: 'TUYA_JL12Z' -> new Reading 'cur_power' has no value - can't add it !
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL13, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL14, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 56.9, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL15, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL18, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL19, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL20, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL21, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL22, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 10.1, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL24, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL25, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL26, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL27, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL28, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL29, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL30, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL31, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 9.7, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL32, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 9.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL33, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL34, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL35, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_JL36, Type: FHEMPY, Event: addLog, Reading: cur_power, Value: 0.0, Unit:
2023.04.13 21:34:25 5: redefine at command DbLog_addlog_TUYA_JL_cur_power as +*00:10:00 set dblog_THB addLog TUYA_JL.*:cur_power
2023.04.13 21:34:25 5: exec at command DbLog_addlog_TUYA_TEMP_va_temperature
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp01, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 21.5, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp02, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 19.6, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp03, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 22.1, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp04, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 7.8, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp05, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 8.0, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp06, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 21.2, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp07, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 20.6, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp08, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 10.6, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp09, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 7.4, Unit:
2023.04.13 21:34:25 3: DbLog dblog_THB - addLog created - TS: 2023-04-13 21:34:25, Device: TUYA_Temp10, Type: FHEMPY, Event: addLog, Reading: va_temperature, Value: 7.6, Unit:
2023.04.13 21:34:25 5: redefine at command DbLog_addlog_TUYA_TEMP_va_temperature as +*00:10:00 set dblog_THB addLog TUYA_Temp.*:va_temperature
2023.04.13 21:36:42 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/10_BindingsIo.pm line 558.
2023.04.13 21:37:58 2: DbLog dblog_THB - Wait for last database cycle due to shutdown ...
2023.04.13 21:37:58 1: Server shutdown delayed due to dblog_THB,alexa for max 10 sec
2023.04.13 21:37:59 2: DbLog dblog_THB - Last database write cycle done
2023.04.13 21:38:01 3: alexa: read: end of file reached while sysread
2023.04.13 21:38:01 3: alexa: stopped
2023.04.13 21:38:01 0: Server shutdown
2023.04.13 21:38:01 2: DbLog dblog_THB - stopping SubProcess PID >20544< ...
2023.04.13 21:38:01 2: DbLog dblog_THB - SubProcess PID >20544< stopped
2023.04.13 21:38:04 1: Including fhem.cfg
2023.04.13 21:38:05 2: DbLog dblog_THB - Subprocess >22274< initialized ... ready for non-blocking operation
2023.04.13 21:38:06 3: telnetPort: port 7072 opened
2023.04.13 21:38:06 3: WEB: port 8083 opened
2023.04.13 21:38:06 3: WEBphone: port 8084 opened
2023.04.13 21:38:06 3: WEBtablet: port 8085 opened
2023.04.13 21:38:06 3: TelegramBot_Define TelegramBotTHB: called
2023.04.13 21:38:07 3: BindingsIo v1.0.1
2023.04.13 21:38:07 3: fhempyServer v1.0.0
2023.04.13 21:38:07 3: fhempy v1.0.0 (tuya_cloud: TUYA)
2023.04.13 21:38:07 3: fhempy v1.0.0 (tuya: tuya_system)
2023.04.13 21:38:07 3: Opening CUL_0 device /dev/ttyACM0
2023.04.13 21:38:07 3: Setting CUL_0 serial parameters to 9600,8,N,1
2023.04.13 21:38:07 3: CUL_0: Possible commands: BbCFiAZNkGMKUYRTVWXefmLltux
2023.04.13 21:38:07 3: CUL_0 device opened
2023.04.13 21:38:07 2: Switched CUL_0 rfmode to MAX
2023.04.13 21:38:07 3: Opening JLLaCR device /dev/ttyUSB0
2023.04.13 21:38:07 3: Setting JLLaCR serial parameters to 57600,8,N,1
2023.04.13 21:38:08 3: JLLaCR device opened
2023.04.13 21:38:08 1: PERL WARNING: Use of uninitialized value in numeric ge (>=) at ./FHEM/12_OilFox.pm line 387, <$fh> line 553.
2023.04.13 21:38:08 2: LOGIN TOKEN MISSING OR EXPIRED
2023.04.13 21:38:08 3: myOilFox - email set to bkt@gmx.net
2023.04.13 21:38:08 3: myOilFox - set interval: 36000
2023.04.13 21:38:08 3: myOilFox - password set to thbbkt25
2023.04.13 21:38:08 3: powerfox: Defined with URL https://bkt%40gmx.net:thbbkt25@backend.powerfox.energy/api/2.0/my/246f283cfeac/current and interval 60 featurelevel 6.2
2023.04.13 21:38:24 2: eventTypes: loaded 18314 lines from ./log/eventTypes.txt
2023.04.13 21:38:24 3: TX29_00: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_01: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_02: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_03: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_04: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_05: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_06: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_07: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_08: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_09: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_10: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_11: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_12: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX25IT_13: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_14: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_15: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_16: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_17: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_18: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_19: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_20: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_21: I/O device is JLLaCR
2023.04.13 21:38:24 3: TX29DTH_22: I/O device is JLLaCR
2023.04.13 21:38:24 3: HUEDevice2: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice4: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice5: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice6: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice7: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice8: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice10: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice17: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice18: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice19: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice20: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice22: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice23: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice24: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice25: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice27: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice28: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice29: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice30: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice31: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice32: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice33: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice38: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice39: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice40: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice41: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup0: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup1: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup2: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup3: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup4: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup5: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup6: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup7: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup8: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup9: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup10: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup11: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup12: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup13: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup14: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup15: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup16: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup17: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup18: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup19: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup20: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup21: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup22: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup23: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup24: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup25: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup26: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup27: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup28: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup29: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup30: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice44: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEGroup31: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor6: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor8: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor10: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor13: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor24: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor27: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor34: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor37: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor45: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice45: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice46: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice47: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice48: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice49: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice50: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice51: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor91: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor110: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUESensor1: I/O device is hueBridge1
2023.04.13 21:38:24 3: HUEDevice52: I/O device is hueBridge1
2023.04.13 21:38:24 1: MaxTemp: WT
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_BULB01)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_BULB02)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYA_BULB03)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera1)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera2)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera3)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera4)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera5)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Camera6)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_DIY1)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_DIY3)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_DIY4)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_EMYLO1)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_EMYLO2)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_EMYLOD2)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_EMYLO3)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_EMYLO4)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL02)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL03)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL04)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL05)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL06)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL07)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL08)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL09)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL10Z)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL11Z)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL12Z)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL13)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL14)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL15)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL18)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYA_JL19)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL20)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL21)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL22)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL24)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYA_JL25)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL26)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL27)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL28)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL29)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL30)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL31)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL32)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL33)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL34)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL35)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_JL36)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_PS1)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_PS3)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_PS4)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_PS5)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_PS7)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SCHF1)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SCHF2)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SCHF3)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya_cloud: TUYA_SCHFF4)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP01)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP02)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP03)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP04)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP05)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP06)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP07)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP08)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP09)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP10)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP11)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP12)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP13)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP14)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP15)
2023.04.13 21:38:25 3: fhempy v1.0.0 (tuya: TUYA_SP16)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_PIR01)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_PIR02)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_PIR03)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT01)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT02)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT03)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT04)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorT05)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorW01)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorW02)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorW03)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorW04)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Sir01)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Sir02)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Sir03)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_Relais01)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYAC_SensorSmoke01)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya: TUYA_STF01)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya: TUYA_STF02)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya: TUYA_STF03)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_STF04)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya: TUYA_MMG)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp01)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp02)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp03)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp05)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp06)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp04)
2023.04.13 21:38:26 1: PERL WARNING: Useless use of anonymous hash ({}) in void context at (eval 125) line 1, <$fh> line 6354.
2023.04.13 21:38:26 3: SST (SamsungSmartThingsConnector): define - CONNECTOR defined as SamsungSmartThingsConnector
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_5062137624a1600b6d62)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_4530056170039f4a87e5)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_104380002462ab30258d)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp07)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_bfc65f1f693ce027f5avyd)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_bf95f50f98d37da7235vba)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_bfe6fb5a31840d5ca3dce6)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_bf8430ea7591b4d534d4dp)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp09)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp08)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: TUYA_Temp10)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_bf90689f7512fabbd0lonv)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_bf99dd6c52e2de4e07ckuw)
2023.04.13 21:38:26 3: fhempy v1.0.0 (tuya_cloud: tuya_cloud_bfe074c7ede8a9ad830m5q)
2023.04.13 21:38:26 1: Including ./log/fhem.save
2023.04.13 21:38:35 1: Messages collected while initializing FHEM:SecurityCheck:
  WEBphone is not password protected
  WEB is not password protected
  telnetPort is not password protected
  WEBtablet is not password protected

Protect this FHEM installation by defining an allowed device with define allowed allowed
You can disable this message with attr global motd none

2023.04.13 21:38:36 2: alexa: starting alexa-fhem: /usr/local/bin/alexa-fhem -c ./alexa-fhem.cfg
2023.04.13 21:38:36 3: alexa: starting
2023.04.13 21:38:36 3: alexa: using logfile: ./log/alexa-2023-04-13.log
2023.04.13 21:38:36 2: hueBridge1: autocreate: created 0/0/0 devices (ignored 0/2/26)
2023.04.13 21:38:37 3: n_global_INITIALIZED return value: Unknown command <set, try help.
2023.04.13 21:38:37 2: alexa: starting alexa-fhem: /usr/local/bin/alexa-fhem -c ./alexa-fhem.cfg
2023.04.13 21:38:37 0: Featurelevel: 6.2
2023.04.13 21:38:37 0: Server started with 583 defined entities (fhem.pl:27410/2023-04-07 perl:5.032001 os:linux user:fhem pid:22273)
2023.04.13 21:38:38 3: DbLog dblog_THB - DB connection parameters are initialized in the SubProcess
2023.04.13 21:38:38 1: PERL WARNING: devspec2array *: Unknown verb pattern '' in regex; marked by <-- HERE in m/^(*) <-- HERE $/ at fhem.pl line 1354.
2023.04.13 21:38:38 1: PERL WARNING: ^* matches null string many times in regex; marked by <-- HERE in m/^* <-- HERE :.*RSSI.*$/ at ./FHEM/93_DbLog.pm line 1299.
2023.04.13 21:38:45 3: DbLog dblog_THB - DB connection parameters are stored in SubProcess
2023.04.13 21:38:45 3: alexa: stopped
2023.04.13 21:38:45 2: alexa: starting alexa-fhem: /usr/local/bin/alexa-fhem -c ./alexa-fhem.cfg
2023.04.13 21:38:45 3: alexa: starting
2023.04.13 21:38:45 3: alexa: using logfile: ./log/alexa-2023-04-13.log
2023.04.13 21:38:50 2: hueBridge1: http request failed: https://192.168.9.179/auth/v1: empty answer received
2023.04.13 21:38:50 2: hueBridge1: http request failed: https://192.168.9.179/eventstream/clip/v2: empty answer received
2023.04.13 21:38:50 2: hueBridge1: EventStream: terminated; retrying later
2023.04.13 21:38:53 2: {"token_type":"Bearer","access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJiNmU5ZDg5Ni1kMzMwLTRiMWYtODVhNS0wYjk4NGQyZWJiMDQiLCJhdWQiOiJVU0VSIiwic2NvcGUiOiJDVVNUT01FUl9BUEkiLCJpc3MiOiJvaWxmb3guaW8iLCJleHAiOjE2ODE0MTU2MzAsImp0aSI6IjMyMmJiOTAzLTQ2YjItNDRjNi1iOTQ4LTNmMzVkNDIzOGZjNCIsImVtYWlsIjoiYmt0QGdteC5uZXQifQ.1qguJrFhk0oBsWEnXvsv6uvQXIc2TSbOHpHzXvTEGXO965eIRMISKqPja2P2srrdOfjFqa8kCDK4RR0-oPaG6w","refresh_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzY29wZSI6IkNVU1RPTUVSX0FQSSIsImlzcyI6Im9pbGZveC5pbyIsImV4cCI6MTY4MjcxMDczMCwianRpIjoiMTI1Y2QwMGYtZjBlZi00ZDI1LTgzNWYtMDY0NDdjNDczM2Y2In0.2iQ8mLVXhszQJggciutZq_htc-Q7U6tDloiOavbe2zPtjjNFDzqZq1MOwCxvS2CBdapcAKU1it8bvIzzSLgHLA"}
2023.04.13 21:38:54 2: AttrTemplates: got 259 entries
2023.04.13 21:39:01 2: hueBridge1: http request failed: read from https://192.168.9.179:443 timed out
2023.04.13 21:39:08 2: error while requesting https://api.oilfox.io/customer-api/v1/device - read from https://api.oilfox.io:443 timed out
2023.04.13 21:39:09 3: DbLog dblog_THB - SubProcess connected to fhem
2023.04.13 21:41:50 2: hueBridge1: EventStream: event for unknown device received, trying to refresh resouces
2023.04.13 21:41:51 2: hueBridge1: autocreate: created 0/0/0 devices (ignored 0/2/26)

UpdaTES HABE ICH ALLEGEMACHT:

LG

tHOMAS
Auch ein restart von fhempy hilft nicht? Die SP sind doch die Zwischenstecker, oder?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: SouzA am 14 April 2023, 08:28:19
Zitat von: SouzA am 13 April 2023, 12:21:43
Zitat von: dominik am 05 April 2023, 22:04:52
Zitat von: SouzA am 22 März 2023, 09:42:13Hallo liebe Leute,

habe hier nun endlich den ECO-DIM.07 WIFI integriert bekommen.
Der lässt sich laut Standardkonfig mit bright_value_1 von 0 bis 1000 dimmen.
Kriegt man es irgendwie hin, dass
1. man die Prozent also "pct" einstellen kann
und
2. es wirklich Prozent von 0 bis 100 sind?

Thx für eine kurze Rückmeldung.

Bis denn
SouzA

EDIT:
Der Grund für die Frage ist der, dass das Device zwar vom gassistant erkannt wird und on/off funktioniert. Dimmen halt nur nicht...
Das kann ich leider nicht so einfach anpassen. Diese Ranges werden von Tuya vorgegeben und ich versuche daran nichts zu ändern, damit das Modul einfach sehr generisch bleibt.
Versuch mal folgendes im homebridgeMapping
{
  "Brightness": {
    "cmd": "bright_value_1",
    "reading": "bright_value_1",
    "max": 1000,
    "maxValue": 100
  }
}


Danke Dominik,
das hat geklappt.
Jetzt funktioniert der Dimmer einwandfrei!

Thx und bis denn
SouzA

Ich muss da noch mal zurück rudern.
Jetzt ist es so, dass am nächsten Tag, das AN/AUS nicht mehr da ist im GH. Da gibt es diesen kleinen Schiebeschalter nicht mehr...
Erst nach "Aktualisiere meine Geräte" funktioniert wieder alles so wie gewünscht?!

Woran kann das liegen?

Thx & bis denn
SouzA
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 14 April 2023, 08:38:48
Machst du in der Nacht einen Reboot oder irgendwelche Restarts? Wenn bei einem Restart gassistant vor fhempy fertig wird, dann fehlen noch die Commands im Device.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: SouzA am 14 April 2023, 09:09:16
Zitat von: dominik am 14 April 2023, 08:38:48Machst du in der Nacht einen Reboot oder irgendwelche Restarts? Wenn bei einem Restart gassistant vor fhempy fertig wird, dann fehlen noch die Commands im Device.
Alle paar Nächte mach ich nen automatisches Backup des Raspi.
Der startet danach aber eigentlich normal wieder fhem.

Das bedeutet aber eigentlich, dass das bei jedem normalem Restart von fhem passieren kann, oder?
Kann man da an irgendwelchen Einstellungen was drehen?

Thx & bis denn
SouzA
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 14 April 2023, 12:19:55
@dominik

Danke für deine Antwort.

ZitatDeine Interpretation von API KEY und SECRET ist richtig. Tuya hatte die Bezeichnung irgendwann geändert, in der Doku steht es leider noch alt. Was passiert wenn du scan_devices drückst?
Dachte schon ich hab etwas an den Augen ;)

Gestern Abend stand da nur "Ready". Heute steht das er scannt, nichts findet und lokal sucht.
Und nix findet.

Jetzt habe ich verbose auf 5 und nun sehe ich im Log folgendes:
Zitat2023.04.14 09:57:32 1: ws:127.0.0.1:15733 disconnected, waiting to reappear (fhempy_local)
2023.04.14 09:57:32 1: BindingsIo (fhempy_local): ERROR during connection setup: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2023.04.14 09:57:42 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/10_BindingsIo.pm line 558.
2023.04.14 09:57:42 1: ws:127.0.0.1:15733 reappeared (fhempy_local)
Stimmen hier irgend welche Rechte nicht?

Laufen tut das ganze auf einem Raspberry mit 8GByte.
Installation ist von 2022. Das Python-Gedöns ist gestern frisch installiert.

ZitatPRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

List von fhempy_local
Internals:
   BindingType fhempy
   DEF        fhempy
   DeviceName ws:127.0.0.1:15733
   FD         106
   FUUID      64380f8b-f33f-adfe-9ff4-48b4b5051fcedade
   FVERSION   10_BindingsIo.pm:0.182830/2019-01-16
   IP         127.0.0.1
   NAME       fhempy_local
   NR         1605
   NTFY_ORDER 50-fhempy_local
   PARTIAL   
   PORT       15733
   STATE      opened
   TYPE       BindingsIo
   WEBSOCKET  1
   binary     1
   connecttime 1681459062.93818
   devioLoglevel 0
   eventCount 16
   installing 0
   localBinding 1
   nextOpenDelay 10
   prev_error 127.0.0.1: Verbindungsaufbau abgelehnt (111)
   READINGS:
     2023-04-14 09:57:43   hostname        rpi00
     2023-04-14 09:57:43   os              posix
     2023-04-14 09:57:43   python          3.7.3
     2023-04-14 09:57:43   release         5.10.103-v7l+
     2023-04-14 09:57:42   state           opened
     2023-04-14 09:57:43   system          Linux
     2023-04-14 09:57:43   version         0.1.646
     2023-04-14 09:57:43   version_available 0.1.646
     2023-04-14 09:57:43   version_release_notes <html><a href="https://github.com/fhempy/fhempy/releases" target="_blank">Release Notes</a></html>
   args:
     fhempy_local
     BindingsIo
     fhempy
   messages:
     0:
     tuya_system:
Attributes:
   devStateIcon {      my $attr_ver = "1.1.0";;      my $status_img = "10px-kreis-gruen";;      my $status_txt = "connected";;      my $ver = ReadingsVal($name, "version", "-");;      my $ver_available = ReadingsVal($name, "version_available", $ver);;      my $update_icon = "";;      my $refresh_img = "refresh";;      my $refresh_txt = "Update fhempy";;      if ($ver_available ne $ver) {        $refresh_img = "refresh\@orange";;        $refresh_txt = "Version ".$ver_available." available for update";;      }      if (ReadingsVal($name, "state", "disconnected") eq "disconnected") {        $status_img = "10px-kreis-rot";;        $status_txt = "disconnected";;      }      $update_icon = "<a  href=\"/fhem?cmd.dummy=set $name update&XHR=1\" title=\"Start ".$ver_available." update\">".FW_makeImage($refresh_img, $refresh_txt)."</a>";;      my $restart_icon = "<a  href=\"/fhem?cmd.dummy=set $name restart&XHR=1\" title=\"Restart fhempy\">".FW_makeImage("control_reboot")."</a>";;      "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a> ".$ver." </a>".$update_icon.$restart_icon."</div>"    }
   group      fhempy
   icon       file_json-ld2
   room       fhempy
   verbose    1

List fhempyserver_15733:
Internals:
   DEF        0
   FD         95
   FUUID      64380f8b-f33f-adfe-5359-e68e35041a68342c
   FVERSION   10_fhempyServer.pm:0.182830/2019-01-16
   LAST_START 2023-04-14 09:57:32
   LAST_STOP  2023-04-14 09:57:32
   NAME       fhempyserver_15733
   NR         1606
   NTFY_ORDER 50-fhempyserver_15733
   PID        29342
   STARTS     2
   STATE      ???
   TYPE       fhempyServer
   currentlogfile ./log/fhempy-2023-04-14.log
   eventCount 4
   logfile    ./log/fhempy-%Y-%m-%d.log
   CoProcess:
     cmdFn      fhempyServer_getCmd
     name       fhempy
     state      running FHEM/bindings/python/bin/fhempy
   READINGS:
     2023-04-14 09:57:32   fhempy          running FHEM/bindings/python/bin/fhempy
     2023-04-14 09:32:37   python          v3.7.3
Attributes:
   devStateIcon {      my $status_img = "10px-kreis-gruen";;      my $status_txt = "running";;      if (substr(ReadingsVal($name, "fhempy", "running"),0,7) ne "running") {        $status_img = "10px-kreis-rot";;        $status_txt = "stopped";;      }      "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a  href=\"/fhem?cmd.dummy=set $name restart&XHR=1\" title=\"Kill and restart\">".FW_makeImage("audio_repeat")."</a></div>"      }
   group      fhempy
   icon       python
   logfile    ./log/fhempy-%Y-%m-%d.log
   nrarchive  10
   room       fhempy
   verbose    1

List tuya_system
Internals:
   API_KEY    s7xxxxxxxxxxxxxxx
   API_SECRET 2822ffxxxxxxxxxxxxxxxxxx
   DEF        tuya setup s7xxxxxxxxxxxxxxx 2822ffxxxxxxxxxxxxxxxxxx 1323xxxxxxxxxxxx
   DEVICEID   0
   FHEMPYTYPE tuya
   FUUID      643810f9-f33f-adfe-52ff-6d99c9e9b3dbd3bc
   FVERSION   10_fhempy.pm:0.182830/2019-01-16
   IODev      fhempy_local
   NAME       tuya_system
   NR         1608
   PYTHONTYPE tuya
   REGION     eu
   STATE      0 devices found localy
   TYPE       fhempy
   eventCount 15
   READINGS:
     2023-04-14 12:05:57   state           0 devices found localy
   args:
     tuya_system
     fhempy
     tuya
     setup
     s7xxxxxxxxxxxxxxx
     2822ffxxxxxxxxxxxxxxxxxx
     1323xxxxxxxxxxxx
   argsh:
   hmccu:
Attributes:
   group      tuya
   icon       rc_SETUP
   room       fhempy
   verbose    5

Im fhempy-Log von heute steht:
2023-04-14 09:31:51,653 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2023-04-14 09:31:51,655 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2023-04-14 09:31:58,007 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2023-04-14 09:31:59,804 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-04-14 09:31:59,806 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-14 09:31:59,807 - INFO     - websockets.server: server closing
2023-04-14 09:32:38,809 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.646...
2023-04-14 09:32:38,817 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-14 09:32:38,852 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-14 09:32:43,541 - INFO     - websockets.server: connection open
2023-04-14 09:32:43,542 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-14 09:57:15,817 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2023-04-14 09:57:15,819 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2023-04-14 09:57:22,206 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2023-04-14 09:57:22,251 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-04-14 09:57:22,252 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-14 09:57:22,253 - INFO     - websockets.server: server closing
2023-04-14 09:57:32,259 - INFO     - websockets.server: connection closed
2023-04-14 09:57:32,259 - INFO     - websockets.server: server closed
2023-04-14 09:57:32,260 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-04-14 09:57:33,348 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.646...
2023-04-14 09:57:33,355 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-14 09:57:33,387 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-14 09:57:42,935 - INFO     - websockets.server: connection open
2023-04-14 09:57:42,936 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-14 09:58:21,533 - ERROR    - tuya_system: Exception raised by task: <Task finished coro=<FhemModule._run_coro() done, defined at /opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/generic.py:216> exception=KeyError('has_more')>
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/generic.py", line 224, in _handle_task_result
    task.result()
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/generic.py", line 218, in _run_coro
    await coro
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/tuya/tuya.py", line 738, in _scan_devices
    functools.partial(self.tuya_cloud.getdevices, verbose=True)
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/utils.py", line 72, in run_blocking
    return await asyncio.get_event_loop().run_in_executor(pool, function)
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/opt/fhem/.local/lib/python3.7/site-packages/aiotinytuya/Cloud.py", line 366, in getdevices
    json_data = self._get_all_devices()
  File "/opt/fhem/.local/lib/python3.7/site-packages/aiotinytuya/Cloud.py", line 336, in _get_all_devices
    has_more = result[i]['has_more']
KeyError: 'has_more'
2023-04-14 11:53:12,939 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to execute function Set: Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 385, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 486, in execute_function
    fct_timeout,
  File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/generic.py", line 208, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/utils.py", line 335, in handle_set
    return await fct_call(hash, final_params)
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/tuya/tuya.py", line 262, in set_create_device
    nameid = params["name"]
KeyError: 'name'
 with hash: {'NAME': 'tuya_system', 'defargsh': {}, 'msgtype': 'function', 'id': 59252170, 'defargs': ['tuya_system', 'fhempy', 'tuya', 'setup', 's7rrmtmpfka4vg5y9twf', '2822ff4bc11f4c24b666d43f3cfbdc2e', '1323440510521cfbab65'], 'FHEMPYTYPE': 'tuya', 'argsh': {}, 'args': ['tuya_system', 'create_device'], 'function': 'Set', 'PYTHONTYPE': 'tuya'}
2023-04-14 11:53:49,590 - DEBUG    - tuya_system: Device Listing
2023-04-14 11:53:49,591 - DEBUG    - tuya_system: []
2023-04-14 11:53:49,597 - DEBUG    - tuya_system: Scan local devices...
2023-04-14 11:54:09,648 - DEBUG    - tuya_system: Polling local devices...
2023-04-14 11:57:18,851 - DEBUG    - tuya_system: Device Listing
2023-04-14 11:57:18,852 - DEBUG    - tuya_system: []
2023-04-14 11:57:18,857 - DEBUG    - tuya_system: Scan local devices...
2023-04-14 11:57:38,907 - DEBUG    - tuya_system: Polling local devices...
2023-04-14 12:05:37,783 - DEBUG    - tuya_system: Device Listing
2023-04-14 12:05:37,783 - DEBUG    - tuya_system: []
2023-04-14 12:05:37,789 - DEBUG    - tuya_system: Scan local devices...
2023-04-14 12:05:57,837 - DEBUG    - tuya_system: Polling local devices...
2023-04-14 12:13:28,288 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-04-14 12:13:28,289 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-04-14 12:13:28,290 - INFO     - websockets.server: server closing
2023-04-14 12:13:38,307 - INFO     - websockets.server: connection closed
2023-04-14 12:13:38,308 - INFO     - websockets.server: server closed
2023-04-14 12:13:38,310 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
2023-04-14 12:13:39,438 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.646...
2023-04-14 12:13:39,445 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-04-14 12:13:39,477 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-04-14 12:13:48,457 - INFO     - websockets.server: connection open
2023-04-14 12:13:48,458 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-04-14 12:14:02,214 - DEBUG    - tuya_system: Device Listing
2023-04-14 12:14:02,215 - DEBUG    - tuya_system: []
2023-04-14 12:14:02,221 - DEBUG    - tuya_system: Scan local devices...
2023-04-14 12:14:22,289 - DEBUG    - tuya_system: Polling local devices...
2023-04-14 12:16:36,242 - DEBUG    - tuya_system: Device Listing
2023-04-14 12:16:36,242 - DEBUG    - tuya_system: []
2023-04-14 12:16:36,248 - DEBUG    - tuya_system: Scan local devices...
2023-04-14 12:16:56,295 - DEBUG    - tuya_system: Polling local devices...
Falls das relevant sein sollte.

Danke Dir schon mal für die Antwort.

Gruss Gerd
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 14 April 2023, 14:41:41
@dominik

Ich bin immer noch verwirrt mit den vielen Keys....
Wo finde ich den eine Info an welcher Stelle und wo man diese alle findet?

Zitat- API_KEY: From tuya developer portal
  Unter Cloud>Overview
- API_SECRET: From tuya developer portal
  Unter Cloud>Overview
- DEVICE_ID: From SmartLife app, doesn't matter which device, we just need one to retrieve the proper uid from it
  Unter Cloud>Devices
  Was soll nun die "uid" sein? Im Tuya-IoT-Log hat meine App eine "uid" bekommen und unter Cloud > "Link Tuya App Account" wird eine angezeigt
- PRODUCT_ID: Set to "api" if APIKEY and APISECRET are provided, otherwise use the proper product id
  Wo sollte man diese finden können?
- LOCAL_KEY: Take that one from the tuyasystem device you created
  Noch ein Key....Ist das der Project code unter Cloud?
- VERSION: Take that one from the tuyasystem device you created (default 3.3)
  Ist das einfach 3.3 oder sollte man das bei Tuya IOT irgendwo finden können?



Dominik, in der Hilfe zu fhempy_local ist die Hilfe durch viele Leehrzeilen sehr gestreckt.
Ist das so absicht?
In Bereich der Hilfe steht z.B. "APIKEY" (das KEY ist bei mir Kursiv).
Im Define heisst es aber "API_KEY".
Das gleiche bei "APISECRET", "PRODUCTID" und "LOCALKEY".
"IP" ist wie auch manche Folgetexte ebenfalls Kursiv. Ist vermutlich so nicht gewollt ?!

PS: FHEMSync funktioniert immer noch bestens!

Danke und Gruss
Gerd
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 14 April 2023, 17:45:48
Zitat von: Maista am 14 April 2023, 12:19:552023-04-14 09:32:37   python          v3.7.3
3.7.3 ist etwas alt. Buster hat 3.9 an Bord. Mach bitte ein Python Update mit apt-get. In fhempy habe ich den Support für <3.9 eingestellt, da viele Libraries 3.9 erfordern.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 14 April 2023, 17:48:43
Zitat von: SouzA am 14 April 2023, 09:09:16
Zitat von: dominik am 14 April 2023, 08:38:48Machst du in der Nacht einen Reboot oder irgendwelche Restarts? Wenn bei einem Restart gassistant vor fhempy fertig wird, dann fehlen noch die Commands im Device.
Alle paar Nächte mach ich nen automatisches Backup des Raspi.
Der startet danach aber eigentlich normal wieder fhem.

Das bedeutet aber eigentlich, dass das bei jedem normalem Restart von fhem passieren kann, oder?
Kann man da an irgendwelchen Einstellungen was drehen?

Thx & bis denn
SouzA

Als Abhilfe kannst du ein DOIF schreiben, welches auf fhempy opened reagiert und dann 60s danach ein reload bei gassistant macht.
define greload DOIF ([fhempy_local] eq "opened") (set gassistant reload)
attr greload wait 60
(ungetestet)
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 14 April 2023, 17:51:22
Zitat von: Maista am 14 April 2023, 14:41:41@dominik

Ich bin immer noch verwirrt mit den vielen Keys....
Wo finde ich den eine Info an welcher Stelle und wo man diese alle findet?

Zitat- API_KEY: From tuya developer portal
  Unter Cloud>Overview
- API_SECRET: From tuya developer portal
  Unter Cloud>Overview
- DEVICE_ID: From SmartLife app, doesn't matter which device, we just need one to retrieve the proper uid from it
  Unter Cloud>Devices
  Was soll nun die "uid" sein? Im Tuya-IoT-Log hat meine App eine "uid" bekommen und unter Cloud > "Link Tuya App Account" wird eine angezeigt
- PRODUCT_ID: Set to "api" if APIKEY and APISECRET are provided, otherwise use the proper product id
  Wo sollte man diese finden können?
- LOCAL_KEY: Take that one from the tuyasystem device you created
  Noch ein Key....Ist das der Project code unter Cloud?
- VERSION: Take that one from the tuyasystem device you created (default 3.3)
  Ist das einfach 3.3 oder sollte man das bei Tuya IOT irgendwo finden können?



Dominik, in der Hilfe zu fhempy_local ist die Hilfe durch viele Leehrzeilen sehr gestreckt.
Ist das so absicht?
In Bereich der Hilfe steht z.B. "APIKEY" (das KEY ist bei mir Kursiv).
Im Define heisst es aber "API_KEY".
Das gleiche bei "APISECRET", "PRODUCTID" und "LOCALKEY".
"IP" ist wie auch manche Folgetexte ebenfalls Kursiv. Ist vermutlich so nicht gewollt ?!

PS: FHEMSync funktioniert immer noch bestens!

Danke und Gruss
Gerd

Die falsche Schreibweise entsteht im Moment leider durch den "markdown to html" Konverter.

Mach bitte kein manuelles Setup, einfach automatic Setup machen, dann brauchst du nur API_KEY/SECRET und eine DeviceId. DeviceId braucht man um die uid zu erhalten. Die uid wird also sowieso automatisch bezogen und muss nicht angegeben werden.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 15 April 2023, 11:11:06
Zitat von: dominik am 14 April 2023, 17:45:48
Zitat von: Maista am 14 April 2023, 12:19:552023-04-14 09:32:37   python          v3.7.3
3.7.3 ist etwas alt. Buster hat 3.9 an Bord. Mach bitte ein Python Update mit apt-get. In fhempy habe ich den Support für <3.9 eingestellt, da viele Libraries 3.9 erfordern.
Hallo Dominik.
Schau ich mir eventuell heute Abend an.
Hatte die Installation nach Anleitung durchgeführt.

Gruß Gerd
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 15 April 2023, 19:31:44
Mach mal ein
sudo apt update
sudo apt install python3

Eigentlich sollte da Python 3.9 installiert werden und nicht 3.7.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 15 April 2023, 19:33:44
Hallo Dominik,

ne eben nicht. Ich bin aber so weit das 3.9 (3.9.16) installiert ist.

https://raspberrytips.com/install-latest-python-raspberry-pi/ (https://raspberrytips.com/install-latest-python-raspberry-pi/)

Bin gerade dran. Die 3.7 gehört da wohl noch dazu.
Ich melde mich wieder
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 15 April 2023, 19:53:39
So,

FHEM shutdown restart / reboot Pi gemacht.

Keine Änderung. Im Log steht:
Zitat2023.04.15 19:42:55 1: fhempy_local: Can't connect to ws:127.0.0.1:15733: Operation now in progress
2023.04.15 19:42:55 1: fhempy_local: Can't connect to ws:127.0.0.1:15733: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2023.04.15 19:42:55 1: BindingsIo (fhempy_local): ERROR during connection setup: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
.
.
2023.04.15 19:43:08 1: ws:127.0.0.1:15733 reappeared (fhempy_local)

Internals:
   BindingType fhempy
   DEF        fhempy
   DeviceName ws:127.0.0.1:15733
   FD         103
   FUUID      64380f8b-f33f-adfe-9ff4-48b4b5051fcedade
   FVERSION   10_BindingsIo.pm:0.182830/2019-01-16
   IP         127.0.0.1
   NAME       fhempy_local
   NR         1605
   NTFY_ORDER 50-fhempy_local
   PARTIAL   
   PORT       15733
   STATE      opened
   TYPE       BindingsIo
   WEBSOCKET  1
   binary     1
   connecttime 1681580587.9812
   devioLoglevel 0
   eventCount 10
   installing 0
   localBinding 1
   nextOpenDelay 10
   prev_error 127.0.0.1: Verbindungsaufbau abgelehnt (111)
   READINGS:
     2023-04-15 19:43:08   hostname        rpi00
     2023-04-15 19:43:08   os              posix
     2023-04-15 19:43:08   python          3.9.16
     2023-04-15 19:43:08   release         5.10.103-v7l+
     2023-04-15 19:43:07   state           opened
     2023-04-15 19:43:08   system          Linux
     2023-04-15 19:43:08   version         0.1.646
     2023-04-15 19:43:08   version_available 0.1.646
     2023-04-15 19:43:08   version_release_notes <html><a href="https://github.com/fhempy/fhempy/releases" target="_blank">Release Notes</a></html>
   args:
     fhempy_local
     BindingsIo
     fhempy
   messages:
     0:
     tuya_system:
     z2m:
Attributes:
   devStateIcon {      my $attr_ver = "1.1.0";;      my $status_img = "10px-kreis-gruen";;      my $status_txt = "connected";;      my $ver = ReadingsVal($name, "version", "-");;      my $ver_available = ReadingsVal($name, "version_available", $ver);;      my $update_icon = "";;      my $refresh_img = "refresh";;      my $refresh_txt = "Update fhempy";;      if ($ver_available ne $ver) {        $refresh_img = "refresh\@orange";;        $refresh_txt = "Version ".$ver_available." available for update";;      }      if (ReadingsVal($name, "state", "disconnected") eq "disconnected") {        $status_img = "10px-kreis-rot";;        $status_txt = "disconnected";;      }      $update_icon = "<a  href=\"/fhem?cmd.dummy=set $name update&XHR=1\" title=\"Start ".$ver_available." update\">".FW_makeImage($refresh_img, $refresh_txt)."</a>";;      my $restart_icon = "<a  href=\"/fhem?cmd.dummy=set $name restart&XHR=1\" title=\"Restart fhempy\">".FW_makeImage("control_reboot")."</a>";;      "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a> ".$ver." </a>".$update_icon.$restart_icon."</div>"    }
   group      fhempy
   icon       file_json-ld2
   room       fhempy
   verbose    1

Internals:
   DEF        0
   FD         95
   FUUID      64380f8b-f33f-adfe-5359-e68e35041a68342c
   FVERSION   10_fhempyServer.pm:0.182830/2019-01-16
   LAST_START 2023-04-15 19:42:50
   NAME       fhempyserver_15733
   NR         1606
   NTFY_ORDER 50-fhempyserver_15733
   PID        910
   STARTS     1
   STATE      ???
   TYPE       fhempyServer
   currentlogfile ./log/fhempy-2023-04-15.log
   eventCount 2
   logfile    ./log/fhempy-%Y-%m-%d.log
   CoProcess:
     cmdFn      fhempyServer_getCmd
     name       fhempy
     state      running FHEM/bindings/python/bin/fhempy
   READINGS:
     2023-04-15 19:42:50   fhempy          running FHEM/bindings/python/bin/fhempy
     2023-04-15 19:42:50   python          v3.9.16
Attributes:
   devStateIcon {      my $status_img = "10px-kreis-gruen";;      my $status_txt = "running";;      if (substr(ReadingsVal($name, "fhempy", "running"),0,7) ne "running") {        $status_img = "10px-kreis-rot";;        $status_txt = "stopped";;      }      "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a  href=\"/fhem?cmd.dummy=set $name restart&XHR=1\" title=\"Kill and restart\">".FW_makeImage("audio_repeat")."</a></div>"      }
   group      fhempy
   icon       python
   logfile    ./log/fhempy-%Y-%m-%d.log
   nrarchive  10
   room       fhempy
   verbose    1

Internals:
   BindingType fhempy
   DEF        fhempy
   DeviceName ws:127.0.0.1:15733
   FD         103
   FUUID      64380f8b-f33f-adfe-9ff4-48b4b5051fcedade
   FVERSION   10_BindingsIo.pm:0.182830/2019-01-16
   IP         127.0.0.1
   NAME       fhempy_local
   NR         1605
   NTFY_ORDER 50-fhempy_local
   PARTIAL   
   PORT       15733
   STATE      opened
   TYPE       BindingsIo
   WEBSOCKET  1
   binary     1
   connecttime 1681580587.9812
   devioLoglevel 0
   eventCount 10
   installing 0
   localBinding 1
   nextOpenDelay 10
   prev_error 127.0.0.1: Verbindungsaufbau abgelehnt (111)
   READINGS:
     2023-04-15 19:43:08   hostname        rpi00
     2023-04-15 19:43:08   os              posix
     2023-04-15 19:43:08   python          3.9.16
     2023-04-15 19:43:08   release         5.10.103-v7l+
     2023-04-15 19:43:07   state           opened
     2023-04-15 19:43:08   system          Linux
     2023-04-15 19:43:08   version         0.1.646
     2023-04-15 19:43:08   version_available 0.1.646
     2023-04-15 19:43:08   version_release_notes <html><a href="https://github.com/fhempy/fhempy/releases" target="_blank">Release Notes</a></html>
   args:
     fhempy_local
     BindingsIo
     fhempy
   messages:
     0:
     tuya_system:
     z2m:
Attributes:
   devStateIcon {      my $attr_ver = "1.1.0";;      my $status_img = "10px-kreis-gruen";;      my $status_txt = "connected";;      my $ver = ReadingsVal($name, "version", "-");;      my $ver_available = ReadingsVal($name, "version_available", $ver);;      my $update_icon = "";;      my $refresh_img = "refresh";;      my $refresh_txt = "Update fhempy";;      if ($ver_available ne $ver) {        $refresh_img = "refresh\@orange";;        $refresh_txt = "Version ".$ver_available." available for update";;      }      if (ReadingsVal($name, "state", "disconnected") eq "disconnected") {        $status_img = "10px-kreis-rot";;        $status_txt = "disconnected";;      }      $update_icon = "<a  href=\"/fhem?cmd.dummy=set $name update&XHR=1\" title=\"Start ".$ver_available." update\">".FW_makeImage($refresh_img, $refresh_txt)."</a>";;      my $restart_icon = "<a  href=\"/fhem?cmd.dummy=set $name restart&XHR=1\" title=\"Restart fhempy\">".FW_makeImage("control_reboot")."</a>";;      "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a> ".$ver." </a>".$update_icon.$restart_icon."</div>"    }
   group      fhempy
   icon       file_json-ld2
   room       fhempy
   verbose    1

Passen hier irgend welche Rechte nicht oder wird das Blockiert?
Im Device "WEB" hab ich die 127.0.0.0 als allowed eingetragen.

@dominik irgend eine Idee?

Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 15 April 2023, 22:48:51
Sorry, es war mein Fehler. Buster ist noch 3.7, Bullseye ist 3.9. Da solltest du irgendwann ein Upgrade machen.

Sieht eigentlich alles gut aus, was genau funktioniert nun nicht?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 15 April 2023, 23:03:21
Ich dachte eigentlich ich bin mit dem Pi4 auf dem aktuellen Stand gewesen ;)

Er findet keine Tuya und wie im Log zu sehen ist kann er keine Verbindung aufbauen.

Zitat2023.04.15 19:42:55 1: fhempy_local: Can't connect to ws:127.0.0.1:15733: Operation now in progress
2023.04.15 19:42:55 1: fhempy_local: Can't connect to ws:127.0.0.1:15733: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2023.04.15 19:42:55 1: BindingsIo (fhempy_local): ERROR during connection setup: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
.
.
2023.04.15 19:43:08 1: ws:127.0.0.1:15733 reappeared (fhempy_local)

Wenn ich in meinem Netzwerk den PI auf Ports scanne wird der Port 15733 gefunden.
Wie ich das Log verstehe die Verbindung aber abgelehnt.

Zumindest verstehe ich das so. Wer die Meldung nun erzeugt kannst Du sicher eher einschätzen.

Hatte wohl vorhin das falsche Device eingefügt für "tuya_system"
Internals:
   API_KEY    s7rrxxxxxxxxxxxxxxxx
   API_SECRET 2822ff4bc11xxxxxxxxxxxxxxxx
   DEF        tuya setup s7rrxxxxxxxxxxxxxxxx 2822ff4bc11xxxxxxxxxxxxxxxx 132344xxxxxxxxx
   DEVICEID   0
   FHEMPYTYPE tuya
   FUUID      643ae647-f33f-adfe-cc84-b67bb1538ed9d582
   FVERSION   10_fhempy.pm:0.182830/2019-01-16
   IODev      fhempy_local
   NAME       tuya_system
   NR         1610
   PYTHONTYPE tuya
   REGION     eu
   STATE      found 0 devices, start local scan...
   TYPE       fhempy
   eventCount 6
   READINGS:
     2023-04-15 22:59:44   state           found 0 devices, start local scan...
   args:
     tuya_system
     fhempy
     tuya
     setup
     s7rrxxxxxxxxxxxxxxxx
     2822ff4bc11xxxxxxxxxxxxxxxx
     132344xxxxxxxxx
   argsh:
Attributes:
   group      tuya
   icon       rc_SETUP
   room       fhempy

Stimmt den meine definition des Devices ? Wenn ja dann muss es ja irgendwo noch beim Verbindungsaufbau
in FHEM hacken wenn ich das Log so verstehen kann?

ZigBee2MQTT hab ich zum laufen gebracht.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 15 April 2023, 23:13:41
Die Verbindung ist da, das ist alles gut. Der Fehler um 19:43:55 ist, weil zu dem Zeitpunkt fhempy nicht gelaufen ist. Um 19:43:08 ist die Verbindung wieder aufgebaut worden und fhempy_local hat wahrscheinlich auch eine grüne Bubble.

Prüfe mal folgende Sachen:
 - iot Cloud ist mit QR Code mit SmartLife verbunden?
 - Du siehst in der iot Cloud die Devices?
 - iot Cloud ist auf Central Europe eingestellt?
 - Poste bitte auch das fhempy Log beim Scan.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 15 April 2023, 23:18:45
ZitatPrüfe mal folgende Sachen:
 - iot Cloud ist mit QR Code mit SmartLife verbunden? JA. Kann die Steckdosen per APP schalten
 - Du siehst in der iot Cloud die Devices? JA. kann sie via Tuya IOT schalten
 - iot Cloud ist auf Central Europe eingestellt?  JA

Zitat- Poste bitte auch das fhempy Log beim Scan.
Mit verbose 5 in diesem Device?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 15 April 2023, 23:24:45
Ja, verbose 5 in tuya_system.

Poste bitte einen Screenshot von den Device in tuya iot Cloud.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 15 April 2023, 23:29:27
Hier erst mal die Geräte bei Tuya

Um die NX-4491 gehts. Sind von Pearl.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 15 April 2023, 23:38:19
Im fhem-log finde ich gar nix bei Verbose 5.

Nur das hier im fhempy.log
Zitat2023-04-15 23:19:51,034 - DEBUG    - tuya_system: Device Listing
2023-04-15 23:19:51,034 - DEBUG    - tuya_system: []
2023-04-15 23:19:51,041 - DEBUG    - tuya_system: Scan local devices...
2023-04-15 23:20:11,090 - DEBUG    - tuya_system: Polling local devices...

Allerdings finde ich das
Zitatprev_error 127.0.0.1: Verbindungsaufbau abgelehnt (111)
nicht mehr in den fhempy_local?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 15 April 2023, 23:39:53
Ich weiß schon woran es liegt, tuya hat was umgestellt bei der Cloud Abfrage. Ich melde mich morgen mit einem Fix.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 15 April 2023, 23:44:35
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
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 16 April 2023, 14:02:46
Danke dir vielmals für die Spende!!

tuya sollte jetzt wieder funktionieren, bitte fhempy Update und dann nochmals einen Scan machen.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 16 April 2023, 14:13:22
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
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 16 April 2023, 14:20:05
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
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 16 April 2023, 14:25:42
Ändert Tuya das öfter Mal oder wieso ist das nur bei mir gewesen?
Zufall?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 16 April 2023, 14:29:21
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)
Titel: Aw: fhempy: tuya (lokal)
Beitrag 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.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 16 April 2023, 14:54:18
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.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 16 April 2023, 14:55:03
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!
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 16 April 2023, 14:56:23
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.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 16 April 2023, 15:08:45
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
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 16 April 2023, 15:11:18
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.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 16 April 2023, 15:50:33
Danke. Ganzen tag keine devices gefunden, nach update jetzt wieder 8 devices lokal gefunden.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 17 April 2023, 11:19:32
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
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: RappaSan am 17 April 2023, 11:59:44
Ich weiß, daß es am fhempy vorbeigeht, aber in OpenBeken gibt's einige Aubess devices.
Vielleicht läßt sich die Steckdose OTA mittels Tuya cloud Cutter flash auf MQTT bringen?
Weitere Infos zum flashen unter https://forum.fhem.de/index.php?topic=132624.0
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: thburkhart am 17 April 2023, 17:24:10
Zitat von: dominik am 14 April 2023, 00:14:25
Zitat von: thburkhart am 13 April 2023, 21:49:33Hallo Dominik,

eben stelle ich fest, dass wohl seit 7.4.23 meine Stecker SP xx nicht mehr aktualisiert werden. Dies aus heiterem Himmel.

Auch ein restart von fhempy hilft nicht? Die SP sind doch die Zwischenstecker, oder?

bei mir lag es daran, dass das Fritz OS 7.5 den Geräten trotz "die selbe IP verwenden" andere IPs zugewiesen hatte und auch nicht mehr zuweisen konnte.
So habe ich in diesem Zuge auf tuya_cloud umgestellt.
Ich versuche später, die Locale Zuweisung wieder frisch vorzunehmen. Für ca. 80 Devices war es mir im Moment zu viel ;-)

lg

Thomas
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: GodVatter am 18 April 2023, 07:32:28
Zitat von: thburkhart am 17 April 2023, 17:24:10Hallo

bei mir lag es daran, dass das Fritz OS 7.5 den Geräten trotz "die selbe IP verwenden" andere IPs zugewiesen hatte und auch nicht mehr zuweisen konnte.
So habe ich in diesem Zuge auf tuya_cloud umgestellt.
Ich versuche später, die Locale Zuweisung wieder frisch vorzunehmen. Für ca. 80 Devices war es mir im Moment zu viel ;-)

lg

Thomas

Was meinst du mit lokaler Zuweisung wieder frisch vornehmen? Ich kann über fhempy_local nämlich nicht schalten, Device wird erzeugt, aber dann geht nichts.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Christian83 am 19 April 2023, 09:50:28
Zitat von: Gisbert am 17 April 2023, 11:19:32Hallo 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


Deine Entwickler Testlizenz bei Iot Tuya ist abgelaufen. Musst du verlängern. Dann kannst du die Geräte wieder anlegen lassen.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Matt1185 am 19 April 2023, 10:45:34
Zitat von: dominik am 05 April 2023, 21:45:23
Zitat von: Matt1185 am 22 März 2023, 10:46:01Hallo Zusammen,

ich hab diese Bewegungsmelder:
https://a.aliexpress.com/_EuU6qd1

Sie werden beim scan gefunden und ich kann sie als devices anlegen. Die richtige IP Adresse habe ich eingetragen. Dann bekomme ich genau einmal ein Update der readings und dann nie wieder.

Sollten solche passiven Devices mittlerweile laufen?

Vielen Dank,
Matthias

Ja, sollten laufen. Wobei ich mit meinem Rauchmelder auch noch Probleme habe :( denis.robel sein Rauchmelder läuft.
Bekommst du wirklich 1x ein Update der Readings? Ich denke das sind nur die Standardreadings, aber kein "motion" Reading oder so?

Generell meine Empfehlung an alle:
Bewegungsmelder, Türsensoren, etc. besser als Zigbee Device kaufen und mit Zigbee2MQTT integrieren - fragen dazu gerne in einem anderen Thread. Das ist super stabil und erfordert keinen WLAN Aufbau beim Senden von Signalen.

Hallo Dominik,

ja genau es kommt kein motion Reading, nur die Standardreadings.
Allerdings kommen die nach einem Neustart genau dann wenn der PIR auslöst.
Siehst du ne Chance dass das in Zukunft funktionieren wird oder soll ich besser gleich auf Zigbee gehen?

Danke und Grüße, Matthias
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 20 April 2023, 10:32:45
Hallo.
Gibts Lösung zum regelmässigen Ausfall der lokalen Devices? Schalten, etc. geht dann immer nur nach update des local_pybinding.

oder wäre es besser auf die cloud umzustellen?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 20 April 2023, 16:43:13
Zitat von: Christian83 am 19 April 2023, 09:50:28Deine Entwickler Testlizenz bei Iot Tuya ist abgelaufen. Musst du verlängern. Dann kannst du die Geräte wieder anlegen lassen.

Hallo Christian,

die Verifizierung der Testlizenz hat über Nacht gedauert. Heute Morgen lief dann alles wieder glatt und es wurde alle Geräte gefunden. Vielen Dank für deinen Hinweis.

Ich hab noch eine andere Frage. Kann ich den Geräten eine neue IP-Adresse aus einem anderen Adressereich zuweisen? Bei den Device-Definitionen in Fhem würde ich die dann übernehmen. Würde das so funktionieren oder muss ich mehr machen?

Viele Grüße Gisbert

Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 21 April 2023, 20:50:38
Zitat von: Gisbert am 20 April 2023, 16:43:13
Zitat von: Christian83 am 19 April 2023, 09:50:28Deine Entwickler Testlizenz bei Iot Tuya ist abgelaufen. Musst du verlängern. Dann kannst du die Geräte wieder anlegen lassen.

Hallo Christian,

die Verifizierung der Testlizenz hat über Nacht gedauert. Heute Morgen lief dann alles wieder glatt und es wurde alle Geräte gefunden. Vielen Dank für deinen Hinweis.

Ich hab noch eine andere Frage. Kann ich den Geräten eine neue IP-Adresse aus einem anderen Adressereich zuweisen? Bei den Device-Definitionen in Fhem würde ich die dann übernehmen. Würde das so funktionieren oder muss ich mehr machen?

Viele Grüße Gisbert


Ja, das funktioniert. FHEM Device DEF ändern nicht vergessen.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 21 April 2023, 20:53:27
Zitat von: Matt1185 am 19 April 2023, 10:45:34
Zitat von: dominik am 05 April 2023, 21:45:23
Zitat von: Matt1185 am 22 März 2023, 10:46:01Hallo Zusammen,

ich hab diese Bewegungsmelder:
https://a.aliexpress.com/_EuU6qd1

Sie werden beim scan gefunden und ich kann sie als devices anlegen. Die richtige IP Adresse habe ich eingetragen. Dann bekomme ich genau einmal ein Update der readings und dann nie wieder.

Sollten solche passiven Devices mittlerweile laufen?

Vielen Dank,
Matthias

Ja, sollten laufen. Wobei ich mit meinem Rauchmelder auch noch Probleme habe :( denis.robel sein Rauchmelder läuft.
Bekommst du wirklich 1x ein Update der Readings? Ich denke das sind nur die Standardreadings, aber kein "motion" Reading oder so?

Generell meine Empfehlung an alle:
Bewegungsmelder, Türsensoren, etc. besser als Zigbee Device kaufen und mit Zigbee2MQTT integrieren - fragen dazu gerne in einem anderen Thread. Das ist super stabil und erfordert keinen WLAN Aufbau beim Senden von Signalen.

Hallo Dominik,

ja genau es kommt kein motion Reading, nur die Standardreadings.
Allerdings kommen die nach einem Neustart genau dann wenn der PIR auslöst.
Siehst du ne Chance dass das in Zukunft funktionieren wird oder soll ich besser gleich auf Zigbee gehen?

Danke und Grüße, Matthias
Die Standardreadings werden aus der Cloud bezogen, die erhält man vom Device selbst leider nicht.
Ich bin noch dran, dass ich das zum Laufen bekomme.

@thburkhart, laufen deine passiven (Temperatur) Devices nun mit tuya local?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: McShire am 21 April 2023, 21:31:20
Zitat von: dominik am 21 April 2023, 20:53:27
Zitat von: Matt1185 am 19 April 2023, 10:45:34
Zitat von: dominik am 05 April 2023, 21:45:23Die Standardreadings werden aus der Cloud bezogen, die erhält man vom Device selbst leider nicht.
Ich bin noch dran, dass ich das zum Laufen bekomme.

@thburkhart, laufen deine passiven (Temperatur) Devices nun mit tuya local?

Hallo zusammen,
nachdem ich , wie auf Seite 53, 10. April, beschrieben, meinen passiven T+H Sensor "gepaired" habe,
funktioniert er.

Viele Grüße
Werner
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 24 April 2023, 18:09:25
Hallo dominik,

heute ist wieder bei dem Device tuya_system das state bei "fhempy server offline".

Im fhempy-log steht gar nichts.
Auf Systemebene steht:
HPT610FHEM@HPT610:/opt/fhem$ sudo FHEM/bindings/python/bin/fhempy --local
2023-04-24 17:42:49,606 - INFO    - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.535...
2023-04-24 17:42:49,690 - INFO    - fhempy.lib.pkg_installer: Attempting install of async-upnp-client==0.31.2
2023-04-24 17:42:49,707 - WARNING  - asyncio: Executing <Task pending name='Task-1' coro=<async_main() running at /usr/local/lib/python3.9/dist-packages/fhempy/lib/fhem_pythonbinding.py:610> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at /usr/lib/python3.9/asyncio/futures.py:384, <TaskWakeupMethWrapper object at 0x7f9a4515ddc0>()] created at /usr/lib/python3.9/asyncio/base_events.py:424> cb=[_run_until_complete_cb() at /usr/lib/python3.9/asyncio/base_events.py:184] created at /usr/lib/python3.9/asyncio/base_events.py:621> took 0.101 seconds
2023-04-24 17:43:03,725 - INFO    - fhempy.lib.pkg_installer: Successfully installed async-upnp-client==0.31.2 update!
2023-04-24 17:43:03,731 - INFO    - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
Traceback (most recent call last):
  File "/opt/fhem/FHEM/bindings/python/bin/fhempy", line 162, in <module>
    fpb.run()
  File "/usr/local/lib/python3.9/dist-packages/fhempy/lib/fhem_pythonbinding.py", line 708, in run
    loop.run_until_complete(async_main())
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete    return future.result()
  File "/usr/local/lib/python3.9/dist-packages/fhempy/lib/fhem_pythonbinding.py", line 616, in async_main
    async with websockets.serve(
  File "/usr/local/lib/python3.9/dist-packages/websockets/legacy/server.py", line 1070, in __aenter__
    return await self
  File "/usr/local/lib/python3.9/dist-packages/websockets/legacy/server.py", line 1088, in __await_impl__
    server = await self._create_server()
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1494, in create_server
    raise OSError(err.errno, 'error while attempting '
OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 15733): address already in use
HPT610FHEM@HPT610:/opt/fhem$

Im Fhem-logfile steht nicht viel:
2023.04.24 17:40:36.669 3:  fhempyserver_15733: starting
2023.04.24 17:40:36.739 2:  Deleting fhempy-2023-04-14.log
2023.04.24 17:40:36.740 3:  fhempyserver_15733: using logfile: ./log/fhempy-2023-04-24.log

Kannst damit was anfangen?

Ein Neustart von Fhem behebt zwar den Missstand, aber das sollte so keine Dauerlösung sein.

Viele Grüße Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 24 April 2023, 23:23:02
Zitat von: Gisbert am 24 April 2023, 18:09:25HPT610FHEM@HPT610:/opt/fhem$ sudo FHEM/bindings/python/bin/fhempy --local
2023-04-24 17:42:49,606 - INFO    - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.535...

Warum sudo? fhempy sollte immer als User fhem laufen, nicht als root!
Außerdem ist 0.1.535 schon ziemlich alt, bitte da auch ein Update machen.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 26 April 2023, 00:05:13
Hallo dominik,
wir kommen der Sache näher, aber ich benötige deine Hilfe bei der Umsetzung.

ZitatWarum sudo? fhempy sollte immer als User fhem laufen, nicht als root!
Außerdem ist 0.1.535 schon ziemlich alt, bitte da auch ein Update machen.

Ohne sudo gab es missing permission (oder so ähnlich): wie lasse ich fhempy als User Fhem laufen?
0.1.535 ziemlich alt: wie mache ich ein update? Die Buttons in den Devices habe ich mehrfach bedient.

Viele Grüße Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dominik am 26 April 2023, 18:46:15
Da liegt wahrscheinlich auch das Problem. Du hast irgendwann per sudo fhempy ausgeführt und daher sind die Berechtigungen falsch gesetzt.
chown fhem:dialout -R /opt/fhem/*
sollte das Problem hoffentlich lösen. Danach müsste auch ein Update klappen
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 26 April 2023, 22:17:36
Hallo dominik,

ich hab jetzt fhempy auf die Version 0.1.648 updaten können.

Ich hab die Fhem-Devices neu gestartet, jetzt gibt es ein neues Device:
defmod fhempy_peer_192_168_1_46 BindingsIo 192.168.1.46:15733 fhempy
attr fhempy_peer_192_168_1_46 devStateIcon {      my $attr_ver = "1.1.0";;;;      my $status_img = "10px-kreis-gruen";;;;      my $status_txt = "connected";;;;      my $ver = ReadingsVal($name, "version", "-");;;;      my $ver_available = ReadingsVal($name, "version_available", $ver);;;;      my $update_icon = "";;;;      my $refresh_img = "refresh";;;;      my $refresh_txt = "Update fhempy";;;;      if ($ver_available ne $ver) {        $refresh_img = "refresh\@orange";;;;        $refresh_txt = "Version ".$ver_available." available for update";;;;      }      if (ReadingsVal($name, "state", "disconnected") eq "disconnected") {        $status_img = "10px-kreis-rot";;;;        $status_txt = "disconnected";;;;      }      $update_icon = "<a  href=\"/fhem?cmd.dummy=set $name update&XHR=1\" title=\"Start ".$ver_available." update\">".FW_makeImage($refresh_img, $refresh_txt)."</a>";;;;      my $restart_icon = "<a  href=\"/fhem?cmd.dummy=set $name restart&XHR=1\" title=\"Restart fhempy\">".FW_makeImage("control_reboot")."</a>";;;;      "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a> ".$ver." </a>".$update_icon.$restart_icon."</div>"    }
attr fhempy_peer_192_168_1_46 group fhempy
attr fhempy_peer_192_168_1_46 icon file_json-ld2
attr fhempy_peer_192_168_1_46 room fhempy

define fhempy_peer_192_168_1_46 BindingsIo 192.168.1.46:15733 fhempy
attr fhempy_peer_192_168_1_46 devStateIcon {      my $attr_ver = "1.1.0";;;;      my $status_img = "10px-kreis-gruen";;;;      my $status_txt = "connected";;;;      my $ver = ReadingsVal($name, "version", "-");;;;      my $ver_available = ReadingsVal($name, "version_available", $ver);;;;      my $update_icon = "";;;;      my $refresh_img = "refresh";;;;      my $refresh_txt = "Update fhempy";;;;      if ($ver_available ne $ver) {        $refresh_img = "refresh\@orange";;;;        $refresh_txt = "Version ".$ver_available." available for update";;;;      }      if (ReadingsVal($name, "state", "disconnected") eq "disconnected") {        $status_img = "10px-kreis-rot";;;;        $status_txt = "disconnected";;;;      }      $update_icon = "<a  href=\"/fhem?cmd.dummy=set $name update&XHR=1\" title=\"Start ".$ver_available." update\">".FW_makeImage($refresh_img, $refresh_txt)."</a>";;;;      my $restart_icon = "<a  href=\"/fhem?cmd.dummy=set $name restart&XHR=1\" title=\"Restart fhempy\">".FW_makeImage("control_reboot")."</a>";;;;      "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a> ".$ver." </a>".$update_icon.$restart_icon."</div>"    }
attr fhempy_peer_192_168_1_46 group fhempy
attr fhempy_peer_192_168_1_46 icon file_json-ld2
attr fhempy_peer_192_168_1_46 room fhempy
#  BindingType fhempy
#  CFGFN     
#  DEF        192.168.1.46:15733 fhempy
#  DeviceName ws:192.168.1.46:15733
#  FD        75
#  FUUID      64497a89-f33f-e986-93ad-ae539b6aea7ff5c8
#  IP        192.168.1.46
#  NAME      fhempy_peer_192_168_1_46
#  NR        3319
#  NTFY_ORDER 50-fhempy_peer_192_168_1_46
#  PARTIAL   
#  PORT      15733
#  STATE      opened
#  TYPE      BindingsIo
#  WEBSOCKET  1
#  binary    1
#  connecttime 1682538071.46302
#  devioLoglevel 0
#  eventCount 37
#  localBinding 0
#  nextOpenDelay 10
#  prev_error 192.168.1.46: Connection refused (111)
#  READINGS:
#    2023-04-26 21:41:11  hostname        HPT610
#    2023-04-26 21:41:11  os              posix
#    2023-04-26 21:41:11  python          3.9.2
#    2023-04-26 21:41:11  release        6.1.0-0.deb11.5-amd64
#    2023-04-26 21:41:11  state          opened
#    2023-04-26 21:41:11  system          Linux
#    2023-04-26 21:41:11  version        0.1.648
#    2023-04-26 21:41:11  version_available 0.1.648
#    2023-04-26 21:41:11  version_release_notes <html><a href="https://github.com/fhempy/fhempy/releases" target="_blank">Release Notes</a></html>
#  args:
#    fhempy_peer_192_168_1_46
#    BindingsIo
#    192.168.1.46:15733
#    fhempy
#  helper:
#    bm:
#      CODE(0x5625901c3f08):
#        cnt        1
#        dmx        -1000
#        dtot      0
#        dtotcnt    0
#        mTS        26.04. 21:24:57
#        max        0.202886819839478
#        tot        0.202886819839478
#        mAr:
#          HASH(0x56258e83faa8)
#          ARRAY(0x5625915095d0)
#          HASH(0x562591f27028)
#      CODE(0x56259058fc18):
#        cnt        1831
#        dmx        -1000
#        dtot      0
#        dtotcnt    0
#        mTS        26.04. 21:40:50
#        max        0.000236988067626953
#        tot        0.0621466636657715
#        mAr:
#          HASH(0x56258e83faa8)
#          HASH(0x5625890a5168)
#      CODE(0x562590590110):
#        cnt        19337
#        dmx        -1000
#        dtot      0
#        dtotcnt    0
#        mTS        26.04. 21:41:11
#        max        0.166298866271973
#        tot        84.6356692314148
#        mAr:
#          HASH(0x56258e83faa8)
#      CODE(0x5625905903f8):
#        cnt        11
#        dmx        -1000
#        dtot      0
#        dtotcnt    0
#        mTS        26.04. 21:39:39
#        max        0.00430798530578613
#        tot        0.0180890560150146
#        mAr:
#          HASH(0x56258e83faa8)
#      CODE(0x562590592db8):
#        cnt        3
#        dmx        -1000
#        dtot      0
#        dtotcnt    0
#        mTS        26.04. 21:46:58
#        max        1.21593475341797e-05
#        tot        2.74181365966797e-05
#        mAr:
#          HASH(0x56258e83faa8)
#          ARRAY(0x562592e98660)
#          HASH(0x562591ed7550)
#      CODE(0x562590592e90):
#        cnt        25
#        dmx        -1000
#        dtot      0
#        dtotcnt    0
#        mTS        26.04. 21:40:51
#        max        0.00199294090270996
#        tot        0.00243258476257324
#        mAr:
#          HASH(0x56258e83faa8)
#          ARRAY(0x562591940e18)
#          HASH(0x5625910dbf40)
#      CODE(0x562590593058):
#        cnt        4
#        dmx        -1000
#        dtot      0
#        dtotcnt    0
#        mTS        26.04. 21:24:57
#        max        3.09944152832031e-05
#        tot        7.60555267333984e-05
#        mAr:
#          set
#          fhempy_peer_192_168_1_46
#          room
#          fhempy
#  messages:
#    0:
#
setstate fhempy_peer_192_168_1_46 opened
setstate fhempy_peer_192_168_1_46 2023-04-26 21:41:11 hostname HPT610
setstate fhempy_peer_192_168_1_46 2023-04-26 21:41:11 os posix
setstate fhempy_peer_192_168_1_46 2023-04-26 21:41:11 python 3.9.2
setstate fhempy_peer_192_168_1_46 2023-04-26 21:41:11 release 6.1.0-0.deb11.5-amd64
setstate fhempy_peer_192_168_1_46 2023-04-26 21:41:11 state opened
setstate fhempy_peer_192_168_1_46 2023-04-26 21:41:11 system Linux
setstate fhempy_peer_192_168_1_46 2023-04-26 21:41:11 version 0.1.648
setstate fhempy_peer_192_168_1_46 2023-04-26 21:41:11 version_available 0.1.648
setstate fhempy_peer_192_168_1_46 2023-04-26 21:41:11 version_release_notes <html><a href="https://github.com/fhempy/fhempy/releases" target="_blank">Release Notes</a></html>


192.168.1.46 ist die IP-Adresse meines Fhem-Servers.

Was mach ich jetzt mit diesem Device?

Viele Grüße Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 28 April 2023, 20:02:44
so, und schon wieder "update" nötig, weul Geräte nicht schalten. irgendwo is der wurm drin.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 29 April 2023, 11:22:20
Hallo dominik,

ich hab 2 schaltbare Steckdosen, die aber nicht immer in einer Steckdose drin stecken. Um das zu erfassen, habe ich einen readingsWatcher (Fhem-Modul) laufen, der ein reading actifity in das tuya-Device schreibt:
2023.04.29 10:31:05.526 1:  'setreading tuya_local_bfe... actifity alive' called form userReadings is prohibited
2023.04.29 10:33:05.792 1:  'setreading tuya_local_bf1... actifity alive' called form userReadings is prohibited
Gleichwohl werden die Readings mit jedem Überwachungszyklus neu geschrieben.

Kann ich die log-Einträge ignorieren, und wie bekomme ich sie bestenfalls gar nicht erst angezeigt?

Viele Grüße Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: uwirt am 02 Mai 2023, 15:43:51
fhempy local läuft bei mir und ich kann die beiden Luftenfeuchter sehen. Leider kann ich aus den Readings nicht sehen ob die Enfteuchter nun tatsächlich entfeuchten oder ob sie nur eingeschaltet sind.  Ausserdem möchte ich gerne eine Nachricht absetzen wenn der Tank voll ist.

Das List des einen Entfeuchters schaut folgendermassen aus:
Internals:
   DEF        tuya ifxxx bf0c0040417c5be27fziuv 192.168.1.222 34xxx 3.3 t3xxx 74xxx
   DEVICEID   bf0c0040417c5be27fziuv
   FHEMPYTYPE tuya
   FUUID      64500d0b-f33f-521d-c1af-e8b32b54ea4f308d
   IODev      fhempy_local
   NAME       tuya_local_bf0c0040417c5be27fziuv
   NR         230
   PYTHONTYPE tuya
   STATE      on
   TYPE       fhempy
   eventCount 3122
   READINGS:
     2023-05-01 21:03:45   active_time     1647326323
     2023-05-01 21:03:45   biz_type        0
     2023-05-01 21:03:45   category        cs
     2023-05-01 21:03:45   countdown_set   cancel
     2023-05-01 21:03:45   create_time     1647326323
     2023-05-01 21:03:45   dehumidify_set_enum 60
     2023-05-01 21:03:45   dp_101          0
     2023-05-01 21:03:45   dp_102          0
     2023-05-01 21:03:45   fan_speed_enum  low
     2023-05-01 21:03:45   fault           0
     2023-05-02 15:37:31   humidity        62.0
     2023-05-02 15:27:35   humidity_indoor 62.0
     2023-05-01 21:03:45   icon            smart/icon/ay1540889171034rOso7/6e43c268ce8e1a14e5ad10b8f399b835.png
     2023-05-01 21:03:45   id              bf0c0040417c5be27fziuv
     2023-05-01 21:03:45   ip              80.219.133.218
     2023-05-01 21:03:45   lat             46.9400
     2023-05-01 21:03:45   local_key       34xxx
     2023-05-01 21:03:45   lon             7.4800
     2023-05-01 21:03:45   model           WDH-930EEW
     2023-05-01 21:03:45   name            WDH-930EEW Keller
     2023-05-02 04:31:22   online          1
     2023-05-01 21:03:45   owner_id        52840618
     2023-05-01 21:03:45   product_id      ifxxx
     2023-05-01 21:03:45   product_name    WDH-930EEW
     2023-05-02 04:32:03   state           on
     2023-05-02 15:37:31   statenum        1
     2023-05-01 21:03:45   sub             0
     2023-05-01 21:03:45   switch          on
     2023-05-02 14:44:13   temp_indoor     22.0
     2023-05-02 15:37:31   temperature     22.0
     2023-05-01 21:03:45   time_zone       +01:00
     2023-05-01 21:03:45   uid             euxxx
     2023-05-01 21:03:45   update_time     1682791316
     2023-05-01 21:03:45   uuid            17xxx
   args:
     tuya_local_bf0c0040417c5be27fziuv
     fhempy
     tuya
     ifbnzf2j2rwr0upp
     bf0c0040417c5be27fziuv
     192.168.1.222
     34a6a25e79be58de
     3.3
     t3xxx
     74xxx
   argsh:
   hmccu:
Attributes:
   alias      WDH-930EEW Keller
   dp_01      switch
   dp_03      dehumidify_set_enum
   dp_04      fan_speed_enum
   dp_06      humidity_indoor
   dp_07      temp_indoor
   dp_17      countdown_set
   dp_19      fault
   group      tuya
   room       fhempy
   tuya_spec_functions [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'dehumidify_set_enum', 'dp_id': 3, 'type': 'Enum', 'values': {'range': ['30', '40', '50']}, 'desc': 'dehumidify set enum'}, {'code': 'fan_speed_enum', 'dp_id': 4, 'type': 'Enum', 'values': {'range': ['low', 'high']}, 'desc': 'fan speed enum'}, {'code': 'countdown_set', 'dp_id': 17, 'type': 'Enum', 'values': {'range': ['cancel', '1h', '2h', '3h']}, 'desc': 'countdown set'}]
   tuya_spec_status [{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'dehumidify_set_enum', 'dp_id': 3, 'type': 'Enum', 'values': {'range': ['30', '40', '50']}}, {'code': 'fan_speed_enum', 'dp_id': 4, 'type': 'Enum', 'values': {'range': ['low', 'high']}}, {'code': 'humidity_indoor', 'dp_id': 6, 'type': 'Integer', 'values': {'unit': '%', 'min': 30, 'max': 90, 'scale': 0, 'step': 1}}, {'code': 'temp_indoor', 'dp_id': 7, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 50, 'scale': 0, 'step': 1}}, {'code': 'countdown_set', 'dp_id': 17, 'type': 'Enum', 'values': {'range': ['cancel', '1h', '2h', '3h']}}, {'code': 'fault', 'dp_id': 19, 'type': 'Bitmap', 'values': {'label': ['E1', 'E2']}}]
   userReadings temperature { ReadingsVal("tuya_local_bf0c0040417c5be27fziuv","temp_indoor",0) }, humidity { ReadingsVal("tuya_local_bf0c0040417c5be27fziuv","humidity_indoor",0) }, statenum {if(ReadingsVal("tuya_local_bf0c0040417c5be27fziuv","state","") eq "off") {return 0} else {return 1}}

Wie kann ich sicher sein dass alle dp's  als readings dargestellt werden oder kann man das gar nicht beeinflussen?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 03 Mai 2023, 16:15:01
Zitat von: Gisbert am 29 April 2023, 11:22:20Hallo dominik,

ich hab 2 schaltbare Steckdosen, die aber nicht immer in einer Steckdose drin stecken. Um das zu erfassen, habe ich einen readingsWatcher (Fhem-Modul) laufen, der ein reading actifity in das tuya-Device schreibt:
2023.04.29 10:31:05.526 1:  'setreading tuya_local_bfe... actifity alive' called form userReadings is prohibited
2023.04.29 10:33:05.792 1:  'setreading tuya_local_bf1... actifity alive' called form userReadings is prohibited
Gleichwohl werden die Readings mit jedem Überwachungszyklus neu geschrieben.

Kann ich die log-Einträge ignorieren, und wie bekomme ich sie bestenfalls gar nicht erst angezeigt?

Viele Grüße Gisbert

Hallo dominik,

ich bin jetzt bei verbose 0 - und die log-Einträge gehen unverändert weiter.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 03 Mai 2023, 16:20:21
Zitat von: Gisbert am 29 April 2023, 11:22:20Hallo dominik,

ich hab 2 schaltbare Steckdosen, die aber nicht immer in einer Steckdose drin stecken. Um das zu erfassen, habe ich einen readingsWatcher (Fhem-Modul) laufen, der ein reading actifity in das tuya-Device schreibt:
2023.04.29 10:31:05.526 1:  'setreading tuya_local_bfe... actifity alive' called form userReadings is prohibited
2023.04.29 10:33:05.792 1:  'setreading tuya_local_bf1... actifity alive' called form userReadings is prohibited
Gleichwohl werden die Readings mit jedem Überwachungszyklus neu geschrieben.

Kann ich die log-Einträge ignorieren, und wie bekomme ich sie bestenfalls gar nicht erst angezeigt?

Viele Grüße Gisbert

Hallo dominik,

ich bin jetzt bei verbose 0 - und die log-Einträge gehen unverändert weiter.
2023.05.03 12:51:03.167 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 12:52:03.292 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 12:53:03.337 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 12:54:03.439 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 12:55:03.569 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 12:56:03.641 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 12:56:03.642 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 13:42:08.403 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 13:42:08.404 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 13:46:08.798 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 13:47:08.922 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 13:47:08.923 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 13:48:08.992 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 13:48:08.992 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 13:49:09.102 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 13:49:09.103 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 14:40:14.772 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 14:40:14.773 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 14:41:14.869 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 14:41:14.869 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 14:42:14.950 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 14:42:14.951 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 14:43:15.047 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 14:43:15.048 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 14:44:15.179 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 14:44:15.180 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 14:45:15.279 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 14:45:15.280 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 15:39:21.526 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 15:39:21.527 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 15:41:21.736 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 15:41:21.737 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 15:43:21.865 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 15:43:21.866 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited
2023.05.03 15:44:21.950 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 15:45:22.059 1:  'setreading tuya_local_bf1f765162617dcd31ido7 actifity alive' called form userReadings is prohibited
2023.05.03 15:45:22.060 1:  'setreading tuya_local_bf40c31ece6575958bzage actifity alive' called form userReadings is prohibited

Wo kann ich dich unterstützen? Gibt es irgendeine Möglichkeit diese log-Einträge zu ignorieren?

Viele Grüße Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 19 Mai 2023, 15:18:31
weil ich täglich autom. update, habe ich keine probs mehr mit tuya lokal.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Kuehnhackel am 26 Mai 2023, 11:15:57
Hallo zusammen,

ich habe eine elektrische Handtuchheizung installiert, die über Tuya angesteuert wird.

Die Heizung kann ich per Fhem ein- und ausschalten und die Temperatur ändern.

Ich würde gerne aber auch die Schaltstufe LOW/High -> dp07 Low/High ändern können, ebenso das "Touchfeld sperren" -> dp02 - 0/1
-> dp 05 ist ein Timer in Minuten, wäre auch super wenn dass klappen könnte.

List der Readings:
active_time    1682155744
biz_type    0
category    qn
create_time    1682155744
dp_02    0
dp_05    0
dp_07    High
icon    smart/icon/1470624702_0.jpeg
id    65373041bcff4xxxxx
ip    109.xxxx
lat    533.700
local_key    df0635122xxx
lon    104.900
model    NPH-2000G-WIFI
name    Heizung Bad
online    1
owner_id    154256418
product_id    ynjanlglr4qa6dxf
product_name    Panel heater
state    on
sub    0
temp_current    27.0
temp_set    31.0
time_zone    +01:00
uid    eu1682155xxxx
update_time    1685083536
uuid    65373041bcxxx

Liste der Attribute:
alias Heizung Bad

dp_01 switch

dp_03 temp_set

dp_04 temp_current

group tuya

room fhempy

tuya_spec_functions
[{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}, 'desc': 'switch'}, {'code': 'temp_set', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 5, 'max': 40, 'scale': 0, 'step': 1}, 'desc': 'temp set'}]


tuya_spec_status
[{'code': 'switch', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'temp_set', 'dp_id': 3, 'type': 'Integer', 'values': {'unit': '℃', 'min': 5, 'max': 40, 'scale': 0, 'step': 1}}, {'code': 'temp_current', 'dp_id': 4, 'type': 'Integer', 'values': {'unit': '℃', 'min': 0, 'max': 100, 'scale': 0, 'step': 1}}]

Ich hoffe jemand kann helfen.

Sonnige Grüße

Ralf
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: uwirt am 08 Juni 2023, 14:19:17
Ich habe folgende Fehlermeldung nach dem Scannen und mit create_device:

Failed to execute function Set: Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.10/site-packages/fhempy/lib/fhem_pythonbinding.py", line 385, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/opt/fhem/.local/lib/python3.10/site-packages/fhempy/lib/fhem_pythonbinding.py", line 484, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.10/asyncio/tasks.py", line 445, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.10/site-packages/fhempy/lib/generic.py", line 208, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/opt/fhem/.local/lib/python3.10/site-packages/fhempy/lib/utils.py", line 338, in handle_set
    return await fct_call(hash, final_params)
  File "/opt/fhem/.local/lib/python3.10/site-packages/fhempy/lib/tuya/tuya.py", line 307, in set_create_device
    f"tuya_local_{dev['device_id']} localkey {dev['key']}",
KeyError: 'key'


Ich habe es gelöst - ich musste das attr local_key ergänzen.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: stefanru am 09 Juni 2023, 16:12:22
Hi,

ich möchte auch nochmal kurz mein Fehler mit dem "middle" Wert erwähnen, bevor es untergeht.
2023.06.09 15:51:55 1: BindingsIo (local_pybinding): Argument "middle" isn't numeric in numeric gt (>) at (eval 22460618) line 1.
 => COMMAND: readingsEndUpdate($defs{'tuya_cloud_bffa550a829a269630vhcn'},1);;
2023.06.09 15:51:55 1: BindingsIo (local_pybinding):    command = readingsEndUpdate($defs{'tuya_cloud_bffa550a829a269630vhcn'},1);;
2023.06.09 15:51:55 1: BindingsIo (local_pybinding):    NAME = tuya_cloud_bffa550a829a269630vhcn
2023.06.09 15:51:55 1: BindingsIo (local_pybinding):    awaitId = 49500712
2023.06.09 15:51:55 1: BindingsIo (local_pybinding):    msgtype = command

Ist nicht eilig, müllt nur etwas das Logfile voll.

Gruß,
Stefan
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 10 Juni 2023, 13:22:05
Ich habe die Installation gemäss der Anleitung https://github.com/fhempy/fhempy#installation durchgeführt.
Dann habe ich noch Python aktualisiert und OpenSSL dafür aktiviert.

Nun scheitere ich an folgender Fehlermeldung:
2023-06-10 12:54:03,103 - INFO     - __main__: Attempting install of fhempy>=0.1.462
2023-06-10 13:04:31,703 - ERROR    - __main__: Unable to install package fhempy>=0.1.462: WARNING: The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
ERROR: Could not install packages due to an OSError: [Errno 13] Keine Berechtigung: '/root/.local'
Check the permissions.
2023-06-10 13:04:31,703 - ERROR    - __main__: Failed to install fhempy, exit now...

Allerdings läuft "pip" nicht als root soweit ich das beurteilen kann:
pi@raspberrypi:/opt/fhem$ ps aux | grep "pip"
fhem     20130  8.6  5.8  64104 57856 ?        S    13:06   0:36 /usr/bin/python3 -m pip install --quiet fhempy>=0.1.462 --upgrade
fhem     20994  1.6  1.8  25248 18664 ?        S    13:11   0:01 /usr/bin/python3 /usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmp9rksvvm5

Die Devices sehen so aus:
server:
Internals:
   DEF        0
   FD         4
   FUUID      64843adf-f33f-b584-f6b9-078d3502bcf7b16c
   LAST_START 2023-06-10 13:06:08
   NAME       fhempyserver_15733
   NR         500
   NTFY_ORDER 50-fhempyserver_15733
   PID        20128
   STARTS     1
   STATE      ???
   TYPE       fhempyServer
   currentlogfile ./log/fhempy-2023-06-10.log
   eventCount 2
   logfile    ./log/fhempy-%Y-%m-%d.log
   CoProcess:
     cmdFn      fhempyServer_getCmd
     name       fhempy
     state      running FHEM/bindings/python/bin/fhempy
   READINGS:
     2023-06-10 13:06:08   fhempy          running FHEM/bindings/python/bin/fhempy
     2023-06-10 13:06:08   python          v3.11.3
Attributes:
   devStateIcon {      my $status_img = "10px-kreis-gruen";;      my $status_txt = "running";;      if (substr(ReadingsVal($name, "fhempy", "running"),0,7) ne "running") {        $status_img = "10px-kreis-rot";;        $status_txt = "stopped";;      }      "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a  href=\"/fhem?cmd.dummy=set $name restart&XHR=1\" title=\"Kill and restart\">".FW_makeImage("audio_repeat")."</a></div>"      }
   group      fhempy
   icon       python
   logfile    ./log/fhempy-%Y-%m-%d.log
   nrarchive  10
   room       fhempy

local:
Internals:
   BindingType fhempy
   DEF        fhempy
   DeviceName ws:127.0.0.1:15733
   FUUID      64843adf-f33f-b584-edff-5e54b20bd398f21a
   IP         127.0.0.1
   NAME       fhempy_local
   NEXT_OPEN  1686395190.91439
   NR         499
   NTFY_ORDER 50-fhempy_local
   PARTIAL   
   PORT       15733
   STATE      Installing fhempy (15min)...
   TYPE       BindingsIo
   binary     1
   devioLoglevel 0
   eventCount 241
   installing 0
   localBinding 1
   nextOpenDelay 10
   prev_error 127.0.0.1: Verbindungsaufbau abgelehnt (111)
   READINGS:
     2023-06-10 13:15:04   state           Installing fhempy (15min)...
   args:
     fhempy_local
     BindingsIo
     fhempy
   messages:
     0:
Attributes:
   devStateIcon {      my $attr_ver = "1.1.0";;      my $status_img = "10px-kreis-gruen";;      my $status_txt = "connected";;      my $ver = ReadingsVal($name, "version", "-");;      my $ver_available = ReadingsVal($name, "version_available", $ver);;      my $update_icon = "";;      my $refresh_img = "refresh";;      my $refresh_txt = "Update fhempy";;      if ($ver_available ne $ver) {        $refresh_img = "refresh\@orange";;        $refresh_txt = "Version ".$ver_available." available for update";;      }      if (ReadingsVal($name, "state", "disconnected") eq "disconnected") {        $status_img = "10px-kreis-rot";;        $status_txt = "disconnected";;      }      $update_icon = "<a  href=\"/fhem?cmd.dummy=set $name update&XHR=1\" title=\"Start ".$ver_available." update\">".FW_makeImage($refresh_img, $refresh_txt)."</a>";;      my $restart_icon = "<a  href=\"/fhem?cmd.dummy=set $name restart&XHR=1\" title=\"Restart fhempy\">".FW_makeImage("control_reboot")."</a>";;      "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a> ".$ver." </a>".$update_icon.$restart_icon."</div>"    }
   group      fhempy
   icon       file_json-ld2
   room       fhempy


"Update" sowie "shutdown restart" von FHEM habe ich schon probiert, ebenso "chown fhem:dialout -R /opt/fhem/*". Hat alles nix gebracht.

Was mache ich falsch?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: stefanru am 11 Juni 2023, 14:39:24
Eventuell musst du FHEM erlauben scripte mit sudo auszuführen.
Eine Anleitung ist hier:
https://wiki.fhem.de/wiki/FHEM_mit_sudo

Ich habe mit visudo das eingetragen:
fhem     ALL=(ALL) NOPASSWD: ALL

Ich führe aber auch noch mehr skripte mit root rechten aus.
Empfohlen ist das so offen wohl nicht.

Gruß,
Stefan
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: xeenon am 11 Juni 2023, 22:41:20
Hallo zusammen,

für unseren Pool überlege ich mir den redox und pH Sensor w2839 aus China zu bestellen. Anscheinend geht das über die smartlife bzw. Tuya (local) app.

Kann ich mit dem angebotenen hier das Gerät in fhem einbinden oder bin ich verkehrt?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 13 Juni 2023, 18:55:31
Zitat von: stefanru am 11 Juni 2023, 14:39:24Eventuell musst du FHEM erlauben scripte mit sudo auszuführen.
Eine Anleitung ist hier:
https://wiki.fhem.de/wiki/FHEM_mit_sudo

Ich habe mit visudo das eingetragen:
fhem     ALL=(ALL) NOPASSWD: ALL

Ich führe aber auch noch mehr skripte mit root rechten aus.
Empfohlen ist das so offen wohl nicht.
Das hat leider nichts geändert.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 14 Juni 2023, 08:52:20
Zitat von: TheTrumpeter am 13 Juni 2023, 18:55:31
Zitat von: stefanru am 11 Juni 2023, 14:39:24Eventuell musst du FHEM erlauben scripte mit sudo auszuführen.
Eine Anleitung ist hier:
https://wiki.fhem.de/wiki/FHEM_mit_sudo

Ich habe mit visudo das eingetragen:
fhem     ALL=(ALL) NOPASSWD: ALL

Ich führe aber auch noch mehr skripte mit root rechten aus.
Empfohlen ist das so offen wohl nicht.
Das hat leider nichts geändert.
Ergänzend:
Ich hab' jetzt auch noch probiert auf den beiden Ordner /root/.local und /root/.cache allen Usern alle Rechte zu geben, auch das hat nichts geändert, es bleibt bei:
2023-06-14 08:34:09,401 - ERROR    - __main__: Failed to load fhempy
Traceback (most recent call last):
  File "/opt/fhem/FHEM/bindings/python/bin/fhempy", line 139, in <module>
    import fhempy.lib.fhem_pythonbinding as fpb
ModuleNotFoundError: No module named 'fhempy'
2023-06-14 08:34:09,441 - INFO     - __main__: Attempting install of fhempy>=0.1.462
2023-06-14 08:47:58,063 - ERROR    - __main__: Unable to install package fhempy>=0.1.462: WARNING: The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
ERROR: Could not install packages due to an OSError: [Errno 13] Keine Berechtigung: '/root/.local'
Check the permissions.
2023-06-14 08:47:58,063 - ERROR    - __main__: Failed to install fhempy, exit now...
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 14 Juni 2023, 10:53:10
Hallo zusammen hatte bis jetzt nur eine Doppel Steckdose in Tuya und in Fhem. Diese funktioniert nach wie vor.
Jetzt habe ich in der App ein Bewässerungsventil hinzugefügt,das am Handy via BLE verbunden wird oder über den beigefügten WLAN zu BLE bride auch übers Internet angesprochen wird. Beides funktioniert in der App.

Aber in fhem bekomme ich es nicht hinzugefügt!

Wenn ich in Fhem im tuya_system Device auf scan_device klicke wird diese Fehlermeldung angezeigt im State.
   
2023-02-16 17:57: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.'"}
I'm Log steht das:
2023-06-11 14:00:44,954 - INFO    - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.652...
2023-06-11 14:00:44,966 - INFO    - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-06-11 14:00:45,098 - INFO    - websockets.server: server listening on 0.0.0.0:15733
2023-06-11 14:00:50,667 - INFO    - websockets.server: connection open
2023-06-11 14:00:50,669 - INFO    - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-06-11 14:01:32,139 - 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-06-11 14:02:46,849 - 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.'"}
Was kann ich tun um wieder devices hinzuzufügen?

Danke euch und schönen Sonntag noch
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Christian83 am 14 Juni 2023, 10:54:54
Zitat von: Tueftler1983 am 14 Juni 2023, 10:53:10 
2023-02-16 17:57: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.'"}

Dein Testzeitraum für die CLoud Programmierung ist abgelaufen. Deshalb kannst du nichts mehr neu verbinden.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Stefan6183 am 14 Juni 2023, 11:01:49
Hi xeenon,

du bist hier richtig.
Prinzipiell kannst du über fhempy: tuya (lokal) alles einbinden, was du in der SmartLife App gepairt hast.
Ich habe aber eine tuya Infrarot Bridge, die noch nicht unterstützt wird.
Und bei passiven Sensoren kann es passieren, dass du etwas experimentieren musst, biss du die Readings bekommst (siehe dazu den Beitrag von McShire vom 10. April 2023): https://forum.fhem.de/index.php?topic=127441.780 (https://forum.fhem.de/index.php?topic=127441.780)

Gruß
Stefan
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 14 Juni 2023, 11:08:43
Zitat von: Christian83 am 14 Juni 2023, 10:54:54
Zitat von: Tueftler1983 am 14 Juni 2023, 10:53:10 
2023-02-16 17:57: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.'"}

Dein Testzeitraum für die CLoud Programmierung ist abgelaufen. Deshalb kannst du nichts mehr neu verbinden.
Und jetzt? Muss ich da jetzt Kaufen oder was? Oder wie kann ich weiter machen?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Christian83 am 14 Juni 2023, 11:10:08
Zitat von: Tueftler1983 am 14 Juni 2023, 11:08:43Und jetzt? Muss ich da jetzt Kaufen oder was? Oder wie kann ich weiter machen?

Kannst den Zeitraum verlängern.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 14 Juni 2023, 13:18:43
Hmm okay, dann muss ich Mal gucken wo ich das finde. Danke schonmal für den Hinweis.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 14 Juni 2023, 13:29:30
Wo kann ich das denn verlängern? In der Tuya Cloud kann ich die Bridge und das Bewässerungsventil sehen.
Screenshot_20230614_132648_Chrome.jpg
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Christian83 am 14 Juni 2023, 13:30:34
Ich glaube in den Service APIs. Da steht irgendwo das IOT Core. Das wird abgelaufen sein. Da konnte ich das mal verlängern.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 14 Juni 2023, 13:44:05
Ja richtig habe es da Grade gefunden und gemacht.
Da steht jetzt ihr Antrag auf Verlängerung ist eingegangen und wird geprüft.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 16 Juni 2023, 16:22:44
So, ich hab' jetzt mal auf einem Reserve-Raspi das letzte Buster-Release draufgespielt und FHEM neu installiert, danach fhempy lt. Anleitung und siehe da, es läuft auf Anhieb.

Jetzt muss ich nur überlegen, ob ich am Produktiv-System weiter auf Fehlersuche gehe oder lieber alles was darauf läuft auf die Neuinstallation portiere...
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Stefan6183 am 17 Juni 2023, 15:05:04
Hallo,

hatte das gleiche Problem, dass der Tuya Developer Testzeitraum abgelaufen war.
Obwohl ich diesen über Tuya IoT Core nun verlängert habe, kann ich keine Geräte erfolgreich in fhempy: tuya (lokal) hinzufügen:

Ich habe einen komplett neuen Temperatursensor, der zuvor noch nie gepairt oder in FHEM eingebunden war, zunächst mit der Smart Life App gepairt.
Dann tuya_system set scan_devices
Während tuya_system set scan_devices lief (Anzeige "found 52 devices, start local scan...") habe ich mehrmals den reset/setup Knopf am Temperatursensor für 1-2 Sekunden gedrückt.
Anschließend zeigte tuya_system "1 devices found localy" an. Seltsamerweise nur das eine neue und nicht die anderen aktiven tuya Geräte, die er bisher lokal gefunden hatte.

tuya_system set create_device liefert dann folgende Fehlermeldung:

Failed to execute function Set: Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 385, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 484, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/generic.py", line 208, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 338, in handle_set
    return await fct_call(hash, final_params)
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 307, in set_create_device
    f"tuya_local_{dev['device_id']} localkey {dev['key']}",
KeyError: 'key'

Im tuya_system Reading steht allerdings der localkey des neuen Gerätes drin.

Kann mir jemand einen Tipp geben, warum das Hinzufügen von tuya Geräten nicht mehr funktioniert und er die bekannten, aktiven auch nicht mehr lokal findet?

Gruß
Stefan
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 17 Juni 2023, 20:17:29
Hallo Stefan,

Zitathatte das gleiche Problem, dass der Tuya Developer Testzeitraum abgelaufen war.

Ich kann leider nichts zu deiner Frage beitragen.

Der Testzeitraum endet ja immer irgendwann. Gibt es außer der Anfrage, die man stellen muss, eine andere Möglichkeit, dass der Zugriff weiterläuft?

Viele Grüße Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 18 Juni 2023, 13:33:27
suche bewegungsmelder der mit tuya lokal arbeitet. hat wer was in betrieb?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Stefan6183 am 18 Juni 2023, 16:13:15
Zu meinem Problem gibt es einen Bug Report: https://github.com/fhempy/fhempy/issues/162
Die tuya_system set create_device Fehlermeldung ist mit fhempy_local Version 0.1.658 behoben.

Über folgendes Vorgehen lässt sich der Temperatursensor jetzt einbinden:
- Gerät über Smart Life App (und in FHEM) komplett löschen
- Gerät reseten (mehr als 5 Sekunden die Reset Taste drücken, bis es schnell blinkt)
- Gerät über SmartLife App neu verbinden
- tuya_system set scan_devices und dann während lokaler Suche (Anzeige "found xx devices, start local scan...") 1x kurz (1-2 Sekunden) Reset Taste drücken
- set tuya_system create_device <Gerätenamen> und warten, bis das Initializing fertig ist (Reset Taste nicht mehr drücken)

Es kamen gestern und heute auch automatisch die Readings va_humidity und va_temperature an.
Allerdings heute das Reading va_humidity zuletzt um 15:26 (OK) aber das Reading va_temperature zuletzt um 6:53, obwohl laut Tuya IoT Platform Device Log https://eu.iot.tuya.com/cloud/device/ beide Readings um 15:26 vom Temperatursensor gesendet wurden.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Carsten12 am 19 Juni 2023, 09:03:14
Guten Morgen,

ich plane ein einziges Tuya Gerät einzubinden, und zwar ein Keypad. Dabei wird es wahrscheinlich aber auch bleiben. Habe ich dann richtig verstanden, dass ich den API Key zwar für die Einrichtung benötige, das aber hinter alles weiterläuft, selbst wenn der API Key ausläuft?

Das Keypad soll mir nämlich helfen in einem "Notfall" ein Aussperren durch Rollladen zu entschärfen, in dem ich recht simpel die entsprechenden Rollläden nach Eingabe eines Codes wieder hochfahre. Und es wäre doof wenn das dann daran scheitert, dass ich nicht mitbekommen habe, dass der API Key verlängert werden müsste.

Gruß,
Carsten.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Stefan6183 am 19 Juni 2023, 10:33:37
Hallo Carsten,

prinzipiell ja.
Also fhempy_local läuft auch weiter, wenn der API Key ausläuft.

Gruß
Stefan
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 21 Juni 2023, 20:03:32
Hallo zusammen,

seit dem 19. Juni bekomme ich im fhempy-log folgende Einträge:
2023-06-19 09:56:33,436 - ERROR    - __main__: Failed to load fhempy
Traceback (most recent call last):
  File "/opt/fhem/FHEM/bindings/python/bin/fhempy", line 139, in <module>
    import fhempy.lib.fhem_pythonbinding as fpb
ModuleNotFoundError: No module named 'fhempy'
2023-06-19 09:56:33,462 - INFO     - __main__: Attempting install of fhempy>=0.1.462
2023-06-19 09:56:40,680 - ERROR    - __main__: Unable to install package fhempy>=0.1.462: error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
   
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
   
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
   
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.


Wenn ich versuche, phython auf dem Server upzudaten, gelingt dies nicht.
pip3 install --upgrade fhempy
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Woran kann das denn liegen und was kann ich tun?

Viele Grüße
Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Stefan6183 am 22 Juni 2023, 11:08:51
Hi Gisbert,

ich hatte die Fehlermeldung mit "externally-managed-environment" zwar selbst noch nicht, aber die möglichen Lösungswege stehen ja schon in der Fehlermeldung:
Installation über ein virtual Environment, pipx benutzen oder den Sicherheitsmechanismus mit --break-system-packages aushebeln (vorher Backup deines Servers machen!).

Ich habe zu dem Problem folgendes gefunden:
https://pythonspeed.com/articles/externally-managed-environment-pep-668/
https://stackoverflow.com/questions/75608323/how-do-i-solve-error-externally-managed-environment-everytime-i-use-pip3

Und wenn du die kompletten Hintergründe verstehen willst:
https://peps.python.org/pep-0668/

Viele Grüße
Stefan
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 22 Juni 2023, 14:09:27
Hallo Stefan,

ich hab auf Debian 12 umgestellt - damit dürfte die Ursache für das Problem halbwegs klar sein.
Vielen Dank für die Anleitungen, die für mich harter Stoff sind. Ich kann denen schon im Prinzip folgen, aber ich weiß nie, ob die vorgeschlagenen Befehle nur Beispiele oder Lösungen für das dortige Problem oder ob ich genau das, was dort steht bei mir ausführen muss - oder aber wie auch immer auf mein Problem ändern muss. Mir fehlen zuviele Grundlagen, um das jeweilig zu entscheiden.

Im Moment bleibt mir nichts anderes übrig, darauf zu hoffen, dass es einen größeren Bedarf für eine Lösung gibt, so dass ich mich an die Sache heranwage. Es sei denn du kannst mich mit dem richtigen Extrakt an Befehlszeilen der verlinkten Seiten füttern.

Viele Grüße Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: carlos am 22 Juni 2023, 14:35:46
Hallo,
Es werden ja auch updates von fhempy gemacht, die nicht funktionieren:
2023-06-22 11:47:10,174 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.656...
2023-06-22 11:47:10,176 - INFO     - fhempy.lib.pkg_installer: Attempting install of async-upnp-client==0.31.2
2023-06-22 11:47:10,428 - ERROR    - fhempy.lib.pkg_installer: Unable to install package async-upnp-client==0.31.2: error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
   
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
   
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
   
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
2023-06-22 11:47:10,429 - INFO     - fhempy.lib.pkg_installer: Attempting install of async-upnp-client==0.31.2
2023-06-22 11:47:10,677 - ERROR    - fhempy.lib.pkg_installer: Unable to install package async-upnp-client==0.31.2: error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
   
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
   
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
   
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
2023-06-22 11:47:10,678 - INFO     - fhempy.lib.pkg_installer: Attempting install of async-upnp-client==0.31.2
2023-06-22 11:47:10,941 - ERROR    - fhempy.lib.pkg_installer: Unable to install package async-upnp-client==0.31.2: error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
   
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
   
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
   
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
2023-06-22 11:47:10,941 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-06-22 11:47:10,950 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-06-22 11:48:16,909 - INFO     - websockets.server: connection open
2023-06-22 11:48:16,909 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-06-22 11:48:18,871 - INFO     - fhempy.lib.pkg_installer: Attempting install of git+https://github.com/fhempy/aiotinytuya#aiotinytuya==1.12.3
2023-06-22 11:48:19,154 - ERROR    - fhempy.lib.pkg_installer: Unable to install package git+https://github.com/fhempy/aiotinytuya#aiotinytuya==1.12.3: error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
   
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
   
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
   
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
2023-06-22 11:48:19,155 - INFO     - fhempy.lib.pkg_installer: Attempting install of git+https://github.com/fhempy/aiotinytuya#aiotinytuya==1.12.3
2023-06-22 11:48:19,412 - ERROR    - fhempy.lib.pkg_installer: Unable to install package git+https://github.com/fhempy/aiotinytuya#aiotinytuya==1.12.3: error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
   
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
   
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
   
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
2023-06-22 11:48:19,413 - INFO     - fhempy.lib.pkg_installer: Attempting install of git+https://github.com/fhempy/aiotinytuya#aiotinytuya==1.12.3
2023-06-22 11:48:19,663 - ERROR    - fhempy.lib.pkg_installer: Unable to install package git+https://github.com/fhempy/aiotinytuya#aiotinytuya==1.12.3: error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
   
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
   
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
   
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
2023-06-22 11:48:19,666 - INFO     - fhempy.lib.pkg_installer: Attempting install of git+https://github.com/fhempy/aiotinytuya#aiotinytuya==1.12.3
2023-06-22 11:48:19,920 - ERROR    - fhempy.lib.pkg_installer: Unable to install package git+https://github.com/fhempy/aiotinytuya#aiotinytuya==1.12.3: error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
   
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
   
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
   
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
2023-06-22 11:48:19,921 - INFO     - fhempy.lib.pkg_installer: Attempting install of git+https://github.com/fhempy/aiotinytuya#aiotinytuya==1.12.3
2023-06-22 11:48:20,170 - ERROR    - fhempy.lib.pkg_installer: Unable to install package git+https://github.com/fhempy/aiotinytuya#aiotinytuya==1.12.3: error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
   
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
   
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
   
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
2023-06-22 11:48:20,171 - INFO     - fhempy.lib.pkg_installer: Attempting install of git+https://github.com/fhempy/aiotinytuya#aiotinytuya==1.12.3
2023-06-22 11:48:20,461 - ERROR    - fhempy.lib.pkg_installer: Unable to install package git+https://github.com/fhempy/aiotinytuya#aiotinytuya==1.12.3: error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
   
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
   
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
   
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
2023-06-22 11:48:26,300 - ERROR    - mybackup: Failed to get https://api.github.com/repos/hubecker/fhempy_backup/contents/fhem_backup/fhem.cfg with HTTP error 401
2023-06-22 11:48:28,129 - ERROR    - tuya_cloud_connector: Please activate OpenPulsar: https://developer.tuya.com/en/docs/iot/subscribe-mq?id=Kavqcrvckbh9h
2023-06-22 11:48:29,476 - ERROR    - mybackup: Failed to put https://api.github.com/repos/hubecker/fhempy_backup/contents/fhem_backup/fhem.cfg with HTTP error 401
2023-06-22 11:48:30,070 - ERROR    - mybackup: Failed to upload file fhem.cfg
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.11/site-packages/fhempy/lib/github_backup/github_backup.py", line 164, in upload_file
    raise Exception(f"Failed to upload file {filename}")
Exception: Failed to upload file fhem.cfg
2023-06-22 11:48:31,952 - ERROR    - mybackup: Failed to get https://api.github.com/repos/hubecker/fhempy_backup/contents/fhem_backup/log/fhem.save with HTTP error 401
2023-06-22 11:48:33,714 - ERROR    - ZigBee_Gateway_bf2688b4ee33caf1921f1n: 'result'
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.11/site-packages/fhempy/lib/tuya_cloud/tuya_cloud_device.py", line 45, in _init_device
    await self._setup_device()
  File "/opt/fhem/.local/lib/python3.11/site-packages/fhempy/lib/tuya_cloud/tuya_cloud_device.py", line 74, in _setup_device
    self._t_info = await utils.run_blocking(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/fhem/.local/lib/python3.11/site-packages/fhempy/lib/utils.py", line 72, in run_blocking
    return await asyncio.get_event_loop().run_in_executor(pool, function)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/fhem/.local/lib/python3.11/site-packages/tuya_iot/device.py", line 332, in get_device_info
    return self.device_manage.get_device_info(device_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/fhem/.local/lib/python3.11/site-packages/tuya_iot/device.py", line 580, in get_device_info
    response["result"].pop("status")
    ~~~~~~~~^^^^^^^^^^
KeyError: 'result'
2023-06-22 11:48:34,993 - ERROR    - ZX7226_plug: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.11/site-packages/fhempy/lib/tuya/tuya.py", line 563, in setup_connection
    self._connected_device = await asyncio.wait_for(connect_fct, timeout=15)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/tasks.py", line 479, in wait_for
    return fut.result()
           ^^^^^^^^^^^^
  File "/opt/fhem/.local/lib/python3.11/site-packages/aiotinytuya/__init__.py", line 206, in connect
    await device.start_socket()
  File "/opt/fhem/.local/lib/python3.11/site-packages/aiotinytuya/core.py", line 917, in start_socket
    raise ex
  File "/opt/fhem/.local/lib/python3.11/site-packages/aiotinytuya/core.py", line 894, in start_socket
    self.reader, self.writer = await asyncio.open_connection(
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/streams.py", line 48, in open_connection
    transport, _ = await loop.create_connection(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection
    sock = await self._connect_sock(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.11/asyncio/selector_events.py", line 634, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/selector_events.py", line 674, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.178.105', 6668)
2023-06-22 11:48:35,387 - ERROR    - mybackup: Failed to put https://api.github.com/repos/hubecker/fhempy_backup/contents/fhem_backup/log/fhem.save with HTTP error 401
2023-06-22 11:48:35,390 - ERROR    - mybackup: Failed to upload file log/fhem.save
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.11/site-packages/fhempy/lib/github_backup/github_backup.py", line 164, in upload_file
    raise Exception(f"Failed to upload file {filename}")
Exception: Failed to upload file log/fhem.save

Diese sind aber, wenn man sie von Hand macht schon erfüllt.
pip3 install async-upnp-client  --break-system-packages
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: async-upnp-client in /opt/fhem/.local/lib/python3.11/site-packages (0.33.2)
Requirement already satisfied: aiohttp>=3.7.4 in /opt/fhem/.local/lib/python3.11/site-packages (from async-upnp-client) (3.8.4)
Requirement already satisfied: async-timeout<5.0,>=3.0 in /usr/lib/python3/dist-packages (from async-upnp-client) (4.0.2)
Requirement already satisfied: defusedxml>=0.6.0 in /opt/fhem/.local/lib/python3.11/site-packages (from async-upnp-client) (0.7.1)
Requirement already satisfied: python-didl-lite~=1.3.2 in /opt/fhem/.local/lib/python3.11/site-packages (from async-upnp-client) (1.3.2)
Requirement already satisfied: voluptuous>=0.12.1 in /opt/fhem/.local/lib/python3.11/site-packages (from async-upnp-client) (0.13.1)
Requirement already satisfied: attrs>=17.3.0 in /usr/lib/python3/dist-packages (from aiohttp>=3.7.4->async-upnp-client) (22.2.0)
Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /usr/lib/python3/dist-packages (from aiohttp>=3.7.4->async-upnp-client) (3.0.1)
Requirement already satisfied: multidict<7.0,>=4.5 in /opt/fhem/.local/lib/python3.11/site-packages (from aiohttp>=3.7.4->async-upnp-client) (6.0.4)
Requirement already satisfied: yarl<2.0,>=1.0 in /opt/fhem/.local/lib/python3.11/site-packages (from aiohttp>=3.7.4->async-upnp-client) (1.9.2)
Requirement already satisfied: frozenlist>=1.1.1 in /opt/fhem/.local/lib/python3.11/site-packages (from aiohttp>=3.7.4->async-upnp-client) (1.3.3)
Requirement already satisfied: aiosignal>=1.1.2 in /opt/fhem/.local/lib/python3.11/site-packages (from aiohttp>=3.7.4->async-upnp-client) (1.3.1)
Requirement already satisfied: idna>=2.0 in /usr/lib/python3/dist-packages (from yarl<2.0,>=1.0->aiohttp>=3.7.4->async-upnp-client) (3.3)

Ich denke da muss eine generelle Lösung her.
Ich blicke leider auch noch nicht ganz durch, aber vielleicht sollte man das mit der venv Geschichte verfolgen und das alles von fhempy aus machen lassen, wenn das möglich ist.

Wie gesagt, ich kann es leider nicht beurteilen.

Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 23 Juni 2023, 14:27:05
Hallo Stefan,

ich hab mich mal an eine Lösung (nennen wir es mal so, ich weiß aber nicht, ob es wirklich eine ist) gewagt.
Meine Voraussetzungen:
Insofern war mein Risiko begrenzt.

Ich habe diese Quellen benutzt:
https://stackoverflow.com/questions/75608323/how-do-i-solve-error-externally-managed-environment-everytime-i-use-pip3 (https://stackoverflow.com/questions/75608323/how-do-i-solve-error-externally-managed-environment-everytime-i-use-pip3)
https://www.youtube.com/watch?v=oTTb6iUuBWQ (https://www.youtube.com/watch?v=oTTb6iUuBWQ)
Insbesondere das Youtube-Video war hilfreich, dem ich im wesentlichen gefolgt bin.
Es fehlte mir aber noch eine Datei 'requirements.txt'. Diese erhält man durch fogenden Befehl:pip freeze > requirements.txtIch habe dann python3 -m pip install -r requirements.txtausgeführt und schließlich noch:
pip3 install --upgrade fhempyund abschließend die Datei 'EXTERNALLY-MANAGED' im Ordner /usr/lib/python3.11/config-3.11-x86_64-linux-gnu gelöscht.
Danach habe ich Fhem neu gestartet (shutdown restart in der Konsole), und dann lief fhempy wieder.
Ich übernehme keine Gewähr, dafür dass es bei irgendjemand anderem funktioniert und keine Schäden anrichtet. Genauso wenig weiß ich, was von dem, was ich ausgeführt habe, wirklich notwendig war.

Viele Grüße Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 26 Juni 2023, 13:14:26
Hallo zusammen,

diesmal melde ich mich, weil ich Fhem auf einen neuen Server auf Proxmox umgezogen habe. Im Wesentlichen habe ich ein Backup der gesamten Fhem-Installation auf dem neuen Server entpackt.

Ich habe die notwendigen Perlpakete für Debian 11 Bullseye installiert und folgende Definition erstellt (sie fehlte gegenüber der auf dem alten Rechner):
define fhempy_local BindingsIo fhempyNach ein paar Minuten des Wartens habe ich Fhem neu gestartet.
Jetzt nach weiteren langen Minuten des Wartens passiert noch nichts, bzw. außer das:
state Installing fhempy (15min)...
Was habe ich vergessen?
Viele Grüße
Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 26 Juni 2023, 15:06:53
Hallo zusammen,

geholfen hat:
pip3 install --upgrade fhempyund ein anschließender Neustart von Fhem.

fhempy: tuya (lokal) läuft wieder - Freude :)

Viele Grüße
Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 28 Juni 2023, 09:09:14
Ich habe eine Frage zu den angezeigten Werten...

Habe zwei Steckdosen mit Verbrauchsmessung verbunden, aber die "energy"-Werte zwischen App und FHEM unterscheiden sich.
Steckdose 1: FHEM: 9.116, App: 13.21
Steckdose 2: FHEM: 4.868, App: 5.86

Zeigt FHEM nur die Werte an, die seit dem Einbinden/Verbinden der Steckdosen verbraucht wurden oder sollten die Werte mit der App übereinstimmen?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Stefan6183 am 28 Juni 2023, 21:36:40
Vermutlich hast du dasselbe Problem wie ich, dass fhempy_local Werte-Updates der Tuya Geräte teilweise nicht mitbekommt.

Scheinbar passiert das immer, nachdem ein Tuya Gerät Offline war und kurz vor dem Senden der Werte-Updates wieder Online geht.
Ich kann das sehr gut mit meinem Kontaktsensor reproduzieren: Wenn dieser einige Minuten ohne Bewegung auf dem Tisch liegt, geht er offline. Wenn ich dann den Kontakt entferne, geht er Online und sendet ein Update des Kontaktstatus. Das ist im tuya.com Log des Geräts zu sehen, fhempy_local zeigt aber keine Veränderung (immer noch Reading doorcontact_state=on). Erst wenn ich den Kontakt innerhalb kurzer Zeit wieder dran mache und wieder weg, also wenn das Gerät erneut Werte-Updates sendet, bekommt das fhempy_local mit (Reading  doorcontact_state=off).

tuya.com Gerätelog:
2023-06-28 21:16:48    Device restart    Device restart    power off reboot    device itself   
2023-06-28 21:16:47    Report    Door Sensor    ON    device itself   
2023-06-28 21:16:44    Report    Door Sensor    off    device itself     ==> fhempy_local: erfolgreiches Update des doorcontact_state
2023-06-28 21:16:40    Report    Door Sensor    ON    device itself   
2023-06-28 21:16:39    Report    Door Sensor    off    device itself     ==> fhempy_local: kein Update des doorcontact_state
2023-06-28 21:16:39    Online    Online        device itself   
2023-06-28 21:12:18    Offline    Offline    keepalive_timeout    device itself   

Der Tuya Kontaktsensor ist in FHEM folgendermaßen definiert:

Internals:
DEF tuya <geheim><geheime IP> 3.3 <geheim> <geheim>
DEVICEID <geheim>
FHEMPYTYPE tuya
FUUID <geheim>
IODev fhempy_local
NAME tuya_local_<geheim>
NR 629
PYTHONTYPE tuya
STATE <b>Türkontakt: on<br/>Batterie: 24.0%
TYPE fhempy
eventCount 85
READINGS:
2023-06-26 11:40:51 active_time 1687772310
2023-06-28 09:53:01 battery_percentage 24.0
2023-06-26 11:40:51 biz_type 18
2023-06-26 11:40:51 category mcs
2023-06-26 11:40:51 create_time 1687185701
2023-06-28 21:16:47 doorcontact_state on
2023-06-26 11:40:51 icon smart/icon/bay1624869296421wDFy/36fa2717304f55b8a2999f5b8a469109.png
2023-06-26 11:40:51 id <geheim>
2023-06-26 11:40:51 ip <geheim>
2023-06-26 11:40:51 lat 49.3100
2023-06-26 11:40:51 local_key <geheim>
2023-06-26 11:40:51 lon 8.8300
2023-06-26 11:40:51 name Contact Sensor 3
2023-06-27 17:53:33 online 1
2023-06-26 11:40:51 owner_id <geheim>
2023-06-26 11:40:51 product_id qxu3flpqjsc1kqu3
2023-06-26 11:40:51 product_name Contact Sensor
2023-06-27 17:53:39 state ready
2023-06-26 11:40:51 sub 0
2023-06-26 11:40:51 time_zone +02:00
2023-06-26 11:40:51 uid <geheim>
2023-06-26 11:40:51 update_time 1687772388
2023-06-26 11:40:51 uuid <geheim>
args:
tuya_local_<geheim>
fhempy
tuya
<geheim>
<geheim>
<geheime IP>
3.3
<geheim>
<geheim>
argsh:
Attributes:
alias Contact Sensor 3
dp_01 doorcontact_state
dp_02 battery_percentage
group tuya
localkey <geheim>
room fhempy
stateFormat <b>Türkontakt: doorcontact_state<br/>Batterie: battery_percentage%
tuya_spec_functions []
tuya_spec_status [{'code': 'doorcontact_state', 'dp_id': 1, 'type': 'Boolean', 'values': {}}, {'code': 'battery_percentage', 'dp_id': 2, 'type': 'Integer', 'values': {'unit': '%', 'min': 0, 'max': 100, 'scale': 0, 'step': 1}}]
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: denis.robel am 02 Juli 2023, 09:58:54
Wie kann das Problem gelöst werden? Es scheint kein Push vom Tuya Device nach fhempy zu geben.
Wie kann man es synchronisieren oder triggern, dass fhempy das device lokal abfragt, wenn es online ist?

Die Zeit, die so ein Sensor online ist, ist ja auch minimal. Oder geht das nur mit tuya cloud?

Es scheint ja ein generelles Problem mit vielen passiven Sensoren zu sein.

EDIT: mein Rauchmelder funktioniert lokal nur, wenn das fhempy das Ding zu einem günstigen Zeitpunkt abfragt. Leider ist die Fehlerquote sehr hoch, was für den Rauchmelder natülich ein Ausschlußkriterium ist.
Man kann da nur Abhilfe durch eine andere Firmware schaffen (TASMOTA / OpenBeken), die dann aktiv die veränderten Werte via MQTT versendet.

EDIT2: ich hab dem RM nochmals getestet. Es muss nur lange genug rauchen, dann wird auch gepusht ... Die Smartlife App ist immer etwas zügiger als FHEM. FHEM braucht ca. 30s länger, aber  ich habe jetzt 5x hintereinander getestet und es funktioniert.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Stefan6183 am 03 Juli 2023, 15:05:45
Hi Denis,

dass irgendwann dann doch ein Werte-Update bei fhempy_local ankommt, passt zu meinem Problem:
Wahrscheinlich geht der Rauchmelder Online, nachdem er das erste Mal Rauch bemerkt und sendet direkt ein Werte Update, das fhempy_local nicht mitbekommt, die Tuya Cloud aber schon. Dann bleibt der Rauchmelder wohl online, solange er noch Rauch bemerkt und sendet regelmäßig weitere Werte-Updates, die fhempy_local dann mitbekommt.

Kannst du mal versuchen, das tuya.com Log des Geräts mit dem Verhalten in fhempy_local zu vergleichen?
Also direkt unter https://eu.iot.tuya.com/cloud/device/detail und nicht über die Smartlife App. Die Smartlife App am Besten einfrieren und nicht starten, damit sie fhempy_local nicht die lokale Verbindung zum Tuya Gerät klaut.

Gruß
Stefan
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Stefan6183 am 03 Juli 2023, 15:06:39
Ich habe zu den verlorenen Werte-Updates der Tuya Geräte nach Offline-Online Wechsel mal einen Github Issue aufgemacht:
https://github.com/fhempy/fhempy/issues/167
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 17 Juli 2023, 18:34:28
Hallo Stefan,

gibt es in Bezug auf fhempy irgendetwas zu bedenken bei einem Wechsel von Debian Bullseye zu Bookworm?

Wie hast du es gemacht, bzw. was ist deine Empfehlung?

Viele Grüße Gisbert
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: xeenon am 20 Juli 2023, 02:21:49
Hallo,

Ich habe direkt im ersten Anlauf erfolgreich mein w2839 eingebunden. Spuckt eine Menge readings aus, aber die die ich brauche konnte ich schnell identifizieren.

Ich habe aber eine Frage. Ich verstehe das System nicht so ganz. Wie greift jetzt Fhem die Daten ab? Im Opening steht ja, dass die Cloud nur einmalig kontaktiert wird.

Viele Grüße und danke für die super Arbeit.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 20 Juli 2023, 12:31:04
ganz einfach, direkt vom Gerät selbst. den es funkt ja seine daten über deinen router in die cloud, und die fängt fhempy ab.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 21 Juli 2023, 11:48:08
Hallo.
Habe mir diesen PIR  (https://www.amazon.de/Bewegungsmelder-Wireless-Infrarot-Alarm-Control/dp/B087ZDS7TP?pd_rd_w=hdlep&content-id=amzn1.sym.8584802a-acbf-426f-9a5e-f4a2af841f9b&pf_rd_p=8584802a-acbf-426f-9a5e-f4a2af841f9b&pf_rd_r=N3T1WEVEF7DPSVK9XT5M&pd_rd_wg=r6OlE&pd_rd_r=38ad18f3-21c9-4249-be09-4645c8ad9b1c&pd_rd_i=B087ZDS7TP&psc=1&ref_=pd_bap_d_grid_rp_0_1_ec_t)zugelegt.
Wird auch von tuya_localbinding erkannt, aber nach einiger zeit offline.
Die app u. tuya platform zeigt mir online und motion  an.
Klappt das ganze nicht mit PIR od. ähnlichen sensoren?

[2edit]
klappt bedingt jetzt.
tuya_cloud meldet die states, aber tuya_local nur "ready". keine änderung beim state

[edit]
nach beustart des systems werden zwar alle devices erkannt, aber beim PIR gibts keine statusänderungen. in der smartlive app aber sehr wohl.
irgendwas hats da mit den sensorenwerten aus der cloud.
schade, werde wohl shelly ordern müssen....

Titel: Aw: fhempy: tuya (lokal)
Beitrag von: wires.io am 14 August 2023, 12:35:30
Wie wird denn die "Offline" Erkennung behandelt? Wenn ich die Tuya-Lampe per Wandschalter ausschalte, bleibt "online" auf 1 und "state" auf on.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: wires.io am 14 August 2023, 15:57:24
Kann es daran liegen, dass "ip" in den "readings" nicht auf die lokale IP-Adresse, sondern auf die aus der Konfiguration von der tuya-Cloud zeigt? Wenn ich dem Gerät den Internetzugang verbiete, kommt als Status "Initializing".
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: debu am 19 August 2023, 07:32:55
Hallo zusammen,

schliesse mich mal hier an. Habe das gleiche Problem: tuya device wird erkannt und ist ready, bekommt aber keinerlei updates.
Ich habe eine Bresser 7 in 1 Wetterstation: https://www.bresser.de/Wetter-Zeit/BRESSER-Tuya-Smart-Home-7-in-1-Wetterstation-ClimateConnect-weiss.html
In der Bresser app oder smartLife bekomme ich viele updates, auch direkt auf https://eu.iot.tuya.com/cloud/device/detail in den logs sehe ich rege Kommunikation.

Angelegt wurde die "Bresser 7 in 1" in fhem über das scan_devices des tuya moduls (das ist auch mein einziger tuya device). Wobei das tuya modul beim scannen immer sagt: "found 1 devices, start local scan...". Dies ändert sich dann in "0 devices found localy". Den gefunden device habe ich dann per create_device des tuya moduls angelegt. Wie von fhem angemerkt habe ich dann den DEF geändert und "offline" durch die lokale ip des devices ersetzt. Dieser angelegte device schaut ansich gut aus, hat einige readings (name, product_id, local_key, ip (externe ip), online,...) und der state ist ready. Nur eben keine readings für temp, humidity,...

Ist das evtl. schon das Problem dass er lokal den device nicht findet? Muss/kann ich noch irgendwas machen damit ich die lokalen updates (readings) in fhem bekomme? Wäre echt sehr schade wenn sich die WetterStation nicht integrieren lässt.
Danke und beste Grüße
Debu
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 19 August 2023, 08:25:21
leg die station mal über die cloud an, kommen dann readings? was auch hilft, vor neuerlichen scan das device löschen
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: debu am 19 August 2023, 09:04:54
neuerliches Löschen vor dem scan und lokal anlegen hilft leider nicht.
Wenn ich die Station über den tuya_cloud_connector automatisch anlegen lasse kommen alle readings. Das funktioniert soweit beim kurz nach dem Anlegen. Updates der readings habe ich auch nach 15 Minuten leider nicht bekommen. Sprich die readings kommen scheinbar nur einmal beim Anlegen danach kommt wohl nix mehr (bis jetzt zumindest).

EDIT 10:44 Uhr: letztes update der readings immer noch 09:10 Uhr heute morgen. Readings werden nur bei Neuanlage oder bei update des fhempy aktualisiert. Es kommt wirklich nix mehr auch wenn über tuya_cloud_connector angelegt :-(
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 19 August 2023, 20:01:04
hallo.
das deckt sich mit meinen Bewegungssensoren. Wahrscheinlich gehts mit sensoren nicht.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: debu am 19 August 2023, 20:05:29
Sehr seltsam dass es selbst über die cloud nicht geht, da die Station zweifelsohne wie verrückt Daten sendet und diese auch in der Cloud ankommen.
Kann man da nicht irgendwie den device lokal aktiv pollen und die Werte abholen? Vielleicht sogar ohne fhempy etc. mit anderen mitteln?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: debu am 19 August 2023, 20:12:41
man könnte jetzt hingehen und ständig (z.B. alle 60 sekunden) den fhempy_local restarten damit man dadurch die readings upgedated bekommt. Weiss aber nicht ob das wirklich sinnvoll ist ;-)
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 20 August 2023, 08:10:30
bei wettersensoren ok, aber bewegungssensor? ich lasse jetzt die cloud eine steckdose schalten, die wertet fhem aus und schaltet weiter.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: debu am 20 August 2023, 18:38:52
ich habe die Wetter Station jetzt doch noch ans laufen bekommen. Es ist aber etwas magic. Kann es nicht so richtig erklären woran es gelegen haben soll. Folgendes habe ich gemacht:
Die Station nochmal in den AP modus versetzt und in der SmartLife app neu angelernt. In der https://eu.iot.tuya.com/cloud den tuya app account neu gelinkt. In    
fhempy_local nochmal scan_devices und den gefunden device anlegen lassen.
Und plötzlich waren alle readings da und werden auch schon den ganzen Tag zuverlässig geupdated. :-)

Die einzige Erklärung bzw. für mich sichtbarerer Unterschied ist dass ich nun einen neuen localKey habe für den device. Zuvor waren im localKey Sonderzeichen wie .)'+? Im neuen localKey sind keine Sonderzeichen. Könnten die Sonderzeichen im localKey eventuell der Grund sein dass es davor nicht funktioniert hat?

Über den tuya_cloud_connector bekomme ich allerdings immer noch keine updates, aber wurscht, lokal is mir eh lieber
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Stefan6183 am 22 August 2023, 11:40:40
Ja, der tuya_cloud connector verhält sich bei mir auch manchmal seltsam. Ein Gerät (ein Kontaktsensor), das in tuya_local eingebunden ist, wird in tuya_cloud nicht angezeigt (obwohl es in der Smart Life App und https://eu.iot.tuya.com/cloud/ funktioniert).
Gibt es eine Möglichkeit, tuya_cloud in FHEM zurückzusetzen, damit es alle Geräte nochmal neu hinzufügt?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 04 September 2023, 22:25:29
Hallo zusammen,
Ich habe 2 LCS RGBWWKW LED Strips vom Action im Einsatz.
Der 1. Strip (Küche) läuft soweit außer das ich die Farbe nicht einstellen kann. Farbe Temperatur vom Weiß kann ich einstellen. Auch den Workmode nur halt nicht direkt Blau oder Grün oder Rot.

Der 2. Strip ist auch in Fhem steht aber immer nur auf ready und läst sich nicht steuern. Habe in schon in fhem Gelöscht, neu gesucht und hinzugefügt aber leider ohne Erfolg.

Hoffe ihr könnt mir helfen.

1.Strip
define LED_Kueche fhempy tuya tdlcbgj5yipsqjlw bf44d4d8fba66046c0xh1z 192.168.1.40 3.3 qcdxp5xtsngskkqwsdjn 96ac49712ba5459d8622807f39ea859a
attr LED_Kueche alias LED Kueche
attr LED_Kueche dp_20 switch_led
attr LED_Kueche dp_21 work_mode
attr LED_Kueche dp_22 bright_value
attr LED_Kueche dp_23 temp_value
attr LED_Kueche dp_24 colour_data
attr LED_Kueche dp_25 scene_data
attr LED_Kueche dp_26 countdown
attr LED_Kueche group tuya
attr LED_Kueche localkey #NkIQM0'USLG|A;;*
attr LED_Kueche room Licht,Thomas,fhempy
attr LED_Kueche tuya_spec_functions [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}, 'desc': 'switch led'}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}, 'desc': 'work mode'}, {'code': 'bright_value', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'bright value'}, {'code': 'temp_value', 'dp_id': 23, 'type': 'Integer', 'values': {'min': 0, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'temp value'}, {'code': 'colour_data', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}, 'desc': 'colour data'}, {'code': 'scene_data', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, 'desc': 'scene data'}, {'code': 'countdown', 'dp_id': 26, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown'}, {'code': 'music_data', 'dp_id': 27, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}, 'desc': 'music data'}, {'code': 'control_data', 'dp_id': 28, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}, 'desc': 'control data'}]
attr LED_Kueche tuya_spec_status [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}}, {'code': 'bright_value', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'temp_value', 'dp_id': 23, 'type': 'Integer', 'values': {'min': 0, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'colour_data', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, {'code': 'scene_data', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}}, {'code': 'countdown', 'dp_id': 26, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}]
#   DEF        tuya tdlcbgj5yipsqjlw bf44d4d8fba66046c0xh1z 192.168.1.40 3.3 qcdxp5xtsngskkqwsdjn 96ac49712ba5459d8622807f39ea859a
#   DEVICEID   bf44d4d8fba66046c0xh1z
#   FHEMPYTYPE tuya
#   FUUID      649b3786-f33f-b458-d175-67bcdabaad52575a
#   IODev      fhempy_local
#   NAME       LED_Kueche
#   NR         126
#   PYTHONTYPE tuya
#   STATE      off
#   TYPE       fhempy
#   eventCount 5855
#   READINGS:
#     2023-06-27 21:30:14   active_time     1687893309
#     2023-06-27 21:30:14   biz_type        0
#     2023-08-14 21:10:36   bright_value    1000.0
#     2023-06-27 21:30:14   category        dd
#     2023-09-04 22:23:03   colour_data     00b403
#     2023-07-21 19:23:55   countdown       0.0
#     2023-06-27 21:30:14   create_time     1687893309
#     2023-07-19 09:58:31   dp_42           01000001645c000003e8007803e800f003e8003c03e800b403e8012c03e8
#     2023-06-27 21:30:14   icon            smart/icon/ay1541056239985fDGjj/b0b60366ea58c5452c263ca3afe6ef4c.png
#     2023-06-27 21:30:14   id              bf44d4d8fba66046c0xh1z
#     2023-06-27 21:30:14   ip              89.204.130.86
#     2023-06-27 21:30:14   lat             50.8700
#     2023-06-27 21:30:14   local_key       #NkIQM0'USLG|A;*
#     2023-06-27 21:30:14   lon             6.1700
#     2023-06-27 21:30:14   model           6125000100
#     2023-06-27 21:30:14   name            LSC Light Strip-RGBCCT
#     2023-09-04 22:10:02   online          1
#     2023-06-27 21:30:14   owner_id        81817100
#     2023-06-27 21:30:14   product_id      tdlcbgj5yipsqjlw
#     2023-06-27 21:30:14   product_name    LSC Light Strip-RGBCCT
#     2023-09-04 22:23:32   state           off
#     2023-06-27 21:30:14   sub             0
#     2023-09-04 22:10:02   switch_led      off
#     2023-09-04 21:39:58   temp_value      932.0
#     2023-06-27 21:30:14   time_zone       +02:00
#     2023-06-27 21:30:14   uid             eu16765577276199c5V2
#     2023-06-27 21:30:14   update_time     1687893977
#     2023-06-27 21:30:14   uuid            a8008c5bf6ba4a25
#     2023-09-04 21:47:49   work_mode       white
#   args:
#     tuya_local_bf44d4d8fba66046c0xh1z
#     fhempy
#     tuya
#     tdlcbgj5yipsqjlw
#     bf44d4d8fba66046c0xh1z
#     192.168.1.40
#     3.3
#     qcdxp5xtsngskkqwsdjn
#     96ac49712ba5459d8622807f39ea859a
#   argsh:
#
setstate LED_Kueche off
setstate LED_Kueche 2023-06-27 21:30:14 active_time 1687893309
setstate LED_Kueche 2023-06-27 21:30:14 biz_type 0
setstate LED_Kueche 2023-08-14 21:10:36 bright_value 1000.0
setstate LED_Kueche 2023-06-27 21:30:14 category dd
setstate LED_Kueche 2023-09-04 22:23:03 colour_data 00b403
setstate LED_Kueche 2023-07-21 19:23:55 countdown 0.0
setstate LED_Kueche 2023-06-27 21:30:14 create_time 1687893309
setstate LED_Kueche 2023-07-19 09:58:31 dp_42 01000001645c000003e8007803e800f003e8003c03e800b403e8012c03e8
setstate LED_Kueche 2023-06-27 21:30:14 icon smart/icon/ay1541056239985fDGjj/b0b60366ea58c5452c263ca3afe6ef4c.png
setstate LED_Kueche 2023-06-27 21:30:14 id bf44d4d8fba66046c0xh1z
setstate LED_Kueche 2023-06-27 21:30:14 ip 89.204.130.86
setstate LED_Kueche 2023-06-27 21:30:14 lat 50.8700
setstate LED_Kueche 2023-06-27 21:30:14 local_key #NkIQM0'USLG|A;;*
setstate LED_Kueche 2023-06-27 21:30:14 lon 6.1700
setstate LED_Kueche 2023-06-27 21:30:14 model 6125000100
setstate LED_Kueche 2023-06-27 21:30:14 name LSC Light Strip-RGBCCT
setstate LED_Kueche 2023-09-04 22:10:02 online 1
setstate LED_Kueche 2023-06-27 21:30:14 owner_id 81817100
setstate LED_Kueche 2023-06-27 21:30:14 product_id tdlcbgj5yipsqjlw
setstate LED_Kueche 2023-06-27 21:30:14 product_name LSC Light Strip-RGBCCT
setstate LED_Kueche 2023-09-04 22:23:32 state off
setstate LED_Kueche 2023-06-27 21:30:14 sub 0
setstate LED_Kueche 2023-09-04 22:10:02 switch_led off
setstate LED_Kueche 2023-09-04 21:39:58 temp_value 932.0
setstate LED_Kueche 2023-06-27 21:30:14 time_zone +02:00
setstate LED_Kueche 2023-06-27 21:30:14 uid eu16765577276199c5V2
setstate LED_Kueche 2023-06-27 21:30:14 update_time 1687893977
setstate LED_Kueche 2023-06-27 21:30:14 uuid a8008c5bf6ba4a25
setstate LED_Kueche 2023-09-04 21:47:49 work_mode white


2. Strip
define tuya_local_bfd99d6a1e8a0716c2i06k fhempy tuya tdlcbgj5yipsqjlw bfd99d6a1e8a0716c2i06k 192.168.1.48 3.3 qcdxp5xtsngskkqwsdjn 96ac49712ba5459d8622807f39ea859a
attr tuya_local_bfd99d6a1e8a0716c2i06k alias LED_Aussen
attr tuya_local_bfd99d6a1e8a0716c2i06k dp_20 switch_led
attr tuya_local_bfd99d6a1e8a0716c2i06k dp_21 work_mode
attr tuya_local_bfd99d6a1e8a0716c2i06k dp_22 bright_value
attr tuya_local_bfd99d6a1e8a0716c2i06k dp_23 temp_value
attr tuya_local_bfd99d6a1e8a0716c2i06k dp_24 colour_data
attr tuya_local_bfd99d6a1e8a0716c2i06k dp_25 scene_data
attr tuya_local_bfd99d6a1e8a0716c2i06k dp_26 countdown
attr tuya_local_bfd99d6a1e8a0716c2i06k group tuya
attr tuya_local_bfd99d6a1e8a0716c2i06k localkey aExr2-';;zeY6?606
attr tuya_local_bfd99d6a1e8a0716c2i06k room fhempy
attr tuya_local_bfd99d6a1e8a0716c2i06k tuya_spec_functions [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}, 'desc': 'switch led'}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}, 'desc': 'work mode'}, {'code': 'bright_value', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'bright value'}, {'code': 'temp_value', 'dp_id': 23, 'type': 'Integer', 'values': {'min': 0, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'temp value'}, {'code': 'colour_data', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}, 'desc': 'colour data'}, {'code': 'scene_data', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, 'desc': 'scene data'}, {'code': 'countdown', 'dp_id': 26, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown'}, {'code': 'music_data', 'dp_id': 27, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}, 'desc': 'music data'}, {'code': 'control_data', 'dp_id': 28, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}, 'desc': 'control data'}]
attr tuya_local_bfd99d6a1e8a0716c2i06k tuya_spec_status [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}}, {'code': 'bright_value', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'temp_value', 'dp_id': 23, 'type': 'Integer', 'values': {'min': 0, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'colour_data', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, {'code': 'scene_data', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}}, {'code': 'countdown', 'dp_id': 26, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}]
#   CFGFN     
#   DEF        tuya tdlcbgj5yipsqjlw bfd99d6a1e8a0716c2i06k 192.168.1.48 3.3 qcdxp5xtsngskkqwsdjn 96ac49712ba5459d8622807f39ea859a
#   DEVICEID   bfd99d6a1e8a0716c2i06k
#   FHEMPYTYPE tuya
#   FUUID      64f63a09-f33f-b458-f734-cd0b71d6396c529b
#   IODev      fhempy_local
#   NAME       tuya_local_bfd99d6a1e8a0716c2i06k
#   NR         72309
#   PYTHONTYPE tuya
#   STATE      ready
#   TYPE       fhempy
#   eventCount 9
#   READINGS:
#     2023-09-04 22:11:56   active_time     1689931153
#     2023-09-04 22:11:56   biz_type        0
#     2023-09-04 22:11:56   category        dd
#     2023-09-04 22:11:56   create_time     1689931153
#     2023-09-04 22:11:56   icon            smart/icon/ay1541056239985fDGjj/b0b60366ea58c5452c263ca3afe6ef4c.png
#     2023-09-04 22:11:56   id              bfd99d6a1e8a0716c2i06k
#     2023-09-04 22:11:56   ip              46.114.110.226
#     2023-09-04 22:11:56   lat             50.8700
#     2023-09-04 22:11:56   local_key       aExr2-';zeY6?$-6
#     2023-09-04 22:11:56   lon             6.1700
#     2023-09-04 22:11:56   model           6125000100
#     2023-09-04 22:11:56   name            LED_Aussen
#     2023-09-04 22:11:56   online          1
#     2023-09-04 22:11:56   owner_id        81817100
#     2023-09-04 22:11:56   product_id      tdlcbgj5yipsqjlw
#     2023-09-04 22:11:56   product_name    LSC Light Strip-RGBCCT
#     2023-09-04 22:12:03   state           ready
#     2023-09-04 22:11:56   sub             0
#     2023-09-04 22:11:56   time_zone       +02:00
#     2023-09-04 22:11:56   uid             eu16765577276199c5V2
#     2023-09-04 22:11:56   update_time     1693858206
#     2023-09-04 22:11:56   uuid            eebb1d2f3a899a03
#   args:
#     tuya_local_bfd99d6a1e8a0716c2i06k
#     fhempy
#     tuya
#     tdlcbgj5yipsqjlw
#     bfd99d6a1e8a0716c2i06k
#     192.168.1.48
#     3.3
#     qcdxp5xtsngskkqwsdjn
#     96ac49712ba5459d8622807f39ea859a
#   argsh:
#
setstate tuya_local_bfd99d6a1e8a0716c2i06k ready
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 active_time 1689931153
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 biz_type 0
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 category dd
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 create_time 1689931153
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 icon smart/icon/ay1541056239985fDGjj/b0b60366ea58c5452c263ca3afe6ef4c.png
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 id bfd99d6a1e8a0716c2i06k
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 ip 46.114.110.226
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 lat 50.8700
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 local_key aExr2-';;zeY6?$-6
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 lon 6.1700
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 model 6125000100
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 name LED_Aussen
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 online 1
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 owner_id 81817100
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 product_id tdlcbgj5yipsqjlw
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 product_name LSC Light Strip-RGBCCT
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:12:03 state ready
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 sub 0
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 time_zone +02:00
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 uid eu16765577276199c5V2
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 update_time 1693858206
setstate tuya_local_bfd99d6a1e8a0716c2i06k 2023-09-04 22:11:56 uuid eebb1d2f3a899a03

Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 06 September 2023, 22:56:47
So kurze Rückmeldung,
Nachdem ich den LED Strip in Fhem und Tuya gelöscht habe und neu hinzugefügt lässt er sich auch aus Dem heraus Steuern.

Aber ein Problem habe ich noch mit den LED Strips, ich kann Keine Farbe einstellen, egal was ich im Colur picker einstelle er bleibt Grün.

Jemand eine Idee woran es liegen kann?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 10 September 2023, 23:33:02
Niemand einen Tipp für das Farbe Problem???
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Superposchi am 12 September 2023, 21:47:54
Hallo zusammen,

ich habe einen Tuya-sensor für Temperatur und Luftfeuchtigkeit angeschafft und wollte diesen in mein Fhem einbinden.
Habe den Sensor erst mal in der Tuya-App eingebunden und dann in Fhem fhempy neu gestartet. Siehe da, der Sensor wurde auch angezeigt.
Allerdings musste ich den localkey manuell eintragen, da er mit offline im DEF angelegt worden war.
Nun ist das Problem, dass der Sensor immer auf "Initializing..." steht und im Tuya-local-Device steht bei IP "Offline"

List des Sensor-Device:
Internals:
   CFGFN     
   DEF        tuya g2y6z3p3ja2qhyav bfa761eb90305906808ykg 192.168.178.186 3.3 |Be'0]%AHa<%DuD$ fc553d7a6bfa4a569bc69ed2aa6924ed
   DEVICEID   bfa761eb90305906808ykg
   FHEMPYTYPE tuya
   FUUID      6500b8ab-f33f-7706-ae7a-b51627c62dce2c64
   IODev      fhempy_local
   NAME       tuya_local_bfa761eb90305906808ykg
   NR         280327
   PYTHONTYPE tuya
   STATE      Initializing...
   TYPE       fhempy
   eventCount 13
   READINGS:
     2023-09-12 21:28:59   IODev           fhempy_local
     2023-09-12 21:14:51   online          0
     2023-09-12 21:38:45   state           Initializing...
   args:
     tuya_local_bfa761eb90305906808ykg
     fhempy
     tuya
     g2y6z3p3ja2qhyav
     bfa761eb90305906808ykg
     192.168.178.186
     3.3
     |Be'0]%AHa<%DuD$
     fc553d7a6bfa4a569bc69ed2aa6924ed
   argsh:
Attributes:
   IODev      fhempy_local
   alias      Temperatursensor  Badezimmer
   group      Sensor
   icon       hue2019_devicesMotionSensor
   localkey   |Be'0]%AHa<%DuD$
   room       Wohnung->Badezimmer,fhempy

List tuya-local-Device:
Internals:
   API_KEY    asfg5sj9aurr9nib73fx
   API_SECRET fc553d7a6bfa4a569bc69ed2aa6924ed
   DEF        tuya setup asfg5sj9aurr9nib73fx fc553d7a6bfa4a569bc69ed2aa6924ed bf934a1eb83b21bc25uo4x set tuya_system start_scan
   DEVICEID   0
   FHEMPYTYPE tuya
   FUUID      63e0110f-f33f-7706-9ebc-3f39758978b5b151
   FVERSION   10_fhempy.pm:0.182830/2019-01-16
   IODev      fhempy_local
   NAME       tuya_system
   NR         60
   PYTHONTYPE tuya
   REGION     eu
   STATE      ready
   TYPE       fhempy
   eventCount 31
   READINGS:
     2023-02-05 21:48:54   bf5df91a3950a0df0csgf7_icon https://images.tuyaeu.com/smart/icon/ay1496289297888GkNKB/e37dc3d5bed7147b344e6eda5073f40e.jpg
     2023-02-05 21:48:54   bf5df91a3950a0df0csgf7_id bf5df91a3950a0df0csgf7
     2023-02-05 21:49:30   bf5df91a3950a0df0csgf7_ip 192.168.178.168
     2023-02-05 21:48:54   bf5df91a3950a0df0csgf7_localkey 7858ce60310e0e06
     2023-02-05 21:48:54   bf5df91a3950a0df0csgf7_name Luftbefeuchter
     2023-02-05 21:48:54   bf5df91a3950a0df0csgf7_productid yodwo2ujgwbgjaio
     2023-02-05 21:49:30   bf5df91a3950a0df0csgf7_version 3.3
     2023-02-05 21:48:54   bf75378cf6e13718e0rvcj_icon https://images.tuyaeu.com/smart/icon/bay1579257011827QOvk/05cb05801c69fa7b6bdacda9c7f21196.png
     2023-02-05 21:48:54   bf75378cf6e13718e0rvcj_id bf75378cf6e13718e0rvcj
     2023-02-05 21:49:30   bf75378cf6e13718e0rvcj_ip 192.168.178.169
     2023-02-05 21:48:54   bf75378cf6e13718e0rvcj_localkey 7ada5a7cbf4a78e8
     2023-02-05 21:48:54   bf75378cf6e13718e0rvcj_name Schlafzimmerventilator
     2023-02-05 21:48:54   bf75378cf6e13718e0rvcj_productid 6awobc9jfnlwvqtw
     2023-02-05 21:49:30   bf75378cf6e13718e0rvcj_version 3.3
     2023-02-05 21:48:54   bf934a1eb83b21bc25uo4x_icon https://images.tuyaeu.com/smart/icon/bay1579257011827QOvk/05cb05801c69fa7b6bdacda9c7f21196.png
     2023-02-05 21:48:54   bf934a1eb83b21bc25uo4x_id bf934a1eb83b21bc25uo4x
     2023-02-05 22:03:17   bf934a1eb83b21bc25uo4x_ip 192.168.178.171
     2023-02-05 21:48:54   bf934a1eb83b21bc25uo4x_localkey 9d214ad6b3b2a7e9
     2023-02-05 21:48:54   bf934a1eb83b21bc25uo4x_name Wohnzimmerventilator
     2023-02-05 21:48:54   bf934a1eb83b21bc25uo4x_productid 6awobc9jfnlwvqtw
     2023-02-05 21:49:30   bf934a1eb83b21bc25uo4x_version 3.3
     2023-09-09 19:15:06   bfa761eb90305906808ykg_icon https://images.tuyaeu.com/smart/icon/bay1624869296421wDFy/f1c885d6e3a2b7dd5326d23de9a2a900.png
     2023-09-09 19:15:06   bfa761eb90305906808ykg_id bfa761eb90305906808ykg
     2023-09-09 19:15:26   bfa761eb90305906808ykg_ip offline
     2023-09-09 19:15:06   bfa761eb90305906808ykg_localkey |Be'0]%AHa<%DuD$
     2023-09-09 19:15:06   bfa761eb90305906808ykg_name TH_badezimmer
     2023-09-09 19:15:06   bfa761eb90305906808ykg_productid g2y6z3p3ja2qhyav
     2023-09-09 19:15:26   bfa761eb90305906808ykg_version 3.3
     2023-09-12 21:29:52   state           ready
   args:
     tuya_system
     fhempy
     tuya
     setup
     asfg5sj9aurr9nib73fx
     fc553d7a6bfa4a569bc69ed2aa6924ed
     bf934a1eb83b21bc25uo4x
     set
     tuya_system
     start_scan
   argsh:
Attributes:
   group      tuya
   room       fhempy

Was habe ich vergessen, dass die Werte vom Sensor in Fhem angezeigt werden?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Szlachta am 16 September 2023, 10:25:19
Bei mir ist es ähnlich. Die Devices bleiben zwar nicht auf initializing aber mit fhem.py/tuya-cloud werden die Devices nach erfolgreichem, automatischen Anlegen, 1x aktualisiert dann in dem Status. Es kommen dann leider keine Aktualisierungen. Restart fhemypy_local hilft dann 1x zu aktualisieren. Dann bleibt wieder alles unverändert. In der Smart Life App werden die Werte regelmäßig aktualisiert, d.h. die Geräte senden also.

Hattes es auch schon mit fhempy/tuya-local versucht, aber das Ergebnis war trotz eingetragener IP ähnlich.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 17 September 2023, 20:56:35
sensoren klappen nicht, leider
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: denis.robel am 23 September 2023, 12:04:29
Vielleicht ist für die Sensoren die alternative Firmware Openbeken eine Lösung....

Ansätze kann man hier nachlesen:

 https://forum.fhem.de/index.php?topic=132624.30 (https://forum.fhem.de/index.php?topic=132624.30)


Titel: Aw: fhempy: tuya (lokal)
Beitrag von: RappaSan am 23 September 2023, 14:52:21
Openbeken funktioniert auf jeden Fall per MQTT mit fhem.
Habe mittlerweile 4 RGB-Leds und 4 Stecker hier laufen, die tadellos funktionieren.
Das flashen über WLAN klappt aber nicht mit allen angebotenen Geräten, manche lassen sich, wenn überhaupt, nur per wire flashen (heißt: auseinander nehmen  :(  ).
Eine Anfrage dort, ob ein Gerät unterstützt wird und wie´s zu flashen ist, kann aber bestimmt nicht schaden.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Markus M. am 29 September 2023, 12:51:33
Ich habe meinen neuen Staubsauger (Lydsto R1) eingebunden und nun das Problem, dass nicht alles im set auftaucht was ich in tuya_spec_functions definiert habe.
Auch bei der initialen Einrichtung fehlten dort einige Funktionen, die sich in der Tuya API nicht aus dem Standard Instruction Set sondern nur aus den Device Control Properties und dem Things Explorer auslesen lassen.
Woher zieht sich FHEM diese initial und wie bekomme ich hier alle vorhandenen nutzbar?
Screenshot 2023-09-29 at 12.50.38.png
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 30 September 2023, 19:42:29
Hallo @domenik

Ich hab mir beim XXXL ein RGBWWCW-5m LED Band gekauft.
Wurde auch problemlos gefunden & eingebunden.

Allerdings kann ich keine Farben einstellen. Die aus der Tuya-App gelieferten Werte haben auch nichts
mit den Farben von FHEM zu tun.

Hab da noch nicht weiter geschaut ob es dazu schon eine Lösung gibt.
Allerdings gibt es Fehlermeldungen beim anlegen des Devices.

2023-09-30 19:31:33 Global global DEFINED tuya_local_bf2exxxxxxxxxxx649hsjs
2023-09-30 19:31:33 Global global ATTR tuya_local_bf2exxxxxxxxxxx649hsjs group tuya
2023-09-30 19:31:33 Global global ATTR tuya_local_bf2exxxxxxxxxxx649hsjs room fhempy
2023-09-30 19:31:33 Global global ATTR tuya_local_bf2exxxxxxxxxxx649hsjs alias TY.EG.ku.PWM.Licht
2023.09.30 19:31:33 1: BindingsIo (fhempy_local): Variable "$F" is not imported at (eval 389896) line 1.
 => COMMAND: CommandAttr(undef, "tuya_local_bf2exxxxxxxxxxx649hsjs localkey P+)qMs^Q(cpT$F|G")
2023.09.30 19:31:33 1: BindingsIo (fhempy_local):    msgtype = command
2023.09.30 19:31:33 1: BindingsIo (fhempy_local):    command = CommandAttr(undef, "tuya_local_bf2exxxxxxxxxxx649hsjs localkey P+)qMs^Q(cpT$F|G")
2023.09.30 19:31:33 1: BindingsIo (fhempy_local):    NAME = tuya_system
2023.09.30 19:31:33 1: BindingsIo (fhempy_local):    awaitId = 52211234
2023.09.30 19:31:33 1: BindingsIo (fhempy_local): ERROR failed (CommandAttr(undef, "tuya_local_bf2exxxxxxxxxxx649hsjs localkey P+)qMs^Q(cpT$F|G")): Global symbol "$F" requires explicit package name (did you forget to declare "my $F"?) at (eval 389896) line 1.
2023-09-30 19:31:33 fhempy tuya_system create_device TY.EG.ku.PWM.Licht_bf2exxxxxxxxxxx649hsjs
2023-09-30 19:31:34 fhempy tuya_local_bf2exxxxxxxxxxx649hsjs online: 0
2023-09-30 19:31:34 fhempy tuya_local_bf2exxxxxxxxxxx649hsjs attr localkey required

Ist das ein Benutzerfehler?

Gruss Gerd
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Maista am 30 September 2023, 21:44:10
Moin zusammen,

Zitat von: Maista am 30 September 2023, 19:42:29Allerdings kann ich keine Farben einstellen. Die aus der Tuya-App gelieferten Werte haben auch nichts
mit den Farben von FHEM zu tun.

Ich hab nun das Device meines E27-Leuchtmittels von XXXL als Device kopiert und das DEF angepasst.
In das DEF des kopierten Devices habe ich dann die DEF aus dem zuvor von tuya_system erzegten Device kopiert.

Nun kann ich die RGB-Farben ändern usw. Hier wird nun auch Format "_V2" verwendet.

Eventl. kann man das noch mit in die Automatik von tuya_system aufnehmen (wie immer das genau funktioniert)?

Für die Interessierten, das nennt sich "LED-Strip, SMART HOME, RGB, 5 Meter lang". Nr "82271011-02".

Nachtrag:
In der Tuya-Cloud habe ich im Device-Debugging gesehen das tatsächlich "_V2" verwendet wird.

Danke und Gruß
Gerd
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 10 Oktober 2023, 07:43:04
klappt seit tagen nichts mehr.

tuya cloud klappt nur mehr schalten, aber keine readings mehr
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: stefanru am 10 Oktober 2023, 23:40:13
Hi satprofi,

bei mir funktioniert sowohl cloud als auch lokal mit Steckdosen mit Power Meter ohne Probleme.
Bekomme alle Werte und kann schalten.
Ich bin noch auf 0.1.665.
Hast du schon das letzte Update gemacht auf 0.1.670?

Gruß,
Stefan

Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 11 Oktober 2023, 15:13:41
so, jetzt nach neustart die fehlermeldung von tuya_local

2023-10-11 15:08:14,841 - ERROR    - fhempy.lib.fhem_pythonbinding: <<< 86408191 5349.77ms: {'msgtype': 'function', 'defargsh': {}, 'FHEMPYTYPE': 'tuya_cloud', 'PYTHONTYPE': 'tuya_cloud', 'defargs': ['tuya_cloud_bf68a96ec365177aacaxrv', 'fhempy', 'tuya_cloud', 'tuya_cloud_connector', 'bf68a96ec365177aacaxrv'], 'argsh': {}, 'id': '86408191', 'args': ['tuya_cloud_bf68a96ec365177aacaxrv', 'off'], 'function': 'Set', 'NAME': 'tuya_cloud_bf68a96ec365177aacaxrv', 'finished': 1, 'returnval': ''}
2023-10-11 15:08:14,843 - WARNING  - fhempy.lib.fhem_pythonbinding: fhempy took 5351ms for {"msgtype":"function","defargsh":{},"FHEMPYTYPE":"tuya_cloud","PYTHONTYPE":"tuya_cloud","defargs":["tuya_cloud_bf68a96ec365177aacaxrv","fhempy","tuya_cloud","tuya_cloud_connector","bf68a96ec365177aacaxrv"],"argsh":{},"id":"86408191","args":["tuya_cloud_bf68a96ec365177aacaxrv","off"],"function":"Set","NAME":"tuya_cloud_bf68a96ec365177aacaxrv"}
2023-10-11 15:08:14,887 - ERROR    - fhempy.lib.fhem: sendCommandName took 5.153095722198486s to send: readingsBeginUpdate($defs{'tuya_local_bf7d89a7f6cc66b9adaufh'});;
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 17 Oktober 2023, 13:40:28
Zitat von: Tueftler1983 am 06 September 2023, 22:56:47So kurze Rückmeldung,
Nachdem ich den LED Strip in Fhem und Tuya gelöscht habe und neu hinzugefügt lässt er sich auch aus Dem heraus Steuern.

Aber ein Problem habe ich noch mit den LED Strips, ich kann Keine Farbe einstellen, egal was ich im Colur picker einstelle er bleibt Grün.

Jemand eine Idee woran es liegen kann?
hallo
wollte auch meinen stripe aktivieren. leuchtet nur rot. nach einbinden in lsc spp oder smartlife app, kann ich zwar alkes einstellen, aber es leuchtet nur rot. da diese Stripes aber digitale sind, denk ich der controller hat ne macke.
es gibt ja keine klassischen rgb lines, nur 24v, gnd und die digitalen eingänge.
hab neuen bestellt, werd berichten wenns klappt
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Smarthome_BABO am 26 Oktober 2023, 20:55:11
Hallo zusammen,

leider komme ich momentan absolut nicht weiter :-(

Fhempy Verbindungen stehen alle, alle Geräte werden sauber gefunden und angelegt.
Aber nur die Lampen lassen sich steuern.
Die Rolladenschalter werden richtig ausgelesen und angelegt, zeigen ready an, aber reagieren nicht auf control open oder close.
Leider ohne jegliche Fehlermeldung.

Hat jemand einen Tipp für mich?
 
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Smarthome_BABO am 26 Oktober 2023, 21:19:44
Zitat von: Smarthome_BABO am 26 Oktober 2023, 20:55:11Hallo zusammen,

leider komme ich momentan absolut nicht weiter :-(

Fhempy Verbindungen stehen alle, alle Geräte werden sauber gefunden und angelegt.
Aber nur die Lampen lassen sich steuern.
Die Rolladenschalter werden richtig ausgelesen und angelegt, zeigen ready an, aber reagieren nicht auf control open oder close.
Leider ohne jegliche Fehlermeldung.

Hat jemand einen Tipp für mich?
 


Okay, jetzt ist der Groschen gefallen. Die Control Befehle, die automatisch angelegt sind, sind verkehrt. Das Device reagiert auf "set [Device]control 1" mit öffnen und bei control 2 mit schließen. Also 1,2,3 statt open,close, stop
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Smarthome_BABO am 27 Oktober 2023, 17:47:05
Alles eingebunden, bis auf eine Rollade.

Hier taucht aber ein Fehler auf bei der Bedienung über die Smart Life App.

Vielleicht weiß ja jemand weiter:

2023.10.27 17:37:20.865 1: BindingsIo (fhempy_local): ^* matches null string many times in regex; marked by <-- HERE in m/^* <-- HERE $/ at ./FHEM/33_readingsGroup.pm line 154.
 => COMMAND: CommandDefine(undef, "tuya_local_bf43cfdf56f61069XXXX fhempy tuya uv8XXXdc2e5xswbat bf43cfdf56XXXXX069c9rlxe 192.168.2.3 3.3 9weveqag53x3xtmXXXf b3f32ca9ea4XXX67841eb9b1ec01bfe7")
2023.10.27 17:37:20.865 1: BindingsIo (fhempy_local):    command = CommandDefine(undef, "tuya_local_bf43cfdXXXfxxxxxxx9rlxe fhempy tuya uvXXXXc2e5xswbat bf43cfXXXXXX61069c9rlxe 192.168.2.3 3.3 9weveqag53x3XXXmd4ef b3f32ca9ea40456784XXX9b1ec01bfe7")
2023.10.27 17:37:20.865 1: BindingsIo (fhempy_local):    awaitId = 35701356
2023.10.27 17:37:20.865 1: BindingsIo (fhempy_local):    NAME = tuya_system
2023.10.27 17:37:20.866 1: BindingsIo (fhempy_local):    msgtype = command
2023.10.27 17:37:20.866 1: BindingsIo (fhempy_local): ^* matches null string many times in regex; marked by <-- HERE in m/^* <-- HERE $/ at ./FHEM/33_readingsGroup.pm line 160.
 => COMMAND: CommandDefine(undef, "tuya_local_bf43cfxxxxx69c9rlxe fhempy tuya uv8yqxxxxxswbat xxxxxxxxxxxxx  192.168.2.3 3.3 9wevexxxxxxxxxxmd4ef b3f32ca9ea4xxxxxxxxx9b1ec01bfe7")
2023.10.27 17:37:20.866 1: BindingsIo (fhempy_local):    command = CommandDefine(undef, "tuya_local_bf43cfxxxxxxx9c9rlxe fhempy tuya xxxxxxxxxxwbat bfxxxxxxxxxrlxe 192.168.2.3 3.3 xxxxxxxxxxxxxxtmmd4ef b3f32xxxxxxxxxxxxxxxxx1bfe7")
2023.10.27 17:37:20.867 1: BindingsIo (fhempy_local):    awaitId = 35701356
2023.10.27 17:37:20.867 1: BindingsIo (fhempy_local):    NAME = tuya_system
2023.10.27 17:37:20.867 1: BindingsIo (fhempy_local):    msgtype = command
2023.10.27 17:37:21.166 1: BindingsIo (fhempy_local): Possible unintended interpolation of @7 in string at (eval 110700) line 1.
 => COMMAND: CommandAttr(undef, "tuya_local_bf43cfdf56f61069c9rlxe localkey o@7??]c}`[IOl&/o")
2023.10.27 17:37:21.167 1: BindingsIo (fhempy_local):    NAME = tuya_system
2023.10.27 17:37:21.167 1: BindingsIo (fhempy_local):    awaitId = 79321728
2023.10.27 17:37:21.167 1: BindingsIo (fhempy_local):    command = CommandAttr(undef, "tuya_local_bf43YYYYYYYYYrlxe localkey o@7??]c}`[IOl&/o")
2023.10.27 17:37:21.167 1: BindingsIo (fhempy_local):    msgtype = command

Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Gisbert am 08 November 2023, 17:01:35
Hallo zusammen,

ich hab meinen Fhem-Server von Bullseye auf Bookworm (Debian 12) upgedatet.
Jetzt funktioniert fhempy nicht mehr.

Wenn ich auf dem Server
pip3 install --upgrade fhempy eingebe, erhalte ich
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Im fhempy-log steht vergleichbares drin:
2023-11-08 16:57:24,125 - ERROR    - __main__: Failed to load fhempy
Traceback (most recent call last):
  File "/opt/fhem/FHEM/bindings/python/bin/fhempy", line 139, in <module>
    import fhempy.lib.fhem_pythonbinding as fpb
ModuleNotFoundError: No module named 'fhempy'
2023-11-08 16:57:24,131 - INFO     - __main__: Attempting install of fhempy>=0.1.462
2023-11-08 16:57:24,899 - ERROR    - __main__: Unable to install package fhempy>=0.1.462: error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
   
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
   
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
   
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
2023-11-08 16:57:24,899 - ERROR    - __main__: Failed to install fhempy, exit now...

Hat jemand tuya / fhempy auf einem Debian 12 (Bookworm) erfolgreich zum Laufen gebracht?

Viele Grüße
Gisbert

PS: Ich hab ein Backup mit Debian 11 eingespielt, da ich bisher keine Lösung gefunden habe.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: hglaeser am 09 November 2023, 21:49:24
Hallo,

ich habe einen WiFi-Türkontakt-Sensor im FHEM Local eingebunden. Er funktioniert soweit und die Eigenschaft doorcontact_state ändert sich im FHEM auch, wenn ich den Kontakt schließe bzw. öffne.

ABER: Der Sensor geht nach wenigen Sekunden ohne Statusänderung (Schließen/Öffnen) in einen Stromsparmodus und ist dann bis zur nächsten Statusänderung nicht mehr mit dem WLAN verbunden. Erst bei der nächsten Statusänderung baut der Sensor die WLAN-Verbindung wieder auf (dauert ca. 2-3 Sekunden) und meldet die Statusänderung dann an die Tuya-Cloud. Die Smart Life-App bekommt die Statusänderung auch immer mit, wenn auch eben mit 2-3 Sekunden Verzögerung. Das stört mich aber nicht.

Nur das FHEM-Modul "Tuya Local" bekommt in diesem Fall von der Statusänderung leider überhaupt nichts mit. Öffne bzw. schließe ich den Sensor innerhalb von ca.15 Sekunden mehrmals, dann bekommt Tuya Local das nach ca. 6-8 Statusänderungen mit, aber eben nicht die erste Statusänderung.

Nun wollte ich aber die Fenster/Türen nicht immer erst 15 Sekunden lang öffnen und schließen müssen, damit FHEM eine Aktion ausführt ;-)

Ist dieses Verhalten prinzipbedingt so oder kann ich das noch irgendwie "wegkonfigurieren"? An dem Stromsparmodus des Sensors möchte ich aber nichts ändern, da dessen Batterien mehrere Monate halten.

Vielen Dank für Eure Antwort.

Holger
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: traders-banquet am 10 November 2023, 17:52:05
Hallo,
ich habe meine Fhem Installation auf Debian Bookworm. Hier wird wohl pip nicht mehr verwendet, daher auch die Fehlermeldung des Kollegen im vorletzten Beitrag. Mit --break-system-packages lassen sich diese dann aber installieren.
Nun habe ich meinen fhempyserver_1533 laufen, meinen fhempy_local Version 0.1670. Um an meine Geräte zu kommen benötige ich noch den Tuya_Cloud_Connector.
Diesen habe ich nun unzählig oft versucht einzurichten mit :
define tuya_cloud_connector fhempy tuya_cloud setup xxxxxxxxxxxxxxxxxxxx XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX xxxx@xxx.xx        XXXXXXXXXXXXXXX        smartlife Europe
                                                    Access ID/Client ID  Access Secret/Client Secret      Smartlife Login    smartlife Passwort

Ich erhalte aber immer nur :
2023-11-10 17:08:43,772 - ERROR    - fhempy_tuya_cloud_connector: Tuya login error response: {'code': 1106, 'msg': 'permission deny', 'success': False, ........

Ich habe das Kennwort in der Tuya App nun schon geändert, da hier wohl die meissten Suchen nach dem Fehler damit gelöst wurden.
Aktuell weiss ich mir nicht mehr zu helfen.

Hier die Logausgabe wenn ich den fhempyserver neu starte, t und tid habe ich heraus genommen :
r2023-11-10 17:50:10,292 - INFO     - fhempy.lib.fhem_pythonbinding: Shutdown initiated...
2023-11-10 17:50:10,292 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-11-10 17:50:10,292 - INFO     - websockets.server: server closing
2023-11-10 17:50:15,305 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.670...
2023-11-10 17:50:15,306 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-11-10 17:50:15,314 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-11-10 17:50:25,452 - INFO     - websockets.server: connection open
2023-11-10 17:50:25,452 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-11-10 17:50:25,927 - ERROR    - fhempy_tuya_cloud_connector: Tuya login error response: {'code': 1106, 'msg': 'permission deny', 'success': False, 't': , 'tid': ''}


Kann sich jemand einen Reim darauf machen ?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Snocksman am 10 November 2023, 19:24:38
Hi !

Ich habe mir so eine nette Infrarotheizung fürs Bad gekauft und das Teil ist ein tuya Wifi Device. In der Tuya App ist alles eingerichtet und funktioniert, fhempy ist auch eingerichtet und funktioniert und auch die Infrarotheizung wurde gefunden. Nun steht in dem angelegten Device aber noch die Meldung:"STATE attr localkey required" und da stelle ich mich wahrscheinlich gerade einfach ein bisschen blöde an... Wo finde ich diesen "localkey" ? ???

Hat sich erledigt ! Habs gefunden !!! Und funktioniert.  8)
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Snocksman am 10 November 2023, 21:35:28
Jetzt habe ich aber scheinbar doch noch ein Problem...

Die ganze Sache läuft soweit bei mir und ich kann die Infrarotheizung steuern... Nach längerer Zeit (+- 1 Stunde) bekomme ich aber beim tuya_system und bei meinem Infrarotheizungs-Device angezeigt, dass der fempy Server Offline wäre... Das fempy_local und fempy_server Device wird mir aber weiterhin mit dem grünen Punkt angezeigt (sollte also laufen...).

Ein restart des fempyserver Devices hilft auch nicht weiter, sondern nur ein komplettes neustart des Raspis.

Was kann das sein...?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 27 November 2023, 10:20:52
Ich habe eine Frage in Zusammenhang mit dem Attribut "event-min-interval".
Das scheint bei meinen Steckdosen nicht ausgelöst zu werden.

Ich möchte die Readings "cur_current", "cur_power" und "cur_voltage" mindestens alle 15min im Log haben (für Plots). Dazu habe ich wie ich es aus anderen Geräten gewohnt bin, das Attribut "event_min_interval" auf "cur.*:900" gesetzt. Allerdings fehlen die Einträge im Log.
Mir ist aufgefallen, dass beim automatischen Anlegen des Geräts beispielsweise ein Attribut "dp_19" auf "cur_power" gesetzt wurde. Nun habe ich auch ausprobiert dieses Reading "dp_19", was offenbar automaisch zu "cur_power" umbenannt wird, in "event-min-interval" zu ergänzen, also "cur.*:900,dp_19:900". Das ändert aber nix.

"event-on-change-reading" funktioniert tadellos und die Einträge im Log sind auch vorhanden, solange sich die Werte ändern. Was mache ich falsch?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: dero am 05 Dezember 2023, 11:09:14
Ich mache gerade meine ersten Versuche mit dem tollen Plugin. Scannen funktioniert. Wenn ich allerdings auf "createdevice" klicke, kommt im Log:

```
2023-12-05 11:03:47,299 - ERROR    - tuya_local_bf2e82b52cbf71e2bfosgd: Failed to connect to device
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/tuya/tuya.py", line 563, in setup_connection
    self._connected_device = await asyncio.wait_for(connect_fct, timeout=15)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/__init__.py", line 206, in connect
    await device.start_socket()
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py", line 917, in start_socket
    raise ex
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py", line 905, in start_socket
    await self._negotiate_session_key()
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py", line 1464, in _negotiate_session_key
    rkey = await self._send_receive_quick(
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py", line 1090, in _send_receive_quick
    self._encode_message(payload)
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py", line 1589, in _encode_message
    payload = self.cipher.encrypt(payload, False)
  File "/opt/fhem/.local/lib/python3.9/site-packages/aiotinytuya/core.py", line 281, in encrypt
    cipher = AES.new(self.key, mode=AES.MODE_ECB)
  File "/opt/fhem/.local/lib/python3.9/site-packages/Crypto/Cipher/AES.py", line 228, in new
    return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs)
  File "/opt/fhem/.local/lib/python3.9/site-packages/Crypto/Cipher/__init__.py", line 79, in _create_cipher
    return modes[mode](factory, **kwargs)
  File "/opt/fhem/.local/lib/python3.9/site-packages/Crypto/Cipher/_mode_ecb.py", line 216, in _create_ecb_cipher
    cipher_state = factory._create_base_cipher(kwargs)
  File "/opt/fhem/.local/lib/python3.9/site-packages/Crypto/Cipher/AES.py", line 90, in _create_base_cipher
    raise ValueError("Incorrect AES key length (%d bytes)" % len(key))
ValueError: Incorrect AES key length (13 bytes)
```

Hat jemand eine Idee?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 05 Dezember 2023, 12:11:58
Zitat von: dero am 05 Dezember 2023, 11:09:14ValueError: Incorrect AES key length (13 bytes)
Sicher, dass Du das "tuya_system"-Device richtig angelegt hast?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 17 Dezember 2023, 10:04:26
Hallo.
Bei action gestern 5m Streifen gekauft, klappt damit sogar Farbänderung, etc. zu steuern.

LG
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Xsantos am 27 Dezember 2023, 16:39:47
Hallo,
erstmal vielen Dank für die tolle Arbeit! Ich habe über 50 Tuya-Geräte im Einsatz und die meisten funktionieren ohne Probleme.
Eine kleine Sache habe ich allerdings:
Ich habe drei Flutlichter und kann die Farbe über Fhem nicht einstellen.
Es gibt zwar die Auswahl: "colour_data" aber beim setzen ändert sich nicht das Reading.
Wenn ich in der "Smart-Life App" z.B. die Farbe Rot einstelle, dann ändert sich das Reading "colour_data" sofort auf "000003".
Wenn ich es aber separat eingebe: set XXXXX colour_data 000003 , bleibt der Wert unverändert.

Es wäre super wenn einer/eine mir helfen kann.

Vielen Dank und schöne Feiertage,
Marco


Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 30 Dezember 2023, 09:15:16
Ich habe ein Problem mit dem automatischen Update...

fhempy_local "hängt" schon länger auf der 0.1.670 fest. Das hat mich bisher nicht gestört, weil alles funktioniert hat.
Gestern habe ich dann ein generelles FHEM-Update gemacht, dann ging erstmal gar nichts ("server offline"). Im Logfile war die vermeintliche Ursache rasch gefunden, mittels "apt-get install python3-venv" war der Server dann auch rasch wieder online. fhempy_local hat sich trotzdem auch nach FHEM-Neustart nicht mehr verbunden.
Ich habe dann versucht ein Update mittels "pip3 install --upgrade fhempy" zu machen so wie es hier wohl schonmal erfolgreich war, https://forum.fhem.de/index.php?topic=118803.0
Während die Installation noch lief, hat sich fhempy_local auch schon wieder verbunden. Ob tatsächlich "pip 3 install ..." dabei geholfen hat oder ich einfach nur nicht lange genug gewartet habe, kann ich nicht sagen. Auf den ersten Blick scheint wieder alles zu funktionieren, nur ein Update von fhempy_local klappt weiterhin nicht.

Der Status hing immer in "restart... please wait", auch ein FHEM-Neustart änderte daran nichts. Ich habe nun FHEM nochmal neu gestartet und erneut das versucht fhempy_local zu aktualisieren. Es ging zwar wieder nicht, aber zumindest schaut der Status wieder "normal" aus.
Hier das Logfile von heute (FHEM-Neustart und dann Update-Versuch):
Activating virtual environment...OK
2023-12-30 08:58:29,764 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.670...
2023-12-30 08:58:29,766 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-12-30 08:58:29,849 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-12-30 08:58:35,715 - INFO     - websockets.server: connection open
2023-12-30 08:58:35,717 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2023-12-30 09:06:39,580 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2023-12-30 09:06:39,582 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2023-12-30 09:06:57,066 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2023-12-30 09:06:57,088 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2023-12-30 09:06:57,093 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2023-12-30 09:06:57,094 - INFO     - websockets.server: server closing
2023-12-30 09:07:07,104 - INFO     - websockets.server: connection closed
2023-12-30 09:07:07,106 - INFO     - websockets.server: server closed
2023-12-30 09:07:07,110 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
Activating virtual environment...OK
2023-12-30 09:07:09,965 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.670...
2023-12-30 09:07:09,968 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2023-12-30 09:07:10,054 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2023-12-30 09:07:17,243 - INFO     - websockets.server: connection open
2023-12-30 09:07:17,245 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1

Kann ich fhempy_local irgendwie "manuell" aktualisieren bzw. wie kann ich den Fehler finden und lösen?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: tomhead am 13 Januar 2024, 11:44:21
Zitat von: TheTrumpeter am 30 Dezember 2023, 09:15:16Ich habe ein Problem mit dem automatischen Update...

fhempy_local "hängt" schon länger auf der 0.1.670 fest.
Hallo, bei mir das gleiche Problem, ich habe bereits mehrfach aus FHEM raus start update probiert, ebenso pip3 install --upgrade fhempy, aber trotzdem wird mir immer noch angezeigt:
version 0.1.670
version_available 0.1.698
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: tomhead am 20 Januar 2024, 20:11:11
Jetzt muss ich doch noch mal nachfragen, ob evtl. jemand ne Lösung weiss: ich bekomme keine fhempy Updates mehr, bei 0.1.670 bleibt es, obwohl mittlerweile 0.1.709 als verfügbar angezeigt wird. Habe das device fhempy_local auch schon gelöscht und wieder neu angelegt, hat aber nix gebracht.
Außerdem frage ich mich, ob das evtl. mit der python version zusammenhängen könnte, da es mir 3.7.3 in den readings angezeigt.
python 3.7.3
release 5.10.103-v7+
state opened
system Linux
version 0.1.670
version_available 0.1.709
Python3 selber habe ich heute auf 3.12.1 auf meinem Raspberry aktualisiert (sowohl python -VV als auch python3 --version liefern Python 3.12.1 als Version, wobei mir apt policy python3 als Ergebnis "Installiert 3.7.3-1" liefert), aber wie bekomme ich python3-venv aktualisiert? Wenn ich "sudo apt install python3-venv" eingebe, kommt "python3-venv ist schon die neueste Version (3.7.3-1)". Könnt ihr mir weiterhelfen ?
VG, Tom

Update:
Jetzt läuft nach einem Neustart fhempy gar nicht mehr (denn sie wissen nicht, was sie tun :-( , im Log kommt folgendes:
Current thread 0x76f3c040 (most recent call first):
  <no Python frame>
Activating virtual environment...OK
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'python3'
  isolated = 0
  environment = 1
  user site = 1
  safe_path = 0
  import site = 1
  is in build tree = 0
  stdlib dir = '/usr/local/lib/python3.12'
  sys._base_executable = '/usr/local/bin/python3.12'
  sys.base_prefix = '/usr/local'
  sys.base_exec_prefix = '/usr/local'
  sys.platlibdir = 'lib'
  sys.executable = '/opt/fhem/.fhempy/fhempy_venv/bin/python3'
  sys.prefix = '/usr/local'
  sys.exec_prefix = '/usr/local'
  sys.path = [
    '/usr/local/lib/python312.zip',
    '/usr/local/lib/python3.12',
    '/usr/local/lib/python3.12/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Bitte Hiiiilfe...

Update2: Hab es nun wie folgt gelöst: Habe FHEM auf einem frischen Debian (gleich mal Bullseye statt Buster verwendet) neu installiert  und dann ein 3 Tage altes FHEM Backup (vor Start der Probleme) eingespielt. Damit bin ich jetzt automatisch auf phyton 3.9.2. Um trotz Backup fhempy wieder zum laufen zu bekommen, musste ich das fhempy_local Device entfernen, den Ordner /opt/fhem/.fhempy komplett löschen und dann das Device wieder neu anlegen. Nach einem FHEM Neustart läuft es jetzt wieder, auch auf der aktuellsten Version 0.1.714
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 22 Januar 2024, 13:13:09
Zitat von: tomhead am 20 Januar 2024, 20:11:11Bitte Hiiiilfe...
Ich habe vor ein paar Tagen auch nochmal versucht das Problem zu lösen.
Was ich herausgefunden habe:
Falls Du Raspbian nutzt, müsste es auch bei Dir so sein:
In den Ordnern /opt/fhem/.fhempy/fhempy_venv/lib/python3.7/site-packages/fhempy/ und /opt/fhem/.fhempy/fhempy_venv/lib64/python3.7/site-packages/fhempy/ finden sich genau die Dateien vom github https://github.com/fhempy/fhempy/tree/master/FHEM/bindings/python/fhempy/lib (bzw. eben die alte Version, ich habe einzelne Dateien, die sich seither geändert haben, stichprobenartig geprüft).
Außerdem liegt dort bei mir eine Ebene höher (/opt/fhem/.fhempy/fhempy_venv/lib/python3.7/site-packages/) noch ein Ordner "fhempy-0.1.670.dist-info" mit irgendwelche Meta-Informationen.

Ich VERMUTE, dass es zum Reparieren des Problems ausreichen würde, die beiden obigen Ordner (site-packages/fhempy/) einfach mit den Dateien vom github zu überschreiben.
Ursprünglich wollt' ich das auch tun, aber dann hat mich doch der Mut verlassen, zumal ich die ganzen neuen Features aktuell nicht benötige.
(Vielleicht "fehlt" dann auch das Zeug aus der "dist-info", deren Herkunft ich in github leider nicht ausfindig machen konnte.)
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: tomhead am 23 Januar 2024, 07:48:52
@TheTrumpeter: Danke für deine Hilfe, ich hatte es mittlerweile so gelöst, dass ich FHEM auf einem frischen Debian (gleich mal Bullseye statt Buster verwendet) neu installiert habe und dann ein 3 Tage altes FHEM Backup (vor Start der Probleme) eingespielt habe. Damit bin ich jetzt automatisch auf phyton 3.9.2. Um trotz Backup fhempy wieder zum laufen zu bekommen, musste ich das fhempy_local Device entfernen, den Ordner /opt/fhem/.fhempy komplett löschen und dann das Device wieder neu anlegen. Nach einem FHEM Neustart läuft es jetzt wieder.
Danke und Grüße
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 23 Januar 2024, 08:04:13
Zitat von: tomhead am 23 Januar 2024, 07:48:52Um trotz Backup fhempy wieder zum laufen zu bekommen, musste ich das fhempy_local Device entfernen, den Ordner /opt/fhem/.fhempy komplett löschen und dann das Device wieder neu anlegen.
Hast Du das davor schon probiert, also nicht auf's Backup zurück, sondern im System, wo das Update nicht mehr funktioniert hat?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: tomhead am 23 Januar 2024, 17:32:45
Zitat von: TheTrumpeter am 23 Januar 2024, 08:04:13
Zitat von: tomhead am 23 Januar 2024, 07:48:52Um trotz Backup fhempy wieder zum laufen zu bekommen, musste ich das fhempy_local Device entfernen, den Ordner /opt/fhem/.fhempy komplett löschen und dann das Device wieder neu anlegen.
Hast Du das davor schon probiert, also nicht auf's Backup zurück, sondern im System, wo das Update nicht mehr funktioniert hat?
Ja, hatte ich vorher schon probiert, hatte aber nichts gebracht.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: coolheizer am 27 Januar 2024, 19:49:51
Meine 3 Hochwasser WiFi melder, angelegt mit tuya_system stehen alle auf Initializing...

In der Fritzbox die Geräte gesucht und Feste IP vergeben.

Ein List:


Internals:
  DEF        tuya jzxxxxxxxxxt 70xxxxxxxxxxxxx2 191.168.178.183 3.3 pvdxxxxxxxxxxxxx5 e3xxxxxxxxxxxxxxxxx8
  DEVICEID  7026xxxxxxxxxxxxx52
  FHEMPYTYPE tuya
  FUUID      65b53xxf-xxxx-bfeb-xxxx-857ec367exxxxx3
  IODev      fhempy_local
  NAME      tuya_local_70xxxxxxxxxxxxxxxxx2
  NR        782
  PYTHONTYPE tuya
  STATE      Initializing...
  TYPE      fhempy
  eventCount 4
  READINGS:
    2024-01-27 18:07:19  active_time    1706373747
    2024-01-27 18:07:19  biz_type        0
    2024-01-27 18:07:19  category        sj
    2024-01-27 18:07:19  create_time    1706365296
    2024-01-27 18:07:19  icon            smart/program_category_icon/sj.png
    2024-01-27 18:07:19  id              702637xxxxxxxxxxxxx2
    2024-01-27 18:07:19  ip              185.209.105.74
    2024-01-27 18:07:19  lat            52.9500
    2024-01-27 18:07:19  local_key      y:E)xxxxxxxxxxxI
    2024-01-27 18:07:19  lon            10.8100
    2024-01-27 18:07:19  model          GS156A-H14
    2024-01-27 18:07:19  name            Water leak sensor
    2024-01-27 18:07:22  online          0
    2024-01-27 18:07:19  owner_id        1818000002
    2024-01-27 18:07:19  product_id      jzoq9yd2wiylf29t
    2024-01-27 18:07:19  product_name    Water leak sensor
    2024-01-27 19:21:28  state          Initializing...
    2024-01-27 18:07:19  sub            0
    2024-01-27 18:07:19  time_zone      +01:00
    2024-01-27 18:07:19  uid            euxxxxxxxxxxxxxxxxxxF
    2024-01-27 18:07:19  update_time    1706373749
    2024-01-27 18:07:19  uuid            702xxxxxxxxxxxxxxxxx
  args:
    tuya_local_7xxxxxxxxxxxxxxxxxxx
    fhempy
    tuya
    jzoq9yd2wiylf29t
    702xxxxxxxxxxxxxxxx
    191.168.178.183
    3.3
    pvxxxxxxxxxxxxxxxxxx
    e37xxxxxxxxxxxxxxxxxxxxxxxxxxxxx8
  argsh:
Attributes:
  alias      Water leak sensor
  group      tuya
  localkey  y:xxxxxxxxxxxxxxxxI
  room      fhempy
  tuya_spec_functions []
  tuya_spec_status [{'code': 'watersensor_state', 'dp_id': 1, 'type': 'Enum', 'values': {'range': ['alarm', 'normal']}}, {'code': 'battery_state', 'dp_id': 3, 'type': 'Enum', 'values': {'range': ['low', 'middle', 'high']}}, {'code': 'battery_percentage', 'dp_id': 4, 'type': 'Integer', 'values': {'unit': '', 'min': 0, 'max': 100, 'scale': 0, 'step': 1}}]


Wo/ was könnte der Fehler sein?

Edit:

Fhempy log:
2024-01-27 19:30:50,739 - DEBUG    - aiotinytuya.core: [7xxxxxxxxxxxxxxxxxx2] ERROR OPENING SOCKET!!!191.168.178.183
Edit2:

Der tuya_cloud_connector war nicht richtig angelegt, nun steht er auf connectet und scheint zu funktionieren.

Nun habe ich aus der App ein Device gelöscht und neu angelegt, das neue Device wird auch gleich automatisch in Fhem angelegt und steht auf "State:normal"

Simuliere ich nun einen Wasserauslauf Piept der Wassermelder so wie er soll, auf dem Handy wird auch eine Meldung ausgegeben nur ändert sich am Fhem Device nix, hier scheint keine Meldung ein zu treffen.

Ein List vom automatisch angelegten Device:

Internals:
   CFGFN     
   DEF        tuya_cloud tuya_cloud_connector 70xxxxxxxxxxxxxxxxxx7
   DEVICEID   702xxxxxxxxxxxxxxxxxxx7
   FHEMPYTYPE tuya_cloud
   FUUID      6xxxxxxd2-fxxf-bxxb-bxx9-9xxxxxxxxxxxx8b
   IODev      fhempy_local
   NAME       tuya_cloud_7xxxxxxxxxxxxxxxxxx7
   NR         783
   PYTHONTYPE tuya_cloud
   STATE      normal
   TYPE       fhempy
   eventCount 10
   READINGS:
     2024-01-27 20:33:54   active_time     1706383568
     2024-01-27 20:34:12   battery_percentage 100.0
     2024-01-27 20:34:12   battery_state   low
     2024-01-27 20:33:54   biz_type        0
     2024-01-27 20:33:54   category        sj
     2024-01-27 20:33:54   create_time     1706365637
     2024-01-27 20:33:54   icon            https://images.tuyaeu.com/smart/program_category_icon/sj.png
     2024-01-27 20:33:54   id              70xxxxxxxxxxxxxxxxxx7
     2024-01-27 20:33:54   ip              185.209.105.74
     2024-01-27 20:33:54   lat             52.9500
     2024-01-27 20:33:54   local_key       Er5VKhYeR>%_j=`H
     2024-01-27 20:33:54   lon             10.8100
     2024-01-27 20:33:54   model           GS156A-H14
     2024-01-27 20:33:54   name            Water leak sensor 3
     2024-01-27 20:33:54   online          on
     2024-01-27 20:33:54   owner_id        181xxxxx2
     2024-01-27 20:33:54   product_id      jzoq9yd2wiylf29t
     2024-01-27 20:33:54   product_name    Water leak sensor
     2024-01-27 20:34:12   state           normal
     2024-01-27 20:33:54   sub             off
     2024-01-27 20:33:54   time_zone       +01:00
     2024-01-27 20:33:54   uid             exxxxxxxxxxxxxxxxxF
     2024-01-27 20:33:54   update_time     1706383866
     2024-01-27 20:33:54   uuid            70xxxxxxxxxxxxxxx7
   args:
     tuya_cloud_7xxxxxxxxxxxxxxxxxx7
     fhempy
     tuya_cloud
     tuya_cloud_connector
     70xxxxxxxxxxxxxxxxx7
   argsh:
Attributes:
   alias      Water leak sensor 3
   group      tuya_cloud
   room       fhempy
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 28 Januar 2024, 08:22:27
Das ist das Problem mit Sensoren, die klappen bei mir alle nicht. Weder Bewegung noch Thermometer. Einzig stromsensoren in zwischenstecker.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Ainadilion am 04 Februar 2024, 12:46:23
Hallo, ich nach bei der Installation folgende Meldung:

http://ws:127.0.0.1:15733/: malformed or unsupported URL
Das Device fhempy_local bleibt im STATE Installing fhempy (15min) hängen, zeigt aber einen grünen Punkt.

Log fhempy
Creating fhempy virtual environment...Activating virtual environment...OK
2024-02-04 09:44:13,193 - ERROR    - __main__: Failed to load fhempy
Traceback (most recent call last):
  File "/opt/fhem/FHEM/bindings/python/bin/start_fhempy.py", line 141, in <module>
    import fhempy.lib.fhem_pythonbinding as fpb
ModuleNotFoundError: No module named 'fhempy'
2024-02-04 09:44:13,194 - INFO    - __main__: Attempting install of fhempy>=0.1.462
2024-02-04 09:45:29,806 - INFO    - __main__: Successfully installed fhempy>=0.1.462
2024-02-04 09:45:30,863 - INFO    - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.670...
2024-02-04 09:45:30,864 - INFO    - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2024-02-04 09:45:30,902 - INFO    - websockets.server: server listening on 0.0.0.0:15733
Activating virtual environment...OK
2024-02-04 11:08:55,440 - INFO    - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.670...
2024-02-04 11:08:55,441 - INFO    - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2024-02-04 11:08:55,473 - INFO    - websockets.server: server listening on 0.0.0.0:15733
Activating virtual environment...OK
2024-02-04 12:29:52,419 - INFO    - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.670...
2024-02-04 12:29:52,420 - INFO    - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2024-02-04 12:29:52,457 - INFO    - websockets.server: server listening on 0.0.0.0:15733
Activating virtual environment...OK
2024-02-04 12:34:49,618 - INFO    - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.670...
2024-02-04 12:34:49,620 - INFO    - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2024-02-04 12:34:49,710 - INFO    - websockets.server: server listening on 0.0.0.0:15733

Was kann ich tun?

Gruß
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 12 Februar 2024, 13:44:09
Hallo da die Cloud nicht mehr funkt habe ich Tuya_Smartlife_Integration gefunden

https://github.com/fhempy/fhempy/tree/73250347a78a730f3af1e949139f0ae150b06228/FHEM/bindings/python/fhempy/lib/tuya_smartlife
Komm dort aber nicht weiter.
Jemand eine Idee
Module failed to load: tuya_smartlife
Maybe you need to update fhempy on this or remote peer.

Stacktrace:
Traceback (most recent call last):
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 336, in handle_function
    module_object = await self.import_module(hash)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 573, in import_module
    module_object = await utils.run_blocking(
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/utils.py", line 72, in run_blocking
    return await asyncio.get_event_loop().run_in_executor(pool, function)
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/tuya_smartlife/tuya_smartlife.py", line 5, in <module>
    import fhempy.lib.tuya_smartlife.tuya_smartlife_setup as tss
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/tuya_smartlife/tuya_smartlife_setup.py", line 6, in <module>
    from tuya_sharing import (
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_sharing/__init__.py", line 2, in <module>
    from .manager import Manager, SharingDeviceListener
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_sharing/manager.py", line 5, in <module>
    from .customerapi import CustomerApi, CustomerTokenInfo, SharingTokenListener
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_sharing/customerapi.py", line 12, in <module>
    from cryptography.hazmat.primitives.ciphers.aead import AESGCM
ModuleNotFoundError: No module named 'cryptography'
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 12 Februar 2024, 13:58:38
Klingt nach einem fehlenden Paket, hast Du alle gemäß der Anleitung installiert? https://github.com/fhempy/fhempy/blob/master/README.md
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 12 Februar 2024, 15:40:28
Ja hab ich, kommt immer die selbe fehlermeldung

Bei

sudo apt install python3 python3-pip python3-dev python3-venv libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libglib2.0-dev libdbus-1-dev bluez libbluetooth-dev git libprotocol-websocket-perl
kommt am Ende

Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut... Fertig
Statusinformationen werden eingelesen... Fertig
autoconf ist schon die neueste Version (2.69-14).
build-essential ist schon die neueste Version (12.9).
git ist schon die neueste Version (1:2.30.2-1+deb11u2).
libdbus-1-dev ist schon die neueste Version (1.12.28-0+deb11u1).
libffi-dev ist schon die neueste Version (3.3-6).
libglib2.0-dev ist schon die neueste Version (2.66.8-1+deb11u1).
libjpeg-dev ist schon die neueste Version (1:2.0.6-4).
libprotocol-websocket-perl ist schon die neueste Version (0.26-2).
python3 ist schon die neueste Version (3.9.2-3).
python3-dev ist schon die neueste Version (3.9.2-3).
python3-venv ist schon die neueste Version (3.9.2-3).
zlib1g-dev ist schon die neueste Version (1:1.2.11.dfsg-2+deb11u2).
bluez ist schon die neueste Version (5.55-3.1+rpt2+deb11u1).
libbluetooth-dev ist schon die neueste Version (5.55-3.1+rpt2+deb11u1).
libssl-dev ist schon die neueste Version (1.1.1w-0+deb11u1+rpt1).
python3-pip ist schon die neueste Version (20.3.4-4+rpt1+deb11u1).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.


Titel: Aw: fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 12 Februar 2024, 15:41:45
Und unter Fhem ist bei Update nichts zu tun
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: stefanru am 12 Februar 2024, 20:16:23
In Google steht zu dieser Fehlermeldung man müsste dies mit pip installieren:
pip install cryptography

Keine Ahnung ob das hilft klingt aber bei der Fehlermeldung danach.

Gruß,
Stefan
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 12 Februar 2024, 20:20:23
Hab ich auch schon probiert

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: cryptography in /usr/lib/python3/dist-packages (3.3.2)
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 13 Februar 2024, 08:06:46
Hab es auf einem Komplett neuen Raspi probiert kommt auch immer  nur

Internals:
   DEF        tuya_smartlife setup xxxxxxx
   FHEMPYTYPE tuya_smartlife
   FUUID      65ca4b10-f33f-c95d-8915-b75744a0240c03db
   IODev      fhempy_local
   NAME       tuya_smartlife_integration
   NR         650
   PYTHONTYPE tuya_smartlife
   STATE      Module failed to load: tuya_smartlife
Maybe you need to update fhempy on this or remote peer.

Stacktrace:
Traceback (most recent call last):
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 336, in handle_function
    module_object = await self.import_module(hash)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 573, in import_module
    module_object = await utils.run_blocking(
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/utils.py", line 72, in run_blocking
    return await asyncio.get_event_loop().run_in_executor(pool, function)
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/tuya_smartlife/tuya_smartlife.py", line 5, in <module>
    import fhempy.lib.tuya_smartlife.tuya_smartlife_setup as tss
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/tuya_smartlife/tuya_smartlife_setup.py", line 6, in <module>
    from tuya_sharing import (
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_sharing/__init__.py", line 2, in <module>
    from .manager import Manager, SharingDeviceListener
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_sharing/manager.py", line 5, in <module>
    from .customerapi import CustomerApi, CustomerTokenInfo, SharingTokenListener
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_sharing/customerapi.py", line 12, in <module>
    from cryptography.hazmat.primitives.ciphers.aead import AESGCM
ModuleNotFoundError: No module named 'cryptography'

   TYPE       fhempy
   eventCount 12
   READINGS:
     2024-02-13 06:04:47   Module failed to load tuya_smartlife
     2024-02-13 06:26:03   state           Module failed to load: tuya_smartlife
Maybe you need to update fhempy on this or remote peer.

Stacktrace:
Traceback (most recent call last):
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 336, in handle_function
    module_object = await self.import_module(hash)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 573, in import_module
    module_object = await utils.run_blocking(
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/utils.py", line 72, in run_blocking
    return await asyncio.get_event_loop().run_in_executor(pool, function)
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/tuya_smartlife/tuya_smartlife.py", line 5, in <module>
    import fhempy.lib.tuya_smartlife.tuya_smartlife_setup as tss
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/tuya_smartlife/tuya_smartlife_setup.py", line 6, in <module>
    from tuya_sharing import (
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_sharing/__init__.py", line 2, in <module>
    from .manager import Manager, SharingDeviceListener
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_sharing/manager.py", line 5, in <module>
    from .customerapi import CustomerApi, CustomerTokenInfo, SharingTokenListener
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_sharing/customerapi.py", line 12, in <module>
    from cryptography.hazmat.primitives.ciphers.aead import AESGCM
ModuleNotFoundError: No module named 'cryptography'

   args:
     tuya_smartlife_integration
     fhempy
     tuya_smartlife
     setup
     xxxxxxx
   argsh:
Attributes:
   room       fhempy

Mein Latein ist am Ende  :-\
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: stefanru am 14 Februar 2024, 10:01:52
Hi Chris,

jetzt bin ich auch ziemlich am ende, aber irgendwie scheint cryptography für den User oder das python in dem fhempy ausgeführt wird zu fehlen.

Der Fehler ist ziemlich eindeutig:
   from cryptography.hazmat.primitives.ciphers.aead import AESGCM
ModuleNotFoundError: No module named 'cryptography'

Musst du den pip install vieleicht als fhem user machen?
Bei mir läuft fhempy unter dem User fhem.

Gruß,
Stefan
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 14 Februar 2024, 15:48:35
Hallo.
Wollte es auch gerade installieren. Auf system mit altem fhem fhem.pl:25997/2022-04-25(raspbi) wo fhempy läuft lässt es sich definieren


Aber auf neuem fhem fhem.pl:28484/2024-02-06(miniPC) lässt es sich definieren, aber im state steht selbiges wie bei ChrisA4
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 14 Februar 2024, 17:43:11
soooo. es muss an FHEM liegen. habe jetzt update am "alten system" gemacht, und jetzt selbe fehlermeldung.
vorher fhem.pl:25997/2022-04-25
jetzt fhem.pl:28484/2024-02-06 

:-(

Titel: Aw: fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 14 Februar 2024, 20:57:58
Kann es leider nicht testen hab keine alte fhem mehr
gibt es da möglichkeiten dies zu beheben??
denn das mit cloud bezahlen  is sicher nicht ok
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 14 Februar 2024, 21:10:21
 Vor dem Update hats noch geklappt, fhempy 0.718 glaub ich. Mit heutigem Update bekommst du die 0720, und danach geht's nimmer. Brauche nur die fhempy, fhem glaub ich nicht das daran schuld ist.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 14 Februar 2024, 21:36:27
Zitat von: satprofi am 14 Februar 2024, 21:10:21Vor dem Update hats noch geklappt, fhempy 0.718 glaub ich. Mit heutigem Update bekommst du die 0720, und danach geht's nimmer.
Dann muss ich ja fast froh sein, dass das Update bei mir schon lange nicht mehr funktioniert.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 14 Februar 2024, 21:42:42
Zitat von: TheTrumpeter am 14 Februar 2024, 21:36:27
Zitat von: satprofi am 14 Februar 2024, 21:10:21Vor dem Update hats noch geklappt, fhempy 0.718 glaub ich. Mit heutigem Update bekommst du die 0720, und danach geht's nimmer.
Dann muss ich ja fast froh sein, dass das Update bei mir schon lange nicht mehr funktioniert.
welche Version hast du?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 14 Februar 2024, 21:50:26
Ist mit der 0719 auch nicht gegangen
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 15 Februar 2024, 06:02:22
0.1.670
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: stefanru am 15 Februar 2024, 13:06:39
Das ist aber alles wieder komisch.

Ich aktualisiere immer.

Ich habe auf meinem Rapberry Bullseye folgende Versionen:
python 3.9.2
release 6.1.21-v8+

fhempy version 0.1.721

fhem.pl                     28484 2024-02-06 17:17:48Z rudolfkoenig

Gruß,
Stefan
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 15 Februar 2024, 14:19:17
ja, glaub ich schon. Habe auch nur 3.9, aber funktioniert bei dir das tuya_smartlife_integration?

Titel: Aw: fhempy: tuya (lokal)
Beitrag von: stefanru am 15 Februar 2024, 16:26:08
Hi,

was genau ist tuya_amrtlife integration?
Ich hatte am Anfang die SmartLife App, habe dann aber auf die Tuya App gewechselt wenn es damit etwas zu tun hat.
SmartLife verwende ich zur Zeit nicht.

Gruß,
Stefan
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 15 Februar 2024, 20:50:57
Tuya app ist ja smartlife
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: stefanru am 16 Februar 2024, 14:39:59
Hi,

ja im prinzip schon es gibt aber eine Tuya APP und eine Smart Life App.
Ich hatte irgendwann am Anfang auf die Tuya App umgestellt.
Einen Unterschied sollte das glaube ich nicht machen.

Aber was genau meinst du mit SmartLife Integration?

Gruß,
Stefan
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 16 Februar 2024, 15:36:36
SmartLife Integration sollte laut beschreibung ein Modul in fhem sein um auf die SmartLife App eine verbindung herzustellen ohne die TuyaIoT.
Damit sollte man alle auf der App befindlichen Geräte steuerbar sein.

Leider funkt es nicht
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: stefanru am 16 Februar 2024, 17:25:15
Ah ok danke, das verwende ich nicht.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 17 Februar 2024, 08:59:27
so, es funktioniert.
Dominik hat es repariert, neue version von fhempy_local updaten, danach definieren
Danke an Dominik
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: ChrisA4 am 17 Februar 2024, 20:21:25
Funkt
Danke an Dominik

hab alle Geräte drinnen aber leider , die mir am wichtigsten, haben fehler

bei Beschattungs Motoren sogenante Blinds Drive, gingen über TuyaCloud bislang ohne probleme seit 1.Feb reagieren sie nicht mehr
hatte gehofft sie über smartlife wieder zu steuern kommt aber leider dieser Fehler

Failed to execute function Set: Traceback (most recent call last):
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 385, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 484, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    return fut.result()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/generic.py", line 208, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/utils.py", line 340, in handle_set
    return await fct_call(hash, final_params)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/tuya_smartlife/tuya_smartlife.py", line 75, in set_integer
    await self.device.set_integer(hash, params)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/fhempy/lib/tuya_smartlife/tuya_smartlife_device.py", line 195, in set_integer
    code = params["function_param"]["code"]
TypeError: 'DeviceFunction' object is not subscriptable

Hier die LList

Internals:
   CFGFN     
   DEF        tuya_smartlife tuya_smartlife_integration bf8c60b945beb98f93hcpa
   DEVICEID   bf8c60b945beb98f93hcpa
   FHEMPYTYPE tuya_smartlife
   FUUID      65d102f6-f33f-c95d-87b2-cdb0357b7c810439
   IODev      fhempy_local
   NAME       tuya_smartlife_bf8c60b945beb98f93hcpa
   NR         745
   PYTHONTYPE tuya_smartlife
   STATE      ready
   TYPE       fhempy
   eventCount 15
   READINGS:
     2024-02-17 20:08:52   border          up
     2024-02-17 20:08:52   control         open
     2024-02-17 20:08:52   control_back_mode back
     2024-02-17 20:08:52   fault           0
     2024-02-17 20:08:52   percent_control 100
     2024-02-17 20:08:52   position_best   0
     2024-02-17 20:03:18   state           ready
     2024-02-17 20:08:52   work_state      opening
   args:
     tuya_smartlife_bf8c60b945beb98f93hcpa
     fhempy
     tuya_smartlife
     tuya_smartlife_integration
     bf8c60b945beb98f93hcpa
   argsh:
   hmccu:
Attributes:
   alias      Jalousie Büro
   group      tuya_smartlife
   room       fhempy


Könnte man sich das ansehen??!?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 20 Februar 2024, 07:14:32
Zitat von: satprofi am 17 Februar 2024, 08:59:27Dominik hat es repariert, neue version von fhempy_local updaten, danach definieren
Dazu müsste das Update dann auch funktionieren... hab' es grad wieder versucht, bleibt weiterhin auf 0.1.670 hängen.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 20 Februar 2024, 10:18:52
Zitat von: TheTrumpeter am 20 Februar 2024, 07:14:32
Zitat von: satprofi am 17 Februar 2024, 08:59:27Dominik hat es repariert, neue version von fhempy_local updaten, danach definieren
Dazu müsste das Update dann auch funktionieren... hab' es grad wieder versucht, bleibt weiterhin auf 0.1.670 hängen.
dann passt bei dir etwas nicht. uralt fhem damit upgedatet, und auch neuestes auf ubuntu.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 21 Februar 2024, 12:35:13
Zitat von: satprofi am 20 Februar 2024, 10:18:52
Zitat von: TheTrumpeter am 20 Februar 2024, 07:14:32
Zitat von: satprofi am 17 Februar 2024, 08:59:27Dominik hat es repariert, neue version von fhempy_local updaten, danach definieren
Dazu müsste das Update dann auch funktionieren... hab' es grad wieder versucht, bleibt weiterhin auf 0.1.670 hängen.
dann passt bei dir etwas nicht. uralt fhem damit upgedatet, und auch neuestes auf ubuntu.
Ja mag sein, scheine aber nicht der einzige zu sein, das Problem haben in den letzten Wochen hier mehrere gemeldet.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 24 Februar 2024, 23:59:07
Hallo nachdem Tuya local im Schrebergarten super funktioniert wollte ich es jetzt Zuhause installieren.
Es klappt auch alles bis zu dem Schritt wo ich nach Geräten suchen will!
Dann kommt diese Fehlermeldung:
{'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.'"}Kann mir jemand helfen?
Wo liegt der Fehler?
LG Holger
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 25 Februar 2024, 08:14:22
Das wurde hier schon mal behandelt, Blätter' mal ein bisschen zurück.
Ich meine Du musst den Tuya Account irgendwie verlängern lassen.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 25 Februar 2024, 08:38:27
Habe zurück geblättert ich habe die Frage schonmal gestellt wegen einem Problem im Schrebergarten, habe aber keine Antwort gefunden und kann nicht auch nicht mehr dran erinnern.
Wäre schön wenn mir jemand helfen könnte.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Tueftler1983 am 25 Februar 2024, 08:57:31
Okay ich habe es, man muss unter Tuya den service verlängern.

Danke für den hinweis
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: sash.sc am 11 März 2024, 22:28:18
Hallo zusammen.

Habe es endlic geschafft alles soweit zu installieren. fhempy server ist grün und bindigs auch.
Es wurden auch alle meine Tuya deevices gefunden.
Habe dann eins angelegt und wollte es schalten. dann steht folgendes im Fhem log.

2024.03.11 22:15:20 1:   defargsh =>  HASH(0x70bc180)
2024.03.11 22:15:20 1:   NAME =>  tuya_local_.......
2024.03.11 22:15:20 1:   args =>  ARRAY(0x7906ec0)
2024.03.11 22:15:20 1:   defargs =>  ARRAY(0x70bd508)
2024.03.11 22:15:20 1:   FHEMPYTYPE =>  tuya
2024.03.11 22:15:20 1:   argsh =>  HASH(0x732bcb0)
2024.03.11 22:15:20 1:   PYTHONTYPE =>  tuya
2024.03.11 22:15:20 1:   msgtype =>  function
2024.03.11 22:15:20 1:   id =>  2.......
2024.03.11 22:15:20 1:   function =>  Set
2024.03.11 22:15:20 1: BindingsIo (fhempy_local): ERROR: Timeout while waiting for function to finish (id: 29716394)


Hier noch das log vom Server


Activating virtual environment...OK
2024-03-11 21:55:34,574 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.726...
2024-03-11 21:55:34,576 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2024-03-11 21:55:34,625 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2024-03-11 21:55:52,520 - INFO     - websockets.server: connection open
2024-03-11 21:55:52,521 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2024-03-11 22:15:37,788 - ERROR    - fhempy.lib.fhem_pythonbinding: <<< 29716394 20445.91ms: {'function': 'Set', 'id': 29716394, 'msgtype': 'function', 'PYTHONTYPE': 'tuya', 'argsh': {}, 'FHEMPYTYPE': 'tuya', 'defargs': ['tuya_local_bf8fa37c88b27b2fb77kgm', 'fhempy', 'tuya', 'adnbjklczamulgdq', 'bf8fa37c88b27b2fb77kgm', '192.168.2.52', '3.5', 'vjnya7kcursunvgws5v7', 'bee2d777a90645b6a24e3a811c5b40a4'], 'args': ['tuya_local_bf8fa37c88b27b2fb77kgm', 'off'], 'NAME': 'tuya_local_bf8fa37c88b27b2fb77kgm', 'defargsh': {}, 'finished': 1, 'returnval': ''}
2024-03-11 22:15:37,789 - WARNING  - fhempy.lib.fhem_pythonbinding: fhempy took 20446ms for {"function":"Set","id":29716394,"msgtype":"function","PYTHONTYPE":"tuya","argsh":{},"FHEMPYTYPE":"tuya","defargs":["tuya_local_bf8fa37c88b27b2fb77kgm","fhempy","tuya","adnbjklczamulgdq","bf77kgm","192.168.2.52","3.5","vjs5v7","bee11c5b40a4"],"args":["tuya_local_bf8fa37c88b27b2fb77kgm","off"],"NAME":"tuya_local_bf8fa37c88b27b2fb77kgm","defargsh":{}}


jemand eine Idee oder werden noch weitere Daten benötigt ?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 13 März 2024, 08:18:26
Du kannst keine manuell hinzufügen, man muss neue Geräte wieder scannen.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: sash.sc am 13 März 2024, 10:09:38
Habe das Gerät manuell aus den readings angelegt.

Oder müssen die Geräte automatisch angelegt werden?

Gruß Sascha
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 13 März 2024, 17:32:44
Hallo.
Es klappt ja nur mehr über tuya_smartlife_integration , da kannst du dann gerade mal ein/aus schalten.
Alles andere klappt nicht mehr. Diese tuya sache ist eigentlich über fhem bicht mehr zu gebrauchen. readings ändern sich nie, egal ob ein/aus geschalten. LED_Streifen kann man nicht mehr regeln, etc.

jeder anderer befehl wird mit Failed to execute function Set: Traceback (most recent call last):
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.10/site-packages/fhempy/lib/fhem_pythonbinding.py", line 385, in handle_function
    ret = await self.execute_function(hash, fhem_reply_done, nmInstance)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.10/site-packages/fhempy/lib/fhem_pythonbinding.py", line 484, in execute_function
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.10/asyncio/tasks.py", line 445, in wait_for
    return fut.result()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.10/site-packages/fhempy/lib/generic.py", line 208, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.10/site-packages/fhempy/lib/utils.py", line 340, in handle_set
    return await fct_call(hash, final_params)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.10/site-packages/fhempy/lib/tuya_smartlife/tuya_smartlife.py", line 78, in set_colour_data
    await self.device.set_colour_data(hash, params)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.10/site-packages/fhempy/lib/tuya_smartlife/tuya_smartlife_device.py", line 201, in set_colour_data
    if self._t_info["category"] == "dj":
TypeError: 'CustomerDevice' object is not subscriptable

quittiert.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 13 März 2024, 19:08:19
Das kann ich so nicht bestätigen.
Meine Steckdosen mit Verbrauchsmessung funktionieren nach wie vor problemlos.

Nur mit dem Update gibt es Probleme, die nach wie vor ungelöst sind.

Und obwohl offensichtlich munter dran entwickelt wird, scheint es keinerlei Support oder Rückmeldung zu den Problemen hier zu geben.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 14 März 2024, 11:22:47
Hallo.
dann lass uns wissen wie du die eingerichtet hast.
Hier ein Status meiner Steckdose, starte ändert sich nie, USB ist gerade on, und im Auswahlmenü klappt nur on off, alle anderen werden mit Fehlermeldung quittiert. Strom Messung klappt auch nicht, obwohl Verbraucher dann hängt.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 14 März 2024, 11:40:11
Zitat von: satprofi am 14 März 2024, 11:22:47dann lass uns wissen wie du die eingerichtet hast.
Ich hab' mich an diese Anleitung zur Installation von fhempy gehalten: https://github.com/fhempy/fhempy
Und dann diese hier für tuya_local: https://github.com/fhempy/fhempy/blob/master/FHEM/bindings/python/fhempy/lib/tuya/README.md

Damit habe ich initial 1 Steckdose mit "start_scan" hinzugefügt. Seitdem habe ich immer wieder 2-3 weitere mittels "start_scan" hinzufügen und finden können.
Ich kann sie schalten und die Verbrauchsanzeige funktioniert ebenfalls, siehe anbei beispielhaft von gestern.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 14 März 2024, 12:07:30
Jaaa, aber neue Geräte? Seit tuya das developerportal abgeschaltet hat, geht nur mehr smartlife Integration.
und die klappt nur gerade on off zu schalten. Messungen klappen gar nicht mehr.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 14 März 2024, 12:40:10
Zitat von: satprofi am 14 März 2024, 12:07:30Seit tuya das developerportal abgeschaltet hat
Wann war das?

Die letzten 2 Steckdosen habe ich im Jänner 2024 hinzugefügt.
Ich habe aus dem letzten Setz noch 2 komplett jungfräulich herumliegen, die kann ich in den nächsten Tagen mal probieren.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 14 März 2024, 13:01:17
Seit Anfang februar
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 14 März 2024, 16:11:24
Zitat von: satprofi am 14 März 2024, 13:01:17Seit Anfang februar
Ich probier' spätestens am Montag die 2 noch jungfräulichen Steckdosen zu registrieren und schreib' dann ob's erfolgreich war.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 18 März 2024, 08:23:21
Zitat von: TheTrumpeter am 14 März 2024, 16:11:24
Zitat von: satprofi am 14 März 2024, 13:01:17Seit Anfang februar
Ich probier' spätestens am Montag die 2 noch jungfräulichen Steckdosen zu registrieren und schreib' dann ob's erfolgreich war.
Sooooooo...

Erstmal das Ergebnis, dann der Weg dorthin:
Steckdosen funktionieren einwandfrei, ich kann sie schalten & auch die Momentanwerte "Spannung" (cur_voltage) und "Leistung" (cur_power) sowie Absolutwert "Verbrauch" (energy) werden plausibel angezeigt. Ebenso wird das Gerätemodell sowie weitere Einstellungen, die über die Tuya-App gemacht werden (GPS-Koordinaten, Relay-Verhalten bei Stromverlust, LED-Verhalten etc.), richtig ausgelesen und angezeigt.


Wie bin ich dorthin gekommen:

Tuya-App:
Ich habe die beiden Steckdosen aus der Packung genommen und dann folgendes gemacht:
Tuya-App geöffnet & mich angemeldet (war schon eine Herausfoderung das Passwort zu wissen, aber im 2. Versuch ging's dann).
Bereits "eingelernte" Steckdosen wurden plausibel angezeigt.
Bluetooth aktiviert.
Gerät hinzufügen ausgewählt
1. Steckdose eingesteckt
Steckdose wurde in der App angezeigt, ich hab' die Einrichtung durchgeführt und geprüft, ob ich das Relay über die App schalten kann
Gerät hinzufügen ausgewählt
2. Steckdose eingesteckt
Steckdose wurde in der App angezeigt, ich hab' die Einrichtung durchgeführt und geprüft, ob ich das Relay über die App schalten kann

FHEM:
Bei mir läuft immer noch die Version 0.1.670.
Ich habe "tuya_system" geöffnet und "scan_devices" gewählt.
Dann kam gleich die erste Ernüchterung, Fehlermeldung "subscription to cloud development plan has expired" :-(
Habe dann erstmal versucht im Tuya-Developer-Portal die Einstellung/Verlängerung zu finden, was mir leider nicht gelungen ist.
Bei der Gelegenheit habe ich aber gesehen, dass die neu hinzugefügten Steckdosen in meinem "Projekt" bereits angezeigt werden (u.a. die product_id). Habe dann nachgeschaut ob ich dort ev. auch den "local_key" finde, aber das wäre natürlich zu einfach gewesen.
Mit ein bisschen Google-Unterstützung habe ich dann doch herausgefunden, wie die nötige Verlängerung durchgeführt werden kann (https://forum.smartapfel.de/forum/thread/11205-tuya-devices-laufen-nicht-mehr-cloud-development-plan-has-expired/)
Habe die Verlängerung beantragt, nach höchstens 30min (Sonntag später Nachmittag MEZ) konnte ich den Scan bereits erfolgreich durchführen.
Dabei die nächste Überraschung: Obwohl die beiden neuen Steckdosen schon wieder offline waren, wurden sie "gefunden" und ich konnte sie hinzufügen. (Im Nachhinein klar: der "scan" holt sich die registrierten Geräte aus dem "Cloud Project" inkl. deren Daten und versucht sie dann lokal zu finden.)
Das Hinzufügen der Steckdosen hat sie anstatt mit der lokalen IP mit dem Schlüsselwort "offline" angelegt und eine Statusmeldung gebracht, dass "offline" durch die IP zu ersetzen ist.
Nachdem ich die Steckdosen eingesteckt habe und dann die richtigen IPs eingetragen habe, wurde die 1. der beiden neuen Steckdosen sofort richtig angezeigt (Lampensymbol) sowie die ganzen readings erzeugt.
Bei der 2. Steckdosen gab's eine Statusmeldung, dass das Attribut "local_key" fehlt. Erneutes "create device" hat nix gebracht, auch nach dem Löschen und erneuten "create device" war's nicht vorhanden. Da die fehlende Information im "tuya_system" aber vorhanden war, hab' ich das Attribut händisch hinzugefügt. Sekunden später war auch dieses Gerät aus meiner Sicht vollständig und komplett funktional vorhanden.

Bei beiden Steckdosen habe ich nun die Tablets der Kinder zum Aufladen drangehängt. Das ist ein 20W-Steckernetzteil, "cur_power" pendelt bei beiden Geräten zwischen 19,8 und 20,7 W. Die Spannung liegt für mein Empfinden dafür, dass die Stecker direkt nebeneinander auf derselben Phase hängen, doch etwas weit auseinander (im Moment 238,2 vs. 234,4 V). Aber von so billigen China-Teilen darf man wohl nicht mehr erwarten & die Spannung braucht man ja ohnehin nicht für eine Automatisierung.


Bei meiner Suche nach dem abgelaufenen "Cloud Development" hab' ich auch ein Youtube-Video gefunden, mit dem man den "local_key" angeblich mit irgendeiner Android-App auslesen kann. Da ich das dann aber doch nicht benötigt habe, hab' ich mir das Video nicht angeschaut und mich auch nicht näher damit beschäftigt. Aber vielleicht hilft's dem einen oder anderen ja weiter, https://www.youtube.com/watch?v=YKvGYXw-_cE
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: satprofi am 18 März 2024, 12:16:35
Danke für die Rückmeldung.
werde es auch versuchen

[edit]
Hallo, hat funktioniert nachdem ich das ->
Zitat von: TheTrumpeter am 18 März 2024, 08:23:21wie die nötige Verlängerung durchgeführt werden kann (https://forum.smartapfel.de/forum/thread/11205-tuya-devices-laufen-nicht-mehr-cloud-development-plan-has-expired/)
ausgeführt habe. Danach Scan und schon sind die devices neu angelegt.
DANKE!
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 20 März 2024, 07:11:56
Zitat von: satprofi am 18 März 2024, 12:16:35Hallo, hat funktioniert nachdem ich das ->
Zitat von: TheTrumpeter am 18 März 2024, 08:23:21wie die nötige Verlängerung durchgeführt werden kann (https://forum.smartapfel.de/forum/thread/11205-tuya-devices-laufen-nicht-mehr-cloud-development-plan-has-expired/)
ausgeführt habe. Danach Scan und schon sind die devices neu angelegt.
DANKE!
Freut mich, dass es geklappt hat.

Ganz zufrieden bin ich damit aber nicht, dass neue Geräte nur durch diesen "Scan" angelegt werden können.
Ursprünglich hatte ich die Beschreibung so verstanden, dass diese ganze Account- und Projektgeschichte nur für die initiale Einrichtung der "lokalen Umgebung" erforderlich wäre und danach alles lokal funktioniert. Das Hinzufügen weiterer Geräte war da natürlich nicht erwähnt, aber es war meine implizite Annahme.

Ich hatte vor Weihnachten schon 1x die Situation, dass die Steckdose für die Weihnachtsbeleuchtung plötzlich nicht mehr reagiert hat. Nach einem erneuten Scan und hinzufügen ging sie wieder, ohne dass ich das Gerät gelöscht oder sonst irgendwie modifiziert hätte.

Eventuell schau' ich mir das andere Youtube-Video bzgl. Auslesen der "local-keys" auch mal an und probier' das aus. Wenn das einfach klappt, wäre es langfristig wohl die bessere Lösung.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: Jippy am 20 März 2024, 12:01:33
Hallo,
ich versuche gerade meine Tuya Devices in FHEM einzubinden.
Leider bekomme ich den "tuya_cloud_connector" nicht zum laufen, dieser steht immer auf connecting.
"fhempy_local" und "fhempyserver" sind beide grün.
Ich habe jetzt schon mehrfach alles nach Anleitung abgearbeitet, komme jetzt aber nicht mehr weiter.
In der log-Datei erscheint auch ein Fehler, ich kenne mich da aber leider nicht wirklich aus, deshalb hoffe ich, dass mir jemand einen Tipp geben kann wo das Problem liegt.
2024-03-20 11:27:33,519 - ERROR    - tuya_cloud_connector: Exception raised by task: <Task finished name='Task-45' coro=<FhemModule._run_coro() done, defined at /opt/fhem/.fhempy/fhempy_venv/lib/python3.11/site-packages/fhempy/lib/generic.py:216> exception=TypeError("unsupported operand type(s) for +: 'NoneType' and 'str'")>
Traceback (most recent call last):
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.11/site-packages/fhempy/lib/generic.py", line 224, in _handle_task_result
    task.result()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.11/site-packages/fhempy/lib/generic.py", line 218, in _run_coro
    await coro
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.11/site-packages/fhempy/lib/tuya_cloud/tuya_cloud_setup.py", line 58, in run_setup
    if await self._init_tuya_sdk() is True:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.11/site-packages/fhempy/lib/tuya_cloud/tuya_cloud_setup.py", line 106, in _init_tuya_sdk
    else await utils.run_blocking(
         ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.11/site-packages/fhempy/lib/utils.py", line 72, in run_blocking
    return await asyncio.get_event_loop().run_in_executor(pool, function)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.11/site-packages/tuya_iot/openapi.py", line 208, in connect
    response = self.post(
               ^^^^^^^^^^
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.11/site-packages/tuya_iot/openapi.py", line 316, in post
    return self.__request("POST", path, None, body)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.11/site-packages/tuya_iot/openapi.py", line 260, in __request
    url = {self.endpoint + path},\
           ~~~~~~~~~~~~~~^~~~~~
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: canis am 23 März 2024, 03:13:35
Oh Shit, nun habe ich den ganzen Abend vergeudet, das Problem mit ddem "local key" zu lösen:
Bei tuya einloggen.
Verlängerung des devolopersportal hat innerhalb von 20 Minuten funktioniert.
Um den "local_key" zu erhalten:
IOT- Plattform aufrufen
in "Cloud" das Projekt auswählen und den API Explorer auswählen
Oben links "Industry Basic Service" auswählen
Darunter "Get the device Information" auswählen
Device-ID eingeben und "Submit Request" auslösen
"local_key": "..." suchen und verwenden
In /opt/tuya-mqtt/devices.conf die Daten entspreched einfügen und tuya-mqtt neu starten.
Thats it.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 23 März 2024, 06:45:03
Zitat von: canis am 23 März 2024, 03:13:35Um den "local_key" zu erhalten:
IOT- Plattform aufrufen
in "Cloud" das Projekt auswählen und den API Explorer auswählen
Oben links "Industry Basic Service" auswählen
Darunter "Get the device Information" auswählen
Device-ID eingeben und "Submit Request" auslösen
"local_key": "..." suchen und verwenden
Funktioniert das auch, wenn der Developer Zugang abgelaufen ist?
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: canis am 23 März 2024, 12:17:36
ZitatFunktioniert das auch, wenn der Developer Zugang abgelaufen ist?
Keine Ahnung, ausprobieren.
Bei mir war nach 20 Minuten eine Verlängerung des Developer Accounts um 6 Monate freigeschaltet
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 04 April 2024, 06:55:51
Zitat von: satprofi am 19 August 2023, 20:01:04hallo.
das deckt sich mit meinen Bewegungssensoren. Wahrscheinlich gehts mit sensoren nicht.
Zitat von: debu am 20 August 2023, 18:38:52Die Station nochmal in den AP modus versetzt und in der SmartLife app neu angelernt. In der https://eu.iot.tuya.com/cloud (https://eu.iot.tuya.com/cloud) den tuya app account neu gelinkt. In   
fhempy_local nochmal scan_devices und den gefunden device anlegen lassen.
Und plötzlich waren alle readings da und werden auch schon den ganzen Tag zuverlässig geupdated. :-)

Die einzige Erklärung bzw. für mich sichtbarerer Unterschied ist dass ich nun einen neuen localKey habe für den device. Zuvor waren im localKey Sonderzeichen wie .)'+? Im neuen localKey sind keine Sonderzeichen.
Nachdem ich die Küche umgebaut habe, wollte ich die Gelegenheit nutzen und einen Wassermelder bei den Geschrirrspüler-Verlängerungen platzieren. (Der Wasser- bzw. Abwasserschlauch ist zu kurz und wurde daher verlängert. Dort liegt meiner Meinung nach die einzige Stelle für eine versteckte Undichtigkeit.)
Nach einigem Suchen ist die Wahl auf dieses Gerät gefallen, weil es ein recht langes Sensorkabel hat und ich den Batterietausch daher problemlos durchführen kann ohne die Verkleidungen abnehmen zu müssen: https://www.amazon.de/dp/B0CMZNJ3QX

Leider tritt nun auch das Problem auf, dass die Updates nicht in FHEM ankommen... nach dem Einlernen funktioniert's erstmal, aber sobald der Sensor im Schlafmodus war, kommen die Updates nicht mehr an.
Ich habe versucht das "Wasser"-Signal längere Zeit anliegen zu lassen, weil hier weiter oben mal stand, dass die Türkontakte bei länger geöffneten Türen dann auch richtig gemeldet werden. Aber selbst nach 3 Minuten gab es in FHEM kein Update.
Nur nach mehrmaligem Toggeln des Signals kommt es irgendwann an. Eine Systematik konnte ich da auch noch nicht erkennen. Mal kommt es nach 3x toggeln, mal erst nach 10x.

Ich habe bei Steckdosen zuletzt auch schon beobachtet, dass diese sich nach dem Einlernen "nicht richtig verhalten" (bzw. von 2 baugleichen Steckdosen eine "normal" funktioniert und die andere nicht). Dort habe ich das oben beschriebene Phänomen mit dem LocalKey ebenfalls beobachtet, d.h. nach dem Löschen aus der App und neu einlernen (samt neuem LocalKey) ging's plötzlich.

Bei dem Wassermelder hat ein Neuanlernen erstmal nix gebracht, werde es noch 1-2x probieren bevor ich komplett aufgebe.
(Die Information vom Wassersensor wird als Reading angezeigt und auch teilweise wie oben beschrieben weitergegeben, der Batteriestatus kommt aber gar nicht. In der App ist er natürlich vorhanden...)


Konnte jemand das Problem schon lösen bzw. tritt es ev. mit den neueren Versionen nicht mehr auf? (Dann müsste ich endlich mal das Update-Problem angehen...)
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: TheTrumpeter am 08 April 2024, 09:36:40
Zitat von: TheTrumpeter am 04 April 2024, 06:55:51neuem LocalKey
Ich habe heute nochmal herumexperimentiert und um die 10 unterschiedliche LocalKeys ausprobiert. Der letzte hatte dann überhaupt keine Sonderzeichen, trotzdem wurde das Update vom Wassersensor nicht zuverlässig weitergegeben.

Ganz mysteriös wurde es, als ich das Gerät im WLAN-Router für's Internet gesperrt habe, d.h. nur lokale Kommunikation zulässig war. Da kam dann nämlich gar nichts mehr durch. (Ich habe im Sekundentakt den Wassersensor-Status getoggelt, die Änderung ist zuverlässig in FHEM angezeigt worden. Währenddessen habe ich den Zugang im Router gesperrt, plötzlich blieb der Wert in FHEM stehen, obwohl ich weiter getoggelt habe. Nach ein paarmal Toggeln habe ich den Zugang im Router wieder freigegeben, schon kam der Wert auch wieder in FHEM.)

Als Gegencheck habe ich dann eine Steckdose mit Verbrauchsmessung auch für's Internet gesperrt. Die konnte ich trotzdem lokal schalten & die Werte (z.B. aktuelle Leistung) kamen auch ganz normal in FHEM rein.
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: cyrusfd am 27 April 2024, 09:20:58
Hallo,

ich kann meine Wärmepumpe (BWT) über Set steuern, bekomme aber keine aktualisierten Readings. In meiner Tuya-App auf dem Handy bzw auf der WP sieht man direkt die Eingaben über Fhem.
Nur bei einem Neustart des Fhempy-Servers werden die Readings aktualisiert.

2024-04-27 03:30:27,090 - ERROR    - websocket: ping/pong timed out - goodbye
2024-04-27 03:30:38,457 - INFO     - websocket: Websocket connected
2024-04-27 06:56:51,515 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2024-04-27 06:56:51,518 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2024-04-27 06:57:16,897 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2024-04-27 06:57:16,910 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2024-04-27 06:57:16,912 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2024-04-27 06:57:16,912 - INFO     - websockets.server: server closing
2024-04-27 06:57:26,926 - INFO     - websockets.server: connection closed
2024-04-27 06:57:26,927 - INFO     - websockets.server: server closed
2024-04-27 06:57:26,935 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
Activating virtual environment...OK
2024-04-27 06:57:28,818 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.740...
2024-04-27 06:57:28,821 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2024-04-27 06:57:28,881 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2024-04-27 06:57:38,815 - INFO     - websockets.server: connection open
2024-04-27 06:57:38,817 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2024-04-27 06:57:40,889 - INFO     - websocket: Websocket connected
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 158, in run
    self.__run_mqtt()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 172, in __run_mqtt
    mqttc = self._start(mq_config)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 179, in _start
    mqttc = mqtt.Client(mq_config.client_id)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/paho/mqtt/client.py", line 766, in __init__
    raise ValueError(
ValueError: Unsupported callback API version: version 2.0 added a callback_api_version, see migrations.md for details
Activating virtual environment...OK
2024-04-27 07:26:59,289 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.740...
2024-04-27 07:26:59,294 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2024-04-27 07:26:59,388 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2024-04-27 07:26:59,802 - INFO     - websockets.server: connection open
2024-04-27 07:26:59,803 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2024-04-27 07:27:01,601 - INFO     - websocket: Websocket connected
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 158, in run
    self.__run_mqtt()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 172, in __run_mqtt
    mqttc = self._start(mq_config)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 179, in _start
    mqttc = mqtt.Client(mq_config.client_id)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/paho/mqtt/client.py", line 766, in __init__
    raise ValueError(
ValueError: Unsupported callback API version: version 2.0 added a callback_api_version, see migrations.md for details
2024-04-27 07:30:40,802 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2024-04-27 07:30:40,805 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2024-04-27 07:30:40,806 - INFO     - websockets.server: server closing
2024-04-27 07:30:50,822 - INFO     - websockets.server: connection closed
2024-04-27 07:30:50,823 - INFO     - websockets.server: server closed
2024-04-27 07:30:50,829 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
Activating virtual environment...OK
2024-04-27 07:30:52,712 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.740...
2024-04-27 07:30:52,714 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2024-04-27 07:30:52,774 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2024-04-27 07:31:03,259 - INFO     - websockets.server: connection open
2024-04-27 07:31:03,261 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2024-04-27 07:31:04,864 - INFO     - websocket: Websocket connected
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 158, in run
    self.__run_mqtt()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 172, in __run_mqtt
    mqttc = self._start(mq_config)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 179, in _start
    mqttc = mqtt.Client(mq_config.client_id)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/paho/mqtt/client.py", line 766, in __init__
    raise ValueError(
ValueError: Unsupported callback API version: version 2.0 added a callback_api_version, see migrations.md for details
2024-04-27 08:05:45,409 - ERROR    - tuya_cloud_connector: Tuya login error response: {'code': 1106, 'msg': 'permission deny', 'success': False, 't': 1714197945384, 'tid': '2f89ac47045c11efb2424a20391ad943'}
Activating virtual environment...OK
2024-04-27 08:06:15,988 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.740...
2024-04-27 08:06:15,991 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2024-04-27 08:06:16,052 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2024-04-27 08:06:19,169 - INFO     - websockets.server: connection open
2024-04-27 08:06:19,171 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2024-04-27 08:06:20,841 - INFO     - websocket: Websocket connected
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 158, in run
    self.__run_mqtt()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 172, in __run_mqtt
    mqttc = self._start(mq_config)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 179, in _start
    mqttc = mqtt.Client(mq_config.client_id)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/paho/mqtt/client.py", line 766, in __init__
    raise ValueError(
ValueError: Unsupported callback API version: version 2.0 added a callback_api_version, see migrations.md for details
2024-04-27 08:33:23,647 - INFO     - fhempy.lib.fhem_pythonbinding: Shutdown initiated...
2024-04-27 08:33:23,650 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2024-04-27 08:33:23,651 - INFO     - websockets.server: server closing
Activating virtual environment...OK
2024-04-27 08:33:29,885 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.740...
2024-04-27 08:33:29,887 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2024-04-27 08:33:29,947 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2024-04-27 08:33:39,768 - INFO     - websockets.server: connection open
2024-04-27 08:33:39,770 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2024-04-27 08:33:42,610 - INFO     - websocket: Websocket connected
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 158, in run
    self.__run_mqtt()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 172, in __run_mqtt
    mqttc = self._start(mq_config)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 179, in _start
    mqttc = mqtt.Client(mq_config.client_id)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/paho/mqtt/client.py", line 766, in __init__
    raise ValueError(
ValueError: Unsupported callback API version: version 2.0 added a callback_api_version, see migrations.md for details
Activating virtual environment...OK
2024-04-27 08:39:05,999 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.740...
2024-04-27 08:39:06,002 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2024-04-27 08:39:06,063 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2024-04-27 08:39:09,151 - INFO     - websockets.server: connection open
2024-04-27 08:39:09,153 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2024-04-27 08:39:11,091 - INFO     - websocket: Websocket connected
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 158, in run
    self.__run_mqtt()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 172, in __run_mqtt
    mqttc = self._start(mq_config)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 179, in _start
    mqttc = mqtt.Client(mq_config.client_id)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/paho/mqtt/client.py", line 766, in __init__
    raise ValueError(
ValueError: Unsupported callback API version: version 2.0 added a callback_api_version, see migrations.md for details
2024-04-27 08:56:31,146 - INFO     - fhempy.lib.pkg_installer: Attempting install of git+https://github.com/fhempy/aiotinytuya#aiotinytuya==1.12.3
2024-04-27 08:56:49,029 - INFO     - fhempy.lib.pkg_installer: Successfully installed git+https://github.com/fhempy/aiotinytuya#aiotinytuya==1.12.3 update!
2024-04-27 09:00:25,737 - INFO     - fhempy.lib.fhem_pythonbinding: Start update...
2024-04-27 09:00:25,739 - INFO     - fhempy.lib.pkg_installer: Attempting install of fhempy
2024-04-27 09:00:50,755 - INFO     - fhempy.lib.pkg_installer: Successfully installed fhempy update!
2024-04-27 09:00:50,773 - INFO     - fhempy.lib.fhem_pythonbinding: Restart initiated...
2024-04-27 09:00:50,775 - INFO     - fhempy.lib.fhem_pythonbinding: All modules successfully undefined!
2024-04-27 09:00:50,776 - INFO     - websockets.server: server closing
2024-04-27 09:01:00,783 - INFO     - websockets.server: connection closed
2024-04-27 09:01:00,784 - INFO     - websockets.server: server closed
2024-04-27 09:01:00,793 - INFO     - fhempy.lib.fhem_pythonbinding: Exit 1
Activating virtual environment...OK
2024-04-27 09:01:02,674 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.740...
2024-04-27 09:01:02,678 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2024-04-27 09:01:02,739 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2024-04-27 09:01:11,532 - INFO     - websockets.server: connection open
2024-04-27 09:01:11,533 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2024-04-27 09:01:14,471 - INFO     - websocket: Websocket connected
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 158, in run
    self.__run_mqtt()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 172, in __run_mqtt
    mqttc = self._start(mq_config)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 179, in _start
    mqttc = mqtt.Client(mq_config.client_id)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/paho/mqtt/client.py", line 766, in __init__
    raise ValueError(
ValueError: Unsupported callback API version: version 2.0 added a callback_api_version, see migrations.md for details
Activating virtual environment...OK
2024-04-27 09:10:40,053 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy 0.1.740...
2024-04-27 09:10:40,055 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2024-04-27 09:10:40,115 - INFO     - websockets.server: server listening on 0.0.0.0:15733
2024-04-27 09:10:43,237 - INFO     - websockets.server: connection open
2024-04-27 09:10:43,239 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 127.0.0.1
2024-04-27 09:10:46,444 - INFO     - websocket: Websocket connected
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 158, in run
    self.__run_mqtt()
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 172, in __run_mqtt
    mqttc = self._start(mq_config)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/tuya_iot/openmq.py", line 179, in _start
    mqttc = mqtt.Client(mq_config.client_id)
  File "/opt/fhem/.fhempy/fhempy_venv/lib/python3.9/site-packages/paho/mqtt/client.py", line 766, in __init__
    raise ValueError(
ValueError: Unsupported callback API version: version 2.0 added a callback_api_version, see migrations.md for details
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: richterh am 04 Mai 2024, 22:38:40
Hallo cyrusfd,

ich hatte das selbe Problem mit der Aktualisierung der Readings und lange nach einer Lösung herumgesucht. Ein "sudo apt upgrade" hat den Fehler dann bei mir behoben.

Viele Grüße
Harald
Titel: Aw: fhempy: tuya (lokal)
Beitrag von: richterh am 05 Mai 2024, 17:17:22
Hallo zusammen,

vielleicht kann mir jemand bei meinen Problemen helfen. Ich habe Tuya lokal am laufen was inzwischen auch recht gut funtkioniert. Was mich aber zur Zeit beschäftigt ist ein 3-Phasiger Stromzähler (Category dlq) der Spannung, Strom und Power verschlüsselt liefert:

phase_a CP4ABRMAAMc= 2024-05-04 22:21:07
phase_b CQYAAUEAAA0= 2024-05-04 22:21:07
phase_c CRgAAigAADo= 2024-05-04 22:21:07

Ähnliches wurde zwar hier im Forum schon behandelt aber brachte mir keine funktionierende Lösung.
Kann man eines der vorhandenen Scripte (tuya.py?) anpassen damit diese Gerät auch erkannt und die Werte entschlüsselt werden oder kann man z.B. mit einem Perl-Script entschlüsseln?

Viele Grüße Harald