Mistake on Eclipse SmartHome Designer - and big delay between 2 telegram

Hi,

i use a small example to show my problem.

in the sitemap:

sitemap home label="My Test"
{
	Frame label="Switch - Key Status"
	{
		Switch item=Key_0_Command
		Text item=Key_0_State
		Switch item=Licht_Command
		Text item=Licht_State
	}

in the items:

Switch Key_0_Command "Taste 1" {mqtt=">[mosquitto:home/eg/wz/switch/key0:command:ON:ON],>[mosquitto:home/eg/wz/switch/key0:command:OFF:OFF]"}
String Key_0_State "Status Taste 1 [%s]" <switch> {mqtt="<[mosquitto:home/eg/wz/switch/key0:state:default]"}
Switch Licht_Command "Licht" <light> {mqtt=">[mosquitto:home/eg/wz/light/power:command:ON:ON],>[mosquitto:home/eg/wz/light/power:command:OFF:OFF]"}
String Licht_State "Status Licht [%s]" <wallswitch> {mqtt="<[mosquitto:home/eg/wz/light/power:state:default]"}

and in the rules:

rule "WZ_Licht_AN"
when
  Item Key_0_State changed from OFF to ON
then
  publish("mosquitto", "home/eg/wz/light/power", "ON")
end

rule "WZ_Licht_AUS"
when
  Item Key_0_State changed from ON to OFF
then
  publish("mosquitto", "home/eg/wz/light/power", "OFF")
end
  • The first statement goes to the development department of openhab or Eclipse SmartHome Designer.

    When i use the publish() command then show me the designer a mistake -> the methode publish(String, String, String) is undefined.
    The Designer show me that it recognizesed a mistake, but the rule is working.

  • The other thing is the big delay between doing and action.


    I push the Switch “Taste 1” and a mqtt telegram goes out

    … the telegram comes in - goes through the rule and a new telegram goes out

    The time between both telegram is 6 seconds. That is too much.
    Why is the openhab system so slowly?

a screenshot from startscreen:

Another question:
when i change the state of switch “Taste 1”, so the state change on “Status Taste 1” and later on “Status Licht”,
but the switch “Licht” does not change it self. Why?

Another hint to the developer of openhab:
In the chrome browser, any change is only displayed after the update.

thanks
Peter

Actions are not recognized by Designer 0.8 right now. This error in Designer can be ignored for now. Hopefully there will either be an update or a replacement for Designer sometime soon (version 0.9 is unusable) but in the mean time there are some thing that Designer can’t do.

This will require you to do a lot of debugging to identify exactly where the delay is. In my experience with Pushbullet, and NMA the delay is in the service, not in OH.

But you can turn on trace logging and follow the activity of the action and identify whether the delay is on the OH side or the telegram side.

Could be a lot of things. You need to trace the messages as they pass from Item to the Event Bus (events.log) to MQTT to the device and back again and figure out where the change is being lost.

Hi,

@rlkoshak you are on the right way. I’ve check out the version of Eclipse SmartHome Designer. I use the version “eclipsesmarthome-incubation-0.8.0-designer-win64”.
It sounds very good that the developers have already recorded this problem and will correct this error message in the next version.

So I just did a new test and now had to realize that the time delay of 6 seconds is gone. I do not know why? I’ll keep watching this.

Can anyone tell me why only the status changes and not the switches?

Should I open a new topic?

ciao
Peter

The Switch doesn’t have any incoming MQTT configs. If you want the Switch to change you need to have it subscribe to the same topic that Status subscribes to. Or you can write a rule to update the state of the Switch when the Status updates.

Hi Rich,

many thanks for your response. I have read another article from you (State / Command in MQTT messages). In this, you describe that the MQTT topic should be distinguished by state and command. In your previous answer, you say that the switch can be switched in one rule. Can you give me an example of this?

Can I directly address the item like
Item.state = “ON” or “OFF”

Not quite but close.

You can MyItem.sendCommand(ON) or MyItem.postUpdate(OFF).

The difference is sendCommand will send the new state to the linked channel or binding and ultimately it to the device whereas postUpdate only changes the state of the item in OH and does not how it to the device.

In this situation you almost certainly want to use postUpdate.

I use your suggestion MyItem.postUpdate(ON or OFF).
Disadvantage, I get 2 times the same MQTT telegram.