andig / pimatic-fritz

Pimatic plugin for Fritz!Box SmartHome and FritzDect!200 Node
GNU General Public License v2.0
8 stars 6 forks source link

[Request] Support DECT ULE Sensors from other vendors #44

Closed mwittig closed 5 years ago

mwittig commented 6 years ago

Apparently, it is possible to integrate DECT ULE sensors from other vendors, like the Telekom Door sensor, with the Fritz!Box Smart Home solution. Is it possible to provide support for this as part of the plugin?

https://www.digitalzimmer.de/artikel/test/fritzbox-akzeptiert-han-fun-sensoren-anderer-hersteller/

See also: https://forum.pimatic.org/topic/4272/optical-door-window-sensor

andig commented 6 years ago

Glad to add to fritzapi and this plugin, but would need a device for testing.

@mwittig tried to contact you numerous times regarding https://github.com/andig/pimatic-fritz/issues/29. It's kinda stale now but still open?

dasmaetthes commented 6 years ago

@andig How could I support you with testing? I want to buy some optical window sensor

xG3n1uS commented 6 years ago

I've bought the Optical Window/Door Sensor from Telekom Magenta Smarthome two weeks ago.

I could connect it successfully to my FritzBox 7490 with FRITZ!OS 6.93

If I do a http-request to the FritzBox with the AHA-Interface I get the following XML-Response for the sensor.

If the sensor is opened the alert state changes to 1.

1 HAN-FUN #4: Unit #1 409 514 256 0

Hope that helps you. If I can do more, just tell me. I'm happy to test and don't need to use my python workaround with a dummy sensor.

andig commented 6 years ago

I‘ve got homekit support working (https://github.com/andig/homebridge-fritz), pimatic to follow.

andig commented 6 years ago

@mwittig is there any way to get in contact with you? my GH comments seem to get lost :(

andig commented 6 years ago

The contact sensor PR should be ready for testing now. Ping @dasmaetthes @xG3n1uS @mwittig

xG3n1uS commented 6 years ago

screenshot_20180425-215805 I've installed the new version. Plugin detects the contact sensor, but in the events it always show me opened. No matter it's closed or open.

andig commented 6 years ago

What sensor model is that- Telekom? Could you log the variable that geta passed to setContact?

xG3n1uS commented 6 years ago

It's from Telekom.

How can I log the variable?

xG3n1uS commented 6 years ago

Found it. When closed 20180425_222940

when opened screenshot_20180425-223022

xG3n1uS commented 6 years ago

In Graph-page the attribute changes, but it's inverse.

In example below the contact is open, variable is 1, but last state in Graph is closed screenshot_20180425-223601

andig commented 6 years ago

Oh, seems pimatic is interpreting the other way round. Can you simply try inverting the value in line 534:

        @_setContact(1-devices[0].alert.state)
xG3n1uS commented 6 years ago

In Graph it's correct now.

andig commented 6 years ago

Published as 0.6.6, please upgrade.

xG3n1uS commented 6 years ago

So only problem left is, that the label is always shown as opened on the Pages. How can this be fixed?

grafik

Is it possile to get the Option xClosedLabel and xOpenedLabel so it's possible to set own labels (in German for instance).

grafik

andig commented 6 years ago

So only problem left is, that the label is always shown as opened on the Pages. How can this be fixed?

I'm a bit confused. That sounds more like a problem of the Pimatic contact sensor than of this extension? If the chart is right then so should be the label display.

Wouldn't it make sense to open an issue with pimatic or discuss in the forums instead of fixing here?

xG3n1uS commented 6 years ago

I'm also using the contact sensor from the Homeduino plugin and there it works. That's why I thought it's related to Fritz plugin.

xG3n1uS commented 6 years ago

Maybe the contact attribute must be true or false not 1 or 0 for pimatic.

andig commented 6 years ago

@xG3n1uS did you discuss this in the pimatic forums?

andig commented 5 years ago

Closing due to missing updates.