NEWS
Resolved: eMylo Smart 1-Phasen - WLAN
-
@apollon77 Mit HA-Online ist der Online Adapter von Home Automation gemeint. Will aber HA nicht verwenden.
Die Objekte:{ "type": "device", "common": { "name": "Dach BKW", "read": true }, "native": { "virtual": false, "lon": "6.9812", "ownerId": "2173566", "uuid": "df610d406216a93c", "mac": "fc671f080e90", "accessType": 0, "otaInfo": { "supportAuto": true, "otaUpgradeModes": [ 0 ], "otaModuleMap": { "wifi": { "upgradeStatus": 0, "cdv": "1.0.0", "bv": "40.00", "verSw": "2.3.5" }, "mcu": { "upgradeStatus": 0, "cdv": "", "verSw": "2.3.5" } } }, "iconUrl": "https://images.tuyaeu.com/smart/icon/ay1536897190133VVeLx/32346148448dd9829abb97ce317c5e82.png", "communication": { "communicationNode": "bfc2a67e80da39b1e0cip0", "communicationModes": [ { "pv": "", "type": 0 }, { "pv": "2.2", "type": 1 }, { "pv": "", "type": 3 } ], "connectionStatus": 1 }, "gatewayVerCAD": "1.0.3", "lat": "50.8048", "runtimeEnv": "prod", "devKey": "", "devId": "bfc2a67e80da39b1e0cip0", "productId": "nqbs1onwskmmmaac", "activeTime": 1671206553, "cloudOnline": true, "baseAttribute": 1024, "devAttribute": 579, "dataPointInfo": { "dpMaxTime": 1671806690351, "dpName": {}, "dps": { "1": 0, "6": "CN4AAAAAAAA=", "10": 0, "12": false, "13": 0, "14": false, "15": 0, "16": true, "17": "AQAAPAMAAPUEAAC0CAAAHg==", "20": false }, "dpsTime": { "1": 1671746418933, "6": 1671806690351, "10": 1671746419317, "12": 1671746418855, "13": 1671746418832, "14": 1671206553474, "15": 1671206553474, "16": 1671746418896, "17": 1671761498478, "20": 1671206553474, "101": 1671206553474 } }, "name": "Dach BKW", "timezoneId": "Europe/Berlin", "deviceTopo": {}, "localKey": "5014c32a18b9e165", "dpName": {}, "groudId": 2173566, "schema": [ { "code": "forward_energy_total", "defaultValue": "", "canTrigger": true, "type": "obj", "executable": true, "mode": "ro", "defaultRecommend": false, "name": "正向总有功电量", "property": { "unit": "kW·h", "min": 0, "max": 99999999, "scale": 2, "step": 1, "type": "value" }, "id": 1, "editPermission": true }, { "code": "phase_a", "defaultValue": "", "canTrigger": true, "type": "raw", "executable": true, "mode": "ro", "defaultRecommend": false, "name": "上报A相电压,电流及功率", "id": 6, "editPermission": true }, { "code": "fault", "defaultValue": "", "canTrigger": true, "type": "obj", "executable": true, "mode": "ro", "defaultRecommend": false, "name": "过流故障上报", "property": { "label": [ "ov_cr", "unbalance_alarm", "ov_vol", "undervoltage_alarm", "miss_phase_alarm", "outage_alarm", "magnetism_alarm", "terminal_alarm", "cover_alarm", "credit_alarm", "no_balance_alarm", "battery_alarm", "meter_hardware_alarm" ], "type": "bitmap", "maxlen": 13 }, "id": 10, "editPermission": true }, { "code": "prepayment_switch", "defaultValue": "", "canTrigger": true, "type": "obj", "executable": true, "mode": "rw", "defaultRecommend": false, "name": "预付费开关", "property": { "type": "bool" }, "id": 12, "editPermission": true }, { "code": "balance_energy", "defaultValue": "0", "canTrigger": true, "type": "obj", "executable": true, "mode": "ro", "defaultRecommend": false, "name": "剩余可用电量", "property": { "unit": "kW·h", "min": 0, "max": 99999999, "scale": 2, "step": 1, "type": "value" }, "id": 13, "editPermission": true }, { "code": "clear_energy", "defaultValue": "", "canTrigger": true, "type": "obj", "executable": true, "mode": "rw", "defaultRecommend": false, "name": "电量清零", "property": { "type": "bool" }, "id": 14, "editPermission": true }, { "code": "energy_charge", "defaultValue": "0", "canTrigger": true, "type": "obj", "executable": true, "mode": "rw", "defaultRecommend": false, "name": "电量充值", "property": { "unit": "kW·h", "min": 0, "max": 50000, "scale": 0, "step": 1, "type": "value" }, "id": 15, "editPermission": true }, { "code": "switch", "defaultValue": "", "canTrigger": true, "iconname": "icon-dp_power3", "type": "obj", "executable": true, "mode": "rw", "defaultRecommend": false, "name": "开关", "property": { "type": "bool" }, "id": 16, "editPermission": true }, { "code": "alarm_set_2", "defaultValue": "", "canTrigger": true, "type": "raw", "executable": true, "mode": "rw", "defaultRecommend": false, "name": "告警设置2", "id": 17, "editPermission": true }, { "code": "clear_event", "defaultValue": "", "canTrigger": true, "iconname": "icon-Disarm", "type": "obj", "executable": true, "mode": "rw", "defaultRecommend": false, "name": "清除事件", "property": { "type": "bool" }, "id": 20, "editPermission": true }, { "code": "factory_data", "defaultValue": "", "canTrigger": true, "type": "raw", "executable": true, "mode": "rw", "defaultRecommend": false, "name": "内部拓展命令", "id": 101, "editPermission": false } ], "productKey": "nqbs1onwskmmmaac", "schemaExt": [ { "complexType": "", "id": 12, "inputStyle": "", "inputType": " " }, { "complexType": "", "id": 14, "inputStyle": "", "inputType": " " }, { "complexType": "", "id": 15, "inputStyle": "", "inputType": " " }, { "complexType": "", "id": 16, "inputStyle": "", "inputType": " " }, { "complexType": "", "id": 20, "inputStyle": "", "inputType": " " } ], "version": "3.3", "dpCodes": { "forward_energy_total": { "code": "forward_energy_total", "defaultValue": "", "canTrigger": true, "type": "obj", "executable": true, "mode": "ro", "defaultRecommend": false, "name": "正向总有功电量", "property": { "unit": "kW·h", "min": 0, "max": 99999999, "scale": 2, "step": 1, "type": "value" }, "id": 1, "editPermission": true }, "phase_a": { "code": "phase_a", "defaultValue": "", "canTrigger": true, "type": "raw", "executable": true, "mode": "ro", "defaultRecommend": false, "name": "上报A相电压,电流及功率", "id": 6, "editPermission": true }, "fault": { "code": "fault", "defaultValue": "", "canTrigger": true, "type": "obj", "executable": true, "mode": "ro", "defaultRecommend": false, "name": "过流故障上报", "property": { "label": [ "ov_cr", "unbalance_alarm", "ov_vol", "undervoltage_alarm", "miss_phase_alarm", "outage_alarm", "magnetism_alarm", "terminal_alarm", "cover_alarm", "credit_alarm", "no_balance_alarm", "battery_alarm", "meter_hardware_alarm" ], "type": "bitmap", "maxlen": 13 }, "id": 10, "editPermission": true }, "prepayment_switch": { "code": "prepayment_switch", "defaultValue": "", "canTrigger": true, "type": "obj", "executable": true, "mode": "rw", "defaultRecommend": false, "name": "预付费开关", "property": { "type": "bool" }, "id": 12, "editPermission": true }, "balance_energy": { "code": "balance_energy", "defaultValue": "0", "canTrigger": true, "type": "obj", "executable": true, "mode": "ro", "defaultRecommend": false, "name": "剩余可用电量", "property": { "unit": "kW·h", "min": 0, "max": 99999999, "scale": 2, "step": 1, "type": "value" }, "id": 13, "editPermission": true }, "clear_energy": { "code": "clear_energy", "defaultValue": "", "canTrigger": true, "type": "obj", "executable": true, "mode": "rw", "defaultRecommend": false, "name": "电量清零", "property": { "type": "bool" }, "id": 14, "editPermission": true }, "energy_charge": { "code": "energy_charge", "defaultValue": "0", "canTrigger": true, "type": "obj", "executable": true, "mode": "rw", "defaultRecommend": false, "name": "电量充值", "property": { "unit": "kW·h", "min": 0, "max": 50000, "scale": 0, "step": 1, "type": "value" }, "id": 15, "editPermission": true }, "switch": { "code": "switch", "defaultValue": "", "canTrigger": true, "iconname": "icon-dp_power3", "type": "obj", "executable": true, "mode": "rw", "defaultRecommend": false, "name": "开关", "property": { "type": "bool" }, "id": 16, "editPermission": true }, "alarm_set_2": { "code": "alarm_set_2", "defaultValue": "", "canTrigger": true, "type": "raw", "executable": true, "mode": "rw", "defaultRecommend": false, "name": "告警设置2", "id": 17, "editPermission": true }, "clear_event": { "code": "clear_event", "defaultValue": "", "canTrigger": true, "iconname": "icon-Disarm", "type": "obj", "executable": true, "mode": "rw", "defaultRecommend": false, "name": "清除事件", "property": { "type": "bool" }, "id": 20, "editPermission": true }, "factory_data": { "code": "factory_data", "defaultValue": "", "canTrigger": true, "type": "raw", "executable": true, "mode": "rw", "defaultRecommend": false, "name": "内部拓展命令", "id": 101, "editPermission": false } }, "ip": "172.16.1.51", "gwId": "bfc2a67e80da39b1e0cip0", "active": 2, "ablilty": 0, "encrypt": true }, "from": "system.adapter.tuya.0", "user": "system.user.admin", "ts": 1671806961266, "_id": "tuya.0.bfc2a67e80da39b1e0cip0", "acl": { "object": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }
MOD-EDIT: Code in code-tags gesetzt!
-
@rkbroker sagte in eMylo Smart 1-Phasen - WLAN:
@apollon77 Mit HA-Online ist der Online Adapter von Home Automation gemeint. Will aber HA nicht verwenden.
Hast Du mal das oben verlinkte bezüglich "useRefreshToGet" probiert?
-
@apollon77 Habe es eingetragen, jedoch ohne Erfolg.
"native": { "useRefreshToGet": true, "virtual": false, "lon": "6.9812", "ownerId": "2173566", "uuid": "df610d406216a93c", "mac": "fc671f080e90", "accessType": 0,
Wenn ich das richtig sehe, könnten in phase_a die Werte vergraben sein.
-
@rkbroker Werden die Werte aktualisiert wenn Du nachdem der Adapter verbunden ist die Tuya App startest und das Gerät öffnest? Wenn nein dann sehr interessant.
Welchen Polling-Interval nutzt du? Kommen in dem Intervall Daten an?
Ansonsten nehme ich gern ein komplettes Debaug log Start und dann bissl zeit in der an sich daten kommen sollten und mindestesns das Polling Intervall 2x drin ist.
Sonst kann ich nur sagen das Du bitte die MQTT Datenverbindung und die iot Tuya Platform nutzen musst ... ist für HA ja auch nötig, korrekt?
-
@rkbroker sagte in eMylo Smart 1-Phasen - WLAN:
Wenn ich das richtig sehe, könnten in phase_a die Werte vergraben sein.
Ne da sind scheinbar die Phasenwerte drin aber irgendwie binär kodiert ... müsste man base64 decoden in einem Skript und dann schauen was es ist das wäre aber ein Thema für ein kleines JavaScriptchen
-
@apollon77 Die Werte werden in der App, IOB und HA aktualisiert, auch wenn alle drei gleichzeitig geöffnet sind. In IOB wird alle 30 Sekunden gepollt und die Daten kommen auch an. Wobei sich nur phase_a ändert. Stelle ich Alarmwerte ein, so wird alarm_set_2 aktualisiert. Da scheinen alle Einstellungen der Alarme drin vergraben sein (Ein/Aus & Wert).
Der Debug: iobroker.2022-12-28.log.htm
Yeep, HA nuzt die Tuya Plattform. Aber mit MQTT und der IOT Tuya werde ich nicht hinbekommen. Im HA-Debug ist aber ein Hinweis:
"status": { "forward_energy_total": 104, "phase_a": { "electricCurrent": 0.0, "power": 0.0, "voltage": 226.0 }, "fault": 0, "switch_prepayment": false, "balance_energy": 0, "clear_energy": false, "charge_energy": 0, "switch": true, "alarm_set_2": [ { "alarmCode": "overcurrent", "doAction": false, "threshold": "60" }, { "alarmCode": "ammeter_overvoltage", "doAction": false, "threshold": "245" }, { "alarmCode": "under_voltage", "doAction": false, "threshold": "180" }, { "alarmCode": "insufficient_balance", "doAction": false, "threshold": "30" } ], "event_clear": false },
Scheint so, dass phase_a und alarm_set_2 dekodiert werden müssten.
-
@rkbroker damit ist es ein Feature request. Alle Infos bitte in ein github issue. Warum nur immer so kompliziert
-
@apollon77 Hatte bei github auch den FR ausgewählt. Keine Ahnung warum es ein Issue wurde.
-
@rkbroker GitHub hat nur issue, also alles ok
Soooo, dann .. test Frei (kopiert aus github)
Ok, then lets try it ... Install GitHub version please ... it should add:
- 3 more states unter .6 (phase _a) wuth the correct values. test it please
- a JSON state unter .17 with the alarm settings. Theoretically also "changeing shgould work (simply set the json after change)
- 13 more states unter .10 that contains boolean states of the "bitmap"
Please try to test as much as possible from it
Would be great to see screenshots and/or debug log
if anything is not working, please provide a debug log with time infos when what happened or should have happened
-
All Released as tuya 3.12.0