larsbeck / HomematicIp

This package allows to query the HomematicIp REST and WebSocket endpoint.
MIT License
7 stars 2 forks source link

unsupported device HOME_CONTROL_ACCESS_POINT #29

Open SaschaWeisenberger opened 3 years ago

SaschaWeisenberger commented 3 years ago

A few days ago I suddenly had an UnknownHomematicObjectException. Data see below:

 {
  "id": "3014F711A00003D709A27DC8",
  "homeId": "a4d2573e-0204-4739-9a75-b96b85171a6b",
  "label": "HOME_CONTROL_ACCESS_POINT",
  "lastStatusUpdate": 1603362056778,
  "type": "HOME_CONTROL_ACCESS_POINT",
  "functionalChannels": {
    "0": {
      "label": "",
      "deviceId": "3014F711A00003D709A27DC8",
      "index": 0,
      "groupIndex": 0,
      "functionalChannelType": "ACCESS_CONTROLLER_CHANNEL",
      "groups": [],
      "unreach": false,
      "lowBat": null,
      "routerModuleEnabled": false,
      "multicastRoutingEnabled": false,
      "routerModuleSupported": false,
      "rssiDeviceValue": null,
      "rssiPeerValue": null,
      "configPending": false,
      "dutyCycle": false,
      "deviceOverloaded": false,
      "coProUpdateFailure": false,
      "coProFaulty": false,
      "coProRestartNeeded": false,
      "deviceUndervoltage": false,
      "deviceOverheated": false,
      "temperatureOutOfRange": false,
      "devicePowerFailureDetected": false,
      "supportedOptionalFeatures": {
        "IFeatureDeviceCoProRestart": false,
        "IFeatureDeviceOverheated": false,
        "IOptionalFeatureDutyCycle": true,
        "IFeatureMulticastRouter": false,
        "IFeatureDeviceCoProUpdate": false,
        "IFeaturePowerShortCircuit": false,
        "IFeatureDevicePowerFailure": false,
        "IFeatureShortCircuitDataLine": false,
        "IFeatureRssiValue": false,
        "IFeatureBusConfigMismatch": false,
        "IFeatureDeviceUndervoltage": false,
        "IFeatureDeviceOverloaded": false,
        "IFeatureDeviceCoProError": false,
        "IFeatureDeviceIdentify": false,
        "IOptionalFeatureLowBat": false,
        "IFeatureDeviceTemperatureOutOfRange": false
      },
      "busConfigMismatch": null,
      "powerShortCircuit": null,
      "shortCircuitDataLine": null,
      "signalBrightness": 1.0,
      "accessPointPriority": 0,
      "dutyCycleLevel": 7.5,
      "carrierSenseLevel": 1.5
    }
  },
  "manufacturerCode": 1,
  "oem": "eQ-3",
  "updateState": "BACKGROUND_UPDATE_NOT_SUPPORTED",
  "firmwareVersion": "2.2.18",
  "firmwareVersionInteger": 131602,
  "connectionType": "HMIP_LAN",
  "liveUpdateState": "LIVE_UPDATE_NOT_SUPPORTED",
  "availableFirmwareVersion": "2.2.18",
  "serializedGlobalTradeItemNumber": "3014F711A00003D709A27DC8",
  "modelType": "HmIP-HAP",
  "modelId": 270,
  "permanentlyReachable": true
}
obartelt commented 3 years ago

Had the same problem. Seems that HMIP has added a new device type for the access point and an according channel. Quick fix:

DeviceType.cs: add HOME_CONTROL_ACCESS_POINT to enum FunctionalChannelType.cs: add ACCESS_CONTROLLER_CHANNEL to enum

Devices folder: add AccessPoint.cs:

namespace HomematicIp.Data.HomematicIpObjects.Devices
{
    [EnumMap(Enums.DeviceType.HOME_CONTROL_ACCESS_POINT)]
    public class AccessPoint : Device
    {

    }
}

Channels folder: add AccessControllerChannel.cs

namespace HomematicIp.Data.HomematicIpObjects.Channels
{
    [EnumMap(Enums.FunctionalChannelType.ACCESS_CONTROLLER_CHANNEL)]
    public class AccessControllerChannel : AbstractDeviceBaseChannel { }
}

That doesn't give you any functionality concerning the access point, but the JSON can be parsed again and the rest seems to be working.