Hi @danhoo1
According to the manual, it accepts HTTP POST commands, and the data being sent needs to be XML.
Naturally this will be guess work, but according to the manual, something like this, is what you are looking for.
<Cookie>
<Auth_token_1109>{Password}</Auth_token_1109>
</Cookie>
<APCMD>
<CTEXT>
<POS>20,10</POS>
<TXT>ABC Company</TXT>
</CTEXT>
</APCMD>
Where {Password}
is your MD5 hashed password, converted to a Base64 string.
Using the HTTP Request
Node, will be the node to use here, and the Template
Node.
The below will get you started, but you may need to seek support from the manufacturer, if something isn't right - as said, this is just a guess.
You will need to set the URL in the Request Node - and connect it to the Template
Node of course (which creates the XML body)
[{"id":"a37d6496c9d8e6b9","type":"inject","z":"9c654e1a5e55d43d","name":"Set Auth, Pos, & Text","props":[{"p":"auth","v":"Password1","vt":"str"},{"p":"pos","v":"10,10","vt":"str"},{"p":"text","v":"Hello, World","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":520,"y":640,"wires":[["0f495bfc45920740"]]},{"id":"408370e5f6ec9633","type":"template","z":"9c654e1a5e55d43d","name":"XML Template","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<Cookie>\n\t<Auth_token_1109>{{{auth}}}</Auth_token_1109>\n</Cookie>\n<APCMD>\n\t<CTEXT>\n\t <POS>{{pos}}</POS>\n\t <TXT>{{text}}</TXT>\n\t</CTEXT>\n</APCMD>","output":"str","x":820,"y":720,"wires":[["f7e48a7a884873c1"]]},{"id":"f7e48a7a884873c1","type":"debug","z":"9c654e1a5e55d43d","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1020,"y":640,"wires":[]},{"id":"09d792c316b80c0b","type":"http request","z":"9c654e1a5e55d43d","name":"Send to printer via HTTP","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Content-Type","keyValue":"","valueType":"other","valueValue":"application/xml"}],"credentials":{},"x":1090,"y":720,"wires":[[]]},{"id":"0f495bfc45920740","type":"function","z":"9c654e1a5e55d43d","name":"MD5 Hash -> Base64 the password","func":"msg.auth = crypto.createHash('md5').update(msg.auth).digest(\"hex\")\nmsg.auth = Buffer.from(msg.auth).toString('base64')\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[{"var":"crypto","module":"crypto"}],"x":560,"y":720,"wires":[["408370e5f6ec9633"]]}]