Modbus communication done right in Node-Red

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.ย. 2024

ความคิดเห็น • 33

  • @anetosaraxtos8912
    @anetosaraxtos8912 3 หลายเดือนก่อน

    Great Video! Really helped with a complex industrial modbus integration. Many thanks!!

  • @vin12666
    @vin12666 ปีที่แล้ว +5

    Great video. Only the delay node of 500mSec is not needed. You can enter, for example, 0.2 (seconds) in the interval field of the inject node. Which gives 200 mSec intervals.

  • @bjarnemoeller5910
    @bjarnemoeller5910 ปีที่แล้ว

    Genius. Solved a big issue we have had for some time with a an industrial installation with multiple nodes causing the the ModBus to hung. Thanks!

    • @csongorvarga
      @csongorvarga  ปีที่แล้ว

      I hang similar issue for at least 2 years until I spent the time to dig in and understand this.

  • @icservis
    @icservis 10 หลายเดือนก่อน +1

    Well, that's exactly what I need. Thanks a lot, fits perfectly to my needs. Just moving from Homeassistant implementation of Modus, which is actually not working very well, to such a kind modbus2mqtt converter.

  • @jankokert653
    @jankokert653 ปีที่แล้ว

    Very good video! Thank you! At 5:30: You can input a faction of a second in the inject node (0,5) and so you can get rid of the quirky 500ms delay.

    • @csongorvarga
      @csongorvarga  ปีที่แล้ว

      Thanks. I don't know why I did not try that.

  • @HelloHelloXD
    @HelloHelloXD ปีที่แล้ว +1

    Looking at this I just love the simplicity of MQTT ;-)

    • @csongorvarga
      @csongorvarga  ปีที่แล้ว

      Yes it is, but if you need some (especially industrial) device, it will most probably use modbus or some other protocol than MQTT.

  • @AxilRod72
    @AxilRod72 ปีที่แล้ว

    Thanks very much this is very helpful

  • @BGazzah
    @BGazzah ปีที่แล้ว +1

    I have not used MODBUS in a number of decades :( This is certainly simpler than the hoops we had to jump through back in the day..

    • @csongorvarga
      @csongorvarga  ปีที่แล้ว +1

      There are still so many products that use modbus on the market, and usually on affordable price. Even this is an ageing protocol, it does not appear to be dying any time soon

    • @BGazzah
      @BGazzah ปีที่แล้ว +1

      @@csongorvarga A good, simple, reliable protocol deserves to last. It was never considered "fast" but more than enough for its target use case. Also the hardware was so simple to install..

  • @bennguyen1313
    @bennguyen1313 ปีที่แล้ว +1

    What hardware do you typically run your Flows on? Would Node-Red work on 8-bit microcontrollers and RS485?
    I'm ordering a Pi-Zero and EsspressIf boards.. any thoughts on using python to talk to a modbus temperature sensor (RS485)?
    For example, I see lots of options but not sure the difference: minimalmodbus , stephane/libmodbus , ClassicDIY/ModbusTool, eModbus/eModbus , modbus-esp8266 , QModMaster , rossmann-engineering/EasyModbusTCP_NET , EasyModbusTCP/UDP/RTU _NET?
    BTW, modbus kinda looks like CanOpen.. is there any connection?

    • @csongorvarga
      @csongorvarga  ปีที่แล้ว +1

      I am running my Node-Red on a Dell Optiplex micro PC with Linux. So it is a lot more powerful than a usual raspberry pi setup. Node-Red needs a proper computer to run on, no microcontrollers. Back in the day before Node-Red, I use this python script to read my solar inverter over modbus serial. That should get you started: github.com/SteveNew/GrowattRpi. I have no heard of these libraries, there must be tons of implementation of the protocol.
      Modbus is a very simple master-slave protocol, where a master manages the communication. On a can network all the nodes can communicate and need to handle collision. So it is quite a different concept.

  • @krzemodam2
    @krzemodam2 3 หลายเดือนก่อน

    I have an issue, that queue periodically stops. I assume there might be some issue with respond and workflow stops since message with "next" topic is not emitted. Can I add repeat interval on "next" inject node to overcome this?

    • @csongorvarga
      @csongorvarga  3 หลายเดือนก่อน +1

      Yes, you can do that. Next skips to the next request, so worst case scenario you loose a request. But if it is only queries (get functions), it will be retrieved next time.

  • @hrishikesh2125
    @hrishikesh2125 ปีที่แล้ว +2

    Make video on Node red msg queue

    • @csongorvarga
      @csongorvarga  ปีที่แล้ว

      What do you mean msg queue?

  • @ctlee681231
    @ctlee681231 6 หลายเดือนก่อน

    How to send Modbus commands using node-red
    For example 01 03 00 00 00 01 84 0A
    How to play

    • @csongorvarga
      @csongorvarga  6 หลายเดือนก่อน

      Either with the modbus-write or the modbus-write-flex node. But you need to specify modbus parameters like function, start adddress and quantity.

  • @szabolcs__
    @szabolcs__ ปีที่แล้ว +1

    Something intresting

  • @user-fc5dz3dt3w
    @user-fc5dz3dt3w ปีที่แล้ว

    Hi Csongor. I am currently using node-red for several connections and I have problems with the modbus server that I mount on node-red, after a while it stops working and I have to disable and enable that flow to get the server up.
    The whole project has OPC-UA, MQTT and Modbus communications, all in different flows.
    Using the node "ModBus-Server" or "ModBus-Flex-Server" I can raise a Modbus server or Modbus slave and configuring it with local ip address in "bind-addres" and in Port I put 55380, the problem is that it works for a while and then it stops working.
    I can't find what the problem is and it only crashes if it is working with other flows with OPC and MQTT communications. All other communications are working properly

    • @csongorvarga
      @csongorvarga  ปีที่แล้ว

      This sounds like a complex problem. I had somewhat similar issues when I was using the modbus getter, but after moving to the flex it was OK. Do you get any exceptions or warnings from any of the modbus nodes? Any information in the logs?

  • @ThePollution666
    @ThePollution666 ปีที่แล้ว

    Very nice Video!
    I have a problem with my setup. I need to read a scalefactor and the corresponding value at the same time but they are pretty far apart so the addresses are over 200 registers apart. How would you read them simultaneously? I am reading a solar inverter with a sunspec model. Just for reference :) Any ideas?

    • @csongorvarga
      @csongorvarga  ปีที่แล้ว

      Thanks. I have similar cases, I think for one of my energy monitor, that voltages and currents are in a first 10-15 registers, and a final accumulated consumption is around register 343. I read the first 10 registers, and next I read the rest of 3-4 starting from 343. Do them is separete requests

    • @ThePollution666
      @ThePollution666 ปีที่แล้ว

      But do you think that the request is fast enough?
      The scalefactor determines the power of ten for the value, so it needs to be read simultaneously or in very short succession. I'll try to trigger the scalefactor read with the value read. Maybe that works.

    • @csongorvarga
      @csongorvarga  ปีที่แล้ว +1

      @@ThePollution666 I think reading two shorter ranges of registers is quicker than reading a very larger range in a single request.

  • @borjaroca1262
    @borjaroca1262 ปีที่แล้ว

    In my case worked for a while, i just deployed and says no data.

    • @csongorvarga
      @csongorvarga  ปีที่แล้ว

      Where does it say no data?

    • @borjaroca1262
      @borjaroca1262 ปีที่แล้ว

      @@csongorvarga solved, was a problem of modbus itself, unable to send data then the status of function filled gray and text no data

  • @stefan-lupo-pelzl
    @stefan-lupo-pelzl ปีที่แล้ว +1

    Sadly, I am too unfamiliar to follow the explanations.