MiSchroe / ioBroker.klf200

Adapter for ioBroker to connect to a KLF200 interface and run scenes and products.
MIT License
17 stars 14 forks source link

"targetPosition" not reacting to MQTT-client changes #68

Closed docpayce closed 2 years ago

docpayce commented 3 years ago

Describe the bug
When changing "targtPosition" of any product via e.g. API ("http://:8087/set/klf200.0.products.3.targetPosition?value=100&prettyPrint") everything works as intended. When trying the same via the adapter "mqtt-client" the value of the object is changed in the iobroker GUI ("tagetPosition" is updated to the new value) but the command is not executed, i.e. the position of the roller/shader will not start to change.

To Reproduce
Steps to reproduce the behavior:

  1. Setup MQTT broker if not available yet (e.g. via adapter "mqtt" localhost)
  2. Add adapter mqtt-client if necessary
  3. Change settings of object "targetPosition" to both publish and subscribe to an appropriate MQTT topic, e.g. "klf200/0/products/0/targetPosition"
  4. Publish a random value on topic "klf200/0/products/0/targetPosition"
  5. The value is updated but no movement executed

Expected behavior
One would expect the shader/roller to start moving with any change in "targetPosition" no matter the source of change.

Screenshots & Logfiles
Screenshot 1: Everything normal, currentPosition = targetPosition as intended Clipboard01

Screenshot 2: After updating targetPosition to a random value via MQTT publish, the currentPosition will not change, as there is no movement happening Clipboard02

Versions:

MiSchroe commented 2 years ago

Works for me if setting of targetPosition is only checked at "subscribe". Works sometimes somehow if "published" is selected, too.