eclipse-archived / smarthome

Eclipse SmartHome™ project
https://www.eclipse.org/smarthome/
Eclipse Public License 2.0
862 stars 783 forks source link

[mqtt] Rollershutter STOP command, outgoing transform, chained incoming transformations #6695

Closed davidgraeff closed 5 years ago

davidgraeff commented 5 years ago

The Rollershutter channel stores its value as percentage. UP/DOWN/STOP commands received via MQTT do not change that state.

Instead of trying to handle those commands, they are now posted to the framework.

Signed-off-by: David Gräff david.graeff@web.de

openhab-bot commented 5 years ago

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/mqtt-2-5/60365/1

openhab-bot commented 5 years ago

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/binding-mqtt-2-5-0-snapshot-rollershutter-command-is-sent-wrong/61091/5

openhab-bot commented 5 years ago

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/mqtt2-in-openhab-2-4-rollershutter-map/61311/5

openhab-bot commented 5 years ago

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/mqtt2-in-openhab-2-4-rollershutter-map/61311/5

kaikreuzer commented 5 years ago

@davidgraeff Could you please check the compilation failures on Travis?

davidgraeff commented 5 years ago

Yes of course.

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.2.0:compile (default-compile) on project org.eclipse.smarthome.binding.mqtt.generic.test: Compilation failure: Compilation failure: 
[ERROR] /home/travis/build/eclipse/smarthome/extensions/binding/org.eclipse.smarthome.binding.mqtt.generic.test/src/test/java/org/eclipse/smarthome/binding/mqtt/generic/internal/values/ValueTests.java:[86] 
[ERROR]     PercentageValue v = new PercentageValue(null, null, null);
[ERROR]                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The constructor PercentageValue(null, null, null) is undefined
[ERROR] /home/travis/build/eclipse/smarthome/extensions/binding/org.eclipse.smarthome.binding.mqtt.generic.test/src/test/java/org/eclipse/smarthome/binding/mqtt/generic/internal/values/ValueTests.java:[98] 
[ERROR]     PercentageValue v = new PercentageValue(null, null, null);
[ERROR]                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The constructor PercentageValue(null, null, null) is undefined
[ERROR] /home/travis/build/eclipse/smarthome/extensions/binding/org.eclipse.smarthome.binding.mqtt.generic.test/src/test/java/org/eclipse/smarthome/binding/mqtt/generic/internal/values/ValueTests.java:[183] 
[ERROR]     PercentageValue v = new PercentageValue(new BigDecimal(10.0), new BigDecimal(110.0), new BigDecimal(1.0));
[ERROR]                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The constructor PercentageValue(BigDecimal, BigDecimal, BigDecimal) is undefined
[ERROR] /home/travis/build/eclipse/smarthome/extensions/binding/org.eclipse.smarthome.binding.mqtt.generic.test/src/test/java/org/eclipse/smarthome/binding/mqtt/generic/internal/values/ValueTests.java:[192] 
[ERROR]     PercentageValue v = new PercentageValue(new BigDecimal(0.1), new BigDecimal(1.0), new BigDecimal(0.1));
[ERROR]                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The constructor PercentageValue(BigDecimal, BigDecimal, BigDecimal) is undefined
[ERROR] /home/travis/build/eclipse/smarthome/extensions/binding/org.eclipse.smarthome.binding.mqtt.generic.test/src/test/java/org/eclipse/smarthome/binding/mqtt/generic/internal/values/ValueTests.java:[203] 
[ERROR]     PercentageValue v = new PercentageValue(new BigDecimal(10.0), new BigDecimal(110.0), new BigDecimal(1.0));
[ERROR]                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The constructor PercentageValue(BigDecimal, BigDecimal, BigDecimal) is undefined
[ERROR] /home/travis/build/eclipse/smarthome/extensions/binding/org.eclipse.smarthome.binding.mqtt.generic.test/src/test/java/org/eclipse/smarthome/binding/mqtt/generic/internal/generic/ChannelStateTests.java:[195] 
[ERROR]     PercentageValue value = new PercentageValue(new BigDecimal(-100), new BigDecimal(100), new BigDecimal(10));
[ERROR]                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The constructor PercentageValue(BigDecimal, BigDecimal, BigDecimal) is undefined
[ERROR] /home/travis/build/eclipse/smarthome/extensions/binding/org.eclipse.smarthome.binding.mqtt.generic.test/src/test/java/org/eclipse/smarthome/binding/mqtt/generic/internal/generic/ChannelStateTransformationTests.java:[109] 
[ERROR]     assertThat(channelConfig.transformations.get(0).pattern, is(jsonPathPattern));
[ERROR]                              ^^^^^^^^^^^^^^^
[ERROR] transformations cannot be resolved or is not a field
[ERROR] /home/travis/build/eclipse/smarthome/extensions/binding/org.eclipse.smarthome.binding.mqtt.generic.test/src/test/java/org/eclipse/smarthome/binding/mqtt/generic/internal/generic/ChannelStateTransformationTests.java:[121] 
[ERROR]     ChannelStateTransformation transformation = channelConfig.transformations.get(0);
[ERROR]                                                               ^^^^^^^^^^^^^^^
kaikreuzer commented 5 years ago

@davidgraeff I "saw" them myself, my request was rather to fix them...

davidgraeff commented 5 years ago

I'm sure you saw them. That was my way of avoiding to lookup travis again for a later fix.

openhab-bot commented 5 years ago

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/mqtt-2-5/60365/12

davidgraeff commented 5 years ago

@kaikreuzer All tests fixed

openhab-bot commented 4 years ago

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/mqtt-2-chained-transformations/84861/4