Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heat pump not visible as hassio entity #17

Open
simonunzio opened this issue Jan 12, 2020 · 9 comments
Open

heat pump not visible as hassio entity #17

simonunzio opened this issue Jan 12, 2020 · 9 comments

Comments

@simonunzio
Copy link

hello, I have configured three heat pumps in Panasonic comfort Cloud, and initially I saw them all as entities on Hassio, then suddenly I see only two. Thinking it was a wi-fi problem I disabled 5ghz on my router, so that all the pumps are in 2.4 ghz. On the comfort cloud I see and manage all 3 heat pumps. I still attach the log.
Thank you and congratulations on your work.

`panasonic_ac: Error on device update!
ValueError: 5 is not a valid AirSwingLR

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/config/custom_components/panasonic_ac/climate.py", line 109, in update
data= self._api.get_device(self._device['id'])
File "/usr/local/lib/python3.7/site-packages/pcomfortcloud/session.py", line 239, in get_device
'parameters': self._read_parameters(_json['parameters'])
File "/usr/local/lib/python3.7/site-packages/pcomfortcloud/session.py", line 374, in _read_parameters
value['airSwingHorizontal'] = constants.AirSwingLR(parameters['airSwingLR'])
File "/usr/local/lib/python3.7/enum.py", line 310, in call
return cls.new(cls, value)
File "/usr/local/lib/python3.7/enum.py", line 564, in new
raise exc
File "/usr/local/lib/python3.7/enum.py", line 548, in new
result = cls.missing(value)
File "/usr/local/lib/python3.7/enum.py", line 577, in missing
raise ValueError("%r is not a valid %s" % (value, cls.name))
ValueError: 5 is not a valid AirSwingLR

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 461, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/panasonic_ac/climate.py", line 113, in update
data = self._api.get_device(self._device['id'])
File "/usr/local/lib/python3.7/site-packages/pcomfortcloud/session.py", line 239, in get_device
'parameters': self._read_parameters(_json['parameters'])
File "/usr/local/lib/python3.7/site-packages/pcomfortcloud/session.py", line 374, in _read_parameters
value['airSwingHorizontal'] = constants.AirSwingLR(parameters['airSwingLR'])
File "/usr/local/lib/python3.7/enum.py", line 310, in call
return cls.new(cls, value)
File "/usr/local/lib/python3.7/enum.py", line 564, in new
raise exc
File "/usr/local/lib/python3.7/enum.py", line 548, in new
result = cls.missing(value)
File "/usr/local/lib/python3.7/enum.py", line 577, in missing
raise ValueError("%r is not a valid %s" % (value, cls.name))
ValueError: 5 is not a valid AirSwingLR`

@djbulsink
Copy link
Owner

Hi @simonunzio,

I don't have a heat pump myself, so I can't reproduce the error. The setting for the air swing left-right is not know by the integration, according to the logs. I like to add the setting, but I dont know what the description should be. Can you tell me what is shown in the comfort app for "Air swing".

Cheers DJBulsink

@arnefm
Copy link

arnefm commented Feb 15, 2020

I have a heat pump too, which supports the air swing setting both horizontally and vertically. It's been working flawlessly with your integration! Thanks for your hard work.
Here is a screenshot of how the air swing setting looks inside the Comfort Cloud app:

comfort_cloud

This probably isn't very helpful, so here is some data from pcomfortcloud:

$ pcomfortcloud -s true xxxxxx@gmail.com myPassword list
list of devices and its device id (1-x)
device #1
    id             : XXXXXXXXXXXXXXXXXXXXXXXXXX
    name           : Air conditioner
    group          : arnefm's heatpump
    model          : CS-HZ25UKE
$ pcomfortcloud -s true xxxxxxxxx@gmail.com myPassword get 1                                
reading from device 'Air conditioner' (XXXXXXXXXXXXXXXXXXXXXXXXXXXX)
id                       : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
parameters
    temperatureInside    : 20
    temperatureOutside   : 3
    power                : On
    temperature          : 20.0
    mode                 : Heat
    fanSpeed             : Auto
    airSwingHorizontal   : Mid
    airSwingVertical     : Up
    eco                  : Auto
