Hi Dominik,
ich habe mit zum testen ein Tuya Leuchtmittel angeschafft, Leuchtmittel in Smartlife eingebunden, fhempy und tuya nach Deiner Anleitung installiert.
Das Leuchtmittel ließ sich dann auch über scan_devices finden und mit create_device anlegen.
Leider bleibt es auf Initializing... stehen.
Ich habe es paarmal vom Netzgetrennt und über die Smartlife App bedient, aber es tut sich nix. Im Log ist auch nichts zu finden.
Kannst du mir da nen Tip geben?
Lists von..
fhempy:
Internals:
BindingType fhempy
DEF fhempy
DeviceName ws:localhost:15733
FD 13
IP 127.0.0.1
NAME fhempy_local
NR 23
NTFY_ORDER 50-fhempy_local
PARTIAL
PORT 15733
STATE opened
TYPE BindingsIo
WEBSOCKET 1
binary 1
connecttime 1670585350.28102
devioLoglevel 0
eventCount 50
installing 0
localBinding 1
nextOpenDelay 10
prev_error localhost: Verbindungsaufbau abgelehnt (111)
READINGS:
2022-12-09 12:29:10 hostname pi4
2022-12-09 12:29:10 os posix
2022-12-09 12:29:10 python 3.9.2
2022-12-09 12:29:10 release 5.15.76-v8+
2022-12-09 12:29:10 state opened
2022-12-09 12:29:10 system Linux
2022-12-09 12:29:10 version 0.1.526
2022-12-09 12:29:11 version_available 0.1.526
2022-12-09 12:29:11 version_release_notes <html><a href="https://github.com/fhempy/fhempy/releases" target="_blank">Release Notes</a></html>
args:
fhempy_local
BindingsIo
fhempy
Attributes:
devStateIcon { my $status_img = "10px-kreis-gruen";; my $status_txt = "connected";; my $ver = ReadingsVal($name, "version", "-");; my $ver_available = ReadingsVal($name, "version_available", $ver);; my $update_icon = "";; if ($ver_available ne $ver) { $status_img = "10px-kreis-gelb";; $status_txt = "Version ".$ver_available." available for update";; } if (ReadingsVal($name, "state", "disconnected") eq "disconnected") { $status_img = "10px-kreis-rot";; $status_txt = "disconnected";; } $update_icon = "<a href=\"/fhem?cmd.dummy=set $name update&XHR=1\" title=\"Start ".$ver_available." update\">".FW_makeImage("refresh")."</a>";; "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a> ".$ver." </a>".$update_icon."</div>" }
group fhempy
icon file_json-ld2
room fhempy
tuya:
Internals:
API_KEY APIKEY
API_SECRET APISECRET
DEF tuya setup APIKEY APISECRET DEVID
DEVICEID 0
FHEMPYTYPE tuya
IODev fhempy_local
NAME tuya_system
NR 25
PYTHONTYPE tuya
REGION eu
STATE 1 devices found localy
TYPE fhempy
eventCount 7
READINGS:
2022-12-04 23:58:36 DEVID_icon https://images.tuyaeu.com/smart/icon/ay1525830333575gYi61/d9a5f9bcc5fa2d6c047b8a56b2e691b0.png
2022-12-04 23:58:36 DEVID_id DEVID
2022-12-04 23:59:26 DEVID_ip 192.168.178.47
2022-12-04 23:58:36 DEVID_localkey locKey
2022-12-04 23:58:36 DEVID_name M-TCV1
2022-12-04 23:58:36 DEVID_productid zhuhhc9hdwibjz6v
2022-12-04 23:59:26 DEVID_version 3.4
2022-12-09 12:37:02 state 1 devices found localy
args:
tuya_system
fhempy
tuya
setup
APIKEY
APISECRET
DEVID
argsh:
Attributes:
group tuya
room fhempy
Leuchtmittel:
Internals:
DEF tuya zhuhhc9hdwibjz6v DEVID 192.168.178.47 locKey 3.4 APIKEY APISECRET
DEVICEID DEVID
FHEMPYTYPE tuya
IODev fhempy_local
NAME tuya_local_DEVID
NR 26
PYTHONTYPE tuya
STATE Initializing...
TYPE fhempy
eventCount 82079
READINGS:
2022-12-05 00:18:52 active_time 1670189824
2022-12-05 00:18:52 biz_type 18
2022-12-05 00:18:52 category dj
2022-12-05 00:18:52 create_time 1670189824
2022-12-05 00:18:52 icon smart/icon/ay1525830333575gYi61/d9a5f9bcc5fa2d6c047b8a56b2e691b0.png
2022-12-05 00:18:52 id DEVID
2022-12-05 00:18:52 ip 62.143.15.132
2022-12-06 23:10:08 lat 50.1441
2022-12-05 00:18:52 local_key locKey
2022-12-08 18:43:39 lon 8.6033
2022-12-05 00:18:52 name M-TCV1
2022-12-09 12:38:40 online 0
2022-12-05 00:18:52 owner_id 72805765
2022-12-05 00:18:52 product_id zhuhhc9hdwibjz6v
2022-12-05 00:18:52 product_name M-TCV1
2022-12-09 12:29:11 state Initializing...
2022-12-05 00:18:52 sub 0
2022-12-05 00:18:52 time_zone +01:00
2022-12-05 00:18:52 uid eu1669756723579ISkWj
2022-12-08 18:43:39 update_time 1670440222
2022-12-05 00:18:52 uuid 8243228dfa810dd7
args:
tuya_local_DEVID
fhempy
tuya
zhuhhc9hdwibjz6v
DEVID
192.168.178.47
locKey
3.4
APIKEY
APISECRET
argsh:
Attributes:
alias M-TCV1
group tuya
room fhempy
tuya_spec_functions [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}, 'desc': 'switch led'}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}, 'desc': 'work mode'}, {'code': 'bright_value_v2', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'bright value v2'}, {'code': 'temp_value_v2', 'dp_id': 23, 'type': 'Integer', 'values': {'min': 0, 'max': 1000, 'scale': 0, 'step': 1}, 'desc': 'temp value v2'}, {'code': 'colour_data_v2', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}, 'desc': 'colour data v2'}, {'code': 'scene_data_v2', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, 'desc': 'scene data v2'}, {'code': 'countdown_1', 'dp_id': 26, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}, 'desc': 'countdown 1'}, {'code': 'music_data', 'dp_id': 27, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}, 'desc': 'music data'}, {'code': 'control_data', 'dp_id': 28, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}, 'desc': 'control data'}, {'code': 'rhythm_mode', 'dp_id': 30, 'type': 'Raw', 'values': {'maxlen': 255}, 'desc': 'rhythm mode'}, {'code': 'sleep_mode', 'dp_id': 31, 'type': 'Raw', 'values': {'maxlen': 255}, 'desc': 'sleep mode'}, {'code': 'wakeup_mode', 'dp_id': 32, 'type': 'Raw', 'values': {'maxlen': 255}, 'desc': 'wakeup mode'}, {'code': 'power_memory', 'dp_id': 33, 'type': 'Raw', 'values': {}, 'desc': 'power memory'}, {'code': 'do_not_disturb', 'dp_id': 34, 'type': 'Boolean', 'values': {}, 'desc': 'do not disturb'}, {'code': 'cycle_timing', 'dp_id': 209, 'type': 'Raw', 'values': {}, 'desc': 'cycle timing'}, {'code': 'random_timing', 'dp_id': 210, 'type': 'Raw', 'values': {}, 'desc': 'random timing'}]
tuya_spec_status [{'code': 'switch_led', 'dp_id': 20, 'type': 'Boolean', 'values': {}}, {'code': 'work_mode', 'dp_id': 21, 'type': 'Enum', 'values': {'range': ['white', 'colour', 'scene', 'music']}}, {'code': 'bright_value_v2', 'dp_id': 22, 'type': 'Integer', 'values': {'min': 10, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'temp_value_v2', 'dp_id': 23, 'type': 'Integer', 'values': {'min': 0, 'max': 1000, 'scale': 0, 'step': 1}}, {'code': 'colour_data_v2', 'dp_id': 24, 'type': 'Json', 'values': {'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}, {'code': 'scene_data_v2', 'dp_id': 25, 'type': 'Json', 'values': {'scene_num': {'min': 1, 'scale': 0, 'max': 8, 'step': 1}, 'scene_units': {'unit_change_mode': {'range': ['static', 'jump', 'gradient']}, 'unit_switch_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'unit_gradient_duration': {'min': 0, 'scale': 0, 'max': 100, 'step': 1}, 'bright': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}}}}, {'code': 'countdown_1', 'dp_id': 26, 'type': 'Integer', 'values': {'unit': 's', 'min': 0, 'max': 86400, 'scale': 0, 'step': 1}}, {'code': 'music_data', 'dp_id': 27, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}}, {'code': 'control_data', 'dp_id': 28, 'type': 'Json', 'values': {'change_mode': {'range': ['direct', 'gradient']}, 'bright': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'temperature': {'min': 0, 'scale': 0, 'unit': '', 'max': 1000, 'step': 1}, 'h': {'min': 0, 'scale': 0, 'unit': '', 'max': 360, 'step': 1}, 's': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}, 'v': {'min': 0, 'scale': 0, 'unit': '', 'max': 255, 'step': 1}}}, {'code': 'rhythm_mode', 'dp_id': 30, 'type': 'Raw', 'values': {'maxlen': '255'}}, {'code': 'sleep_mode', 'dp_id': 31, 'type': 'Raw', 'values': {'maxlen': '255'}}, {'code': 'wakeup_mode', 'dp_id': 32, 'type': 'Raw', 'values': {'maxlen': '255'}}, {'code': 'power_memory', 'dp_id': 33, 'type': 'Raw', 'values': {}}, {'code': 'do_not_disturb', 'dp_id': 34, 'type': 'Boolean', 'values': {}}, {'code': 'cycle_timing', 'dp_id': 209, 'type': 'Raw', 'values': {}}, {'code': 'random_timing', 'dp_id': 210, 'type': 'Raw', 'values': {}}]