Where can I find the response string - ItachFlex

Hi - just setting up openhab on a nas and testing control with a denon pro pre-amp via RS232 via GlobalCache ItachFlex

The things and items are configured via paper UI, and the “user” UI is the HABPanel.

Simple test - turn the Denon unit on and off - works great. The item is defined as string, and I just pass the proper string and the Denon responds. Two way is enabled on the thing and its sent out via
Module 1 (serial module) - Connector 1 - Direct. (I don’t see any specific module to receive)

However - I do not know where to find the response from the Denon. Using iTest I can see that it sends a response like: @PWR:2 (meaning the physical device is now in ON state)

I would like to show the response in the HABPanel, The HABPanel simply has a button widget on it, and the button settings “Display” tab indicates It should display a response.

Any pointers would be great ! Thanks

The receive channel is defined as “advanced”, so it’s not visible in the UI unless you click “show advanced”

Thanks Mark ! I was blind to the “show more” link.

Now that I have the receive data, I need to transform it into human readable text - is there a simple UI process to do this? (avoiding text files if I can) Starting to lean toward looking at the scripting feature…

Transformations (specifically MAP) might do what you want.

Got into reading about Map (Transformations) - made sure it was installed (Addons - Transformations - Map Transformation)

created a simple map file denon.map and put it /conf/transform folder

I set the map profile under Things/Denon7100_Thing/ Channels / Module 1 / Connector 1(direct) / Linked items (Denon) to MAP (transform:MAP) and specified the filename, leaving State Formatter blank

and it doesn’t seem to work. Can’t seem to find any mention of it in the log as even being processed. (then read about increasing log level and using Karafe…that’s a long road…skipping for now)

In the Profile setting it asks for the filename, I tried just denon and denon.map, no difference.

The response string is: @PWR:1%0D

I tried all these variations in the map file:

and you guessed it, nothing. Lastly I just faked a name for the map file in the channel profile - and no error was raised in paperui or in the log.

So I’m thinking its not reading my map file at all.

Any hints where to look appreciated !

I’m sorry. I don’t know how to do that through the UI, as I use text based items and rules.

Out of curiosity, if you’re setting up openHAB for the first time, is there a reason you chose the 2.5 version instead of 3.0? 2.5 is pretty much out of support, except for critical binding bug fixes.

I’m using 2.5 only because it was available in the QNAP club as an installable app.
I can try installing 3 in a container. …and see how migration happens :slight_smile:

I didn’t mean to send you down a rabbit hole…

Just an update: Openhab 3 is installed now, in a QNAP Container Station running Debian - sure was a minimalistic install had to even install sudo ! In this “virtualized” system, Multicast is not passed thru so it doesn’t find the itachflex devices on its own through scan. Using iHelp.exe (free) from globalcache I found the IPs for all the itachflexs and matched it up with all my installer notes device id - > physical device name.
Created a “cell” on the overview page and through the UI had it call an action (send command string). Unit powers on and off - but this is even more cryptic as to how to pickup the response, let alone change color without writing some “code”. What is that code anyway looks like ecma script, but I can’t seem to find a dom model in the documentation to know what I can call…more digging on the weekend.

Yes, you would need to write a rule to process the response. There are a variety of language choices you could use. You would use “received update” to identify changes to the item linked to the receive channel. Then apply the transform (or your own code) to convert the item state to something human readable.

Isn’t the filename denonmsg.map?

yes, I tried real files, fake files, filename with and without extensions looking for some signal in the log that OH was trying to read the map, will retry this weekend with OH3.

Thanks Mark - I’ll check out rules and the “received update” event

Can we go back a bit? What does happen? A failed transformation usually passes the input string unaltered to the target. Does your String Item get updated?

It’s probably moot at this point @rossko57 since he installed 3.0. Do you know if there’s a way to do a transformation in the new UI without writing a rule?

1 Like

The OH3 UI allows you to add transform profiles to links (which will operate on data from binding before it gets passed toItem). And/or, to put a transform in the Item’s metadata state description (which will leave Item state unaltered but transform it for display only). Same mechanisms as OH2.

There is as yet no means to create or edit associated files like denon.map

I agree its probably moot - I still have OH2.5 on another vm, but OH3 is the one operational.
In OH2.5 the Denon sent back a message, and it showed on a button in the hab panel, but it was “@PWR…xxx”. I wanted to transform that to a real work like “ON” or “OFF”, so created the map file, but it didn’t observe the map file, and I couldn’t find an easy way to see if the map file was even being read.

Maybe if the transform file is missing, it should raise an error when you try to save the profile.

So then it seems this will do what he needs?

So you would do it here using map, javascript, etc.?