pcomfortcloud -s true xxxxxx@gmail.com myPassword dump 1                                         
deviceGuid               : CS-HZ25UKE+4939713442
timestamp                : 1581787900915
summerHouse              : 2
iAutoX                   : False
nanoe                    : True
autoMode                 : True
heatMode                 : True
fanMode                  : True
dryMode                  : True
coolMode                 : True
ecoNavi                  : False
powerfulMode             : True
permission               : 3
quietMode                : True
airSwingLR               : True
ecoFunction              : 0
temperatureUnit          : 0
modeAvlList
    autoMode             : 1
    fanMode              : 1
parameters
    devGuid              : CS-HZ25UKE+4939713442
    eventTime            : None
    online               : True
    operate              : 1
    operationMode        : 3
    temperatureSet       : 20.0
    fanSpeed             : 0
    fanAutoMode          : 1
    airSwingLR           : 2
    airSwingUD           : 0
    airDirection         : 0
    ecoMode              : 0
    ecoNavi              : 0
    nanoe                : 2
    iAuto                : 0
    defrosting           : -255
    errorCode            : KgAACwEBSDAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
    errorCodeStr         : H00
    insideTemperature    : 20
    outTemperature       : 2
    devRacCommunicateStatus: -255
    errorStatus          : -255
    errorStatusFlg       : False
    actualNanoe          : 2
    airQuality           : 0
    ecoFunctionData      : 0
    updateTime           : None
autoTempMax              : -1
dryTempMax               : -1
heatTempMax              : -1
coolTempMax              : -1
autoTempMin              : -1
dryTempMin               : -1
heatTempMin              : -1
coolTempMin              : -1
fanSpeedMode             : -1
fanDirectionMode         : -1

Please tell me if you need more information - I could for instance do a "pcomfortcloud get 1" for each swing setting both horizontally and vertically if that would be helpful.

@djbulsink
Copy link
Owner

Hi @simonunzio @arnefm ,

I've created a quick fix for this problem. Can you test it. By using this file in the custom component: https://github.com/djbulsink/panasonic_ac/blob/fix/heat-pump/custom_components/panasonic_ac/climate.py .

In the future I hope to implement the horizontal airswing. Not sure how to do this because of the limit methods home assistant support for climate devices: https://developers.home-assistant.io/docs/entity_climate/#set-swing-mode

DJ.

@nimikko
Copy link

nimikko commented Mar 20, 2020

Not sure if this help but there is similar discussion going on another climate device.

https://github.com/home-assistant/core/labels/integration%3A%20melcloud

@djbulsink
Copy link
Owner

@joha-git Thanks for the hint. I implemented it now the same way. I don't have a device that's swings horizontal, so I'm not able to test it.

I still don't know what causes the 'ValueError: 5 is not a valid AirSwingLR' is some cases. Probably the class AirSwingLR is not complete.

@nimikko
Copy link

nimikko commented Mar 21, 2020

Well i got the same problems when i tried to test the horizontal swing. My guess at the moment is that the AirSwingLR is not correct as for example when i turn the swing to left it says right on home assistant and I get the ValueError: 5 when it is either on the most right position or the second most right position, but i do try to debug it more later.

@nimikko
Copy link

nimikko commented Mar 23, 2020

I went trough all the horizontal swing settings and commented on the pcomfort cloud. As for me there was some differences on the comfort cloud and AirSwingLR class. On my unit I got these results.

class AirSwingLR(Enum):
Auto = -1
Left = 1
LeftMid = 5
Mid = 2
RightMid = 4
Right = 0

@com-xuonghuynh
Copy link

I got same issue, any fix for this yet ?

@shyne99
Copy link
Contributor

shyne99 commented Jul 15, 2020

I think that this issue comes from the underlying python package that this integration is relying on.

Haven't tested it but there is a ongoing pull request pending : lostfields/python-panasonic-comfort-cloud#24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants