jheling / freeathome

Free@Home component for Home Assistant
103 stars 37 forks source link

Incorrect thermostat state when turning it off #12

Closed fotiDim closed 5 years ago

fotiDim commented 5 years ago

On is reported correctly but Off is reported as Eco with a temperature of 35.

Below you will find the get-master-message logs of a very simple scenario. Studio 1 thermostat is initially off and I turn it on using the wall switch. HA reports the state correctly.

INFO     <?xml version="1.0" encoding="UTF-8"?><project timeStamp="27719" sessionId="1489baca" type="update" mrhaVersion="2.2.4" mrhaBuild="7103"><privileges/><devices><device serialNumber="ABB20C052951" domainAddress="930E" state="modified" commissioningState="ready" progress="100"><channels><channel triggered="true" state="modified" i="ch0003" cid="ABB2050C"><inputs/><outputs/><parameters/><scenes/></channel></channels></device></devices></project>

INFO     <?xml version="1.0" encoding="UTF-8"?><project timeStamp="27720" sessionId="1489baca" type="update" mrhaVersion="2.2.4" mrhaBuild="7103"><privileges/><devices><device serialNumber="ABB700CFCEF2" domainAddress="930E" state="modified" commissioningState="ready" progress="100"><channels><channel state="modified" i="ch0000" cid="ABB702EB"><inputs/><outputs><dataPoint state="modified" i="odp0006" full="false"><value>21</value></dataPoint><dataPoint state="modified" i="odp0008" full="false"><value>1</value></dataPoint></outputs><parameters/><scenes/></channel></channels><parameters/></device></devices></project>

INFO     <?xml version="1.0" encoding="UTF-8"?><project timeStamp="27721" sessionId="1489baca" type="update" mrhaVersion="2.2.4" mrhaBuild="7103"><privileges/><devices><device serialNumber="ABB209732951" domainAddress="930E" state="modified" commissioningState="ready" progress="100"><channels><channel triggered="true" state="modified" i="ch0002" cid="ABB2050C"><inputs/><outputs/><parameters/><scenes/></channel><channel triggered="true" state="modified" i="ch0003" cid="ABB2050C"><inputs/><outputs/><parameters/><scenes/></channel></channels></device></devices></project>

I then turn it off using the wall switch. HA reports ECO and 7 degrees set temperature which are wrong. However the current temperature is reported correctly.

INFO     <?xml version="1.0" encoding="UTF-8"?><project timeStamp="27722" sessionId="1489baca" type="update" mrhaVersion="2.2.4" mrhaBuild="7103"><privileges/><devices><device serialNumber="ABB700CFCEF2" domainAddress="930E" state="modified" commissioningState="ready" progress="100"><channels><channel state="modified" i="ch0000" cid="ABB702EB"><inputs/><outputs><dataPoint state="modified" i="odp0010" full="false"><value>22.16</value></dataPoint></outputs><parameters/><scenes/></channel></channels><parameters/></device></devices></project>

INFO     <?xml version="1.0" encoding="UTF-8"?><project timeStamp="27723" sessionId="1489baca" type="update" mrhaVersion="2.2.4" mrhaBuild="7103"><privileges/><devices><device serialNumber="ABB700CFCEF2" domainAddress="930E" state="modified" commissioningState="ready" progress="100"><channels><channel state="modified" i="ch0000" cid="ABB702EB"><inputs/><outputs><dataPoint state="modified" i="odp0008" full="false"><value>0</value></dataPoint></outputs><parameters/><scenes/></channel></channels><parameters/></device></devices></project>

INFO     <?xml version="1.0" encoding="UTF-8"?><project timeStamp="27724" sessionId="1489baca" type="update" mrhaVersion="2.2.4" mrhaBuild="7103"><privileges/><devices><device serialNumber="ABB700CFCEF2" domainAddress="930E" state="modified" commissioningState="ready" progress="100"><channels><channel state="modified" i="ch0000" cid="ABB702EB"><inputs/><outputs><dataPoint state="modified" i="odp0006" full="false"><value>7</value></dataPoint></outputs><parameters/><scenes/></channel></channels><parameters/></device></devices></project>

This is another session where the thermostat is ON and I switch on ECO

INFO     <?xml version="1.0" encoding="UTF-8"?><project timeStamp="27756" sessionId="1489baca" type="update" mrhaVersion="2.2.4" mrhaBuild="7103"><privileges/><devices><device serialNumber="ABB700CFCEF2" domainAddress="930E" state="modified" commissioningState="ready" progress="100"><channels><channel state="modified" i="ch0000" cid="ABB702EB"><inputs/><outputs><dataPoint state="modified" i="odp0009" full="false"><value>68</value></dataPoint></outputs><parameters/><scenes/></channel></channels><parameters/></device></devices></project>

INFO     <?xml version="1.0" encoding="UTF-8"?><project timeStamp="27757" sessionId="1489baca" type="update" mrhaVersion="2.2.4" mrhaBuild="7103"><privileges/><devices><device serialNumber="ABB700CFCEF2" domainAddress="930E" state="modified" commissioningState="ready" progress="100"><channels><channel state="modified" i="ch0000" cid="ABB702EB"><inputs/><outputs><dataPoint state="modified" i="odp0006" full="false"><value>18</value></dataPoint></outputs><parameters/><scenes/></channel></channels><parameters/></device></devices></project>

I switch it back to normal (turn ECO off)

INFO     <?xml version="1.0" encoding="UTF-8"?><project timeStamp="27758" sessionId="1489baca" type="update" mrhaVersion="2.2.4" mrhaBuild="7103"><privileges/><devices><device serialNumber="ABB700CFCEF2" domainAddress="930E" state="modified" commissioningState="ready" progress="100"><channels><channel state="modified" i="ch0000" cid="ABB702EB"><inputs/><outputs><dataPoint state="modified" i="odp0009" full="false"><value>65</value></dataPoint></outputs><parameters/><scenes/></channel></channels><parameters/></device></devices></project>

INFO     <?xml version="1.0" encoding="UTF-8"?><project timeStamp="27759" sessionId="1489baca" type="update" mrhaVersion="2.2.4" mrhaBuild="7103"><privileges/><devices><device serialNumber="ABB700CFCEF2" domainAddress="930E" state="modified" commissioningState="ready" progress="100"><channels><channel state="modified" i="ch0000" cid="ABB702EB"><inputs/><outputs><dataPoint state="modified" i="odp0006" full="false"><value>21</value></dataPoint></outputs><parameters/><scenes/></channel></channels><parameters/></device></devices></project>

I see value 7 arriving as a message. I also noticed in climate.py there is a line: # ch0, odp0006 = 7 == ??????????????????????. Seems like this message should be ignored.

jheling commented 5 years ago

The pull request has been merged. Thanks for the fix!