laurent-martin / ets-to-homeassistant

script to convert ETS5 project file to a YAML configuration file suitable for Home Assistant
Apache License 2.0
52 stars 12 forks source link

Errors with ETS5 file #14

Open MLat365 opened 6 months ago

MLat365 commented 6 months ago

I'm new to Ruby and I've tried to use your script with an ETS5 file but it seems it cannot be opened:

c:\rubyknx>ruby ets_to_hass.rb --format homeass RueCourbe36-NouveauECS.knxproj > ha.yaml
<internal:C:/Program Files/Ruby32/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- zip (LoadError)
        from <internal:C:/Program Files/Ruby32/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from ets_to_hass.rb:6:in `<main>'

What's wrong? Maybe I don't do it rigth.

Thanks

laurent-martin commented 6 months ago

You need to install missings gems (ruby library).

Look at the README: execute in shell the following 2 commands:

gem install bundler

bundle install
MLat365 commented 6 months ago

Thanh you. Effectively I miss this step. But has I just install Ruby, and never use it before, I need to find how to do this and where this library need to be stored.

Cordialement, M. Latour


From: Laurent Martin @.> Sent: Tuesday, December 5, 2023 12:11:57 AM To: laurent-martin/ets-to-homeassistant @.> Cc: MLat365 @.>; Author @.> Subject: Re: [laurent-martin/ets-to-homeassistant] Errors with ETS5 file (Issue #14)

You need to install missings gems (ruby library)

— Reply to this email directly, view it on GitHubhttps://github.com/laurent-martin/ets-to-homeassistant/issues/14#issuecomment-1839692239, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BEOKOB4MO6ZMD5X6Q23GLZDYHZKD3AVCNFSM6AAAAABAF7TNYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZZGY4TEMRTHE. You are receiving this because you authored the thread.Message ID: @.***>

laurent-martin commented 6 months ago

No need to think about where to install, just execute in the main folder:

gem install bundler

bundle install
MLat365 commented 6 months ago

I'm sure I do some mistakes as this doesn't work.

Here is all what I've done so far:

I'm running under Windows 7. I've installed Ruby in C:\Ruby32 While installing msys32 it seems I have some errors as I did not have the Admin rigth but at the end it says it is installed.

I've created another directory C:\rubyknx where i have downloaded all the files from your [ets-to-homeassistant] repository In the same directory I put my ETS Project file

I run "gem install bundler" from the cmd window And it seems to work: C:\rubyknx>gem install bundler Fetching bundler-2.4.22.gem Successfully installed bundler-2.4.22 Parsing documentation for bundler-2.4.22 Installing ri documentation for bundler-2.4.22 Done installing documentation for bundler after 1 seconds 1 gem installed

               A new release of RubyGems is available: 3.4.10 → 3.4.22!
               Run `gem update --system 3.4.22` to update your installation.

The I try to run "bundle install" but it doesn't work: C:\rubyknx>bundle install Could not locate Gemfile

Of course I'm sure that I'm doing wrong ;-)

laurent-martin commented 6 months ago

Well, the project contains a file named Gemfile , and the error says: no such file... So, you did not download all files. best, use the zip:

https://github.com/laurent-martin/ets-to-homeassistant/archive/refs/heads/master.zip

You need to execute the command from inside the folder that contains the file Gemfile, it's normally the project's main folder...

MLat365 commented 6 months ago

That's what I did but in fact when dowloading your files some extentions where added and Gemfile become Gemfile.txt. I replace all and now I get a result. I'll now look at the integration with HA.

Thank's a lot for your patience.

MLat365 commented 6 months ago

Hi, So I look at the result. I have created two Functions in the ETS Building structure in order to test. In the output I found the two "Light" but:

MLat365 commented 6 months ago

Hi, Did you see my request?

laurent-martin commented 6 months ago

Hi, Did you see my request?

Yes, for debugging, maybe you can send me the ETS project file, then I can run and see what's happening ? (laurent.martin.l / gmail.com)

MLat365 commented 6 months ago

Sure I can send the project file. Which direct address can I use?

laurent-martin commented 6 months ago

The address is up there in previous post, just replace / with @

laurent-martin commented 6 months ago

I have updated the README with additionnal information. Especially, make sure that all group addresses that you want to use have a "data point type", i.e. group address type associated.