fhempy: tuya (lokal)

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

Vorheriges Thema - Nächstes Thema

satprofi

so, und schon wieder "update" nötig, weul Geräte nicht schalten. irgendwo is der wurm drin.
gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram

Gisbert

Hallo dominik,

ich hab 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
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

uwirt

#842
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?
FHEM / Ubuntu / fitlet2
HomeMatic: CCU3|HmIP-STHD|HmIP-PCBS|HmIP-PCBS2|HmIP-PCBS-BAT|HM-WDC7000|HM-WDS100-C6-O|HM-WDS40|HM-LC-Sw1-FM|HM-LC-RGBW-WM|HM-ES-PMSw1-Pl|HM-ES-TX-WM
NAS: DS218+|DS209j|DS216+II|DS412+
Devices: Panasonic Webcams|Withings|Gardena Smart

Gisbert

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

Gisbert

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

satprofi

weil ich täglich autom. update, habe ich keine probs mehr mit tuya lokal.
gruss
-----------------------------------------------------------------------
beelink miniPC - Fhem 6.x CUL 868, FS20, NetIO230 CUL 433
HMLAN, HM-CC-RT-DN,Homematic Actoren,LD382A,Telegram

Kuehnhackel

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

uwirt

#847
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.
FHEM / Ubuntu / fitlet2
HomeMatic: CCU3|HmIP-STHD|HmIP-PCBS|HmIP-PCBS2|HmIP-PCBS-BAT|HM-WDC7000|HM-WDS100-C6-O|HM-WDS40|HM-LC-Sw1-FM|HM-LC-RGBW-WM|HM-ES-PMSw1-Pl|HM-ES-TX-WM
NAS: DS218+|DS209j|DS216+II|DS412+
Devices: Panasonic Webcams|Withings|Gardena Smart

stefanru

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

TheTrumpeter

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?
FHEM auf RPi3, THZ (LWZ404SOL), RPII2C & I2C_MCP342x (ADCPiZero), PowerMap, CustomReadings, RPI_GPIO, Twilight, nanoCUL (WMBus für Diehl Wasserzähler & Regenerationszähler für BWT AqaSmart), ESPEasy, TPLinkHS110

stefanru

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

xeenon

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?

TheTrumpeter

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.
FHEM auf RPi3, THZ (LWZ404SOL), RPII2C & I2C_MCP342x (ADCPiZero), PowerMap, CustomReadings, RPI_GPIO, Twilight, nanoCUL (WMBus für Diehl Wasserzähler & Regenerationszähler für BWT AqaSmart), ESPEasy, TPLinkHS110

TheTrumpeter

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...
FHEM auf RPi3, THZ (LWZ404SOL), RPII2C & I2C_MCP342x (ADCPiZero), PowerMap, CustomReadings, RPI_GPIO, Twilight, nanoCUL (WMBus für Diehl Wasserzähler & Regenerationszähler für BWT AqaSmart), ESPEasy, TPLinkHS110

Tueftler1983

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