fhempy: tuya (lokal)

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

Vorheriges Thema - Nächstes Thema

Christian83

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

x86

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
FHEM auf Raspberry Pi 1 Model B
SIGNALduino (CC1101), 6 IT-Steckdosen/Fernbedienungen, 4 433-MHz-Temperatursensoren, 6 tuya-Bulbs, 5 Shelly 2.5 Rolladenaktoren, 1 Comet DECT Heizungsaktor, tasmota IR, SamsungAV, HomeConnect, Google Assistant, FTUI, Wetter- und Fahrplandaten = 220 defines

thburkhart

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

fretti

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
promox, debian, rpi, homematic, mqtt, dect, z2m

dominik

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?
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

dominik

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.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

dominik

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.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

fretti

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

promox, debian, rpi, homematic, mqtt, dect, z2m

thburkhart

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

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

x86

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
FHEM auf Raspberry Pi 1 Model B
SIGNALduino (CC1101), 6 IT-Steckdosen/Fernbedienungen, 4 433-MHz-Temperatursensoren, 6 tuya-Bulbs, 5 Shelly 2.5 Rolladenaktoren, 1 Comet DECT Heizungsaktor, tasmota IR, SamsungAV, HomeConnect, Google Assistant, FTUI, Wetter- und Fahrplandaten = 220 defines

x86

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
FHEM auf Raspberry Pi 1 Model B
SIGNALduino (CC1101), 6 IT-Steckdosen/Fernbedienungen, 4 433-MHz-Temperatursensoren, 6 tuya-Bulbs, 5 Shelly 2.5 Rolladenaktoren, 1 Comet DECT Heizungsaktor, tasmota IR, SamsungAV, HomeConnect, Google Assistant, FTUI, Wetter- und Fahrplandaten = 220 defines

Teemo

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.

thburkhart

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

Christian83

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)

x86

#404
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
FHEM auf Raspberry Pi 1 Model B
SIGNALduino (CC1101), 6 IT-Steckdosen/Fernbedienungen, 4 433-MHz-Temperatursensoren, 6 tuya-Bulbs, 5 Shelly 2.5 Rolladenaktoren, 1 Comet DECT Heizungsaktor, tasmota IR, SamsungAV, HomeConnect, Google Assistant, FTUI, Wetter- und Fahrplandaten = 220 defines