justme-1968 / homebridge-fhem

a fhem platform plugin for homebridge
https://wiki.fhem.de/wiki/Homebridge_einrichten
79 stars 16 forks source link

Homebridgemapping for TargetTemperature requires SET command in wrong device #44

Open california444 opened 6 years ago

california444 commented 6 years ago

HI, I think I found an issue with the homebridgeMapping for TargetTemperature. In my setup I use the Reading for TargetTemperature from another device (Heizung3). So my mapping looks like: homebridgeMapping: TargetTemperature=PTEMP:Heizung3:Party-Temperatur,minValue=18,maxValue=25,minStep=1.0

But as long as the device in which the mapping is defined in (Heizung_TempSoll_Thermostat) has no SET command as defined in the homebridgeMapping (PTEMP) the plugin complains at startup with: [2018-2-18 12:28:01] [FHEM] Heizung_TempSoll_Thermostat is NOT a thermostat. set command for target temperature missing: PTEMP

If I define the required set command in Heizung_TempSoll_Thermostat with setList PTEMP, the issue goes away but interestingly, when I change the targetTemperature in HOME App, the SET command is issued for the device Heizung3 but not for Heizung_TempSoll_Thermostat.

In my opinion either both, the Reading and SET Command, should be used from the defined device. In this case it must be checked if the SET command exists for the defined device, not the current one. Or the SET command is issued for the current device. But then the SET should be issued for the current device.

Thx, Roman

justme-1968 commented 6 years ago

yes. you are right. the commands is checked against the device with the homebridgeMapping attribute. the reason for this is that i don't have any information about the other device at this point.

so basically it is not straight forward do do the 'obvious' thing.

but it should not be a problem: use the device with the set command for inclusion and add all other read only characteristics from a remote device.

the other workaround is to use cmdalias to create a 'fake's set command that goes to the correct device.

but in your case it looks like you are using dummy devices. why not use just an dummy for each thermostat. not multiple dummys.