Page 1 of 1

tcp poller

Posted: Thursday 06 December 2018 20:42
by vttland
Hello
I work in my house whith industrial plc. (beckhoff twincact 2).
I have installed domoticz on os off plc windows 7 embded.
Is working very well.

I have succefull send data plc to domoticz by json.

Now i have problem to send domoticz to plc.
I have open tcp socket on my plc but is not http port.
And http poller has not working to send data.
But in putty i can send data in raw format in plc.

Have you an idea to send data in simple tcp format in plc?
Thanks

Re: tcp poller

Posted: Thursday 06 December 2018 21:24
by waaren
vttland wrote: Thursday 06 December 2018 20:42 Hello
I work in my house whith industrial plc. (beckhoff twincact 2).
I have installed domoticz on os off plc windows 7 embded.
Is working very well.

I have succefull send data plc to domoticz by json.

Now i have problem to send domoticz to plc.
I have open tcp socket on my plc but is not http port.
And http poller has not working to send data.
But in putty i can send data in raw format in plc.

Have you an idea to send data in simple tcp format in plc?
Thanks
Use a device with in the On action a (bash or other) script that will send the data with netcat
or a script in domoticz (dzVents, Lua, Python or other) executing the os command netcat

Re: tcp poller

Posted: Friday 07 December 2018 15:21
by vttland
Ok is working.

I post my script in bat text :

Code: Select all

echo %1 %2 |D:\Domoticz\Domoticz\scripts\lua\nc.exe -d 127.0.0.1 200
And I attach twincat 2 project for other people want make link whith twincat and domoticz...