Where can I find the response string - ItachFlex

Don’t send this commands yet - it is only linked to the receive channel, yes? Are you really getting responses from the device, as opposed to internal reflections of your command (the ‘prediction’)

Okay, step one.

OH3 users are finding that profile update process is not very dynamic. It’s a pain, but I suggest you reboot OH as your profile setting looks good now.

I tried the textual definition as well but got what I sent. I am sending via a Cell on a Page, how did you send? I also have test.map and denonmsg.map both in the /etc/openhab/transform folder
Also noticed you cannot currently update or change the textual definition from the UI, you have to make new ones …:frowning:

(rebooted whole debian - no change)

I sent from the Karaf console.

openhab:send Test_Item_String @PWR:1\%0D

I don’t have time ATM to try it using the UI.

ok I installed Karaf (no idea what it does, so I will research later)
I ran: openhab-cli console from the debian console, and got the openhab prompt

entered the command with appropriate "Test_Item_Stringx" and @PWR:1\%0D
transform not applied.

restarted, same thing.

So decided to delete all those test items and make
i) one from .items file (appended F)
ii) one via the UI - textual item (appended UI)
The file one worked, the UI created one does not work
NOTE the far right does NOT update with the transformed value you have to open it.

image

image

So maybe a UI creation bug - IDK how to look at the JSON in the db

I’ve lost track of what you are trying to do now, and complaining about “when I do this” without really detailing “this” isn’t helping.
How did you set your UI test Item up? How did you set your file test Item up? The process differs. Can we see? What have you asked your widgets to display? It is optonal to display raw state or transformed state, when formatting at state presentation level.

Simply trying to transform the received string from a real device into a human readable format and show it on the Cell that sent the command. This was first attempted to ALL be done through the OH3 web UI.

Real devices are receiving and processing their serial commands, that all works.
OH gets the devices reply but it stays as a command string. To clean that up the connector had a profile assigned to it (denonmsg.map) which there was no way to tell if it was being used, probably not since even the null key was ignored.

Mark suggested above creating an item from a Textual definition - which was done through the UI, and command was sent to it via openhab-cli it simply echoed the command.

I then created a clone item from a .items file and sent it a command, it transformed the reply using the map file.

The syntax used to create the Textual item definition in both the UI and the items file was exactly the same as in Marks post:
String Test_Item_String "Test String [MAP(test.map):%s]"

Summary - creating the item from a .items file works for transforming real device replys, creating item via the UI, reply transformation seems ignored.

Outstanding - now that the item has a humanly readable value, how does a Cell pick that up/get updated with the transformed value, in the footer of the cell for example?

IDK if it helps but notice in the API explorer that there no MAP Pattern set for this item, even though the UI shows it to be denonmsg.map

{
    "link": "http://192.168.1.90:52080/rest/items/DenonRcvTest",
    "state": "NULL",
    "stateDescription": {
      "pattern": "%s",
      "readOnly": false,
      "options": []
    },
    "editable": true,
    "type": "String",
    "name": "DenonRcvTest",
    "label": "DenonRcvTest",
    "category": "",
    "tags": [],
    "groupNames": []
  },

The item created from a text file has a patterns map
{
“link”: “http://192.168.1.90:52080/rest/items/Test_Item_StringF”,
“state”: “@PWR:1%0D”,
“transformedState”: “offfx3”,
“stateDescription”: {
"pattern": “MAP(test.map):%s”,
“readOnly”: false,
“options”: []
},
“editable”: false,
“type”: “String”,
“name”: “Test_Item_StringF”,
“label”: “Test String”,
“tags”: [],
“groupNames”: []
}

(both map files exist in the transform folder)

All of this stuff works, it’s just finger trouble.

There aren’t any Textual Items. There are String Items.
You can’t type that line into the UI, so we’ll have to guess what you did.
I think that will be pasting Test String [MAP(test.map):%s] into the Item ‘label’ box.
In OH2 PaperUI, that works. The parser pulls out the [state presentation] and does stuff with it.

In OH3 MainUI,it doesn’t work. You just get a label Test String [MAP(test.map):%s]
It has to go somewhere else - in the Item’s metadata, the “pattern” box.

EDIT -ah, you’ve found API Explorer, that’s good :slight_smile: complete with an example of the format it is looking for,no this time.

Didn’t say there are “textual items”
image

From the images below and testing, it’s clear that OH3 UI created items ignore connector level Profile MAPS for physical device reply strings

For an item of type string - if you add meta data “State Description” namespace, you can manually specify the pattern, such as:

MAP(denonmsg.map):%s

Which will transform the device’s reply string.

So this leads me to think channel connector MAP profiles are broken in the UI.


The question remains how does a Cell get that transformed value now and display it.

Alright, you have a special version of openHAB where the profiles don’t work at all. (Do bear in mind that because profiles operate on data between channel and Item, nothing actually happens until data comes from in the device via the channel).

For a UI created Item, you will have to set your metadata and [text] in the label is just text…

It is special its misbehaving and going on your only constructive input - is it receiving a reply and not getting set to “predicted value”

The clear answer after testing on the network is NO. iTest gets the reply (and its on a different computer) but the Container Debian does not, port fowarding for itach 4998 to 5000 both udp and tcp are open but I cannot see any inbound traffic on those ports, only outbound.

These are the replys to the sends that came from oh3 ui, but the replys have not made it back to the receive channel, the string item (brand new) connect to that channel just stays as null.
image

Reconfigured Debian VM - the ports for iTach Traffic are fully un-blocked, socket requests to itachflex are accepted and replys are received via telnet, and are also seen in itach free tool: iTest on another workstation on the same LAN.

SO - sending and receiving work from the VM when confirmed with other tools - telnet and itest.

