Originally posted by B50int
View Post
Announcement
Collapse
No announcement yet.
IP / Serial Plugin for HS3 (by "drule") - Discussion Thread
Collapse
X
-
They are Extron MLC104IP+ panels so I can program them to send (and respond to) almost anything via serial connection or as TCP hosts in verbose mode.
I have done a bit more experimenting after the VM restore. This time I avoided shortcutting and stopped using the copy command in the connections before amending. Starting the whole setup from scratch it works.
Full of confidence I started using the copy function again. This time on commands to control the panel and the copied commands could not be selected as valid commands from triggers...
Thinking back, the trigger that broke the 'old' connections was also one I copied from a working trigger that I amended.
So, looks Ok at the moment but if my current thinking is correct, it looks like the copy facility is introducing the problems I am experiencing?
Jon
Comment
-
... won't work as TCP host for me
This plug-in won't work as TCP host for me. I'm testing using popular program "PacketSender" that acts as TCP client.
I setup the plug-in to act as "host" at the same IP address where it resides (HS3 machine) and port number 8102. No, I didn't forget to click on "enable" button to enable it. So it is enabled.
The TCP client can't connect at all. It is on the same LAN. Does anyone have it working as TCP host? Any ideas how to make it working? Thanks.Last edited by risquare; July 14, 2018, 07:36 PM.
Comment
-
So I thought I give my old Marantz SR7008 another go at feedback - or passthru as we might call it.
Anyway, I send "NSA\r" to my Marantz, and in return I'll get a 9 line (chr(13) separated I guess) answer in return. This has worked before HomeSeer (Fibaro HC2) so I know what I am after - I just need to get to understand what is wrong... I think I did a test on this a year or two ago and ended up with failure - and I think I even got a version from drule that was to help me (.25 maybe). So Back on the horse then, start simple:
Code:Sub Main(parm as object) Dim Params() As String = Split(parm.ToString, Chr(0)) ' Param(0) is the name of the plugin's connector ' Param(1) is the ip address of the remote end ' Param(2) is the data received Dim SplitString() As String = Split(Params(2), Chr(13)) hs.writelog("Marantz FeedBack: ", SplitString(1)) End Sub
This will of course fail, on the Split function (since if I remove them, the error goes away...) - and the error gives me nothing:
Running script FeedBackMarantz.vb :Exception has been thrown by the target of an invocation.->Does entry point Main exist in script? at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x7f004e5ab9e0 + 0x000ef> in :0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) <0x7f004e3e3cf0 + 0x0002a> in :0 at Scheduler.clsRunVBNetScript.ExecuteScript () <0x417f3540 + 0x00e12> in :0
Now If I remove the Split function I thought I just write the "parm" to the log - nope not a good idea, I get the same error as above...
Not used to VB Script, so what am I doing wrong here? All I need to do is send "NSA\r" and then read the next 9 lines that are returned from my Marantz receiver (it will contain status, what input, what is playing on internet radio and so on). Any ideas?
Comment
-
Unfortunately, Mono does not fully support all the serial functions offered by .NET, so the plugin does not directly work with serial ports when running on Linux. However, you can use ser2net to create a tcp interface to your serial device and the plugin with work just fine. I do exactly this for a number of serial devices.
Comment
-
I am trying to get information from my house alarm into HS. I have a Cytech Comfort II alarm. The alarm has an ethernet interface and 'broadcasts' information to that interface as events occur in the alarm. I have a list of the codes it broadcasts.
I am hoping that I can use the IP / Serial interface to monitor those broadcasts and then run events accordingly.
I have installed the plugin and set the alarm (fixed IP) as a Connection in the plugin config. It is currently set as a Host. I have opened the port in my Firewall.
I have set an event with a drhsPlugIn: Received Triggers. The Connection is set as the alarm. I then have an acion I can monitor.
The output from the alarm is in the format IP0A01 where IP = input (the input I wish to monitor) 0A = the hex number of the input I wish to monitor (Input10) and )1 is on, 00 is Off
I have tried all the different Encoding types but am not having any success in triggerring my event when I open Input 10.
Any suggestions?
Comment
-
Big5 plug-in for HS3 does all of it and much more. It supports Serial, HTTP, MQTT, TCP and Messaging (Slack). https://shop.homeseer.com/products/b...lug-in-for-hs3
Comment
-
Originally posted by larhedse View PostSo I thought I give my old Marantz SR7008 another go at feedback - or passthru as we might call it.
Anyway, I send "NSA\r" to my Marantz, and in return I'll get a 9 line (chr(13) separated I guess) answer in return. This has worked before HomeSeer (Fibaro HC2) so I know what I am after - I just need to get to understand what is wrong... I think I did a test on this a year or two ago and ended up with failure - and I think I even got a version from drule that was to help me (.25 maybe). So Back on the horse then, start simple:
Code:Sub Main(parm as object) Dim Params() As String = Split(parm.ToString, Chr(0)) ' Param(0) is the name of the plugin's connector ' Param(1) is the ip address of the remote end ' Param(2) is the data received Dim SplitString() As String = Split(Params(2), Chr(13)) hs.writelog("Marantz FeedBack: ", SplitString(1)) End Sub
This will of course fail, on the Split function (since if I remove them, the error goes away...) - and the error gives me nothing:
Now If I remove the Split function I thought I just write the "parm" to the log - nope not a good idea, I get the same error as above...
Not used to VB Script, so what am I doing wrong here? All I need to do is send "NSA\r" and then read the next 9 lines that are returned from my Marantz receiver (it will contain status, what input, what is playing on internet radio and so on). Any ideas?
Code:Sub Main(parm() as object) ' Parm(0) is the name of the plugin's connector ' Parm(1) is the ip address of the remote end ' Parm(2) is the data received (as text) ' Parm(3) is the raw data ? Dim SplitString() As String = Split(Parm(2).ToString, Chr(13)) hs.writelog("Marantz FeedBack: ", SplitString(1)) End Sub
Comment
-
Originally posted by joegr View Post
So, I'm just now starting to move to HS3 and had the same problem and error (more or less). I did find the solution and am posting it here in case anyone else's search brings them here.
Code:Sub Main(parm() as object) ' Parm(0) is the name of the plugin's connector ' Parm(1) is the ip address of the remote end ' Parm(2) is the data received (as text) ' Parm(3) is the raw data ? Dim SplitString() As String = Split(Parm(2).ToString, Chr(13)) hs.writelog("Marantz FeedBack: ", SplitString(1)) End Sub
Sep-20 16:31:18 Error 3 Running script FeedBackMarantz.vb :Exception has been thrown by the target of an invocation.->Does entry point Main exist in script? at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x7f5f031ab9e0 + 0x000ef> in :0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) <0x7f5f02fe3cf0 + 0x0002a> in :0 at Scheduler.clsRunVBNetScript.ExecuteScript () <0x41855000 + 0x00e12> in :0
Comment
-
Well, a bit depending on your installation (Linux or Windows), you will be able to find a file named "drhsIpPlugIn.ini" that contains all information. Back up that and you should be fine. In my case, with Linux (Ubuntu) installation, this file is in:
/opt/HomeSeer/Config/drhsIpPlugIn.ini
But as I write this, it will depend on how it is installed, and what environment/operating system you use.
Comment
Comment