Closed thncode closed 5 years ago
Did you add the custom Eve characteristic for air quality? You should emulate Eve Room (have a look at the wiki)
it's characteristic E863F10B-079E-48FF-8F27-9C2605A29F52
yes I did - this is within setUpServies:
this.fakeGatoHistoryService = new FakeGatoHistoryService("room", this, { storage: 'fs' });
var CustomCharacteristic = {};
CustomCharacteristic.AirQuality = function () {
Characteristic.call(this, 'Air Quality PM25', 'E863F10B-079E-48FF-8F27-9C2605A29F52');
this.setProps({
format: Characteristic.Formats.UINT16,
unit: "ppm",
maxValue: 99999,
minValue: 2,
minStep: 1,
perms: [Characteristic.Perms.READ, Characteristic.Perms.NOTIFY]
});
this.value = this.getDefaultValue();
};
CustomCharacteristic.AirQuality.uuid = 'E863F10B-079E-48FF-8F27-9C2605A29F52';
inherits(CustomCharacteristic.AirQuality, Characteristic);
CustomCharacteristic.EveAirQuality = function () {
Characteristic.call(this, 'Eve Air Quality', 'E863F11B-079E-48FF-8F27-9C2605A29F52');
this.setProps({
format: Characteristic.Formats.FLOAT,
unit: "ppm",
maxValue: 5000,
minValue: 0,
minStep: 1,
perms: [Characteristic.Perms.READ, Characteristic.Perms.NOTIFY]
});
this.value = this.getDefaultValue();
};
CustomCharacteristic.EveAirQuality.UUID = 'E863F11B-079E-48FF-8F27-9C2605A29F52';
inherits(CustomCharacteristic.EveAirQuality, Characteristic);
// AirQuality sensor
airQualitySensor = function (displayName, subtype) {
let uuid = UUIDGen.generate('airQualitySensor');
Service.call(this, displayName, uuid, subtype);
this.addCharacteristic(Characteristic.AirQuality);
this.addCharacteristic(CustomCharacteristic.EveAirQuality);
};
inherits(airQualitySensor, Service);
//airQualitySensor.UUID = uuid;
this.airQualityService = new Service.AirQualitySensor('Luftqualität');
this.airQualityService.getCharacteristic(Characteristic.StatusLowBattery)
.on('get', this.getStatusLowBattery.bind(this));
this.airQualityService.getCharacteristic(Characteristic.StatusActive)
.on('get', this.getStatusActive.bind(this));
this.airQualityService
.setCharacteristic(Characteristic.AirParticulateSize, '2.5um');
this.airQualityService.getCharacteristic(Characteristic.AirQuality)
.on('get', this.getAirQuality.bind(this));
this.airQualityService.getCharacteristic(CustomCharacteristic.EveAirQuality)
.on('get', this.getEveAirQuality.bind(this));
this.airQualityService.getCharacteristic(Characteristic.PM2_5Density)
.on('get', this.getPM2_5Density.bind(this));
this.airQualityService.getCharacteristic(Characteristic.PM10Density)
.on('get', this.getPM10Density.bind(this));
did you try adding all 3 services to the accessory (temperature, humidity, airquality)? Also, add the E863F132-079E-48FF-8F27-9C2605A29F52 characteristic to the airquality service. The idea is to replicate as much as possible the Eve structure.
Check your UUID: EveQualityPPM is E863F10B, but you are adding to your accessory E863F11B
Try opening this with HomekitAccessorySimulator and copy the structure.
I am one big step further: I am getting a history but no graphics. All history entries do say "UNKNOWN (xx ppm) - where is the quality assignment to measurement readings coming from???
Try to remove the history from Eve deleting all the entries for temp, hum, and ppm. Can you post an image of what you see in the history?
Have you tried with some higher value? A real Eve room upon reset starts from 450ppm, and it's already Excellent. Maybe 450 is the floor.
yes you are right. I mixed up ug/m3 (which my device is measuring) with PPM - my only problem now (and this is not fakegato related) is that I cannot find a conversion for those units...
I don't know if there is direct conversion. Eve Room measures VOC (this is the sensor https://ams.com/documents/20143/36005/AS-MLV-P2_FS000137_2-00.pdf), and they are only expressed in ppm, while from what I see you are measuring particulate.
Is it ok now? can I close the issue?
THX - works now!
I am trying hard to add air quality (ppm) history with fakegato - but no luck yet. the accessory always reports "not data". is there anywhere a good example or where can I find the specific conditions for this? contactSensor and temp/humidity works for me, but not air quality. PLEASE HELP!