dahlb / ha_blueair

Home Assistant Integration for Blueair Class Filters
MIT License
35 stars 9 forks source link

Support for 211i? #145

Open jef-pearlman opened 1 day ago

jef-pearlman commented 1 day ago

Would it be possible to add support for the 211i? The integration currently recognizes the device, but some sensors don't work (in part because they don't exist on this device) and others don't match the device (e.g., pm1/10/25 all read the same value, which does not match the device's display or app).

I turned on debug logging and am happy to provide the log, though I wasn't sure what stuff was sensitive (API keys, etc.). Below is the pair of HTTP responses that seemed most relevant with the obvious pieces redacted. Please let me know if what else would be helpful, and no problem if you can't add this in. Thanks for all your work on this!

2024-12-01 11:29:13.628 DEBUG (MainThread) [blueair_api.util_http] response json: {'appConfig': {}, 'identityconfig': {}, 'deviceInfo': [{'id': '[ID REDACTED]', 'configuration': {'df': {'a': 877, 'ot': 'B4Filter', 'fsfc': 12000000, 'alg': 'FilterAlg1'}, 'di': {'cfv': '1.1.7', 'cma': 'cc:7b:5c:ea:6c:d0', 'mt': '4', 'name': 'Guest bedroom ', 'sku': '110059', 'mfv': '1.1.7', 'ofv': '1.1.7', 'hw': 'nb_h_1.0', 'ds': '[DS REDACTED]'}, '_ot': 'CmConfig', '_f': False, '_it': 'urn:blueair:openapi:version:blue:0.0.5', '_eid': '[_EID REDACTED]', '_sc': 'Instance', 'ds': {'fu0': {'tf': 'senml+json', 'ot': 'FU', 'e': True, 'i': 0, 'tn': 'd/[ID REDACTED]/s/fu0', 'ttl': -1, 'n': 'fu0', 'fe': True}, 'rssi': {'tf': 'senml+json', 'ot': 'RSSI', 'e': False, 'i': 60000, 'tn': 'd/[ID REDACTED]/s/rssi', 'ttl': 600, 'n': 'rssi', 'fe': True}, 'ledb': {'tf': 'senml+json', 'ot': 'Led', 'e': True, 'i': 0, 'tn': 'd/[ID REDACTED]/s/ledb', 'ttl': -1, 'n': 'ledb', 'fe': True}, 'chl': {'tf': 'senml+json', 'ot': 'ChildLock', 'e': True, 'i': 0, 'tn': 'd/[ID REDACTED]/s/chl', 'ttl': -1, 'n': 'chl', 'fe': True}, 'pm10': {'tf': 'senml+json', 'ot': 'PM10', 'e': True, 'i': 0, 'tn': 'd/[ID REDACTED]/s/pm10', 'ttl': 0, 'n': 'pm10', 'fe': True}, 'is': {'tf': 'senml+json', 'ot': 'IonizerState', 'e': True, 'i': 0, 'tn': 'd/[ID REDACTED]/s/is', 'ttl': -1, 'n': 'is', 'fe': True}, 'am': {'tf': 'senml+json', 'ot': 'AutoMode', 'e': True, 'i': 0, 'tn': 'd/[ID REDACTED]/s/am', 'ttl': -1, 'n': 'am', 'fe': True}, 'sb': {'tf': 'senml+json', 'ot': 'Standby', 'e': True, 'i': 0, 'tn': 'd/[ID REDACTED]/s/sb', 'ttl': -1, 'n': 'sb', 'fe': True}, 'rt5m': {'tf': 'senml+json', 'ot': 'RT5m', 'e': False, 'i': 300000, 'tn': 'd/[ID REDACTED]/s/5m', 'sn': ['pm2_5', 'fsp0', 'rssi', 'pm1', 'pm10'], 'ttl': 1200, 'n': 'rt5m', 'fe': True}, 'rt1s': {'tf': 'senml+json', 'ot': 'RT1s', 'e': False, 'i': 1000, 'tn': 'd/[ID REDACTED]/s/1s', 'sn': ['pm2_5', 'fsp0', 'rssi', 'pm1', 'pm10'], 'ttl': 0, 'n': 'rt1s', 'fe': True}, 'rt5s': {'tf': 'senml+json', 'ot': 'RT5s', 'e': False, 'i': 5000, 'tn': 'd/[ID REDACTED]/s/5s', 'sn': ['pm2_5', 'fsp0', 'rssi', 'pm1', 'pm10'], 'ttl': 1200, 'n': 'rt5s', 'fe': True}, 'pm1': {'tf': 'senml+json', 'ot': 'PM1', 'e': True, 'i': 0, 'tn': 'd/[ID REDACTED]/s/pm1', 'ttl': 0, 'n': 'pm1', 'fe': True}, 'pm2_5': {'tf': 'senml+json', 'ot': 'PM2_5', 'e': False, 'i': 60000, 'tn': 'd/[ID REDACTED]/s/pm2_5', 'ttl': 1200, 'n': 'pm2_5', 'fe': True}, 'b5m': {'tf': 'senml+json', 'th': ['5kb', '4h'], 'ot': 'Batch5m', 'e': True, 'i': 300000, 'tn': '$aws/rules/telemetry_ingest_rule/d/[ID REDACTED]/s/batch/b5m', 'sn': ['pm2_5', 'fsp0', 'rssi', 'pm1', 'pm10'], 'ttl': -1, 'n': 'b5m', 'fe': True}, 'sp': {'tf': 'senml+json', 'ot': 'SensorBoxPresense', 'e': True, 'i': 0, 'tn': 'd/[ID REDACTED]/s/sp', 'ttl': -1, 'n': 'sp', 'fe': True}, 'fsp0': {'st': 'fsp0', 'tf': 'senml+json', 't': 10, 'ot': 'Fanspeed', 'e': True, 'i': 0, 'tn': 'd/[ID REDACTED]/s/fsp0', 'sn': ['fsp0'], 'ttl': -1, 'n': 'fsp0', 'fe': True}, 'nm': {'tf': 'senml+json', 'ot': 'NightMode', 'e': True, 'i': 0, 'tn': 'd/[ID REDACTED]/s/nm', 'ttl': -1, 'n': 'nm', 'fe': True}}, '_r': 'us-east-2', '_s': {'sig': '[SIG REDACTED]', 'salg': 'SHA256'}, '_t': 'Diff', '_v': 1730068331, '_cas': 1722915498, '_id': '[ID REDACTED]', 'fc': {'pwd': '[PWD REDACTED]', 'ssid': 'BAFactory', 'url': ' '}, 'da': {'reboot': {'p': True, 'a': False, 'ot': 'Reboot', 'e': True, 'tn': 'd/[ID REDACTED]/a/reboot', 'n': 'reboot', 'fe': True}, 'uitest': {'p': False, 'a': 'off', 'ot': 'UiTest', 'e': True, 'tn': 'd/[ID REDACTED]/a/uitest', 'n': 'uitest', 'fe': True}, 'ledb': {'p': True, 'a': 100, 'tf': 'senml+json', 'ot': 'LedBrightness', 'e': True, 'tn': 'd/[ID REDACTED]/a/ledb', 'n': 'ledb', 'fe': True}, 'chl': {'p': True, 'a': False, 'tf': 'senml+json', 'ot': 'ChildLock', 'e': True, 'tn': 'd/[ID REDACTED]/a/chl', 'n': 'chl', 'fe': True}, 'sflu': {'p': False, 'a': False, 'ot': 'SensorFlush', 'e': True, 'tn': 'd/[ID REDACTED]/a/sflu', 'n': 'sflu', 'fe': True}, 'buttontest': {'p': False, 'a': False, 'ot': 'ButtonTest', 'e': True, 'tn': 'd/[ID REDACTED]/a/buttontest', 'n': 'buttontest', 'fe': True}, 'is': {'p': False, 'a': False, 'tf': 'senml+json', 'ot': 'IonizerState', 'e': True, 'tn': 'd/[ID REDACTED]/a/is', 'n': 'is', 'fe': True}, 'am': {'p': True, 'a': False, 'tf': 'senml+json', 'ot': 'AutoMode', 'e': True, 'tn': 'd/[ID REDACTED]/a/am', 'n': 'am', 'fe': True}, 'fsp0': {'p': True, 'st': 'fsp0', 'a': 11, 'tf': 'senml+json', 'ot': 'Fanspeed', 'e': True, 'tn': 'd/[ID REDACTED]/a/fsp0', 'n': 'fsp0', 'fe': True}, 'sb': {'p': True, 'a': False, 'tf': 'senml+json', 'sbt': 'sensor_on', 'ot': 'Standby', 'e': True, 'tn': 'd/[ID REDACTED]/a/sb', 'n': 'sb', 'fe': True}, 'nm': {'p': True, 'maxfsp': 23, 'a': False, 'tf': 'senml+json', 'ot': 'NightMode', 'ledb': 12, 'e': True, 'tn': 'd/[ID REDACTED]/a/nm', 'n': 'nm', 'fe': True}}, 'dc': {'cfv': {'d': 'di.cfv', 't': 'integer', 'v': 0, 'n': 'cfv'}, 'filterusage': {'s': 'fu0', 't': 'integer', 'v': 0, 'n': 'filterusage'}, 'brightness': {'a': 'ledb', 's': 'ledb', 't': 'integer', 'v': 100, 'n': 'brightness'}, 'standby': {'a': 'sb', 's': 'sb', 't': 'boolean', 'v': False, 'n': 'standby'}, 'fanspeed': {'a': 'fsp0', 's': 'fsp0', 't': 'integer', 'v': 11, 'n': 'fanspeed'}, 'nightmode': {'a': 'nm', 's': 'nm', 't': 'boolean', 'v': False, 'n': 'nightmode'}, 'childlock': {'a': 'chl', 's': 'chl', 't': 'boolean', 'v': False, 'n': 'childlock'}, 'mfv': {'d': 'di.mfv', 't': 'integer', 'v': 0, 'n': 'mfv'}, 'ofv': {'d': 'di.ofv', 't': 'integer', 'v': 0, 'n': 'ofv'}, 'automode': {'a': 'am', 's': 'am', 't': 'boolean', 'v': False, 'n': 'automode'}}}, 'alarms': [], 'events': [], 'sensordata': [{'v': '0', 'n': 'pm2_5', 't': 1733068936}, {'v': '11', 'n': 'fsp0', 't': 1733068936}, {'v': '-42', 'n': 'rssi', 't': 1733068936}, {'v': '0', 'n': 'pm1', 't': 1733068936}, {'v': '0', 'n': 'pm10', 't': 1733068936}], 'states': [{'n': 'cfv', 'v': 16777479, 't': 1730513808}, {'n': 'filterusage', 'v': 13, 't': 1733057170}, {'n': 'brightness', 'v': 100, 't': 1733070689}, {'n': 'standby', 'vb': False, 't': 1732119710}, {'n': 'nightmode', 'vb': False, 't': 1732120266}, {'n': 'childlock', 'vb': False, 't': 1730513808}, {'n': 'mfv', 'v': 16777479, 't': 1730513808}, {'n': 'ofv', 'v': 16777479, 't': 1730513808}, {'n': 'automode', 'vb': True, 't': 1732638671}, {'n': 'fanspeed', 'v': 11, 't': 1732638671}, {'t': 1732638671, 'vb': True, 'n': 'online'}], 'welcomehome': {'setting': []}, 'fleet_info': [], 'location_id': '', 'timezone': 'America/Los_Angeles'}]} ... 2024-12-01 11:29:13.629 DEBUG (MainThread) [blueair_api.device_aws] refreshed blueair device aws: {'uuid': '[UUID REDACTED]', 'name': 'Guest bedroom ', 'type_name': 'NB', 'sku': '11 0059', 'name_api': '[NAME_API REDACTED]', 'mac': '[MAC REDACTED}', 'firmware': '1.1.7', 'mcu_firmware': '1.1.7', 'serial_number': '[SERIAL_NUMBER REDACTED]', 'brightness': 100, 'chil d_lock': False, 'fan_speed': 11, 'fan_auto_mode': True, 'running': True, 'night_mode': False, 'germ_shield': None, 'pm1': 0, 'pm2_5': 0, 'pm10': 0, 'tVOC': None, 'temperature': None, 'humidity': None, ' filter_usage': 13, 'wick_usage': None, 'wick_dry_mode': None, 'auto_regulated_humidity': None, 'water_shortage': None}

jef-pearlman commented 1 day ago

And in case it's helpful, here's a screenshot of the device in HA and a link to the device page. image