gjbadros / hass-vantage

Home Assistant custom_component for Vantage Infusion Whole House lighting system.
MIT License
9 stars 5 forks source link

Installation in HassOS image #19

Open stevespaw opened 1 year ago

stevespaw commented 1 year ago

@gjbadros I am also running this in the newest prebuilt container. Can the install script be tweaked for this? It runs from the root folder and there are no homeassistant directories.

I am a former Vantage dealer with it in my home. I am new to Home Assistant and am so excited that this could possibly work. I am happy to help diagnose this in any way. If the only way to make it work is in a Linux install I will do that, but this HassOS image is a pretty slick and easy method. I am currently running on Virtualbox, but will migrate this to a dedicated box if I can get this Vantage integration to work.

Thanks for the work on this, it could be a lifesaver for many Vantage people.

Steve

gjbadros commented 1 year ago

I'm sure it can be made to work and am happy to accept well-tested pull-requests. There should be plenty of folks who can answer questions about how to install a custom component on whatever commonly-supported approaches there are.

stevespaw commented 1 year ago

Thanks, Good to know this project is still alive.

I will look for some help on this and get back to you.

Thanks again, I am looking forward to life with Vantage again.

stevespaw commented 1 year ago

@gjbadros @colohan I am trying to look at this again. I have the newest HASS image running, and have tried to interpret the installation instructions the best I can. I am expecting the IU to populate with the Vantage components. ( as it did when I added my Wyze stuff ). Something has connected, as I see a file called "/config/192.168.2.101_config.txt" that is the xml of my Vantage. I have a small system by most Vantage standards. I have deleted the user name and password lines in the config.yaml, as I don't use any in DC. I have these errors:

image image

I am VERY interested in getting this to work and will happily document the process afterward to help others - Please don't hesitate to DM me for more information. I would even entertain paying for help if needed.

gjbadros commented 1 year ago

Look at the 192.168.2.101_config.txt as it's probably not well-formed XML and may hold clues to the problem.

stevespaw commented 1 year ago

192.168.2.101_config.txt @gjbadros

gjbadros commented 1 year ago

That file parses fine for me. I'm guessing it's from a prior run because I think the error you point at comes from earlier code before the XML config is written out to a file. It's related to this https://github.com/gjbadros/pyvantage/pull/11/commits/6e7e08e32dc7f7ad4b8b0644f37cab3bd344bbbf

Which is from a PR from @filmackay:

https://github.com/gjbadros/pyvantage/commit/6e7e08e32dc7f7ad4b8b0644f37cab3bd344bbbf

You can either add some debugging code yourself to make the problem obvious to us or work with him:

https://github.com/gjbadros/pyvantage/commits?author=filmackay

My guess is that that PR assumes a more recent version of the vantage controller that perhaps responds to GetFile requests with a correct XML response.

You could also just try reverting that part of that commit (just go back to the old code that I previously wrote for lines 1371-1377).

stevespaw commented 1 year ago

I am sorry I am not a developer, I am just trying to install this and get it working on my simple system. Can you help me at a more consumer level? It seems that this could be deployed in the HACS system and be available to any level of HA enthusiast. I would even to pay to make this work.

gjbadros commented 1 year ago

I feel for you -- I don't have the time to make this end-user friendly but am always happy to look at contributions if you want to pay a python developer to help you out.

On Fri, May 26, 2023 at 11:15 AM Steve Spaw @.***> wrote:

I am sorry I am not a developer, I am just trying to install this and get it working on my simple system. Can you help me at a more consumer level? It seems that this could be deployed in the HACS system and be available to any level of HA enthusiast. I would even to pay to make this work.

— Reply to this email directly, view it on GitHub https://github.com/gjbadros/hass-vantage/issues/19#issuecomment-1564754739, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALOHTP3UDHQMM37VE2QC3DXIDXNJANCNFSM6AAAAAAWUCXCFM . You are receiving this because you were mentioned.Message ID: @.***>

filmackay commented 1 year ago

@stevespaw your DC version is very old (?) are you on an older version for a reason?

The .txt file looks fine - can you delete it, re-run and see if it generates something different (XML invalid)? I don't think the old version of DC is an issue - as the .txt file parses OK there must be something else in play. I loaded the .xml file and parsed it with the exact same XML library/runtime, and as expected it parsed just fine. So that tells you that what is being parsed in your HA, is not what is in the .txt file.

Don't worry, we'll sort this out..

filmackay commented 1 year ago

Looking at the code, if you bring up Diagnostics (via DC) and make a GetFile call to retrieve the file Backup\Project.dc. If you could send through the response to that call (it won't make a lot of sense.. but :) that would help diagnose what is going on.

It is possible that upgrading the s/w in your controller (with DC 4.x) could (in theory) change/fix the behaviour here?

stevespaw commented 1 year ago

@gjbadros Progress has been made! Many Thanks to @filmackay for his help in diagnosing. It seems that the minimum DC may be 3.9. Now my Question is, If I add a new variable to DC (Test and it works etc.) It does not show up, even the VID does not show up in the generated config.text. Boolean variable that were in the system on the first success show up and work fine. I must be missing something in how to refresh. I even deleted the config.txt and it created another - still no new VID ??? It is working with a key panel.

gjbadros commented 1 year ago

Glad to hear it.

Your mental model re the config file is wrong -- it is retrieved from your controller not generated. If the newly retrieved config.txt does not have the new VID in it, then your controller is not serving that new file to hass-vantage. Be sure you're saving the config to the memory card when you do a program.

stevespaw commented 1 year ago

Yes I understand that it is getting it from the controller, but I may not have saved to the memory card - Checking now.

stevespaw commented 1 year ago

HMMM I am at a loss, So I may have been just doing "updates" instead of the full "program". But I did a full "Program" and wrote to the memory card, and even deleted the config .txt. After an HA restart - same thing, the VID with the new variable id not in the config.txt, nor shows up in HA. So, it is copying the XML from the Controller's memory card? Is it being cached somewhere maybe?

stevespaw commented 1 year ago

It definitely is in the dc file saved locally. ???

stevespaw commented 1 year ago

More strangeness - I just noticed that the config.txt that is loading is from my old DC version 3.7 I am now using 3.9 (and that is what my local saved DC file is). Where can this be coming from? I am doing an F7 save to memory card from my 3.9 - no errors.

stevespaw commented 1 year ago

The memory card seems to be write protected. I have the project.dc in the memory card diags, but it is months old and I cannot delete it. Any ideas?

stevespaw commented 1 year ago

OK, The memory card was the issue, I put in another one and it works fine as described a simple HA restart and it loaded the new one fine. Now I have to figure out my Equinox bad card..... Will I need Equinox? - That is the question :-)