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

datenpunkt type änderung #15

Closed
liv-in-sky opened this issue Oct 17, 2019 · 8 comments
Closed

datenpunkt type änderung #15

liv-in-sky opened this issue Oct 17, 2019 · 8 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@liv-in-sky
Copy link

hallo zefau - ich versuche gerade ein script zu schreiben, welches die datenpunkte etwas analysiert und auswertet - dabei ist aufgefallen , dass du im adapter datenpunkte vom type text und double hast - man sagte mir, ich solle ein issue dazu erstellen
im forum: https://forum.iobroker.net/post/312375

Image 4

Image 3

gruß

@Zefau
Copy link
Collaborator

Zefau commented Oct 17, 2019

Kann ich bestätigen. Der Adapter übernimmt den Datentyp aus der API.
Was genau ist das Problem? Nur die Kombination von role text und type double?

Ich habe eine Anpassung in der Zeile 871 vorgenommen: entry['type'] habe ich auf string geändert.
Von:
https://github.com/Zefau/ioBroker.plex/blob/49a1c91236881c11d5600908237f0cf53d26cc94/plex.js#L871

auf:

'type': entry['type'] == 'bool' ? 'boolean' : (entry['type'] == 'int' ? 'number' : 'string'),

@Zefau
Copy link
Collaborator

Zefau commented Oct 17, 2019

v0.7.0 auf Github behebt das Problem. Bestehende Objekte müssen vorher allerdings entfernt werden, damit diese durch den Adapter neu und korrekt angelegt werden.

@liv-in-sky
Copy link
Author

super danke dir - ich lass mein script nochmal drüber laufen und gebe dir bescheid

@Zefau
Copy link
Collaborator

Zefau commented Oct 22, 2019

@liv-in-sky Wie sieht's aus? Passt's?

@Zefau Zefau added this to In progress in Plex ROADMAP Oct 22, 2019
@liv-in-sky
Copy link
Author

hi zefau,

habe dp gelöscht und adapter installiert

sieht besser aus bis auf:
Image 4

@liv-in-sky
Copy link
Author

probier doch mal das script vom ersten post aus - bin froh, wenn ein paar tester da sind

@Zefau
Copy link
Collaborator

Zefau commented Oct 23, 2019

The state ratingKey is a number for all my playlists. Do you have a string value here?
Also the channels info and events look good to me?

Will be fixed in future version:

  • port
  • seekTo
  • setVolume

timestamp looks good?

{
  "common": {
    "name": "Timestamp of the event being received",
    "role": "value",
    "type": "number",
    "write": false
  },
  "type": "state",
  "native": {},
  "from": "system.adapter.plex.0",
  "user": "system.user.admin",
  "ts": 1571854106258,
  "_id": "plex.0._playing.firefox-bfdnfl59yw20e02jzguzl625.timestamp",
  "acl": {
    "object": 1636,
    "state": 1636,
    "owner": "system.user.admin",
    "ownerGroup": "system.group.administrator"
  }
}

@Zefau
Copy link
Collaborator

Zefau commented Oct 28, 2019

@liv-in-sky kannst du das Skript (https://forum.iobroker.net/post/311971) anpassen, dass es als Test integriert werden kann? Also, dass vor dem Release npm run test prüft, ob alles passt. Weiterhin wäre eine whitelist klasse, falls einige Datenpunkte gewollt so sind, wie sie sind.

@Zefau Zefau added bug Something isn't working help wanted Extra attention is needed labels Oct 28, 2019
@Zefau Zefau self-assigned this Oct 28, 2019
@Zefau Zefau moved this from In progress to Done in Plex ROADMAP Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Plex ROADMAP
  
Done
Development

No branches or pull requests

2 participants