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

Verify Compact mode for your adapter #202

Closed
ioBrokerChecker opened this issue Oct 21, 2019 · 8 comments
Closed

Verify Compact mode for your adapter #202

ioBrokerChecker opened this issue Oct 21, 2019 · 8 comments

Comments

@ioBrokerChecker
Copy link

We have detected that your adapter supports the compact mode. Please use the latest js-controller 2.0 and verify that everything works.

Some more information what is important to check can be found at ioBroker/ioBroker.js-controller#512

On questions please answer to the linked issue. Please close this issue after your test and add the version number that you have tested please as a comment.

Thank you for your support.

@ioBrokerChecker ioBrokerChecker changed the title Please check ioBroker.hm-rpc with js-controller 2.0 Verify Compact mode for your adapter Oct 21, 2019
@jpawlowski
Copy link

It seems that enabling compact mode will mix-up the objects, e.g. they will no longer appear under the node they usually should but rather appear on a different instance's node.

@foxriver76
Copy link
Collaborator

Exact example or Screenshot could might be useful.

@jpawlowski
Copy link

jpawlowski commented Oct 27, 2019

Way to reproduce:

  1. Clean container install using André's Docker image (current beta).
  2. Set upgrade repository to latest
  3. Upgrade js-controller and default adapters to latest version.
  4. Enable compact mode: iob compact enable
  5. Setup hm-rega.0 with hm-rpc.0 (HmIP) and hm-rpc.1 (HmClassic)
  6. Enable compact mode for instances: iob compact hm-rega.0 enable 1; iob compact hm-rpc.0 enable 1; iob compact hm-rpc.1 enable 1
  7. Use dedicated compact group for RPC: iob compact hm-rpc.0 group 2; iob compact hm-rega.0 group 2;

As a result, HmIP devices will show up in both instance nodes, hm-rcp.0 (where they belong) and hm-rcp.1 (which shouldn't be):

image

@foxriver76
Copy link
Collaborator

Confirmed, there is a strange behaviour. For me it ended up having only rfd devices in both namespaces (rfd is my hm-rpc.0)

@Apollon77 is it already tested, having 2 instances of the same adapter in the same comapct group?

@Apollon77
Copy link
Contributor

Technically this should be completely irrelevant if compact mode or not and such.

For compact mode there is a slight chance that „global“ working libraries (so libs that do not create object instances and store data on such a level) mix up. Maybe it is something like this?

On the other hand vm2 is used where code runs in. I have no idea how separated requires are there then.

I can also have a look at the hm-rpc Code later

Ingo

@foxriver76
Copy link
Collaborator

@Apollon77 As mentioned in Telegram, when the whole code is in startAdapter function it works well. So a compact group seems to share global variables. Which is not only a problem when using the same adapter multiple times in a group, but also when two different adapters use same names for some global variables.

@Apollon77
Copy link
Contributor

Just variable names should not be the reason ... but great to know

@foxriver76
Copy link
Collaborator

Seems fixed with js-controller 2.0.40

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

No branches or pull requests

4 participants