Page 2 of 2

Re: General Modbus support

Posted: Monday 19 December 2016 19:47
by Toulon7559
@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?

Re: General Modbus support

Posted: Monday 19 December 2016 20:33
by Toulon7559
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.

Re: General Modbus support

Posted: Wednesday 21 December 2016 21:38
by term
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

Re: General Modbus support

Posted: Thursday 09 February 2017 10:46
by Toulon7559
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.

Re: General Modbus support

Posted: Tuesday 14 March 2017 16:39
by bobdvb
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

Re: General Modbus support

Posted: Monday 10 April 2017 19:02
by Lomax
+1

Re: General Modbus support

Posted: Monday 10 April 2017 22:19
by vuokko
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 :oops:

Re: General Modbus support

Posted: Saturday 15 April 2017 21:07
by Lomax
I might be interested in putting a bounty up for this functionality, if there are any takers?

Re: General Modbus support

Posted: Tuesday 09 May 2017 18:33
by Thomasdc
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

Re: General Modbus support

Posted: Thursday 13 July 2017 20:41
by salvacalatayud
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
I'm interested in your work. How do you translate modbus to domoticz in node red?

Enviado desde mi Lenovo K50-t5 mediante Tapatalk

Re: General Modbus support

Posted: Tuesday 01 August 2017 18:39
by Lomax
salvacalatayud wrote:
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
I'm interested in your work. How do you translate modbus to domoticz in node red?

Enviado desde mi Lenovo K50-t5 mediante Tapatalk
Anything to do with ModBus is interesting to me, please tell us more!

Re: General Modbus support

Posted: Thursday 10 August 2017 22:51
by bobdvb
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?

Re: General Modbus support

Posted: Wednesday 04 October 2017 9:46
by miljume
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

Re: General Modbus support

Posted: Thursday 26 October 2017 10:16
by Ricard1
How hard can it be... ;) Modbus and KNX support now please! :D :P

Re: General Modbus support

Posted: Saturday 28 October 2017 17:15
by pj-r
Ricard1 wrote: Thursday 26 October 2017 10:16 How hard can it be... ;) Modbus and KNX support now please! :D :P
Just implement it! Domoticz is open source ;)

Re: General Modbus support

Posted: Sunday 26 November 2017 20:41
by DomoArie
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

Re: General Modbus support

Posted: Sunday 07 January 2018 21:35
by Domoticx
Hi All,

Modbus plugin released soon 8-) , follow: https://domoticz.com/forum/viewtopic.php?f=65&t=21297

Enjoy!