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

invalid: obj.common.min has an invalid type! Expected "number", received "string" #36

Open
RP70DP opened this issue Mar 14, 2022 · 3 comments

Comments

@RP70DP
Copy link

RP70DP commented Mar 14, 2022

Version 1.2.6 of Alias-Manager

2022-03-14 12:05:49.093  - �[33mwarn�[39m: admin.0 (24767) Object alias.0.Haus.Obergeschoss.Wohnzimmer.Hue.Play.Links.reachable is invalid: obj.common.min has an invalid type! Expected "number", received "string"
2022-03-14 12:05:49.101  - �[33mwarn�[39m: admin.0 (24767) This object will not be created in future versions. Please report this to the developer.
2022-03-14 12:05:49.135  - �[33mwarn�[39m: admin.0 (24767) Object alias.0.Haus.Obergeschoss.Wohnzimmer.Hue.Play.Links.switch_on is invalid: obj.common.min has an invalid type! Expected "number", received "string"
2022-03-14 12:05:49.136  - �[33mwarn�[39m: admin.0 (24767) This object will not be created in future versions. Please report this to the developer.
2022-03-14 12:08:12.150  - �[33mwarn�[39m: admin.0 (24767) Object alias.0.Haus.Obergeschoss.Wohnzimmer.Hue.Play.Rechts.reachable is invalid: obj.common.min has an invalid type! Expected "number", received "string"
2022-03-14 12:08:12.151  - �[33mwarn�[39m: admin.0 (24767) This object will not be created in future versions. Please report this to the developer.
2022-03-14 12:08:12.168  - �[33mwarn�[39m: admin.0 (24767) Object alias.0.Haus.Obergeschoss.Wohnzimmer.Hue.Play.Rechts.switch_on is invalid: obj.common.min has an invalid type! Expected "number", received "string"
2022-03-14 12:08:12.169  - �[33mwarn�[39m: admin.0 (24767) This object will not be created in future versions. Please report this to the developer.

Alias:


{
  "common": {
    "alias": {
      "id": "hue.0.Philips_hue.Hue_play_2.on",
      "read": "",
      "write": ""
    },
    "name": "switch_on",
    "role": "switch.light",
    "type": "boolean",
    "unit": "",
    "min": "",
    "max": "",
    "read": true,
    "write": true
  },
  "native": {},
  "type": "state",
  "from": "system.adapter.admin.0",
  "user": "system.user.admin",
  "ts": 1647256092168,
  "_id": "alias.0.Haus.Obergeschoss.Wohnzimmer.Hue.Play.Rechts.switch_on",
  "acl": {
    "object": 1636,
    "state": 1636,
    "owner": "system.user.admin",
    "ownerGroup": "system.group.administrator"
  }
}

Data:


{
  "_id": "hue.0.Philips_hue.Hue_play_2.on",
  "type": "state",
  "common": {
    "name": "Philips hue.Hue play 2.on",
    "read": true,
    "write": true,
    "type": "boolean",
    "role": "switch.light",
    "def": false
  },
  "native": {
    "id": "20"
  },
  "from": "system.adapter.hue.0",
  "user": "system.user.admin",
  "ts": 1647248884902,
  "acl": {
    "object": 1636,
    "state": 1636,
    "owner": "system.user.admin",
    "ownerGroup": "system.group.administrator"
  }
}
@do1osc
Copy link

do1osc commented Dec 15, 2022

Hello,

Is a solution available for this problem ?

@chris299
Copy link

@sbormann I also see this issue.
looks like it is related to undefined behaviour, if the original DataPoint does not provide common.min etc., so the alias manager chooses the wrong defaults here for numbers on creating the alias. "" instead of 0

@asmitconsulting
Copy link

I also seem to have the same problem - here on an alias for an HM-IP device - the warnings are generated for too many data points:

`2023-10-29 11:10:37.465 - warn: admin.0 (2600737) Object alias.0.AZ_Wandtaster_Schrank1.DUTY_CYCLE is invalid: obj.common.min has an invalid type! Expected "number", received "string"

2023-10-29 11:10:37.465 - warn: admin.0 (2600737) This object will not be created in future versions. Please report this to the developer.
`

From HM-IP-Device

{ "type": "state", "common": { "name": "AZ_Wandtaster_Schrank1:0.DUTY_CYCLE", "role": "value", "def": false, "type": "boolean", "read": true, "write": false }, "native": { "MIN": false, "OPERATIONS": 5, "MAX": true, "FLAGS": 1, "ID": "DUTY_CYCLE", "TYPE": "BOOL", "DEFAULT": false }, "from": "system.adapter.hm-rega.1", "user": "system.user.admin", "ts": 1697651943757, "_id": "hm-rpc.5.000193C99D51C1.0.DUTY_CYCLE", "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }

Alias-Device:

{ "common": { "alias": { "id": "hm-rpc.5.000193C99D51C1.0.DUTY_CYCLE", "read": "", "write": "" }, "name": "DUTY_CYCLE", "role": "value", "type": "boolean", "unit": "", "min": "", "max": "", "read": true, "write": false }, "native": {}, "type": "state", "from": "system.adapter.admin.0", "user": "system.user.admin", "ts": 1698574237465, "_id": "alias.0.AZ_Wandtaster_Schrank1.DUTY_CYCLE", "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants