[SOLVED] Right format for postUpdate and sendCommand

Hi,

i have this

Item:

String Clim_1           "AC"               <AC>           (gAll,gChart,gHistory,gSalon,gAC,gBye,gNight)  // [ "Lighting" ]

Sitemap

Switch item=Clim_1 	        label="Salon"			icon="climate"  		 mappings=[ ON="ON",OFF="OFF"]/

the question is how to sendcommand and update the item from a rule :slight_smile:

Option 1: (current format used). it works but it’s strange that the PostUpdate is with "
Clim_1.sendCommand(“ON”)
Clim_1.postUpdate(“ON”)

Option 2:
Clim_1.sendCommand(“ON”)
Clim_1.postUpdate(ON)

Option 3:
Clim_1.sendCommand(“ON”)
Clim_1.postUpdate(“ON”)

Thanks for your help

Option1

Clim_1 is a String so you send it a "String"

Whats the differences between postupdate and sendcommand?

In the most simple way:

postUpdate changes the state on the item in OH
sendCommand changes the state AND pushes the value to the binding

Hmm okay.
I asked because I have a periodic problem with one rule and the sendcommand til an IHC item.
With hours inbetween it gives me an timeout to the IHC controller (the binding do the timeout). Even though the binding receive from the IHC controller at the same time without any problems. I can even activate a pushbutton on the IHC controller, while this specific rule where I use sendCommand, gives me timeout…
I thought of trying postUpdate, but I suspect thats gona work.