chasenicholl / homebridge-weatherflow-tempest

WeatherFlow Tempest Homebridge Plugin
Apache License 2.0
15 stars 2 forks source link

Need help making new version work #10

Closed LauraBelle13 closed 1 year ago

LauraBelle13 commented 1 year ago

Describe Your Problem: Received the errors shown in the logs below and the accessory doesn’t work. I have deleted the previous version and reinstalled the new version, but it still doesn’t work.

Logs:


[5/20/2023, 12:20:04 PM] [WeatherFlow Tempest Platform] Adding new accessory: undefined
[5/20/2023, 12:20:04 PM] [WeatherFlow Tempest Platform] AssertionError [ERR_ASSERTION]: Accessories must be created with a non-empty displayName.
at new Accessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:491:11)
at new PlatformAccessory (/usr/local/lib/node_modules/homebridge/src/platformAccessory.ts:71:9)
at WeatherFlowTempestPlatform.initAccessory (/usr/local/lib/node_modules/homebridge-weatherflow-tempest/src/platform.ts:266:25)
at WeatherFlowTempestPlatform.discoverDevices (/usr/local/lib/node_modules/homebridge-weatherflow-tempest/src/platform.ts:210:14)
at /usr/local/lib/node_modules/homebridge-weatherflow-tempest/src/platform.ts:95:16
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
generatedMessage: false,
code: ‘ERR_ASSERTION’,
actual: undefined,
expected: true,
operator: ‘==’
}

Plugin Config:


{
“name”: “WeatherFlow Tempest Platform”,
“token”: “hidden”,
“station_id”: hidden,
“interval”: 10,
“units”: “Standard”,
“sensors”: [
{
“sensor_type”: “Temperature Sensor”,
“temperature_properties”: {
“value_key”: “air_temperature”
}
},
{
“sensor_type”: “Humidity Sensor”,
“humidity_properties”: {
“value_key”: “relative_humidity”
}
}
],
“platform”: “WeatherFlowTempest”
}

Screenshots:

Environment:

DMBlakeley commented 1 year ago

@LauraBelle13, thanks for reaching out.

After deleting the previous version did you restart Homebridge before adding the new version? This is necessary to clear out the accessory cache in Homebridge. After selection could you also check the startup logs to make sure there are no entries starting with [WeatherFlow Tempest Platform]. If you do find [WeatherFlow Tempest Platform] entries could you restart a second time before adding the new version.

v3.0.0 has a different cache format as well as a different config.json format. Please let us know if this corrects your problem and if so, an additional instruction will be added to the README instructions.

LauraBelle13 commented 1 year ago

It didn't work. When I uninstall the plugin, home bridge says it's saving my config even though the uninstall popup says to remove the config. Do you know where it saves it on MacOS, so I can go remove it just in case that's causing a problem. I also have gone back a version to make sure I have that one working. It's working.

LauraBelle13 commented 1 year ago

I found where it stores the saved config files and I don't think that's the issue. I also looked at the cache and I don't see anything about Weather Flow in it. I tried installing the new version again and it still doesn't work.

DMBlakeley commented 1 year ago

Thanks for the additional details. Let me do some more investigation on my end and will get back later today. Must have missed something in the upgrade process. I also have homebridge running on a Mac.

DMBlakeley commented 1 year ago

The problem is that sensor name field is not included in the plugin's config file. Determined that there is an error in the config.schema.json file which I need to correct and submit to the owner of the repository. Apologies on my part.

In the meantime until the correction is posted, you can update your config file manually to add the "name" entries for each sensor as shown below in bold text to correct the issue your are experiencing.

{ “name”: “WeatherFlow Tempest Platform”, “token”: “hidden”, “station_id”: hidden, “interval”: 10, “units”: “Standard”, “sensors”: [ { "name": "Air Temperature", “sensor_type”: “Temperature Sensor”, “temperature_properties”: { “value_key”: “air_temperature” } }, { "name": "Relative Humidity", “sensor_type”: “Humidity Sensor”, “humidity_properties”: { “value_key”: “relative_humidity” } } ], “platform”: “WeatherFlowTempest” }

LauraBelle13 commented 1 year ago

Thanks for looking into this. I wondered about the name since the previous config file had a name.

LauraBelle13 commented 1 year ago

It appears to be working, so thanks again for your help.