Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error setting serial number in logs #18

Closed
apexskier opened this issue Dec 14, 2023 · 4 comments
Closed

Error setting serial number in logs #18

apexskier opened this issue Dec 14, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@apexskier
Copy link

Describe The Bug:
Plugin still works, but there's an error in the logs

To Reproduce:
Just happens on startup

Expected behavior:
No error in logs

Logs:

[14/12/2023, 10:53:23] [homebridge-weatherflow-tempest] This plugin generated a warning from the characteristic 'Serial Number': [Serial Number] characteristic must have a length of more than 1 character otherwise         HomeKit will reject this accessory, ignoring new value. See https://homebridge.io/w/JtMGR for more info.
[14/12/2023, 10:53:23] [homebridge-weatherflow-tempest] Error: 
    at SerialNumber.Characteristic.characteristicWarning (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:3011:105)
    at SerialNumber.Characteristic.validateUserInput (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2963:14)
    at SerialNumber.Characteristic.setValue (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2229:20)
    at AccessoryInformation.Service.setCharacteristic (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:758:35)
    at new WeatherFlowTempestPlatformAccessory (/var/lib/homebridge/node_modules/homebridge-weatherflow-tempest/src/platformAccessory.ts:642:8)
    at WeatherFlowTempestPlatform.initAccessory (/var/lib/homebridge/node_modules/homebridge-weatherflow-tempest/src/platform.ts:351:9)
    at WeatherFlowTempestPlatform.discoverDevices (/var/lib/homebridge/node_modules/homebridge-weatherflow-tempest/src/platform.ts:297:14)
    at WeatherFlowTempestPlatform.initializeBySocket (/var/lib/homebridge/node_modules/homebridge-weatherflow-tempest/src/platform.ts:114:12)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Plugin Config:

{
  "name": "Tempest",
  "local_api": true,
  "token": "<Your API Token>",
  "station_id": 0,
  "interval": 10,
  "units": "Standard",
  "sensors": [
    {
      "name": "Air Temperature",
      "sensor_type": "Temperature Sensor",
      "temperature_properties": {
        "value_key": "air_temperature"
      }
    },
    {
      "name": "Humidity",
      "sensor_type": "Humidity Sensor",
      "humidity_properties": {
        "value_key": "relative_humidity"
      }
    },
    {
      "name": "Brightness",
      "sensor_type": "Light Sensor",
      "light_properties": {
        "value_key": "brightness"
      }
    },
    {
      "name": "Feels Like",
      "sensor_type": "Temperature Sensor",
      "temperature_properties": {
        "value_key": "feels_like"
      }
    },
    {
      "name": "Wind Gust",
      "sensor_type": "Motion Sensor",
      "motion_properties": {
        "value_key": "wind_gust",
        "trigger_value": 3
      }
    },
    {
      "name": "Rain",
      "sensor_type": "Occupancy Sensor",
      "occupancy_properties": {
        "value_key": "precip",
        "trigger_value": 0
      }
    }
  ],
  "_bridge": {
    "username": "0E:C9:A9:4B:4B:4B",
    "port": 42489
  },
  "platform": "WeatherFlowTempest"
}

Environment:

  • Plugin Version: v4.0.0
  • Homebridge Version: 1.7.0
  • Node.js Version: v20.9.0
  • NPM Version: 10.1.0
  • Operating System: Raspbian
@apexskier apexskier added the bug Something isn't working label Dec 14, 2023
@DMBlakeley
Copy link
Collaborator

DMBlakeley commented Dec 14, 2023

Nice catch!

If you edit the Plugin Config and change "station_id": 0, to "station_id": 12345, the error will go away.

Will need to update the plugin to check for a 0 entry which is the case when you install the plugin and directly use local mode.

@chasenicholl
Copy link
Owner

Great catch, thank you. I'll work on a patch release soon.

@DMBlakeley
Copy link
Collaborator

@chasenicholl, I submitted a 4.0.1 pull request to address this issue.

@chasenicholl
Copy link
Owner

@apexskier thanks for the bug ticket. This has been addressed by @DMBlakeley in a just published patch release v4.0.1

Thank you everyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants