andrasU / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1 stars 0 forks source link

Free@home flex motion detectors: access to motion detection channels? #12

Closed LtLuckySau closed 1 year ago

LtLuckySau commented 1 year ago

Hi,

first off: the binding works very well with all my standard free@home switches, temperature controllers and scenes/actions. A big thank you for your awesome work on that!

One of two things i discovered so far that are not working: My newly installed free@home flex actuator combined with a motion detector is recognized in openhab via the binding. It comes with only one channel however, the switch actuator on/off. It would be great if there would be channels for the motion detection and switch channels also. Is that possible?

(This is also connected with my other issue concerning flex components, see: https://github.com/andrasU/openhab-addons/issues/13 )

andrasU commented 1 year ago

Hi @LtLuckySau

Could you send me the swagger JSON output of this device. I would like to have the info about the pairing IDs for the implementation.

Thank you

LtLuckySau commented 1 year ago

Hi @andrasU

Same as with the other issue: Forgive me, i am fairly new to openhab, so i had to research and take a guess on what you want me to do. I used the API explorer to get the thing via UID and received this output:

{
  "channels": [
    {
      "linkedItems": [],
      "uid": "freeathomesystem:free-at-home-device:0b53561ae6:ABB7030715E5:ch000e_switch_on_off",
      "id": "ch000e_switch_on_off",
      "channelTypeUID": "freeathomesystem:PID_VALUETYPE_BOOLEAN_channeltype",
      "itemType": "Switch",
      "kind": "STATE",
      "label": "Flur EG - Switch actuator - Switch On/Off",
      "description": "Binary Switch value",
      "defaultTags": [],
      "properties": {
        "output": "odp0000",
        "input": "idp0000"
      },
      "configuration": {}
    }
  ],
  "statusInfo": {
    "status": "ONLINE",
    "statusDetail": "NONE"
  },
  "editable": true,
  "label": "Bewegungsmelder/Schaltaktor 1-fach Flur EG",
  "bridgeUID": "freeathomesystem:bridge:0b53561ae6",
  "configuration": {},
  "properties": {
    "interface": "wireless",
    "modelId": "free@home Device",
    "deviceId": "ABB7030715E5",
    "vendor": "Busch&Jaeger - ABB"
  },
  "UID": "freeathomesystem:free-at-home-device:0b53561ae6:ABB7030715E5",
  "thingTypeUID": "freeathomesystem:free-at-home-device"
}

I hope this is what you are looking for. If not, i would be thankful for more instructions. Sorry for my ignorance.

Thank you for looking into this!

andrasU commented 1 year ago

Hi @LtLuckySau

I would need the swagger outpu from the free@home SysAp

sorry that I was not correct But I can add the new channel if you send me the SysAp output. I do not want to make it blind

LtLuckySau commented 1 year ago

Hi @andrasU

ah yes, that makes sense. Sorry for my ignorance. Slowly i am learning :)

Here is the swagger output from the free@home SysAp for the flex actuator and the motion detector:

"devices": {
      "ABB7030715E5": {
        "floor": "01",
        "room": "07",
        "interface": "RF",
        "displayName": "Bewegungsmelder/Schaltaktor 1-fach Flur EG",
        "unresponsive": false,
        "channels": {
          "ch0001": {
            "displayName": "Bewegungsmelder/Schaltaktor 1-fach Flur EG",
            "functionID": "1090",
            "inputs": {
              "idp0000": {
                "pairingID": 256,
                "value": "0"
              },
              "idp0001": {
                "pairingID": 257,
                "value": "0"
              },
              "idp0002": {
                "pairingID": 357,
                "value": "2"
              },
              "idp0003": {
                "pairingID": 356,
                "value": "0"
              },
              "idp0004": {
                "pairingID": 359,
                "value": "0"
              },
              "idp0005": {
                "pairingID": 18,
                "value": "1"
              }
            },
            "outputs": {
              "odp0000": {
                "pairingID": 6,
                "value": "1"
              },
              "odp0001": {
                "pairingID": 7,
                "value": "1"
              },
              "odp0002": {
                "pairingID": 1027,
                "value": "5"
              },
              "odp0003": {
                "pairingID": 358,
                "value": "0"
              },
              "odp0004": {
                "pairingID": 418,
                "value": "65535"
              },
              "odp0005": {
                "pairingID": 360,
                "value": "0"
              }
            }
          },
          "ch0007": {
            "displayName": "Bewegungsmelder/Schaltaktor 1-fach Flur EG",
            "functionID": "1081",
            "inputs": {
              "idp0000": {
                "pairingID": 359,
                "value": "0"
              }
            },
            "outputs": {
              "odp0000": {
                "pairingID": 1,
                "value": "0"
              },
              "odp0001": {
                "pairingID": 4,
                "value": "0"
              },
              "odp0002": {
                "pairingID": 418,
                "value": "65535"
              },
              "odp0003": {
                "pairingID": 360,
                "value": "0"
              },
              "odp000a": {
                "pairingID": 3,
                "value": "0"
              },
              "odp0013": {
                "pairingID": 6,
                "value": "0"
              }
            }
          },
          "ch000a": {
            "displayName": "Bewegungsmelder/Schaltaktor 1-fach Flur EG",
            "functionID": "102a",
            "inputs": {
              "idp0002": {
                "pairingID": 359,
                "value": "0"
              }
            },
            "outputs": {
              "odp0001": {
                "pairingID": 418,
                "value": "65535"
              },
              "odp0002": {
                "pairingID": 360,
                "value": "0"
              },
              "odp0003": {
                "pairingID": 2,
                "value": "0"
              }
            }
          },
          "ch000e": {
            "floor": "01",
            "room": "07",
            "displayName": "Flur EG",
            "functionID": "7",
            "inputs": {
              "idp0000": {
                "pairingID": 1,
                "value": "0"
              },
              "idp0001": {
                "pairingID": 2,
                "value": "0"
              },
              "idp0002": {
                "pairingID": 3,
                "value": "0"
              },
              "idp0003": {
                "pairingID": 4,
                "value": "0"
              },
              "idp0004": {
                "pairingID": 6,
                "value": "1"
              }
            },
            "outputs": {
              "odp0000": {
                "pairingID": 256,
                "value": "0"
              },
              "odp0001": {
                "pairingID": 257,
                "value": "0"
              },
              "odp0002": {
                "pairingID": 357,
                "value": "2"
              },
              "odp0003": {
                "pairingID": 417,
                "value": "65535"
              },
              "odp0004": {
                "pairingID": 273,
                "value": "0"
              }
            }
          }
        }
      }
    }

