Node-Red Reading Values from Click PLC

I am having issues figuring out how to read values from from Click PLC using Modbus. I am reading 15 for quantity but i want to translate to a number instead of an array and display in Home assistant as an entity.

[{"id":"60cce770e7fc7035","type":"inject","z":"91cfb05c729d8220","name":"","props":[{"p":"topic","v":"","vt":"date"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":190,"y":2340,"wires":[["494db88edae7cd17"]]},{"id":"494db88edae7cd17","type":"function","z":"91cfb05c729d8220","name":"Display Gate Operational State","func":"msg.payload = { \n    value: msg.payload, \n    'fc': 3,\n    'unitid': 1,\n    'address': 16883,\n    'quantity':15,\n    } \n    return msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":450,"y":2340,"wires":[["b9619e76bf35c64f"]]},{"id":"43797ef24240043b","type":"api-call-service","z":"91cfb05c729d8220","name":"","server":"788afdb8.f1c034","version":5,"debugenabled":false,"domain":"input_number","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_number.gate_status"],"data":"msg.payload","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1090,"y":2340,"wires":[[]]},{"id":"7a9c4a1615ad580e","type":"debug","z":"91cfb05c729d8220","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1040,"y":2400,"wires":[]},{"id":"b9619e76bf35c64f","type":"modbus-flex-getter","z":"91cfb05c729d8220","name":"","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"server":"6acb19b43669ef88","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":750,"y":2340,"wires":[["43797ef24240043b","7a9c4a1615ad580e"],[]]},{"id":"788afdb8.f1c034","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"},{"id":"6acb19b43669ef88","type":"modbus-client","name":"Click PLC","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"192.168.1.25","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectOnTimeout":true,"reconnectTimeout":2000,"parallelUnitIdsAllowed":true}]

Ok I think i figured out i need to use the buffer parser but i am getting the error “Call-Service attempted without connection to server” ?

[{"id":"60cce770e7fc7035","type":"inject","z":"91cfb05c729d8220","name":"","props":[{"p":"topic","v":"","vt":"date"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":190,"y":2340,"wires":[["494db88edae7cd17"]]},{"id":"494db88edae7cd17","type":"function","z":"91cfb05c729d8220","name":"Display Gate Operational State","func":"msg.payload = { \n    value: msg.payload, \n    'fc': 3,\n    'unitid': 1,\n    'address': 16883,\n    'quantity':15,\n    } \n    return msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":450,"y":2340,"wires":[["b9619e76bf35c64f"]]},{"id":"43797ef24240043b","type":"api-call-service","z":"91cfb05c729d8220","name":"","server":"788afdb8.f1c034","version":5,"debugenabled":false,"domain":"input_number","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_number.gate_status"],"data":"msg.payload","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1130,"y":2500,"wires":[[]]},{"id":"7a9c4a1615ad580e","type":"debug","z":"91cfb05c729d8220","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1040,"y":2400,"wires":[]},{"id":"b9619e76bf35c64f","type":"modbus-flex-getter","z":"91cfb05c729d8220","name":"","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"server":"6acb19b43669ef88","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":750,"y":2340,"wires":[["7a9c4a1615ad580e","c4c068e448ce721a"],[]]},{"id":"c4c068e448ce721a","type":"buffer-parser","z":"91cfb05c729d8220","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"int16be","name":"Counter1","offset":0,"length":0,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":910,"y":2460,"wires":[["20941cf817a7fe21","43797ef24240043b"]]},{"id":"20941cf817a7fe21","type":"debug","z":"91cfb05c729d8220","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1090,"y":2460,"wires":[]},{"id":"788afdb8.f1c034","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","credentials":{}},{"id":"6acb19b43669ef88","type":"modbus-client","name":"Click PLC","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"192.168.1.25","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectOnTimeout":true,"reconnectTimeout":2000,"parallelUnitIdsAllowed":true}]