-
Notifications
You must be signed in to change notification settings - Fork 68
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
Item update issue in Siemens Logo Plugin #151
Comments
Der Fehler mit dem update verstehe ich (noch) nicht. Wenn sich bei mir ein Eingang/Ausgang/Merker/Analogwert ändert, so bekomme ich den Status auch sofort und richtig in der Visu angezeigt.. hmm? Wozu ist das source attribute denn sinnvoll? item(new_value, 'LOGO') |
Hallo Es ist folgendermaßen: Nach hinzufügen des Source Attributs ist dieser Effekt verschwunden. Es erscheint nun einmalig "Objekt set to true via LOGO" im Log und der Status bleibt erhalten. MfG |
Items set through read_cycle function in Logo-plugin won't get updated properly and will be reset within next read cycle.
I could fix it by adding a source attribute in the _read_cycle function as follows:
284 if 'old' in v: # Variable wurde schon einmal gelesen
285 if v['old'] != new_value: # Variable hat sich geändert
286 ##logger.debug("LOGO: read_cycle():{0} newV:{1} oldV:{2} item:{3} ".format(k, new_value, v['old'], v['item']))
287 v.update({'value': new_value})
288 v.update({'old': new_value}) # speichere den aktuellen Zustand
--289 item(new_value) # aktualisiere das Item
++289 item(new_value, 'LOGO') # aktualisiere das Item
290 logger.debug('LOGO: updateItem {0}'.format(item))
The text was updated successfully, but these errors were encountered: