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

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

Open
jpawlowski opened this issue Jan 13, 2023 · 6 comments
Open

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

jpawlowski opened this issue Jan 13, 2023 · 6 comments

Comments

@jpawlowski
Copy link

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:

adapter.setState('services.custom_' + data.name, data.data, false, err => callback && callback({result: err || 'Ok'}));

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 jpawlowski changed the title Read-only state "xyz" has been written without ack-flag with value Read-only state "xyz" has been written without ack-flag Jan 13, 2023
@Apollon77
Copy link
Contributor

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

@jpawlowski
Copy link
Author

jpawlowski commented Jan 17, 2023

"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.

@stale
Copy link

stale bot commented May 9, 2023

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 May 9, 2023
@jpawlowski
Copy link
Author

still a topic for discussion/resolution

@stale stale bot removed the wontfix label May 26, 2023
@tommyMX
Copy link

tommyMX commented Apr 1, 2024

Any news ?

@tommyMX
Copy link

tommyMX commented Apr 1, 2024

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

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

3 participants