However - OH3 Thing Receive channel remains null and is not updated with the query reply of the itachflex device.

itachflex at latest version : 710-3000-21
settings are: Serial, 9600, N, 8, 1 HD.

This is really basic stuff, picking up the reply - What am I doing wrong, or what is possibly broken in OH3?

Alright, transforms relegated to sideshow for now.

Do think you ever had data from the receive channel, or its just confusion?
The “owning” Thing is configurable for two-way comms, how is that set?

I think there may never have been return data being picked up by the channel and it was “predicted to become” value as you suggested. The denon spits back confirmation or error of the command sent as seen using itest and telnet (telnet from the command line of the vm itself). On a hard query such as: “@PWR:?0x0D” from a 3rd computer on the network, telnet session (on vm), itest (on computer 2) all see the reply: PWR:1, meaning device is off, it changes appropriately for volume queries etc. Two way is enabled on the Denon Thing.

I’m not sure how to configure “owning”

Whatever openHAB Thing is the parent of the channel you are interested in.
It won’t mean much to me, but I think at this stage you need to show the config of this Thing, as you’re now OH3.

This config?

{
“statusInfo”: {
“status”: “ONLINE”,
“statusDetail”: “NONE”
},
“editable”: true,
“label”: “DenonA7100 GlobalCache iTach Flex”,
“configuration”: {
“ipAddress”: “192.168.1.41”,
“eomDelimiter1”: “%0A”,
“enableTwoWay1”: true,
“activeCable”: “FLEX_SERIAL”
},
“properties”: {},
“UID”: “globalcache:itachFlex:de21c73d63”,
“thingTypeUID”: “globalcache:itachFlex”,
“channels”: [
{
“linkedItems”: ,
“uid”: “globalcache:itachFlex:de21c73d63:sl-m1#c1”,
“id”: “sl-m1#c1”,
“channelTypeUID”: “globalcache:channel-type-sl”,
“itemType”: “String”,
“kind”: “STATE”,
“label”: “Connector 1 (mapped)”,
“description”: “Mapped commands to serial port”,
“defaultTags”: ,
“properties”: {
“module”: “1”,
“connector”: “1”
},
“configuration”: {}
},
{
“linkedItems”: [
“DenonA7100GlobalCacheiTachFlex_Connector1direct”
],
“uid”: “globalcache:itachFlex:de21c73d63:sl-m1#c1-direct”,
“id”: “sl-m1#c1-direct”,
“channelTypeUID”: “globalcache:channel-type-sl-direct”,
“itemType”: “String”,
“kind”: “STATE”,
“label”: “Connector 1 (direct)”,
“description”: “Direct commands to serial port”,
“defaultTags”: ,
“properties”: {
“module”: “1”,
“connector”: “1”
},
“configuration”: {}
},
{
“linkedItems”: [
“DenonA7100GlobalCacheiTachFlex_Connector1receive”
],
“uid”: “globalcache:itachFlex:de21c73d63:sl-m1#c1-receive”,
“id”: “sl-m1#c1-receive”,
“channelTypeUID”: “globalcache:channel-type-sl-receive”,
“itemType”: “String”,
“kind”: “STATE”,
“label”: “Connector 1 (receive)”,
“description”: “Data received on serial port”,
“defaultTags”: ,
“properties”: {
“module”: “1”,
“connector”: “1”
},
“configuration”: {}
},

ITEMS:

{
    "link": "http://192.168.1.90:52080/rest/items/DenonA7100GlobalCacheiTachFlex_Connector1receive",
    "state": "NULL",
    "stateDescription": {
      "pattern": "%s",
      "readOnly": true,
      "options": []
    },
    "editable": true,
    "type": "String",
    "name": "DenonA7100GlobalCacheiTachFlex_Connector1receive",
    "label": "Denon  (receive)",
    "category": "",
    "tags": [],
    "groupNames": [
      "Basement"
    ]
  },
  {
    "link": "http://192.168.1.90:52080/rest/items/DenonA7100GlobalCacheiTachFlex_Connector1direct",
    "state": "@PWR:?%0D",
    "stateDescription": {
      "pattern": "%s",
      "readOnly": false,
      "options": []
    },
    "editable": true,
    "type": "String",
    "name": "DenonA7100GlobalCacheiTachFlex_Connector1direct",
    "label": "Denon  (direct)",
    "category": "",
    "tags": [],
    "groupNames": []
  },

I’m in the midst of trying variations - the above is two separate items,
Trying (i) just one item connected to receive and no item on send, (2) same item on receive and send to see if anything is picked up on receive channel.

More out of curiosity - but how does OH3 manage connections to the itachflex devices, do they constantly have a connection to them on port 4999 or is the connection opened then closed after a command originating from OH3 is sent, or is there a “stay connected for x milliseconds time”

Exactly so.
I know nothing about the binding’s workings, but that all looks reasonable against the docs.
One query - confident about EOM setting, x0A (ascii NL) ? Your trace earlier suggests it might be x0D (ascii CR)?

1 Like

:partying_face: ALRIGHT !! One down, One to go.

EOL for denon reponse is %0D - receive channel working !
MAP file working !

Beers on me if you drink, if not name your beverage :slight_smile:

Thank You (and Mark) for you perseverance.

Next up was how to get a handle to that transformed response, from a cell. I’ll check out the link above.

BTW - set this up with insteon devices, its lighting fast compared to their app, next trying it on Sony and Samsung displays, some Bryston hardware, projectors - its not often one gets to do a fun project around the place. #lockdownfun

1 Like

Glad you got it sorted. Sorry for being offline as I was tied up with something else.

I should’ve thought to ask about the end-of-message delimiter. But as we thought it was working, it never crossed my mind.

1 Like