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

Unexpected error when adding a device #112

Closed
dbeees opened this issue Mar 27, 2023 · 9 comments · Fixed by #113
Closed

Unexpected error when adding a device #112

dbeees opened this issue Mar 27, 2023 · 9 comments · Fixed by #113

Comments

@dbeees
Copy link

dbeees commented Mar 27, 2023

Describe the bug
Adding a new device I get an error 'Unexpected error'

To Reproduce
Follow the steps to add a new device and after entering the IP address for the host, 'Unexpected error' is displayed

Expected behavior
Host should be added and the next modal should show the room selection step to add device

Screenshots
Added

Desktop (please complete the following information):

  • OS: MacOS Ventura
  • Browser Safari
  • Version 16.3 (18614.4.6.1.6)

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
I have 5 Powrmatic/Innova HVAC units, 4 have added successfully and one refuses to be added, giving the 'Unexpected Error' above. The only difference with them is that the one that fails to add is a different model to the others. The ones that have added successfully were all Vision 2.0 models, whereas the one that fails to add is a 'verticool' model. Essentially the same unit, just a different form factor. They all use the same Innvo iOS App and all have the same controller in the unit;
https://www.powrmatic.co.uk/products/air-conditioning/powrmatic-vision-verticool/

Home Assistant 2023.3.6
Supervisor 2023.03.2
Operating System 9.5
Frontend 20230309.1 - latest

Screenshot 2023-03-27 at 08 01 51

@danielrivard
Copy link
Owner

The verticool might not implement the API the same way, I had to adapt the integration for the airleaf fancoil. The API was similar, but different enough that it was not a drop in in the integration.

Do you get a JSON string if you try this url in a browser (replacing with the IP of your verticool)?
http://[IP_ADDRESS]/api/v/1/status

If it returns a result similar to this one, then maybe we can work with it, otherwise, I'm afraid it might not work with this integration.

@danielrivard
Copy link
Owner

danielrivard commented Mar 28, 2023

Looking at the user manual, it does look very similar though, so maybe it is just a small difference, maybe it has a different "deviceType": "001".

It even uses the exact same application than my Innova 2.0 unit, so I think it should be compatible.
image

@danielrivard
Copy link
Owner

I may have reproduced it by simulating a different deviceType.
Can you look at the logs http://[YOUR_HOME_ASSISTANT]:8123/config/logs?

And there should be an error related to innova
image

If you click on it, you should see more details
image

@dbeees
Copy link
Author

dbeees commented Mar 28, 2023

Hey Daniel, so, yes, I get a response from the API as follows;

{"success":true,"sw":{"V":"1.0.36"},"UID":"bc:dd:c2:e0:XX:XX","time":{"d":28,"m":3,"y":2023,"h":12,"i":28},"net":{"ip":"192.168.10.XXX","sub":"255.255.255.0","gw":"192.168.10.XXX","dhcp":"1"},"setup":{"serial":"IN182XXXX","name":"Kitchen"},"RESULT":{"sp":18,"wm":1,"cfg_lastWorkingMode":1,"ps":0,"fs":0,"fr":7,"cm":0,"a":[],"t":15,"cp":0,"nm":0,"ns":0,"cloudStatus":4,"connectionStatus":2,"cloudConfig":1, "timerStatus":0, "heatingDisabled":0, "inputFlags":0,"ncc":0, "debugmsg":"", "pwd":"", "heap":12272, "ccv":0, "cci":0, "daynumber":0, "uptime":83320, "uscm":0, "lastRefresh":4417}}

(I've 'X' out some of the IP address,MAC address and Serial number data)

When I clear the error log in HA and try and add the unit, I get two entries;

Unexpected exception
12:31:38 – (ERROR) Innova (custom integration)
:0:0 Script error.
12:31:27 – (ERROR) components/system_log/init.py

If I select the Unexpected exception error I get;

Logger: custom_components.innova.config_flow
Source: custom_components/innova/config_flow.py:37
Integration: Innova (documentation, issues)
First occurred: 12:31:38 (1 occurrences)
Last logged: 12:31:38

Unexpected exception
Traceback (most recent call last):
File "/config/custom_components/innova/config_flow.py", line 63, in async_step_user
info = await validate_connectivity(self.hass, user_input)
File "/config/custom_components/innova/config_flow.py", line 37, in validate_connectivity
if not await innova.async_update():
File "/usr/local/lib/python3.10/site-packages/innova_controls/innova.py", line 53, in async_update
data["deviceType"], self._network_facade
KeyError: 'deviceType'

In the other Script error I get;

Logger: frontend.js.latest.202303091
Source: components/system_log/init.py:254
First occurred: 12:31:27 (1 occurrences)
Last logged: 12:31:27

This unit doesn't have motorised vents so no 'swing mode' is available. Other than that, they have the same functionality from a users perspective.

@dbeees
Copy link
Author

dbeees commented Mar 28, 2023

This is the output from one of my other devices that does work, looks like the Vertical response above is missing the "deviceType" tag

{"success":true,"sw":{"V":"1.0.42"},"UID":"84:0d:8e:96:XX:XX","deviceType": "001","time":{"d":28,"m":3,"y":2023,"h":12,"i":56},"net":{"ip":"192.168.10.XXX","sub":"255.255.255.0","gw":"192.168.10.XXX","dhcp":"1"},"setup":{"serial":"IN190XXXX","name":"Living Room"},"RESULT":{"sp":22,"wm":5,"cfg_lastWorkingMode":5,"ps":0,"fs":0,"fr":7,"cm":0,"a":[],"t":16,"cp":0,"nm":0,"ns":0,"cloudStatus":4,"connectionStatus":2,"cloudConfig":1, "timerStatus":0, "heatingDisabled":0, "coolingDisabled":0, "hotelMode":0, "kl":0, "heatingResistance":0, "inputFlags":0,"ncc":0, "pwd":"", "heap":11672, "ccv":0, "cci":0, "daynumber":0, "uptime":146740, "uscm":0, "lastRefresh":2}}

@danielrivard
Copy link
Owner

danielrivard commented Mar 28, 2023

Thank you for providing the details. I think I know how I can fix it quickly. I'll see if I can find some time to do it and push an updated version in the next few days.

@dbeees
Copy link
Author

dbeees commented Mar 28, 2023

That would be great!

Thank you so much :-)

@danielrivard
Copy link
Owner

I just published a new version that should fix your issue. Let me know how it goes.

@dbeees
Copy link
Author

dbeees commented Mar 29, 2023 via email

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

Successfully merging a pull request may close this issue.

2 participants