hahn-th / homematicip-rest-api

A python wrapper for the homematicIP REST API (Access Point Based)
https://hahn-th.github.io/homematicip-rest-api/
GNU General Public License v3.0
215 stars 63 forks source link

Implement HmIP-FALMOT-C12 #463

Closed LehmannAndreas closed 2 years ago

LehmannAndreas commented 2 years ago

According to page 1808 and 1813 in the Homematic documentation: https://www.eq-3.de/Downloads/eq3/download%20bereich/hm_web_ui_doku/HmIP_Device_Documentation.pdf it is possible to read out the valve position for each channel of HmIP-FALMOT-C12 (28.3.2.1.6. Parameter LEVEL). Unfortunately, it is not implemented.

At first I thought it would be maybe possible to get this with print(home.devices[7].from_jason("LEVEL")) However, this did not work...

hahn-th commented 2 years ago

Could you please post your config? https://github.com/hahn-th/homematicip-rest-api#new-devices-and-config-dump

hahn-th commented 2 years ago

I just can see a valveState for each channel like ADAPTION_DONE or ADJUSTMENT_TOO_SMALL

LehmannAndreas commented 2 years ago

Dump.txt

It seems that in contradiction to the documentation it is called valvePosition as it is for all other devices. It would be nice to have this as parameter for the device included.

search for the following paragraph:

"2": { "deviceId": "3014F7110000000000000014", "functionalChannelType": "FLOOR_TERMINAL_BLOCK_MECHANIC_CHANNEL", "groupIndex": 2, "groups": [ "00000000-0000-0000-0000-000000000012" ], "index": 2, "label": "Kanal 2", "valvePosition": 0.0, "valveState": "ADAPTION_DONE" },

LehmannAndreas commented 1 year ago

Hi, thanks for the fast implementation. However, since the update I get 12 times the following message in the terminal, when I use home.get_current_state():

'INDOOR_CLIMATE' isn't a valid option for class 'GroupType' There is no class for group 'INDOOR_CLIMATE' yet

And when I use the function home.devices[n], I still get not the ValvePosition. What do I wrong? Thanks for your help!

Printout:

HmIP-FALMOT-C12 Fußbodenheizungsaktor – 12-fach, motorisch lowBat(None) unreach(False) rssiDeviceValue(-63) rssiPeerValue(None) configPending(False) dutyCycle(False) pulseWidthModulationAtLowFloorHeatingValvePositionEnabled(False) minimumFloorHeatingValvePosition(0.0) coolingEmergencyValue(0.0) frostProtectionTemperature(5.0) valveProtectionDuration(5) valveProtectionSwitchingInterval(14)

hahn-th commented 1 year ago

Die INDOOR_CLIMATE Gruppe füge ich hinzu.

Das Problem mit dem valvePosition ist: der Wert gehört zu verschiedenen Channels des FALMOT Gerätes. Angezeigt wird der bei der toString-Methode aber nur die Eigenschaften des Gerätes selber. Willst du über Code drauf zugreifen? Dann so (auszug aus dem Test):

  c = device.functionalChannels[1]
  assert isinstance(c, FloorTerminalBlockMechanicChannel)
  assert c.valveState == ValveState.ADAPTION_DONE
  assert c.valvePosition == 0.5

IsInstance halt mit IF verwenden. Falls die über die CLI drauf zugreifen möchtest, dass funktioniert glaub ich gar nicht.

LehmannAndreas commented 1 year ago

Perfekt, vielen Dank, hat geklappt