Closed liouma closed 2 days ago
The log message needed is the one that is output to HA log when you try to add the device using this integration. That contains the exact DPS that were seen at that time, which is important to correctly match the device. The diagnostic log contains all the dps that the device has sent this session, which in most cases will be the same set, but for some devices there are additional dps not sent in that initial connection that cone through later, so I can make a config based on diagnostics but there is no guarantee it will match.
Sorry. Please find the file attached. I removed the device from local tuya and included it back recording logs.
You can look for "EV charger" in the logfile: home-assistant_tuya_local_2024-04-27T06-00-40.707Z.log
I left the yaml file I made for this device in tuya local. If you want, I can remove the file and run the procedure again. I hope this is the log you were expecting, otherwise please ask, I'll be happy to send a new one.
After more testing, it appear that the file I uploaded is working fine. You can control it, make some improvement and validate it. The problems I reported earlier have diseapered, I can set the values.
I own a Kolanky 11kW charger (3 phase); when I tried to use the proposed configuration to add the device, it wouldn't recognize it at all (0% match). I had to delete ID 120; after that, device was added and it works great. Logs before and after: Device matches None with quality of 0%. DPS: {"updated_at": 1720516523.7142155, "10": 0, "101": "no_connet", "102": 394, "105": 0, "109": 0, "110": 421, "112": 0, "113": "Max16A", "114": 16, "115": 16, "116": 16, "117": 16, "118": 0, "119": 0, "124": "WaitOperation"} Device matches 11kW_EVSE with quality of 73%. DPS: {"updated_at": 1720516743.2816513, "10": 0, "101": "no_connet", "102": 396, "105": 0, "109": 0, "110": 421, "112": 0, "113": "Max16A", "114": 16, "115": 16, "116": 16, "117": 16, "118": 0, "119": 0, "124": "WaitOperation"} I also placed the ID 120 back as optional, after the device was added. Now charging time is also reported.
Thanks for your feedback, I have made the suggested changes.
Sorry but since last update my kolanky charger 1 phase is not recognized anymore. Before it was working fine with the following file. Is there a 1 phase and a 2 phases versions ??
name: EV charger
products:
- id: 7bvgooyjhiua1yyq
name: Kolanky 3.6kW EV charger
primary_entity:
entity: sensor
class: enum
name: Status
icon: "mdi:ev-station"
dps:
- id: 101
type: string
name: sensor
mapping:
- dps_val: no_connect
value: Disconnected
- dps_val: connect
value: Connected
- dps_val: charing
value: Charging
- dps_val: wait_rfid
value: Waiting for authorization
- dps_val: finish
value: Charged
- dps_val: wait_charing
value: Delaying charge
- dps_val: error
value: Error
secondary_entities:
- entity: select
name: Charging mode
icon: "mdi:ev-station"
category: config
dps:
- id: 124
type: string
name: option
mapping:
- dps_val: OpenCharging
value: Start charging
- dps_val: CloseCharging
value: Stop charging
- dps_val: WaitOperation
value: No operation
- entity: number
name: Set charge current
category: config
icon: "mdi:ev-plug-type2"
dps:
- id: 114
type: integer
name: value
unit: A
range:
min: 6
max: 16
mapping:
- constraint: max_current
conditions:
- dps_val: false
value_redirect: current_16_limit
range:
min: 6
max: 16
- entity: number
name: Set delay time
category: config
icon: "mdi:car-clock"
dps:
- id: 118
type: integer
name: value
unit: h
range:
min: 0
max: 15
- entity: sensor
class: energy
dps:
- id: 112
type: integer
name: sensor
unit: kWh
class: measurement
mapping:
- scale: 10
- entity: sensor
class: voltage
category: diagnostic
dps:
- id: 102
type: integer
name: sensor
unit: V
class: measurement
- entity: sensor
class: current
dps:
- id: 105
type: integer
name: sensor
unit: A
class: measurement
mapping:
- scale: 10
- entity: sensor
class: power
dps:
- id: 109
type: integer
name: sensor
unit: kW
class: measurement
mapping:
- scale: 10
- entity: sensor
class: temperature
category: diagnostic
dps:
- id: 110
type: integer
name: sensor
unit: C
class: measurement
mapping:
- scale: 10
- entity: number
name: Charging duration
category: config
icon: "mdi:car-clock"
dps:
- id: 119
type: integer
name: value
unit: h
range:
min: 0
max: 15
- entity: sensor
name: Charging time
class: duration
dps:
- id: 120
optional: true
type: integer
name: sensor
unit: min
mapping:
- scale: 10
The changes made to support the 11kW version in previous comment did not affect the detection of 3.6kW version, they only made 1 dp optional, and changed one value in a mapping which also matches the info you provided.
Without a log message, it is difficult to say what is happening in your case. EV chargers seem to support many charging modes, and may have different expectations of available DPs depending on what mode they are in.
Log Message
As I'm not sure what kind of log you need, I post here:
Log files are attached
-> please see also the file at the bottom of this message. I hope it will save you some time tuya_local-25fc97d6b860c65d62cbd0543b4fc388-Chargeur de voiture-78d349f815a06639910bcb1e40952535.json
Logfile is attached, if you need anything more I'll be happy to provide it.
home-assistant_tuya_local_2024-04-26T08-09-24.277Z.log
Information about DPS mappings
Product ID
{ "result": [ { "active_time": 1712815917, "bind_space_id": "40316186", "category": "qccdz", "create_time": 1712815917, "custom_name": "", "icon": "smart/icon/bay16226250696545rLI/4aa9904ab71f8c8baf9131a4467773fb.png", "id": "bf49daa00b00f1e475sd95", "ip": "92.130.66.134", "is_online": true, "lat": "-21.2700", "local_key": "ocM{T.:u$~&q%?u.", "lon": "55.4900", "model": "", "name": "AC charging control box", "product_id": "7bvgooyjhiua1yyq", "product_name": "河南新乡", "sub": false, "time_zone": "+04:00", "update_time": 1712815920, "uuid": "d698029059e38d5c" } ], "success": true, "t": 1714118185689, "tid": "7b10e01003a211efa95c2ed630a352ef" }
Information about how the device functions
Sensors: Charging time ie 1:30 -> display the past charging time Courant ie 11,8 A -> display the current charge current in A Énergie ie 4,3 kWh -> display the energy Puissance -> ie 2,9 kW -> display the power Status ie Charging : display the status
Configuration Charging duration : here you can limit the charging time (1 - 15) hours Charging mode : here you can start or stop the charge. Possible values are:
Diagnostic Température ie 47,5 °C -> display the charger temp Tension : ie 248 V -> display the voltage
There is no other info available in the TUYA app.
I made the following file. Everything is working fine in read only, but I can not set the parameters from the "configuration" section. When I set a parameter, the value is reverted in the GUI and there is no change visible in the tuya app. The settings are read only and I don't understand why. But I never did this before so obviously I forgot something.
EDIT: this file is working fine. The problem disapeared, it was not coming from the device settnig.
name: EV charger products:
secondary_entities: