Announcement

Collapse
No announcement yet.

HomeTroller SEL as Serial Modbus Gateway

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HomeTroller SEL as Serial Modbus Gateway

    I have acquired a HomeTroller SEL primarily to use as a Modicon master for monitoring mostly digital inputs on a Click PLC. I have installed the trial Modbus plugin but have had no luck in getting it to communicate with the Click.

    Since I already had a USB to RS-232 converter and the Click supports RS-232 Modbus on port 2 and I am only interested in communicating with one Modbus slave, this is the configuration I have chosen.

    Com port chosen: /dev/ttyUSB0.
    Both ports set to 9600, odd, 1 stop bit. I have also enabled zero based addressing (based on earlier thread on Click addressing issues).
    For initial testing, I am trying to read a single input, but only get status of unreachable on the RTU gateway plug-in and no change in status for the bit monitored.

    The log reads:
    Oct-08 11:07:29 AM Modbus Warning Gateway [Modbus RTU Gateway] is disabled, not initialising transport
    Oct-08 11:07:29 AM Modbus Error Error initialising serial port: Cannot find the requested class member.
    Oct-08 11:07:29 AM Device Control Device: Modbus System Modbus RTU Gateway to Enable (1) by/from: CAPI Control Handler

    Questions:
    - Is this RS-232 Modbus supported by the plug-in?
    - Is there some driver I need to tell the USB port it needs to communicate via RS-232?
    - What does "unreachable" mean exactly. Is this a plug-in software configuration issue or is my USB to RS-232 converter not compatible?
    - If not, can you suggest a compatable USB to RS-232 converter?

    I have exhausted all my ideas and am looking for some suggestions to try.

    #2
    "Unreachable" means there's no way for the gateway to communicate with the slave. This is becase the PI is having an issue opening the serial port:

    Oct-08 11:07:29 AM Modbus Error Error initialising serial port: Cannot find the requested class member.
    The plugin should be physical layer independent - so RS232 or RS485 should work.

    Can you try using modpoll form the command line and let me know if you're able to communicate with your PLC?
    http://www.modbusdriver.com/modpoll.html


    If this works then I know it's an issue in the PI and we can try and track it down, if not, then it's an issue with your USB/Serial adapter and we can work from there.
    Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

    Comment


      #3
      Thanks for the quick response. Hate to sound like the Linux novice that I am but to me, the HomeTroller is a closed system. Can you point me to some guidelines somewhere on how to load and execute a third party program/commands on the HomeTroller SEL outside of HS3?

      Comment


        #4
        Originally posted by tjb View Post
        Thanks for the quick response. Hate to sound like the Linux novice that I am but to me, the HomeTroller is a closed system. Can you point me to some guidelines somewhere on how to load and execute a third party program/commands on the HomeTroller SEL outside of HS3?
        Not a all, you raise a good point. Can you ssh to your HomeTroller using a Windows tool like Putty? You should be able to log in to the HomeTroller using the default login (assuming you have not changed it):

        login as: homeseer
        password: hsthsths3

        Once you get logged in run:
        wget http://www.modbusdriver.com/downloads/modpoll.3.4.zip
        unzip modpoll.3.4.zip
        then run modpoll -h and look at the command line arguments.

        In the interim, do you have any documentation for the device you're connecting to, and how are you connecting the USB-Serial adapter to your PLC?
        Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

        Comment


          #5
          In the interim ---

          Click PLC port 2 is a RJ45 with 6 pins: 2x0v, 5v, Rx, Tx, RTS
          I have tried connecting with the Click official programming cable which is a USB to RS-232 converter for communicating with Port 1 for programming and I have tried a generic (from China) board which uses a FT232R converter chip. (no docs). This converter has pin outs so I can experiment with the RG45 cable connections. Swap Tx & Rx, etc. Same results from both cables.

          Click documemtation implies all that is necessary for Modbus communications is Rx, Tx & gnd. The Click is well documented on the www.automationdirect.com website. Ch 4 - Communications is here.

          https://cdn.automationdirect.com/sta...0userm/ch4.pdf

          I'll look at issuing Modbus commands tonight.

          Comment


            #6
            Downloaded and installed Putty, successfully logged onto my HomeTroller, downloaded modpoll and unzipped. Directories and files were created but when modpoll command is entered I get "command not found". Have poked around a bit to the limit of my linux knowledge. Modpoll file is there (in linux directory) but will not execute. I understand its not your role to troubleshoot modpoll but I'm stuck now. Any suggestions are welcome.

            Comment


              #7
              Sure, try 'chmod +x modpoll' in the linux directory. That should make it executable,
              Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

              Comment


                #8
                From the linux directory ---
                'chmod +x modpoll' returns nothing. No error message - nothing but CR and new prompt.
                'chmod +x modpoll -h' returns error 'command not found'

                I have to be traveling now until Sunday so will try variations again then and let you know.
                Thanks for suggestions to this point. Any additional are always welcome.

                Comment


                  #9
                  Got modpoll to work by entering following command from log on directory (just above linux directory).

                  -----------------------------------------------------------------------------

                  "linux/modpoll -b 9600 -p none -m rtu -a 1 -r 500 -c 10 /dev/ttyUSB0"

                  response:----------

                  modpoll 3.4 - FieldTalk(tm) Modbus(R) Master Simulator
                  Copyright (c) 2002-2013 proconX Pty Ltd
                  Visit http://www.modbusdriver.com for Modbus libraries and tools.

                  Protocol configuration: Modbus RTU
                  Slave configuration...: address = 1, start reference = 500, count = 10
                  Communication.........: /dev/ttyUSB0, 9600, 8, 1, none, t/o 1.00 s, poll rate 1000 ms
                  Data type.............: 16-bit register, output (holding) register table

                  No permission to access serial or TCP port!

                  ---------------------------------------------------------------------

                  Last "no permission" seems to be the issue.
                  Is this a plug-in issue??

                  Comment


                    #10
                    Just checking to see if you had any additional thoughts on the above post. My 30 day trial is coming to an end and I hate to purchase if I cannot get it working.
                    Thanks.

                    Comment


                      #11
                      Originally posted by tjb View Post
                      Just checking to see if you had any additional thoughts on the above post. My 30 day trial is coming to an end and I hate to purchase if I cannot get it working.
                      Thanks.
                      Sorry for the late response, the notification ended up in my spam folder for some reason.

                      can you add "sudo" before the modpoll command - it looks like the user you're logged in as is not allowed to access the serial port on the SEL.

                      Let me know if your trial has expired and I'll get an extension for you.

                      Gavin
                      Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                      Comment


                        #12
                        OK. I have modpoll communicating with the Homeseer SEL. It is polling 10 discrete inputs and responding accurately.

                        The Homeseer web control page still says Modbus Gateway is unreachable. The installed plug-ins page states that my trial has expired so I guess I will need an extension.

                        Thanks,

                        Comment


                          #13
                          Superb. Can you post the modpoll output and command line please?


                          Sent from my iPhone using Tapatalk
                          Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                          Comment


                            #14
                            command:
                            ^Chomeseer@hometrollerSEL:~$ sudo linux/modpoll -b 9600 -p none -m rtu -a 2 -r 1 -c 10 -t 1 /dev/ttyUSB0

                            modpoll output:
                            modpoll 3.4 - FieldTalk(tm) Modbus(R) Master Simulator
                            Copyright (c) 2002-2013 proconX Pty Ltd
                            Visit http://www.modbusdriver.com for Modbus libraries and tools.

                            Protocol configuration: Modbus RTU
                            Slave configuration...: address = 2, start reference = 1, count = 10
                            Communication.........: /dev/ttyUSB0, 9600, 8, 1, none, t/o 1.00 s, poll rate 1000 ms
                            Data type.............: discrete input

                            -- Polling slave... (Ctrl-C to stop)
                            [1]: 1
                            [2]: 0
                            [3]: 0
                            [4]: 0
                            [5]: 0
                            [6]: 0
                            [7]: 0
                            [8]: 0
                            [9]: 0
                            [10]: 0

                            Input 1 is my test input.

                            Comment


                              #15
                              Super, thanks. I'm working on an extension to the trial as soon as I have the license key we can get the plugin up and running.

                              Gavin
                              Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                              Comment

                              Working...
                              X