kbr / fritzconnection

Python-Tool to communicate with the AVM Fritz!Box by the TR-064 protocol and the AHA-HTTP-Interface
MIT License
303 stars 59 forks source link

Howto receive a proper status of "Telekom SmartHome Tür-/Fensterkontakt optisch" #171

Closed MyGitIT closed 1 year ago

MyGitIT commented 1 year ago

I want to receive the status from a window , but the fields never change:

window closed: NewAIN : *** NewDeviceId : *** NewDeviceName : *** NewFirmwareVersion : 0.0 NewFunctionBitMask : 8208 NewHkrComfortTemperature : 0 NewHkrComfortVentilStatus : CLOSED NewHkrIsEnabled : DISABLED NewHkrIsTemperature : 0 NewHkrIsValid : INVALID NewHkrReduceTemperature : 0 NewHkrReduceVentilStatus : CLOSED NewHkrSetTemperature : 0 NewHkrSetVentilStatus : CLOSED NewManufacturer : UNKNOWN NewMultimeterEnergy : 0 NewMultimeterIsEnabled : DISABLED NewMultimeterIsValid : INVALID NewMultimeterPower : 0 NewPresent : CONNECTED NewProductName : HAN-FUN NewSwitchIsEnabled : DISABLED NewSwitchIsValid : INVALID NewSwitchLock : False NewSwitchMode : AUTO NewSwitchState : OFF NewTemperatureCelsius : 0 NewTemperatureIsEnabled : DISABLED NewTemperatureIsValid : INVALID NewTemperatureOffset : 0

window open: NewAIN : *** NewDeviceId : *** NewDeviceName : *** NewFirmwareVersion : 0.0 NewFunctionBitMask : 8208 NewHkrComfortTemperature : 0 NewHkrComfortVentilStatus : CLOSED NewHkrIsEnabled : DISABLED NewHkrIsTemperature : 0 NewHkrIsValid : INVALID NewHkrReduceTemperature : 0 NewHkrReduceVentilStatus : CLOSED NewHkrSetTemperature : 0 NewHkrSetVentilStatus : CLOSED NewManufacturer : UNKNOWN NewMultimeterEnergy : 0 NewMultimeterIsEnabled : DISABLED NewMultimeterIsValid : INVALID NewMultimeterPower : 0 NewPresent : CONNECTED NewProductName : HAN-FUN NewSwitchIsEnabled : DISABLED NewSwitchIsValid : INVALID NewSwitchLock : False NewSwitchMode : AUTO NewSwitchState : OFF NewTemperatureCelsius : 0 NewTemperatureIsEnabled : DISABLED NewTemperatureIsValid : INVALID NewTemperatureOffset : 0

Always the same. The AVM Gui is showing the status proper.

kbr commented 1 year ago

If AVM can handle the communication with this third party device, chances your are just using a wrong service/action combination – provided that the communication with the Telekom device is accessible by the TR-064 protocol.

MyGitIT commented 1 year ago

AVM can handle the communication via DECT, other tools are working with this device. I'm using the following:

from fritzconnection.lib.fritzhomeauto import FritzHomeAutomation

fha = FritzHomeAutomation(
        address='192.168.1.1',
        password="*****"
        )

ain_bad = '***** *****'

bad = fha.get_device_information_by_identifier(ain_bad)

print(bad)

The ain is the right one, but there are no changes in the parameters, if the window is opened or closed. Bildschirmfoto vom 2022-09-29 15-41-00

kbr commented 1 year ago

Your code is correct, but so far the returned detail-data are specific for AVM devices providing information about switch states, valve-states, energy consumption and temperatures. Question is whether AVM shares all the communication data about the Telekom device by the TR-064 protocol, or alternativ by the AHA interface – which is another api and protocol, and so far not part of fritzconnection. I don't have this Telekom device and can not go into this.

MyGitIT commented 1 year ago

I will check the AHA Interface, I think third party device are not 100% part of the TR-064 protocol.

THX

kbr commented 1 year ago

May be a future feature, but currently not an issue.