Modbus over TCP and Net.FTcpSocket

Moderator: leecollings

Post Reply
candrea77
Posts: 32
Joined: Saturday 25 February 2017 18:42
Target OS: Linux
Domoticz version: 2021.1
Location: Milano, Italy
Contact:

Modbus over TCP and Net.FTcpSocket

Post by candrea77 »

I've currently migrated from Fibaro HC2 to Domoticz.

I wonder if there is a possibility to use that part of code in domoticz in any way :

Code: Select all

tcpSocket = Net.FTcpSocket("x.x.x.x", 502)
tcpSocket:setReadTimeout(250);
bytes, errorCode = tcpSocket:write(sendbuffer)
x.x.x.x is a single IP address
In Fibaro I use it for getting the data from my VMC (that use modbus Over TCP)


Regards
Sorry for any spelling mistake, English is not my native language.

DomoticZ running on Ubuntu 20.04 LTS , dzVents Version: 3.1.7 , Python Version: 3.8.5
candrea77
Posts: 32
Joined: Saturday 25 February 2017 18:42
Target OS: Linux
Domoticz version: 2021.1
Location: Milano, Italy
Contact:

Re: Modbus over TCP and Net.FTcpSocket

Post by candrea77 »

Hello,
no one can help me ?


I've found this part of code in the forum , maybe the Net.FTcpSocket("x.x.x.x", 502) is something like this ?

Code: Select all

conn=net.createConnection(net.TCP, 0)
 conn:on("receive", function(conn, payload) print(payload) end )
Sorry for any spelling mistake, English is not my native language.

DomoticZ running on Ubuntu 20.04 LTS , dzVents Version: 3.1.7 , Python Version: 3.8.5
bobdvb
Posts: 18
Joined: Friday 29 July 2016 9:53
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: United Kingdom
Contact:

Re: Modbus over TCP and Net.FTcpSocket

Post by bobdvb »

I am currently testing using NodeRed and MQTT to communicate with a Modbus PLC, it is working but I have done refinement to do before I share my discoveries.

To do it I am using: https://flows.nodered.org/node/node-red-contrib-modbus
candrea77
Posts: 32
Joined: Saturday 25 February 2017 18:42
Target OS: Linux
Domoticz version: 2021.1
Location: Milano, Italy
Contact:

Re: Modbus over TCP and Net.FTcpSocket

Post by candrea77 »

Thank you .... I give it a look.
Sorry for any spelling mistake, English is not my native language.

DomoticZ running on Ubuntu 20.04 LTS , dzVents Version: 3.1.7 , Python Version: 3.8.5
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest