Announcement

Collapse
No announcement yet.

Simple Serial Communication

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

    Simple Serial Communication

    Is there a simple way to send/receive simple serial communication via COM1? Is the only option to use the Big 6? I really don't need all of that for the simple text commands I need to receive. I looked around and could only find very complex and specific serial device communications.

    #2
    Yes. Can you post some info on the device you want to talk to so I can create a simplified script? Basically, it involves opening the COM port with a callback specified for when data is received. The callback function is what processes the received data. Sending is simply a matter of sending data to the open COM port.

    If you're adventurous, you can also do it with Node-RED and the HS4 nodes.
    "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

    Comment


      #3
      It is the Universal Remote MSC-400 that will be sending simple text. It is configured to use the following settings. The text will vary, but will will be simple text such as "GR LAMP ON". It just need to be able to receive the text and execute an event based upon the text. There is no need to talk (send) to this device, only receive. Thanks!

      Click image for larger version

Name:	image.png
Views:	171
Size:	4.6 KB
ID:	1590741

      Comment


        #4
        ctuinstra I need you to do a quick test for me since I don't have the device. Follow the instructions starting on Page 72 of the attached manual except don't check “Append line feeds to incoming line ends” as stated in the note on page 77. Tell me if the default "line end" character is an LF (line feed) or a CR (carriage return). Based on the note I suspect a CR since it instructs you to append an LF.

        The line end char is what is used to tell HomeSeer when to make the callback to the data processing function.

        Edit: Ref Manual is here. Too Big to upload.
        "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

        Comment


          #5
          HS natively supports serial communication with scripting commands to open a port and get callbacks to the script when a character or line is received.

          mcsMQTT plugin (free) provides a visual rather than scripting interface for serial communications that uses HS Device/Feature as the conduit for the communication. In this case it can be physical serial ports or serial ports over ethernet.

          Index from HS3Help.pdf

          Click image for larger version  Name:	0x.png Views:	0 Size:	44.6 KB ID:	1590909

          Setup from mcsMQTT

          Click image for larger version  Name:	1.png Views:	0 Size:	26.6 KB ID:	1590910

          Comment


            #6
            Yes, I forgot about this capability in mcsMQTT. For receiving simple text messages, this would be the easiest route.
            "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

            Comment

            Working...
            X