Serial messages in 2.4 (SOLVED)

On windows 10, i’m Trying out the new OpenHAB 2.4 alongside the OpenHAB2.1 I have already got installed. Everything else apart from the issue below is working fine.

Sending messages to the serial COM port worked fine in 2.1 but exactly the same items and rules doesn’t work in 2.4. In the event logs, the item registers receiving a message, but doesn’t actually send it through to the serial port:

In an items file:
String Arduino “Arduino [%s]” (arduino) {serial=“COM3”}
Switch SwitchFireplace “Fireplace” [ “Switchable” ]

In a rules file:
rule “SwitchFireplaceOn”
when
Item SwitchFireplace received command ON
then
sendCommand (Arduino , “1;1;6730310\n”)

end

Has the handling of serial messages changed from 2.1 to 2.4?
It did a search on this forum but nothing related to 2.4 came up.

Just a thought. :thinking: :thought_balloon:

Can COM port be accessed by 2 applications at the same time or only by one?
Could it be that your openHAB 2.1 accesses the COM3 and blocks the communication for openHAB 2.4?

Thanks for the suggestion.
I close down 2.1 before starting 2.4, so they are not running at the same time.
However, one thing I haven’t done is restart the pc. I’ll try that and report back.

EDIT: Nope. Still doesn’t work.

Hmmm

Same config? Same binding? Are there error logs in the openhab log?
Did you increase the log level of the serial binding?

Event log says:
2019-04-18 10:06:01.619 [ome.event.ItemCommandEvent] - Item ‘Arduino’ received command 1;0;5726162

So it’s definitely receiving. Do I need to explicitly set the baud rate or something in the item description now?EDIT:that didn’t work either.

I never used the serial binding so far :confused: so I can just refer to the Serial Binding docs

Okay. Nothing else I can try now. Looks like the serial binding is no longer working in windows 10 for openhab 2.4.

EDIT: Oh! I didn’t have the serial binding installed!
All works fine now!!!