sanjoyg / dirigera_platform

HomeAssistant Integration for Dirigera Platform
MIT License
122 stars 16 forks source link

INSPELNING not providing any usage values (only ON/OFF control) #111

Open martynasggg opened 2 days ago

martynasggg commented 2 days ago

We need:

  1. currentVoltage
  2. currentAmps
  3. currentActivePower

Full log added Unconfirmed 741107.log

While debug json shows this:

{ 'id': '933ac85f-fd82-4b2c-80a6-b1370bd11e52_1', 'type': 'outlet', 'deviceType': 'outlet', 'createdAt': '2024-10-31T20:09:03.000Z', 'isReachable': True, 'lastSeen': '2024-11-19T19:11:55.000Z', 'attributes': { 'customName': 'Smart plug 6 meter', 'model': 'INSPELNING Smart plug', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.4.45', 'hardwareVersion': '1', 'serialNumber': '8C65A3FFFE10BEAE', 'productCode': 'E2206', 'isOn': True, 'startupOnOff': 'startPrevious', 'lightLevel': 41, 'startUpCurrentLevel': -1, 'currentVoltage': 229, 'currentAmps': 0.017000000923871994, 'currentActivePower': 0.30000001192092896, 'totalEnergyConsumed': 0, 'totalEnergyConsumedLastUpdated': '2024-11-19T19:11:15.000Z', 'energyConsumedAtLastReset': 0, 'timeOfLastEnergyReset': '2024-10-31T19:35:47.000Z', 'childLock': False, 'statusLight': False, 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00' }, 'capabilities': { 'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'energyConsumedAtLastReset', 'childLock', 'statusLight'] }, 'room': { 'id': 'e0dc7baf-24a1-436e-842b-4b800027cc99', 'name': 'Server', 'color': 'ikea_pink_no_4', 'icon': 'rooms_display' }, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False },

Just a gues that names or parameters NOT MATCHING, in your code you are using name with underscore, while in debug there is camelCase. Example from your script:

power_attrs=["current_amps","current_active_power","current_voltage","total_energy_consumed","energy_consumed_at_last_reset","time_of_last_energy_reset","total_energy_consumed_last_updated"] DEBUG: 'currentVoltage' YOUR SCRIPT: current_voltage DEBUG: 'currentAmps' YOUT SCRIPT: current_amps DEBUG: 'currentActivePower' YOUR SCRIPT current_active_power

martynasggg commented 16 hours ago

Fasle alarm.

Well, problem was because issue with latest update. After udpate everything started to work.

Majestic7979 commented 10 hours ago

I am having this issue. Integration version 2.6.4. I tried to redownload via HACS and restart Home Assistant but it made no difference. The Home Smart app is reporting live usage as normal.