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

Errors with ETS5 file #14

Open
MLat365 opened this issue Dec 4, 2023 · 12 comments
Open

Errors with ETS5 file #14

MLat365 opened this issue Dec 4, 2023 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@MLat365
Copy link

MLat365 commented Dec 4, 2023

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
Copy link
Owner

laurent-martin commented Dec 4, 2023

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
Copy link
Author

MLat365 commented Dec 5, 2023 via email

@laurent-martin
Copy link
Owner

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

gem install bundler

bundle install

@MLat365
Copy link
Author

MLat365 commented Dec 5, 2023

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
Copy link
Owner

laurent-martin commented Dec 5, 2023

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
Copy link
Author

MLat365 commented Dec 5, 2023

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 MLat365 closed this as completed Dec 5, 2023
@MLat365
Copy link
Author

MLat365 commented Dec 6, 2023

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:

  • They are not associated with the Building Structure (Device/Entities)
  • The Status GA is not taken into account
    Here is the ETS and result file copy:
    image
    Is it normal or is my ETS not correct?

@MLat365 MLat365 reopened this Dec 6, 2023
@MLat365
Copy link
Author

MLat365 commented Dec 12, 2023

Hi,
Did you see my request?

@laurent-martin
Copy link
Owner

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
Copy link
Author

MLat365 commented Dec 13, 2023

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

@laurent-martin
Copy link
Owner

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

@laurent-martin laurent-martin self-assigned this Dec 14, 2023
@laurent-martin laurent-martin added the bug Something isn't working label Dec 14, 2023
@laurent-martin
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants