Skip to content

Unable to Connect #3

Open
Open

Description

@jodibb

Hi,
First, thanks for this project! I'm trying to implement it into my openhab.
But I have problems with python script and I'm not able to connect. Script is the same as on the page, and I'm on latest 0.0.13 revision.
When I start it, this is result:

`File "airConditionState.py", line 4, in
session.login()
File "/home/openhabian/.local/lib/python2.7/site-packages/pcomfortcloud/session.py", line 96, in login
self._create_token()
File "/home/openhabian/.local/lib/python2.7/site-packages/pcomfortcloud/session.py", line 131, in _create_token
raise LoginError(ex)
pcomfortcloud.session.LoginError: HTTPSConnectionPool(host='accsmart.panasonic.com', port=443): Max retries exceeded with url: /auth/login (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))

Can you please describe me what I'm doing wrong? Thanks.
`

Activity

  1. rest77 commented on Jan 22, 2019

    @rest77

    Hi!

    Did you try with:

    -s [BOOL], --skipVerify [BOOL]
    Skip Ssl verification
    /R

  2. jodibb commented on Jan 22, 2019

    @jodibb
    Author

    It works with -s, thanks.
    But is there any way how to use it with this parameter also in own py script using module?

  3. rest77 commented on Jan 22, 2019

    @rest77

    I had the same problem when I tested but did not dig into the problem. Maybe someone can check that?

  4. lostfields commented on Jan 22, 2019

    @lostfields
    Owner

    I'll look into it, either the requests package is missing CAs or it's unable to download the certificate from panasonic.

    Found a topic in stackoverflow I'm going to look at.

  5. lostfields commented on Jan 22, 2019

    @lostfields
    Owner
          It works with -s, thanks.
    

    But is there any way how to use it with this parameter also in own py script using module?

    The constructor of Session is def __init__(self, username, password, tokenFileName='~/.panasonic-token', raw=False, verifySsl=True) so you could set all of them to default except the last one.

  6. jodibb commented on Jan 22, 2019

    @jodibb
    Author
          It works with -s, thanks.
    

    But is there any way how to use it with this parameter also in own py script using module?

    The constructor of Session is def __init__(self, username, password, tokenFileName='~/.panasonic-token', raw=False, verifySsl=True) so you could set all of them to default except the last one.

    It works! Thanks!

  7. jodibb commented on Jan 22, 2019

    @jodibb
    Author

    OK, I can connect now and read status, but now I'm not able to set values :)

    airON.py
    [{'model': '', 'group': u'My House', 'id': 'XX', 'name': u'Panasonic'}]
    {'id': 'XX', 'parameters': {'airSwingVertical': <AirSwingUD.Up: 0>, 'temperature': 23.5, 'power': <Power.Off: 0>, 'eco': <EcoMode.Auto: 0>, 'temperatureInside': 126, 'temperatureOutside': 126, 'airSwingHorizontal': <AirSwingLR.Auto: -1>, 'mode': <OperationMode.Heat: 3>, 'fanSpeed': <FanSpeed.Auto: 0>}}
    Traceback (most recent call last):
      File "airON.py", line 16, in <module>
        temperature = 22.0)
    TypeError: get_device() got an unexpected keyword argument 'power'
    
    

    I'm using your example:

    ....
    session.login()
    
    devices = session.get_devices()
    
    print(devices)
    
    print(session.get_device(devices[0]['id']))
    
    session.get_device(devices[0]['id'],
    	power = pcomfortcloud.constants.Power.On,
    	temperature = 22.0)
    
  8. lostfields commented on Jan 22, 2019

    @lostfields
    Owner

    my example says session.set_device(id, power =… but your example is get_device. Is that the issue?

  9. jodibb commented on Jan 22, 2019

    @jodibb
    Author

    You are right. My fault. Sorry. :(
    Now it works.

  10. jodibb commented on Jan 22, 2019

    @jodibb
    Author

    Thanks a lot for this support. Now, I'm able to automate my airconditioner.
    One more question. Is there way how to add support for EcoNavi and Nanoe functions? I cannot find them there.

  11. lostfields commented on Jan 22, 2019

    @lostfields
    Owner

    I was supposed to look at it, but it may be useful if you dump data of your device when econavi/nanoe is on and off and post it at issue #1

  12. jodibb commented on Jan 22, 2019

    @jodibb
    Author

    Done.
    Sadly, there is no difference when nanoe is on/off :/ . It's also not available in phone app and you can only start it from remote controler. Then you can see led on airconditioner.
    For EcoNavi, there is parameter and value. On is 2, for Off is 1.
    Here is dump from my device:
    fanMode : False summerHouse : 0 deviceGuid : XXX dryMode : True nanoe : False permission : 2 autoMode : True timestamp : 1548191155465 heatMode : True quietMode : True coolMode : True powerfulMode : True ecoNavi : True airSwingLR : True parameters updateTime : None nanoe : 0 errorCode : KgAACwEBRjAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== errorStatus : -255 fanSpeed : 0 airSwingLR : 2 airQuality : 0 eventTime : None airSwingUD : 0 actualNanoe : 0 outTemperature : -6 insideTemperature : 126 devGuid : C382347994 iAuto : 0 devRacCommunicateStatus: -255 ecoMode : 0 airDirection : 0 operationMode : 0 defrosting : -255 temperatureSet : 25.0 fanAutoMode : 0 ecoNavi : 1 operate : 1 iAutoX : False

  13. lostfields commented on Jan 22, 2019

    @lostfields
    Owner

    yeah, mine has actualNanoe: 1 when it's off and actualNanoe: 2 when it's on - but mine is Reporting ecoNavi: 0 - unsupported. Same With yours, except that nanoe is unsupported at your device, but ecoNavi is supported.

    Is only parameter ecoNavi changing when you toggle NanoE at your remote?

  14. jodibb commented on Jan 22, 2019

    @jodibb
    Author

    No, EcoNavi is changing only when I'm changing EcoNavi status. That was separate test, when I tried only nanoe and dump was same for On/Off.

    btw, can you see correct insideTemperature? Mine is 126 and I also cannot see it in android app. outTemperature works fine.

  15. added a commit that references this issue on Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions