iklein99 / homebridge-smartthings

This is a plugin to Homebridge to connect your Smartthings network into Apple Home Kit.
Apache License 2.0
150 stars 52 forks source link

Support for Air Purifier #111

Closed Aekung closed 1 year ago

Aekung commented 1 year ago

Is there any possibility that you might want to add support for the Samsung Air Purifier? Currently, the air purifier is exposed as a switch in Homekit instead of its own accessory type. Because of this, it doesn't offer much of the functionality except on and off, which is kinda defeat the purpose of it being a smart device.

Do you think it's possible that you might consider adding support for the Air Purifier type of accessory? I would be happy to help you on the testing if you would like to.

Thank you in advance.

iklein99 commented 1 year ago

I’ll take a look at it.

iklein99 commented 1 year ago

I need to see the capabilities reported by the device. Please do the following:

  1. Truncate your logs
  2. Set debug mode on (settings)
  3. Restart homebridge
  4. After about 30 seconds, download the log file
  5. Reset debug mode
  6. Restart homebridge
  7. Send the log file to me at iklein99@comcast.net
Aekung commented 1 year ago

I need to see the capabilities reported by the device. Please do the following:

  1. Truncate your logs
  2. Set debug mode on (settings)
  3. Restart homebridge
  4. After about 30 seconds, download the log file
  5. Reset debug mode
  6. Restart homebridge
  7. Send the log file to me at iklein99@comcast.net

Thanks for the fast reply.

I have almost 40 plugins in my homebridge server so I think the log will be spammed in no time. I think it should be better and easier to cut just the part of plugin log and post it here for you. Please kindly find it down below;

[12/28/2022, 11:34:22 AM] [Smartthings Plug (IK)] Updated status for Air Purifier: {"samsungce.deviceIdentification":{"micomAssayCode":{"value":null},"modelName":{"value":null},"serialNumber":{"value":null},"serialNumberExtra":{"value":null},"modelClassificationCode":{"value":null},"description":{"value":null},"binaryId":{"value":"AVT-WW-TP1-22-TOUCHOTN","timestamp":"2022-12-27T18:39:14.802Z"}},"airQualitySensor":{"airQuality":{"value":null}},"switch":{"switch":{"value":"on","timestamp":"2022-12-27T03:20:42.618Z"}},"fineDustHealthConcern":{"fineDustHealthConcern":{"value":null}},"ocf":{"st":{"value":null},"mndt":{"value":null},"mnfv":{"value":"AVT-WW-TP1-22-TOUCHOTN_12220626","timestamp":"2022-12-26T12:55:09.342Z"},"mnhw":{"value":"Realtek","timestamp":"2022-12-26T12:48:45.083Z"},"di":{"value":"0f59a42b-d65a-d1c1-8fd5-f45e701c9688","timestamp":"2022-12-26T12:48:45.083Z"},"mnsl":{"value":"http://www.samsung.com","timestamp":"2022-12-26T12:48:45.083Z"},"dmv":{"value":"1.2.1","timestamp":"2022-12-26T12:55:09.342Z"},"n":{"value":"[air purifier] Samsung","timestamp":"2022-12-26T12:48:45.083Z"},"mnmo":{"value":"AVT-WW-TP1-22-TOUCHOTN|10241841|70000629001610000D000800000A0000","timestamp":"2022-12-26T12:48:45.083Z"},"vid":{"value":"DA-AC-AIR-01011","timestamp":"2022-12-26T12:48:45.083Z"},"mnmn":{"value":"Samsung Electronics","timestamp":"2022-12-26T12:48:45.083Z"},"mnml":{"value":"http://www.samsung.com","timestamp":"2022-12-26T12:48:45.083Z"},"mnpv":{"value":"DAWIT 2.0","timestamp":"2022-12-26T12:48:45.083Z"},"mnos":{"value":"TizenRT 3.1","timestamp":"2022-12-26T12:48:45.083Z"},"pi":{"value":"0f59a42b-d65a-d1c1-8fd5-f45e701c9688","timestamp":"2022-12-26T12:48:45.083Z"},"icv":{"value":"core.1.1.0","timestamp":"2022-12-26T12:48:45.083Z"}},"airConditionerFanMode":{"fanMode":{"value":"auto","timestamp":"2022-12-28T01:14:15.073Z"},"supportedAcFanModes":{"value":["auto","low","medium","high","sleep"],"timestamp":"2022-12-26T12:48:44.618Z"}},"veryFineDustHealthConcern":{"veryFineDustHealthConcern":{"value":null}},"custom.disabledCapabilities":{"disabledCapabilities":{"value":["demandResponseLoadControl","airQualitySensor","odorSensor","dustSensor","dustHealthConcern","fineDustHealthConcern","veryFineDustSensor","veryFineDustHealthConcern","custom.virusDoctorMode","custom.welcomeCareMode","custom.periodicSensing","custom.doNotDisturbMode"],"timestamp":"2022-12-26T12:55:12.225Z"}},"samsungce.driverVersion":{"versionNumber":{"value":22100101,"timestamp":"2022-12-26T12:48:43.077Z"}},"sec.diagnosticsInformation":{"logType":{"value":["errCode","dump"],"timestamp":"2022-12-26T12:55:12.225Z"},"endpoint":{"value":"SSM","timestamp":"2022-12-26T12:55:12.225Z"},"minVersion":{"value":"1.0","timestamp":"2022-12-26T12:55:12.225Z"},"signinPermission":{"value":null},"setupId":{"value":"AP1","timestamp":"2022-12-26T12:55:12.225Z"},"protocolType":{"value":"wifi_https","timestamp":"2022-12-26T12:55:12.225Z"},"mnId":{"value":"0AJT","timestamp":"2022-12-26T12:55:12.225Z"},"dumpType":{"value":"file","timestamp":"2022-12-26T12:55:12.225Z"}},"custom.hepaFilter":{"hepaFilterCapacity":{"value":8760,"unit":"Hour","timestamp":"2022-12-26T12:48:43.254Z"},"hepaFilterStatus":{"value":"normal","timestamp":"2022-12-26T12:48:43.254Z"},"hepaFilterResetType":{"value":["replaceable"],"timestamp":"2022-12-26T12:48:43.254Z"},"hepaFilterUsageStep":{"value":1,"timestamp":"2022-12-26T12:48:43.254Z"},"hepaFilterUsage":{"value":1,"timestamp":"2022-12-27T08:21:35.540Z"},"hepaFilterLastResetDate":{"value":null}},"dustSensor":{"dustLevel":{"value":null},"fineDustLevel":{"value":null}},"custom.deviceReportStateConfiguration":{"reportStateRealtimePeriod":{"value":"disabled","timestamp":"2022-12-26T12:48:43.845Z"},"reportStateRealtime":{"value":{"state":"disabled"},"timestamp":"2022-12-26T18:39:14.660Z"},"reportStatePeriod":{"value":"enabled","timestamp":"2022-12-26T12:48:43.845Z"}},"custom.periodicSensing":{"automaticExecutionSetting":{"value":null},"automaticExecutionMode":{"value":null},"supportedAutomaticExecutionSetting":{"value":null},"supportedAutomaticExecutionMode":{"value":["Off","Airpurify","Alarm"],"timestamp":"2022-12-26T12:48:43.938Z"},"periodicSensing":{"value":null},"periodicSensingInterval":{"value":600,"timestamp":"2022-12-26T12:48:43.938Z"},"lastSensingTime":{"value":"1672202045","unit":"second","timestamp":"2022-12-28T04:34:07.626Z"},"lastSensingLevel":{"value":"Kr3","timestamp":"2022-12-28T04:34:07.626Z"},"periodicSensingStatus":{"value":"nonprocessing","timestamp":"2022-12-27T03:20:45.304Z"}},"custom.virusDoctorMode":{"virusDoctorMode":{"value":null}},"dustHealthConcern":{"dustHealthConcern":{"value":null}},"custom.lowerDevicePower":{"powerState":{"value":null}},"demandResponseLoadControl":{"drlcStatus":{"value":null}},"powerConsumptionReport":{"powerConsumption":{"value":{"energy":1368,"deltaEnergy":3,"power":0,"powerEnergy":0,"persistedEnergy":0,"energySaved":0,"start":"2022-12-28T04:15:44Z","end":"2022-12-28T04:30:24Z"},"timestamp":"2022-12-28T04:30:24.573Z"}},"refresh":{},"execute":{"data":{"value":{"payload":{"rt":["oic.r.energy.consumption"],"if":["oic.if.baseline","oic.if.a"]}},"data":{"href":"/energy/consumption/0"},"timestamp":"2022-12-28T01:23:03.089Z"}},"odorSensor":{"odorLevel":{"value":null}},"custom.deviceDependencyStatus":{"subDeviceActive":{"value":true,"timestamp":"2022-12-26T12:48:43.077Z"},"dependencyStatus":{"value":"single","timestamp":"2022-12-26T12:48:43.077Z"},"numberOfSubDevices":{"value":0,"timestamp":"2022-12-26T12:48:44.135Z"}},"custom.energyType":{"energySavingSupport":{"value":false,"timestamp":"2022-12-26T12:48:44.618Z"},"drMaxDuration":{"value":null},"energyType":{"value":"2.0","timestamp":"2022-12-26T12:48:43.077Z"},"energySavingLevel":{"value":null},"supportedEnergySavingLevels":{"value":null},"energySavingOperation":{"value":null},"energySavingOperationSupport":{"value":null}},"samsungce.softwareUpdate":{"otnDUID":{"value":"EXCGCEMPQIVTC","timestamp":"2022-12-26T12:48:44.025Z"},"availableModules":{"value":[],"timestamp":"2022-12-26T12:48:44.025Z"},"newVersionAvailable":{"value":false,"timestamp":"2022-12-26T12:48:44.025Z"}},"custom.welcomeCareMode":{"welcomeCareMode":{"value":null}},"veryFineDustSensor":{"veryFineDustLevel":{"value":null}},"custom.doNotDisturbMode":{"doNotDisturb":{"value":"off","timestamp":"2022-12-26T12:48:43.938Z"},"startTime":{"value":"0000","timestamp":"2022-12-26T12:48:43.938Z"},"endTime":{"value":"0000","timestamp":"2022-12-26T12:48:43.938Z"}},"custom.airQualityMaxLevel":{"airQualityMaxLevel":{"value":4,"timestamp":"2022-12-26T12:48:43.393Z"}}} [12/28/2022, 11:34:22 AM] [Smartthings Plug (IK)] Switch value from Air Purifier: on [12/28/2022, 11:34:22 AM] [Smartthings Plug (IK)] Air Purifier value updated.

Please let me know if you still need any further information.

iklein99 commented 1 year ago

There are a number of capabilities reported by the device, but the only 2 that have a valid return value are switch (which is supported already) and 'airConditionerFanMode'. The other capabilities such as dustSensor, airQualitySensor, etc., are all reporting 'null' which is not valid.

How does this device show up in the smartthings app?

iklein99 commented 1 year ago

No activity. Closing