• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Using Serial Data Source as MBUS device

    User help
    5
    29
    11.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • TurboT
      Turbo @Turbo
      last edited by Turbo

      @Turbo Well hot damn. The thing works.

      So now I can socat data in as a TCP point.. That's cool.

      For folks following along:
      First, do this to forward the port:
      79470b9a-a3e7-4957-a605-7c7910570af7-image.png

      socat -d -d -d -d tcp-listen:4141,reuseaddr,fork file:/dev/ttyUSB0,nonblock,cs8,b2400,cstopb=0,raw,echo=0

      This is a 2400 baud device.
      I set the timeout for 250, no delimeter, and then port 4141 (as above) and host of Localhost.

      Then, in the data point, I created a general placeholder with a read command of "00" and a value regex of (.*), value index 0

      This appears to update properly.

      Now to write a parser- This sure would be easier with the original M-Bus device.

      Thanks for your help, @MattFox .

      There also appears to be a bug (still) in the serial data source, at least when running on Linux- This test install is a raspberry pi, but we'll be deploying this on our IMX8's as usual, I hpoe.

      TurboT 1 Reply Last reply Reply Quote 1
      • TurboT
        Turbo @Turbo
        last edited by

        @Turbo Ok. One more quick question on here: Since this device is (effectively) streaming data in - There isn't even a RX pin on the device we're talking to, is there a way to set up the tcpip connector to just store data as it comes in, rather than requiring the use of the "read" command before awaiting a response?

        Right now, I'm just sending "00" out as a read command, but the device has no read command; It just spews data out. The read command forces a sync where none exists. I'd rather just have the tcpip point record the point when data comes into the point, rather than after the read command is issued.

        If I disable "queryable" I get no data at all, but I enable queries, I end up missing every third packet, since there's no way to sync the "output only" nature of the M-Bus device with Mango's need to poll and record a response.

        It kinda works, but I wonder if there's some secret to have Mango just store whatever comes in over that port?

        1 Reply Last reply Reply Quote 0
        • TurboT
          Turbo @MattFox
          last edited by

          @MattFox So: Turns out the socat solution works, but it's not really as straightforward as using the Serial device natively:
          Can you poke around and see if the Serial data source needs some hugs? Using a TCP forward for a USB converter serial port seems a bit silly to me, when Mango has a raw Serial device interface that (should) do the same thing.

          I've now had no luck with the serial data source on my ARM based IMX8 machine over hardware serial or USB to 485 serial under V3 or V4, and now am seeing the same thing under V4 on a raspberry pi.

          I'm happy to set up a screen share / demo video / something if you want to see what I'm seeing with this.

          Thanks for your help, in any event, as we now have a (mostly) working MBus data source again, although in a somewhat ridiculously rube-goldbergesque way.

          MattFoxM 1 Reply Last reply Reply Quote 0
          • MattFoxM
            MattFox @Turbo
            last edited by

            @Turbo sure I'll flick you a PM

            Do not follow where the path may lead; go instead where there is no path.
            And leave a trail - Muriel Strode

            1 Reply Last reply Reply Quote 0
            • T
              tungthanh500 @Turbo
              last edited by

              @Turbo can you share the reason why you didn't use a Mbus to Modbus TCP converter in your cases? The only time I have to reqd data from Mbus devices, I use Anybus gateway, quite easy to use.

              TurboT 1 Reply Last reply Reply Quote 0
              • TurboT
                Turbo @tungthanh500
                last edited by

                @tungthanh500 Budgets. The M-Bus to USB converter is $20, the M-Bus to modbus device is considerably more expensive. Our goal is also to keep the number of things "needing configuration" to an absolutely minimum:If we can do it in Mango, it saves us time and money (and spare parts inventory costs).

                T 1 Reply Last reply Reply Quote 1
                • cwangvC
                  cwangv @Turbo
                  last edited by

                  @Turbo
                  I didn't notice the MBUS driver has been dropped. That is bit disappointing. I have got a project with 50 MBUS meters. So I have to hook them into something else then spit them back out via BACnet IP then.

                  the workaround you have mentioned is a bit painful to implement and to get working reliably.

                  TurboT 1 Reply Last reply Reply Quote 0
                  • TurboT
                    Turbo @cwangv
                    last edited by

                    @cwangv That's true- I'm happy to send you my code, if you want, when I get it working- It's just a scripted point that searches raw strings for the OBIS code and saves it in datapoints. This for energy meters, and so far, it works OK.

                    @CraigWeb any plans on bringing the M-Bus module in Mango V4? It's interesting, since it's still stated as "supported" on Mango's website: https://radixiot.com/supported-protocols

                    You only find out it's missing from V4 when you look at the documentation for Upgrade from V03 -> V04: https://docs-v4.radixiot.com/upgrade-to-v4 and scroll down to "unsupported modules"

                    CraigWebC 1 Reply Last reply Reply Quote 0
                    • T
                      tungthanh500 @Turbo
                      last edited by

                      @Turbo you arr right, I bought a converter at $500 in my country just for 4 water meter

                      1 Reply Last reply Reply Quote 0
                      • CraigWebC
                        CraigWeb @Turbo
                        last edited by

                        @Turbo I think you would be better off chatting with our team about adding the data source back to v4. We removed it because we had a total of 5 downloads over 3 years.

                        TurboT cwangvC 2 Replies Last reply Reply Quote 0
                        • TurboT
                          Turbo @CraigWeb
                          last edited by

                          @CraigWeb I appreciate that; We're going to be shipping a mountain of these things internationally use M-Bus (I hope), so for now I'm using my TCP silly workaround for this (since the Serial data source still appears to not work properly for whatever reason on our Arm-based machines).

                          Some other folks have piped up here as well about M-Bus- This exists basically nowhere in the US (as I've found now that I'm testing things using M-Bus) but apparently is quite common in IOT purposes in Europe- Every meter in Norway (for example) has an M-Bus port for interfacing HAN devices directly to your buildings' meter.

                          Surely someone must have had a reason that this got added in the first place; Although I do understand not updating things if nobody is using it. Since we're going to be using this A Lot (I think), we may be able to chat NRE to get it put back- I'm still chatting with Michael about Mango for our 2023 project pipeline, and this could be a good business discussion point to have.

                          CraigWebC 1 Reply Last reply Reply Quote 0
                          • CraigWebC
                            CraigWeb @Turbo
                            last edited by

                            @Turbo ye I know of one other client in Ireland who is using it successfully in v3 with about 30 MangoGTs so ill help motivates it with that point.

                            1 Reply Last reply Reply Quote 0
                            • cwangvC
                              cwangv @CraigWeb
                              last edited by

                              @CraigWeb
                              Hi, Craig
                              Good to see you back on here.

                              I will definitely submit this for my project since I have an existing Mango system running.
                              Should I just get in contact with technical support?

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post