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

difference between object?pattern and states?pattern #13

Open
rewegit opened this issue Jan 5, 2019 · 11 comments
Open

difference between object?pattern and states?pattern #13

rewegit opened this issue Jan 5, 2019 · 11 comments

Comments

@rewegit
Copy link

rewegit commented Jan 5, 2019

First of all, thanks for the adapter!
I found an annoying difference between object?pattern and states?pattern.
Objects do not take properties after * into account.
Can this be corrected?

objectspattern
sbjectspattern2
statespattern

thx

@Apollon77
Copy link
Contributor

Do you looked into the JSONs? normally "obkect" returns the complete object definition AND the value, state only returns the value (together with the relevant value data like ts, q, ack and such

@rewegit
Copy link
Author

rewegit commented Jan 5, 2019

I hope I understand you correctly. I just collapsed the objects.
Here is an example for an object:

zigbee.0.00158d0001e7bb0f.voltage: {
type: "state",
common: {
name: "Battery voltage",
type: "number",
unit: "V",
read: true,
write: false,
role: "battery.voltage",
icon: "img/battery_v.png",
custom: {
influxdb.0: {
enabled: true,
changesOnly: true,
debounce: "1000",
retention: 0,
changesRelogInterval: 0,
changesMinDelta: 0,
storageType: "Number",
aliasId: "Schlafstube rechts Volt"
}
}
},
from: "system.adapter.zigbee.0",
ts: 1546721648822,
_id: "zigbee.0.00158d0001e7bb0f.voltage",
acl: {
object: 1636,
state: 1636,
owner: "system.user.admin",
ownerGroup: "system.group.administrator"
},
enums: {
enum.functions.Verschluß: "Verschluß",
enum.functions.Batterie betrieben: "Batterie betrieben"
}
},

That's not the problem either. The problem is the wrong pattern selection.
I think with the query:

http://192.168.99.119:8087/objects?pattern=zigbee.0.*.battery
Should only objects with 'battery' appear as last property, as is the case with 'sates&patter'.

@Apollon77
Copy link
Contributor

aahhhhh this was your question ... yes you are right. ned to check that. seems to be a bug

@Apollon77 Apollon77 added the bug label Jan 5, 2019
@Apollon77 Apollon77 reopened this Jan 5, 2019
@Apollon77
Copy link
Contributor

Rückfrage: Werden deine States in Redis gespeichert?

@rewegit
Copy link
Author

rewegit commented Jan 5, 2019

Standard installation. Läuft im docker-container ohne Redis.
Bis auf das "pattern" Problem kann ich keinerlei Unregelmäßigkeiten entdecken.

@Apollon77
Copy link
Contributor

First check seems to be an issue down in js-controler with "getObjectView" but I need to find time to dig into this. Fix would then be in a future js-controller version or adapte rneed to filter additionally :-(

@rewegit
Copy link
Author

rewegit commented Jan 6, 2019

Ok, thanks for your feedback.

@GermanBluefox
Copy link
Contributor

Because of this:
https://github.com/ioBroker/ioBroker.js-controller/blob/master/lib/objects/objectsInMemServer.js#L2744
It will not be possible to fix the issue in js-controller.

But here https://github.com/ioBroker/ioBroker.simple-api/blob/master/lib/simpleapi.js#L910
we can add additional filter:

if (values.pattern && values.pattern.indexOf('*') !== -1 && !values.pattern.match(/\*$/)) {
    // filter out all ids 
}

@Apollon77
Copy link
Contributor

still relevant

@stale
Copy link

stale bot commented Sep 10, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions.
Dieses Problem wurde automatisch als veraltet markiert, da es in letzter Zeit keine Aktivitäten gab. Es wird geschlossen, wenn nicht innerhalb der nächsten 7 Tage weitere Aktivitäten stattfinden. Bitte überprüft, ob das Problem auch in der aktuellsten Version des Adapters noch relevant ist, und teilt uns dies mit. Überprüft auch, ob alle relevanten Details, Logs und Reproduktionsschritte enthalten sind bzw. aktualisiert diese. Vielen Dank für Eure Unterstützung.

@stale stale bot added the wontfix label Sep 10, 2020
@stale
Copy link

stale bot commented Sep 17, 2020

This issue has been automatically closed because of inactivity. Please open a new issue if still relevant and make sure to include all relevant details, logs and reproduction steps. Thank you for your contributions.
Dieses Problem wurde aufgrund von Inaktivität automatisch geschlossen. Bitte öffnet ein neues Issue, falls dies noch relevant ist und stellt sicher das alle relevanten Details, Logs und Reproduktionsschritte enthalten sind. Vielen Dank für Eure Unterstützung.

@stale stale bot closed this as completed Sep 17, 2020
@Apollon77 Apollon77 reopened this Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants