rhockenbury / homebridge-ecowitt-weather-sensors

Complete HomeKit support for Ecowitt Weather Sensors with Homebridge
https://www.npmjs.com/package/homebridge-ecowitt-weather-sensors
Apache License 2.0
1 stars 0 forks source link

Problem with WH31 sensor #26

Closed LordJohnWhorfin closed 6 days ago

LordJohnWhorfin commented 1 month ago

name: WH31 sensors fail to configure about: Please add WH31 support title: 'WH31 support' labels: bug assignees: ''


Describe The Bug:

WH31 sensors fail to properly initialize

To Reproduce:

connect plugin to gateway featuring a WH31 sensor

Expected behavior:

Should work... @conquistadore/homebridge-ecowitt does work with this sensor

Logs:

her-sensors/src/EcowittPlatform.ts:134:12
    at Layer.handle [as handle_request] (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/express/lib/router/layer.js:95:5)
    at next (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/express/lib/router/route.js:149:13)
    at Route.dispatch (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/express/lib/router/route.js:119:3)
    at Layer.handle [as handle_request] (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/express/lib/router/layer.js:95:5)
    at /usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/express/lib/router/index.js:284:15
    at Function.process_params (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/express/lib/router/index.js:346:12)
    at next (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/express/lib/router/index.js:280:10)
    at /usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/body-parser/lib/read.js:137:5
    at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
    at invokeCallback (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/raw-body/index.js:238:16)
    at done (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/raw-body/index.js:227:7)
    at IncomingMessage.onEnd (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/raw-body/index.js:287:7)
[13/09/2024, 16:40:46] [Ecowitt] An issue occured while updating sensor values for WH31. Review the error message below and file a bug report if needed at https://bit.ly/3yklrWZ 
 Error: Update on 974B:WH31CH1 requires data batt1,temp1f,humidity1
    at WH31.update (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/src/devices/WH31.ts:54:13)
    at EcowittPlatform.updateAccessories (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/src/EcowittPlatform.ts:639:28)
    at EcowittPlatform.onDataReport (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/src/EcowittPlatform.ts:267:10)
    at /usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/src/EcowittPlatform.ts:134:12
    at Layer.handle [as handle_request] (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/express/lib/router/layer.js:95:5)
    at next (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/express/lib/router/route.js:149:13)
    at Route.dispatch (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/express/lib/router/route.js:119:3)
    at Layer.handle [as handle_request] (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/express/lib/router/layer.js:95:5)
    at /usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/express/lib/router/index.js:284:15
    at Function.process_params (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/express/lib/router/index.js:346:12)
    at next (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/express/lib/router/index.js:280:10)
    at /usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/body-parser/lib/read.js:137:5
    at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
    at invokeCallback (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/raw-body/index.js:238:16)
    at done (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/raw-body/index.js:227:7)
    at IncomingMessage.onEnd (/usr/local/lib/node_modules/homebridge-ecowitt-weather-sensors/node_modules/raw-body/index.js:287:7)

Data Report:

StationInfo: {
  "model": "GW1100B",
  "deviceName": "GW1100",
  "serialNumber": "C4:5B:BE:6D:97:4B",
  "shortSerial": "974B",
  "hardwareRevision": "GW1100B_V2.3.4",
  "softwareRevision": "",
  "firmwareRevision": "V2.3.4",
  "frequency": "915M",
  "PASSKEY": "19C7B89C12D820C983DDA1A38B73CADE",
  "sensors": [
    {
      "type": "GW1100"
    },
    {
      "type": "WH31",
      "channel": 1
    },
    {
      "type": "WH31",
      "channel": 2
    }
  ]
}

 {
  "PASSKEY": "19C7B89C12D820C983DDA1A38B73CADE",
  "stationtype": "GW1100B_V2.3.4",
  "runtime": "5524430",
  "heap": "25748",
  "dateutc": "2024-09-13 23:47:04",
  "tempinf": "77.90",
  "humidityin": "40",
  "baromrelin": "29.577",
  "baromabsin": "29.577",
  "temp1f": "37.58",
  "temp2f": "-2.56",
  "batt1": "0",
  "batt2": "0",
  "freq": "915M",
  "model": "GW1100B",
  "interval": "20"
}

Plugin Config:

{
    "baseStation": {
        "mac": "C4:5B:BE:6D:97:4B",
        "port": 8889,
        "path": "/data/report"
    },
    "additional": {
        "staticNames": "false",
        "validateMac": "true",
        "luxFactor": 126.7,
        "acceptAnyPath": "false",
        "validateTimestamp": "true",
        "removeStaleDevices": "true"
    },
    "units": {
        "wind": "mph",
        "rain": "in",
        "distance": "mi",
        "temperature": "fh"
    },
    "platform": "Ecowitt"
}

Screenshots:

Environment:

rhockenbury commented 1 month ago

Hi @LordJohnWhorfin. Thanks so much for trying this plugin out.

For WH31, the plugin is expecting 3 properties from the data report - tempXf, humidityX, and battX. It looks like your data report only includes tempXf, and battX. Do you happen to know why the data report with the WH31 data is not sending humidity? Is it possible that your gateway is configured to not send humidity data, or maybe older WH31s didn't report humidity? Let me know - really would like to understand it better.

It does look like I have one other sample data report that doesn't include humidity data for a WH31, so I'm thinking it would be reasonable to make the humidity data as optional.

LordJohnWhorfin commented 1 month ago

Hi, actually it looks quite confusing. I ordered two WN30BL outdoors probe thermometers from Amazon but the devices I received are marked WN37B and report as a WH31 without humidity readings… This is weird. Let me know if you want more data logs.EricOn Sep 13, 2024, at 7:10 PM, Ryler Hockenbury @.***> wrote: Hi @LordJohnWhorfin. Thanks so much for trying this plugin out. For WH31, the plugin is expecting 3 properties from the data report - tempXf, humidityX, and battX. It looks like your data report only includes tempXf, and battX. Do you happen to know why the data report with the WH31 data is not sending humidity? Is it possible that your gateway is configured to not send humidity data, or maybe older WH31s didn't report humidity? Let me know - really would like to understand it better. It does look like I have one other sample data report that doesn't include humidity data for a WH31, so I'm thinking it would be reasonable to make the humidity data as optional.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

rhockenbury commented 1 month ago

Ahh, that's super helpful. Thanks. In that case, what I think I'll do is map it to the WN30 so they'll show up for you as WN30 sensors, rather than WH31 without humidity. I should have the changes out within the next day or two.

LordJohnWhorfin commented 1 month ago

Sweet! Thanks! I’ll test it right away :-)On Sep 14, 2024, at 5:26 AM, Ryler Hockenbury @.***> wrote: Ahh, that's super helpful. Thanks. In that case, what I think I'll do is map it to the WN30 so they'll show up for you as WN30 sensors, rather than WH31 without humidity. I should have the changes out within the next day or two.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

rhockenbury commented 1 month ago

Hi @LordJohnWhorfin - Can you please give the v2.3.0-beta build a try? That should properly handle mapping your sensors to WN30. Please let me know if you hit any issues.

github-actions[bot] commented 3 weeks ago

This issue has been marked as stale because it has been open for 30 days with no activity.

github-actions[bot] commented 6 days ago

This issue was closed because it has been inactive for 14 days since being marked as stale.