Announcement

Collapse
No announcement yet.

IP and Serial Plugin

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

  • ivanhoek
    replied
    Input mangled over serial

    First, thanks for this excellent plugin.

    I'm having an issue with the serial type connection when used with my receiver. I have a Yamaha RX-A3000, and when I connect to it (using your plugin) via the serial interface, I can send it commands correctly, but when I receive the input, it arrives in various, random chunks. This prevents me from using the input to trigger events.

    If I use the IP connection type, the input looks fine and I can trigger events. Also, if I connect with putty to the serial port, I can see the input arrive in the correct format. I've tried adjusting the threshold setting to no avail.

    Any thoughts?

    Also, I was having an issue where my commands would be halfway lost after restarting homeseer. The Yamaha command format looks something like this:

    @MAIN:PWR=Standby\r\n (C-escaped) ... I had to switch to binary, otherwise the commands get cut to @MAIN:PWR and the remainder is lost. I assume this happens because you are using '=' as a delimeter in your code.. can you confirm?

    Regards,

    Leave a comment:


  • drule
    replied
    Originally posted by jhuthwaite View Post
    David,

    Firsly, fantastic plug-in. I am in the process of setting up communication to a Philips Dynalite system using an RS485-RS232 gateway. This enables me to send Hex bytes to the Dynalite system to control lighting, fans, blinds etc.

    I was hoping that I could also trigger events using Hex (Binary) strings to enable me to track the status of all these devices.

    When I put the Binary string into the trigger it is not working. Any ideas?

    Thanks

    Jamie
    Hi Jamie, the latest update should make this work for you.

    Leave a comment:


  • drule
    replied
    Scripting access examples. From a script you can send either a predefined command to a existing connection, or a 'dynamic' string to a existing connection. For example:
    Code:
    Public Sub Main(ByVal Params As Object)
        Dim IPP As Object = hs.Plugin("DR IP/Serial PlugIn")
        IPP.Send("Mute", "c_Samsung_c1")
    End Sub
    sends the predefined command Mute to the connection called c_Samsung_c1.
    Code:
    Public Sub Main(ByVal Params As Object)
        Dim IPP As Object = hs.Plugin("DR IP/Serial PlugIn")
        IPP.Send("Hello\sworld\r\n", "C Escaped", "c_Samsung_c1")
    End Sub
    would send Hello World as a C Escaped string to the connection called c_Samsung_c1.

    I think there's loads of other potential uses for this interface and I welcome suggestions for new features.

    -David

    Leave a comment:


  • drule
    replied
    I'm back! Sorry for the disappearance. I had a whole bunch of other things demanding my time and then Hurricane Sandy came along and caused some major damage.

    Anyway, I'll be posting a quick update in a few minutes. The new version includes:
    You can now specify encoding types for triggers. This means you can define hex strings or c-escaped strings to match for event triggers. Bad news: existing triggers will need to be edited to select "raw text" as their type or the update may cause them to stop working.

    "Persistent TCP Clients" will restart if the plugin determines that they have dropped. The initial reconnect attempt will occur immediately. If that attempt fails, the plugin will continue to attempt to reconnect periodically at an interval defined in the plugin's config page (defaults to every 10 seconds).

    You can now trigger an event when a persistent TCP client connects and/or disconnects.

    Scripting access. You can now use scripts to send stuff to connections. Right now I've only defined two script commands but expect to grow this over time based on any requests I may get. I'll give some examples in a later post.

    My apologies once again for the long interval between my posts and thanks to cheeryfool for keeping an eye on things for me. He earned himself a copy of the update a couple of days early ;-)

    -David

    Now posted at: http://forums.homeseer.com/showthread.php?t=155438
    Last edited by drule; December 5, 2012, 01:20 PM. Reason: File posted

    Leave a comment:


  • travisdh
    replied
    Great plugin, was just having a play to see what it was capable of and I am very impressed. I have a question though, is it possible in the event trigger (this may be a feature request) to have a trigger if the string contains the phrase, rather than the string is the phrase?

    Thanks

    Leave a comment:


  • manxam
    replied
    drule hasn't been on the forums in a couple of months. I'm not sure what's happened to him.

    Have you enabled debug and watched the log to see what the data captured looks like? I suspect it's being escaped with \ or other characters (and/or line feeds).

    Leave a comment:


  • jhuthwaite
    Guest replied
    Triggering Events on Binary Strings

    David,

    Firsly, fantastic plug-in. I am in the process of setting up communication to a Philips Dynalite system using an RS485-RS232 gateway. This enables me to send Hex bytes to the Dynalite system to control lighting, fans, blinds etc.

    I was hoping that I could also trigger events using Hex (Binary) strings to enable me to track the status of all these devices.

    When I put the Binary string into the trigger it is not working. Any ideas?

    Thanks

    Jamie

    Leave a comment:


  • drule
    started a topic IP and Serial Plugin

    IP and Serial Plugin

    I've had some very good responses so far, including a couple of feature suggestions. Please keep them coming!

    -David

    Link to plugin: http://forums.homeseer.com/showthread.php?t=155438
    Last edited by drule; August 24, 2012, 08:33 AM. Reason: Adding link to plugin.
Working...
X