Announcement

Collapse
No announcement yet.

IP / Serial Plugin for HS3 (by "drule") - Discussion Thread

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

    I think the plugin would need some sort of flowcontroll, so that when an event fires multiple commands to this plugin, it needs to que them up until they done and so on... Now I add WAIT between each call...

    Comment


      Originally posted by larhedse View Post
      I think the plugin would need some sort of flowcontroll, so that when an event fires multiple commands to this plugin, it needs to que them up until they done and so on... Now I add WAIT between each call...
      Each time the plugin receives data, it launches a new thread to process that data.

      -David

      Comment


        Well, I have times when the plugin most likely is called (I write most likely since I have no entry in my HomeSeer log for any commands sent to the plugin) however misses to transmitt. Now I run with persist connection, and in this case it is a Global Cache 100, that have two IR transmitters connected. First one to the Projector, then Second one to cable tv box. Both have events that fires "power on" more or less at the same moment, and one of them are never executed. Or maybe executed, however the end result - which could be down to GC100 (I simply don't know since I have no logging) - is that either the projector or the cable tv box is not turned on. After a small "WAIT 2 Seconds" between the commands, everything works 100%.

        So that's why I ask.

        Comment


          I don't think that's a plugin problem, but rather on the GC side. I have got the same, but has it before I used HS. So this is not specific to HS or the plugin. I even had that using the Square connect with Vera, so maybe a general IR control problem. I have to have delays between all IR commands, no matter what plugin or system I use. Do that and it all runs smooth...

          Comment


            Originally posted by larhedse View Post
            Well, I have times when the plugin most likely is called (I write most likely since I have no entry in my HomeSeer log for any commands sent to the plugin) however misses to transmitt. Now I run with persist connection, and in this case it is a Global Cache 100, that have two IR transmitters connected. First one to the Projector, then Second one to cable tv box. Both have events that fires "power on" more or less at the same moment, and one of them are never executed. Or maybe executed, however the end result - which could be down to GC100 (I simply don't know since I have no logging) - is that either the projector or the cable tv box is not turned on. After a small "WAIT 2 Seconds" between the commands, everything works 100%.

            So that's why I ask.
            OK, I see what you mean. The plugin relies on HS to queue things up and I can see how that could fail. I can probably put something into the plugin to fix it though. Will add it to my list!

            -David

            Comment


              Originally posted by mikee123 View Post
              I don't think that's a plugin problem, but rather on the GC side. I have got the same, but has it before I used HS. So this is not specific to HS or the plugin. I even had that using the Square connect with Vera, so maybe a general IR control problem. I have to have delays between all IR commands, no matter what plugin or system I use. Do that and it all runs smooth...
              That's very interesting info. Thanks!

              Comment


                Normally a 0.5 sec delay between IR commands works fine. With some deivces you need to increase the delay in my experience.

                Comment


                  mikee123: Aha - well then I am where you suggest, I have already added WAITs to kind of work around the problem.

                  drule: I had a thought of what you wrote, and when you launches a new thread to process the command, well then I might end up with 2 or 3 threads trying to send command to the same connection at the same time. I know for a fact (I come from Fibaro HC2) that it is not always the fastest of devices... So it may very well end up with that the GC100 simply ignores the commands or something maybe? I do not know if there is any way to try to poll if it is okay to transmit a new command, so well old stuff never works with new (GC100 is very old tech, only ONE connection at a time and so on).

                  Comment


                    Originally posted by larhedse View Post
                    mikee123: Aha - well then I am where you suggest, I have already added WAITs to kind of work around the problem.

                    drule: I had a thought of what you wrote, and when you launches a new thread to process the command, well then I might end up with 2 or 3 threads trying to send command to the same connection at the same time. I know for a fact (I come from Fibaro HC2) that it is not always the fastest of devices... So it may very well end up with that the GC100 simply ignores the commands or something maybe? I do not know if there is any way to try to poll if it is okay to transmit a new command, so well old stuff never works with new (GC100 is very old tech, only ONE connection at a time and so on).
                    Good point. That's very likely the problem. I can add something to the plugin to delay sending a new command if there is one still being processed by a different thread but I don't think that will help if the GC100 needs more time to process what it receives.

                    Comment


                      Still crashing

                      Originally posted by mlconti View Post
                      I see that. I will load that next week and see if that fixes the issue. THANKS!
                      Any ideas? Here is the error text:


                      roblem signature:
                      Problem Event Name: CLR20r3
                      Problem Signature 01: hspi_drhsipplugin.exe
                      Problem Signature 02: 0.0.0.25
                      Problem Signature 03: 578d3f05
                      Problem Signature 04: System
                      Problem Signature 05: 4.0.30319.17929
                      Problem Signature 06: 4ffa5c88
                      Problem Signature 07: 40f7
                      Problem Signature 08: ec
                      Problem Signature 09: System.IO.IOException
                      OS Version: 6.1.7601.2.1.0.256.48
                      Locale ID: 1033
                      Additional Information 1: 0a9e
                      Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
                      Additional Information 3: 0a9e
                      Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

                      Read our privacy statement online:
                      http://go.microsoft.com/fwlink/?link...8&clcid=0x0409

                      If the online privacy statement is not available, please read our privacy statement offline:
                      C:\Windows\system32\en-US\erofflps.txt


                      My next thought if we can't get this to work without failure would be to use some scripts - if anyone can assist in the script I would appreciate it.

                      Thanks,

                      Mike

                      Comment


                        Originally posted by mlconti View Post
                        Any ideas? Here is the error text:


                        roblem signature:
                        Problem Event Name: CLR20r3
                        Problem Signature 01: hspi_drhsipplugin.exe
                        Problem Signature 02: 0.0.0.25
                        Problem Signature 03: 578d3f05
                        Problem Signature 04: System
                        Problem Signature 05: 4.0.30319.17929
                        Problem Signature 06: 4ffa5c88
                        Problem Signature 07: 40f7
                        Problem Signature 08: ec
                        Problem Signature 09: System.IO.IOException
                        OS Version: 6.1.7601.2.1.0.256.48
                        Locale ID: 1033
                        Additional Information 1: 0a9e
                        Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
                        Additional Information 3: 0a9e
                        Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

                        Read our privacy statement online:
                        http://go.microsoft.com/fwlink/?link...8&clcid=0x0409

                        If the online privacy statement is not available, please read our privacy statement offline:
                        C:\Windows\system32\en-US\erofflps.txt


                        My next thought if we can't get this to work without failure would be to use some scripts - if anyone can assist in the script I would appreciate it.

                        Thanks,

                        Mike
                        Can you send me your ini file?

                        -David

                        Comment


                          Request: I need to trace, at a basic level, when an call is made to this superb plugin - I am chasing a ghost in my system, and it would be lovely to be able to get a line in the LOG that says what is transmitted. Just like when one starts up a client (because I only get this from the plugin - nothing else in the log):

                          sep-10 06:48:55 drhsIpPlugIn Starting Tcp client for GC100 at address 10.168.1.4:4998
                          It could be a nice idea that one could turn it on/off under the Plugin Config (or at connection level might even be better).

                          Comment


                            Btw, for anyone running linux, like the HomeSeer Zee S2 I have, one can download the plugin with curl (the example below is for .25 - it will most likly change for every version that gets uploaded):

                            Code:
                            cd
                            curl -o drhsIpPlugIn25.zip http://board.homeseer.com/attachment.php?attachmentid=55417&d=1468876204
                            Then one could of course update things the wild way:

                            Code:
                            unzip drhsIpPlugIn25.zip
                            mv /usr/local/HomeSeer/HSPI_drhsIpPlugIn.exe HSPI_drhsIpPlugIn.exe.old.21
                            cp ./HSPI_drhsIpPlugIn.exe /usr/local/HomeSeer/HSPI_drhsIpPlugIn.exe
                            chmod 755 /usr/local/HomeSeer/HSPI_drhsIpPlugIn.exe
                            Use on your own risk....

                            Comment


                              Hi All
                              • I have 2x Samsung E6300 series TV's.
                              • I have installed Drules Plugin and a GC-100 in the post for next week.

                              • I have 2x BN39 Samsung cables (3.5mm to RS232). I have 2x RS232 2m cables to test (eventually I will use a RS232 over CAT6 but not at the moment).


                              Please can someone help me setup, and possibly write step by step instructions. How to configure GC100 for the Samsung TV (including COM and network stuff) and how to setup an event. And show me how to send it other commands like 3D, or the number 3, etc for the 6300 series.

                              Thank you
                              Chris

                              Comment


                                I've got a new error in my LOG file:
                                Code:
                                [COLOR=#8700FF]sep-12 05:52:21 [/COLOR] <table class="log_table_row" cellspacing="0"><tbody><tr><td class="LogDateShort LogDateTime1" colspan="1" style=" white-space: nowrap;" align="left">
                                </td><td class="LogPri1" colspan="1" align="left"> [COLOR=#8700FF]   [/COLOR] </td><td class="LogType1" colspan="3" align="left"> [COLOR=#8700FF] drhsIpPlugIn [/COLOR] </td><td class="LogEntry1" colspan="8" align="left"> [COLOR=#8700FF] concatenated string exceeds maximum [/COLOR]</td></tr></tbody></table>
                                I have not seen that one before...

                                Edit: Here is the LOG file related to this error:
                                Code:
                                sep-12 05:52:21 	  	drhsIpPlugIn 	concatenated string exceeds maximum
                                sep-12 05:52:12 	  	Event 	Event Trigger "Control Internet Radio PreSet Internet Station 1"
                                sep-12 05:52:12 	  	Event 	Deleting event after run: "Delayed Actions PreSet Internet Radio (Delayed Action)"
                                sep-12 05:52:12 	  	Device Control 	Device: Vardagsrum Media System PreSet Internet Radio to Internet Radio Station 1 (0)
                                sep-12 05:52:12 	  	Event 	Event Trigger "Delayed Actions PreSet Internet Radio (Delayed Action)"
                                sep-12 05:52:10 	  	Event 	Event Trigger "Control Media Sound Volume -50dB"
                                sep-12 05:52:10 	  	Event 	Deleting event after run: "Delayed Actions Volume (Delayed Action)"
                                sep-12 05:52:10 	  	Device Control 	Device: Vardagsrum Media System Volume to -50dB (5)
                                sep-12 05:52:10 	  	Event 	Event Trigger "Delayed Actions Volume (Delayed Action)"
                                sep-12 05:52:03 	  	Event 	Event Trigger "Control Projector Projector OFF"
                                sep-12 05:52:03 	  	Device Control 	Device: Vardagsrum Media System Projector to Off (0)
                                sep-12 05:52:00 	  	Event 	Event Trigger "Control Media Source Internet Radio"
                                And the event that triggers all this:


                                Now the command that most likely fails, and I have no way of knowing if this is true (no logging in the plugin to HomeSeer LOG), is the one trying to set Internet Radio Station 1 - since that command fails to be delivered (everything else works), this is from the plugin config:


                                And this is the event that triggers that plugin command:


                                I have no clue about the projector turning off - it was already off and it is the GC100 connection - the internet radio is my Marantz IP command connection. So they do not use the same connections.

                                Now all this used to work without any log messages before - so no clue why it fails now....
                                Last edited by larhedse; September 12, 2016, 12:11 AM.

                                Comment

                                Working...
                                X