-
Notifications
You must be signed in to change notification settings - Fork 25
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
Do not run with js-controller 5.0 #276
Comments
Yes, seems https://github.com/sbormann/ioBroker.iqontrol/blob/master/main.js#L1673 was always wrong but silently ignored in the past, not we check a bit better there and so the type do not match |
obj = {...await this.getObjectAsync(objId, {type: 'state'}), ...await this.getObjectAsync(objId, {type: 'channel'}), ...await this.getObjectAsync(objId, {type: 'device'}), ...await this.getObjectAsync(objId, {type: 'enum'})}; Changed it that way. Could you please try with the actual github-version of iqontrol if it works now? |
@sbormann If you want to get an object getObjectAsync(id) is completely sufficient. The options are just needed for special behaviour if you e.g. ewant to limit it to a certain user or such. in your case in fact the options have no meaning because if you try to filter the type then this is not supported by getObject at all (and also had never). Right now you should get back 4 times the same object .... is this intended? |
Hi, getForeignObject(id) does not deliver all types of objects. For example type instance is only delivered, if you call it getForeignObject(id, "instance"). So if the new js-controller doesent accept this any longer, how can i archieve this? I call get ForeignObject in 3 different ways: a and c are the same, as you said. |
You are mixing lots of stuff like |
yes, but in my opinion it makes sense. sometimes i need a specific object, sometimes all of them. Is there any documentation how to use these functions? it's really time consuming to do it all by try'n'error. |
As @foxriver76 already sdtated: getObject/getForeignObject (no "S" at the end!!) is just accessing the pure object via ID and works irrelevant of the object type! YOu aloways get the object if it is a valid ID. getForeighObjects expects a Pattern as first parameter and allows to filter objects types as second parameter ("state" if not provided). But this only exists on that one method. |
Ok, thank you, i think i got it now. Many thanks! |
Thank you! |
The text was updated successfully, but these errors were encountered: