ioBroker.simple-api
ioBroker.simple-api copied to clipboard
difference between object?pattern and states?pattern
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?
thx
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
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'.
aahhhhh this was your question ... yes you are right. ned to check that. seems to be a bug
Rückfrage: Werden deine States in Redis gespeichert?
Standard installation. Läuft im docker-container ohne Redis. Bis auf das "pattern" Problem kann ich keinerlei Unregelmäßigkeiten entdecken.
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 :-(
Ok, thanks for your feedback.
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
}
still relevant
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.
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.