I will add the swagger output for the flex dimmer/motion detector combination to the other issue. Thank you!

andrasU commented 1 year ago

Hi @LtLuckySau Thanks the info... This is an undocumented device, but I tried my best and wired implementation made an implementation.

Could you please try this binary?

https://github.com/andrasU/openhab-addons/releases/tag/fh-v3.4.5-pre1

LtLuckySau commented 1 year ago

Hi @andrasU Thank you very much for this, this added the motion detection channels successfully: grafik

The Lux value accurately reports the recorded brightness value at the motion detector. Switch On/Off and Info On/Off correctly report the setting of the actuator, only difference is that switch is changeable in openhab, while info only reports the state. Seems to be the intent :)

However, Presence and Movement under consideration of brightness report the state "ON" independently of the settings in the free@home SysAp and of actual physical movement in front of the sensor... I am guessing that Presence should be reporting movement registered by the sensor and Movement under consideration of brightness should relate Presence with the set threshold of brightness... For now this is not working.

Dimmer channels for the dimmer/motion detector combinations are not there yet, but i figure you are focussing on the motion detection for now. The error with my other "conventional" free@home dimmers i reported earlier with the other pre-release is gone with this release however :)

For reference, here are the settings of the motion detectors in free@home. Sorry for it being german, i could not figure out how to switch to english on the fly: grafik

As always, thank you very much for your support!

andrasU commented 1 year ago

Hi @LtLuckySau,

in the pre2 the dimactor with switch and also with dimmer shall work

https://github.com/andrasU/openhab-addons/releases/tag/fh-v3.4.5-pre2

The Lux value accurately reports the recorded brightness value at the motion detector. Switch On/Off and Info On/Off correctly report the setting of the actuator, only difference is that switch is changeable in openhab, while info only reports the state. Seems to be the intent :)

Yes, this is planned like you described. The dimmer is detecting all known channels and make visible for the openHAB. The info is known and therefore made visible. However it could be used as safe solution if you want to check the state without the possibility of unwanted change of the state.

However, Presence and Movement under consideration of brightness report the state "ON" independently of the settings in the free@home SysAp and of actual physical movement in front of the sensor... I am guessing that Presence should be reporting movement registered by the sensor and Movement under consideration of brightness should relate Presence with the set threshold of brightness... For now this is not working.

Yes... I know this issue but somehow the free@home is not reporting the state correctly. the same issue is with the normal motion sensor. But I made it available, because once it could be corrected in the SysAP :)

Dimmer channels for the dimmer/motion detector combinations are not there yet, but i figure you are focussing on the motion detection for now. The error with my other "conventional" free@home dimmers i reported earlier with the other pre-release is gone with this release however :)

The dimmer was not activated I wanted to see that my assumption is correct because the flex devices are not documented, and I had to guess :)

For reference, here are the settings of the motion detectors in free@home. Sorry for it being german, i could not figure out how to switch to english on the fly: grafik

Kein Problem... Ich nutze mein System auch auf Deutsch :)

As always, thank you very much for your support!

It would be great if you could have a short test, and OK please close the issues

Thank you

LtLuckySau commented 1 year ago

Hi @andrasU

sorry to hear about that free@home problem with the motion detectors. Well, we'll have to wait then i guess.

I gave the pre2 binary a quick test, the dimmers show up now and work just like the "conventional" free@home dimmers. So everything is working now, at least to the extent that free@home grants us. :)

Thank you very much for your awesome work! I greatly appreciate it!