fhempy: tuya (lokal)

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

Vorheriges Thema - Nächstes Thema

Gisbert

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
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY

romanh

#421
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.

satprofi

was ist bitte tinytuya ?
gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram

satprofi

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
gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram

romanh

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

tinytuya wird auch von dem 'tuya'-Subdevice von fhempy benutzt, so bin ich drauf gekommen ;-)

Christian83

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?

Gisbert

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
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY

Christian83

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.

denis.robel

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.
VG

Denis

Christian83

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.

Gisbert

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:

  • Es mehr Events erzeugt, als mir lieb ist.
  • Beim Reading state wird kein Event erzeugt, auch nicht, wenn es von off zu on wechselt und umgekehrt.

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
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY

thburkhart

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

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

Gisbert

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
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY

thburkhart

#433
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

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

Gisbert

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
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY