General Modbus support
Moderators: leecollings, remb0
-
- Posts: 843
- Joined: Sunday 23 February 2014 17:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: mixed
- Location: Hengelo(Ov)/NL
- Contact:
Re: General Modbus support
@bobdvb
After adjustment of the interface to my configuration with /dev/ttyAMA0 and speed = 9600, I tried to run your probe-script (further unchanged), but got stuck.
See 1 printline appearing:
= Input Registers =
Then error report for line 23, and last line of Traceback/Debug reports 'IOError: No communication with the instrument (no answer)'.
Apparently something in that line 23, which is not accepted in my configuration with a kWh-meter DDS238-1ZN at Slave-Address 1.
Any idea?
After adjustment of the interface to my configuration with /dev/ttyAMA0 and speed = 9600, I tried to run your probe-script (further unchanged), but got stuck.
See 1 printline appearing:
= Input Registers =
Then error report for line 23, and last line of Traceback/Debug reports 'IOError: No communication with the instrument (no answer)'.
Apparently something in that line 23, which is not accepted in my configuration with a kWh-meter DDS238-1ZN at Slave-Address 1.
Any idea?
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
-
- Posts: 843
- Joined: Sunday 23 February 2014 17:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: mixed
- Location: Hengelo(Ov)/NL
- Contact:
Re: General Modbus support
For the question 'Which devices on the RS485-bus?' perhaps pymodbus has some solution.
In the documentation the class pymodbus.constants.Defaults has settings to listen or to ignore Slaves-not-responding, and in the class pymodbus.constants.ModbusStatus reports the status of an adressed Slave.
Now 'only' have to develop a script with pymodbus, which sequentially calls all Slaves to get a listing of occupied Slave-adresses, and then command/request selected Slave(s) to shift to another adress.
In the documentation the class pymodbus.constants.Defaults has settings to listen or to ignore Slaves-not-responding, and in the class pymodbus.constants.ModbusStatus reports the status of an adressed Slave.
Now 'only' have to develop a script with pymodbus, which sequentially calls all Slaves to get a listing of occupied Slave-adresses, and then command/request selected Slave(s) to shift to another adress.
Last edited by Toulon7559 on Saturday 24 December 2016 8:47, edited 2 times in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
-
- Posts: 2
- Joined: Sunday 16 March 2014 17:16
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: General Modbus support
I have bought a Systemair SAVE mostly because it has a well documented MODBUS interface included. I have purchased an RS485 adapter to my domoticz units and I'm willing to help to try things out.
https://www.google.se/url?sa=t&rct=j&q= ... 3lWwPJBfiw
https://www.google.se/url?sa=t&rct=j&q= ... 3lWwPJBfiw
-
- Posts: 843
- Joined: Sunday 23 February 2014 17:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: mixed
- Location: Hengelo(Ov)/NL
- Contact:
Re: General Modbus support
Looking on the internet for another thing, I found this introduction to Modbus.
In plain (dutch) language it summarizes what Modbus is, what you can do with it, and some aspects to notice, when making an application script.
In plain (dutch) language it summarizes what Modbus is, what you can do with it, and some aspects to notice, when making an application script.
Last edited by Toulon7559 on Friday 17 March 2017 13:23, edited 1 time in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
-
- Posts: 18
- Joined: Friday 29 July 2016 9:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: General Modbus support
Okay, I have shelved my python scripts for now and I have found that I can get things roughly working with NodeRed and to do it I am using: https://flows.nodered.org/node/node-red-contrib-modbus
Because I am using serial I am using mbusd which I just recently discovered and it is working well so far. http://mbus.sourceforge.net
I'll publish my flows when I understand what I am doing!
Bob
Because I am using serial I am using mbusd which I just recently discovered and it is working well so far. http://mbus.sourceforge.net
I'll publish my flows when I understand what I am doing!
Bob
Re: General Modbus support
Just to add link: http://libmodbus.org/
It's C implementation and it is quite robust, easy port and so on... RTU and TCP are supported. It can be used as master and slave implementation.
My experience is from 2012-2014...
EDIT: Reread the thread and libmodbus was already mentioned
It's C implementation and it is quite robust, easy port and so on... RTU and TCP are supported. It can be used as master and slave implementation.
My experience is from 2012-2014...
EDIT: Reread the thread and libmodbus was already mentioned
-
- Posts: 32
- Joined: Monday 18 May 2015 17:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: General Modbus support
I might be interested in putting a bounty up for this functionality, if there are any takers?
-
- Posts: 133
- Joined: Wednesday 11 March 2015 19:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: General Modbus support
is someone working on this?
i would like to have Modbus TCP support, i would like to integrate a Railduino (and later more than one) in Domoticz..
see also:
https://www.domoticz.com/forum/viewtopi ... 17&t=17368
i would like to have Modbus TCP support, i would like to integrate a Railduino (and later more than one) in Domoticz..
see also:
https://www.domoticz.com/forum/viewtopi ... 17&t=17368
-
- Posts: 112
- Joined: Monday 26 June 2017 21:16
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Spain
- Contact:
Re: General Modbus support
I'm interested in your work. How do you translate modbus to domoticz in node red?bobdvb wrote:Okay, I have shelved my python scripts for now and I have found that I can get things roughly working with NodeRed and to do it I am using: https://flows.nodered.org/node/node-red-contrib-modbus
Because I am using serial I am using mbusd which I just recently discovered and it is working well so far. http://mbus.sourceforge.net
I'll publish my flows when I understand what I am doing!
Bob
Enviado desde mi Lenovo K50-t5 mediante Tapatalk
-
- Posts: 32
- Joined: Monday 18 May 2015 17:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: General Modbus support
Anything to do with ModBus is interesting to me, please tell us more!salvacalatayud wrote:I'm interested in your work. How do you translate modbus to domoticz in node red?bobdvb wrote:Okay, I have shelved my python scripts for now and I have found that I can get things roughly working with NodeRed and to do it I am using: https://flows.nodered.org/node/node-red-contrib-modbus
Because I am using serial I am using mbusd which I just recently discovered and it is working well so far. http://mbus.sourceforge.net
I'll publish my flows when I understand what I am doing!
Bob
Enviado desde mi Lenovo K50-t5 mediante Tapatalk
-
- Posts: 18
- Joined: Friday 29 July 2016 9:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: General Modbus support
Sorry for not visiting the forum for a while, I started a new job and it's occupied all my brain space lately.
My Pi has crashed and I haven't recovered it yet so I can't share what I did exactly, but from memory:
You need to set up the MQTT as sinks and sources, that should already be in Node-Red with Domoticz.
https://www.domoticz.com/wiki/MQTT
Then you just set up the node-red-contrib-modbus and it is all about reading "coils" and registers. You really need to know what the device is capable of and it's coil maps, otherwise it is hit and miss. I used my script to probe the coil reads which was helpful but writing to the relay still eluded me.
Work in progress?
My Pi has crashed and I haven't recovered it yet so I can't share what I did exactly, but from memory:
You need to set up the MQTT as sinks and sources, that should already be in Node-Red with Domoticz.
https://www.domoticz.com/wiki/MQTT
Then you just set up the node-red-contrib-modbus and it is all about reading "coils" and registers. You really need to know what the device is capable of and it's coil maps, otherwise it is hit and miss. I used my script to probe the coil reads which was helpful but writing to the relay still eluded me.
Work in progress?
-
- Posts: 62
- Joined: Thursday 03 December 2015 21:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: v3.8742
- Contact:
Re: General Modbus support
I would also really like to see general Modbus TCP support
In that way it would be easy to interact with PLC's from different vendors
In that way it would be easy to interact with PLC's from different vendors
-
- Posts: 62
- Joined: Saturday 07 November 2015 12:30
- Target OS: Windows
- Domoticz version: Beta
- Location: Sweden
- Contact:
Re: General Modbus support
How hard can it be... Modbus and KNX support now please!
-
- Posts: 140
- Joined: Wednesday 17 December 2014 17:30
- Target OS: Linux
- Domoticz version: V3.8650
- Location: Jyväskylä, Finland
- Contact:
Re: General Modbus support
Just implement it! Domoticz is open source
LXC(x64 Ubuntu Xenial), RFXtrx433E, MySensors
-
- Posts: 8
- Joined: Tuesday 10 November 2015 19:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5877
- Location: Netherlands
- Contact:
Re: General Modbus support
It was very interesting to read all you effort to get Modbus into Domoticz!
As I am creating a house that can be monitored and steered more and more, I also bought some kHw meters to measure (and steer) depending on power input (or other information) coming form kWh meters that have a Modbus onboard.
The basic of Modbus is robust and simple as you all noticed, but get it connected as a simple "fill in the addresses and variables" into a kind of table would be a nice goal as domotica is continue to grow and Modbus is one of the interesting protocols.
I was reading some real effort of coding and I asked myself what we as a community could create from that.
I am really not an expert programmer but have some spare nighttime to test and practise on several devices.
@Richard1, @pj-r, @miljume, @bobdvb, @Lomax, @salvacalatayud, @Thomasdc, @vuokko, @Toulon7559 together we could develop something nice
Who can help me in getting somewhere?
Regards
As I am creating a house that can be monitored and steered more and more, I also bought some kHw meters to measure (and steer) depending on power input (or other information) coming form kWh meters that have a Modbus onboard.
The basic of Modbus is robust and simple as you all noticed, but get it connected as a simple "fill in the addresses and variables" into a kind of table would be a nice goal as domotica is continue to grow and Modbus is one of the interesting protocols.
I was reading some real effort of coding and I asked myself what we as a community could create from that.
I am really not an expert programmer but have some spare nighttime to test and practise on several devices.
@Richard1, @pj-r, @miljume, @bobdvb, @Lomax, @salvacalatayud, @Thomasdc, @vuokko, @Toulon7559 together we could develop something nice
Who can help me in getting somewhere?
Regards
- Domoticx
- Posts: 90
- Joined: Sunday 07 January 2018 21:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: Marienheem / The Netherlands
- Contact:
Re: General Modbus support
Hi All,
Modbus plugin released soon , follow: https://domoticz.com/forum/viewtopic.php?f=65&t=21297
Enjoy!
Modbus plugin released soon , follow: https://domoticz.com/forum/viewtopic.php?f=65&t=21297
Enjoy!
My Domoticz plugins:
- Modbus RS485 RTU/ASCII/TCP
Maatwerk in: Domotica - Automatisering - Elektronica - 3D printing - Software ontwikkeling
Website / Webshop / Knowledge Center / Facebook (like de pagina en blijf op de hoogte!)
- Modbus RS485 RTU/ASCII/TCP
Maatwerk in: Domotica - Automatisering - Elektronica - 3D printing - Software ontwikkeling
Website / Webshop / Knowledge Center / Facebook (like de pagina en blijf op de hoogte!)
Who is online
Users browsing this forum: No registered users and 1 guest