ioBroker.cloud icon indicating copy to clipboard operation
ioBroker.cloud copied to clipboard

Read-only state "xyz" has been written without ack-flag

Open jpawlowski opened this issue 2 years ago • 6 comments

Die State Objekte werden vom Adapter als Readonly / write=false definiert. Das ist sinnvoll, allerdings passen die dazugehörigen setState() Befehle nicht. Dort wird das ack Flag nicht auf true gesetzt:

https://github.com/ioBroker/ioBroker.cloud/blob/0b4e7b738b2e1ca586aa89cfe6ba8f77f4f881db/main.js#L847

Aus diesem Grund wirft der JS-Controller korrekterweise eine Warnmeldung im Log:

Read-only state "cloud.0.services.custom_xyz" has been written without ack-flag with value "this is my value"

Daher wäre es prima, wenn die setState() Befehle entsprechend mit ack=true ausgeführt würden.

jpawlowski avatar Jan 13 '23 19:01 jpawlowski

Yes I will fix this, BUT "services" vis pro cloud are kind of deprecated and should be moved to iot adapter!

Apollon77 avatar Jan 14 '23 16:01 Apollon77

"services" vis pro cloud are kind of deprecated and should be moved to iot adapter!

That is good to know, thank you! I didn't know this. Was there any official info about it? Asking bc I'm currently integrating some API handling into the ioBroker.residents adapter using ioBroker.simple-api, ioBroker.cloud, and apparently now also ioBroker.iot adapters.

Also important: It seems that there is quite a difference in terms of feature parity between using "services" in the IoT adapter in comparison to the cloud adapter. The cloud adapter supports POST requests, more importantly it avoids using URL parameters like ?service=*&user=*&key=*.

The IoT adapter mixes user data and authentication data which is not a useful design to be honest. Using POST requests is not possible here as per definition, URL parameters would need to be added to the body text instead. But applications expect the body text to be fully "theirs", meaning applications POST-ing a JSON object simply expect to send their pure data. There are even frameworks that invalidate URLs with parameters when sending a POST request (for example, Apple - you can evaluate this using Siri Shortcuts). I'd rather see a better URL format based on REST API standards for the ioBroker.iot adapter. The ioBroker.cloud adapter does a better job here.

jpawlowski avatar Jan 17 '23 13:01 jpawlowski

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[bot] avatar May 09 '23 02:05 stale[bot]

still a topic for discussion/resolution

jpawlowski avatar May 26 '23 08:05 jpawlowski

Any news ?

tommyMX avatar Apr 01 '24 21:04 tommyMX

Read-only state "iot.0.services.custom_location.home" has been written without ack-flag with value "false"

tommyMX avatar Apr 01 '24 21:04 tommyMX