Announcement

Collapse
No announcement yet.

Arduino output very slow in homeseer

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

  • Arduino output very slow in homeseer

    Dear Greg,

    I'm using your plugin for 2 Arduino boards. The plugin works great. But when I set one or more outputs the response is very slow. This is the log with a script that sets 4 outputs by capi:
    jun-16 15:48:37 Warning Dropping event callbacks due to full queue (Type: 16384) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
    jun-16 15:48:37 Warning Dropping event callbacks due to full queue (Type: 64) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
    jun-16 15:48:29 Warning Dropping event callbacks due to full queue (Type: 1024) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
    jun-16 15:48:29 Warning Dropping event callbacks due to full queue (Type: 1024) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
    jun-16 15:48:28 Warning Dropping event callbacks due to full queue (Type: 2048) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
    jun-16 15:48:17 Arduino Plugin Change of Device Screen living links 1-4 BC set position 3rd digit To Value 0
    jun-16 15:48:17 Warning Dropping event callbacks due to full queue (Type: 2) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
    jun-16 15:48:17 Warning Dropping event callbacks due to full queue (Type: 2048) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
    jun-16 15:48:17 Warning Dropping event callbacks due to full queue (Type: 64) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
    jun-16 15:48:17 Warning Dropping event callbacks due to full queue (Type: 16384) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
    jun-16 15:48:17 Arduino Plugin Change of Device Screen living links 1-3 BC set position 2nd digit To Value 1
    jun-16 15:48:02 Warning Dropping event callbacks due to full queue (Type: 16384) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
    jun-16 15:47:59 Warning Dropping event callbacks due to full queue (Type: 64) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
    jun-16 15:47:47 Arduino Plugin Change of Device Screen living links 1-2 BC set position 1st digit To Value 0
    jun-16 15:47:47 Arduino Plugin Change of Device Screen living links 1-1 Go to position To Value 1
    jun-16 15:47:47 Device Control Device: 3 Arduino Plugin Screen living links 1-4 BC set position 3rd digit to On (1) by/from: CAPI Control Handler
    jun-16 15:47:47 Device Control Device: 3 Arduino Plugin Screen living links 1-3 BC set position 2nd digit to Off (0) by/from: CAPI Control Handler
    jun-16 15:47:47 Device Control Device: 3 Arduino Plugin Screen living links 1-2 BC set position 1st digit to On (1) by/from: CAPI Control Handler
    jun-16 15:47:47 Device Control Device: 3 Arduino Plugin Screen living links 1-1 Go to position to Off (0) by/from: CAPI Control Handler
    jun-16 15:47:24 Event Running script in background: C:/Program Files/Homeseer HS3/scripts/ZZZ Ontwikkeling/Test 8.vb
    jun-16 15:47:24 Event Event Trigger "ZZ ontwikkelomgeving Test event"
    I'm using
    Arduino 1.0.0.148
    Homeseer 3.0.0.435

    I use the capi controll by a script, but also when i set one device manual on the home page in HS then this has also a very slow response.

    I need a quick response for my tasks.

    Can you please help?


  • #2
    This is a system problem with a plugin. I have not had any other reports of this as I made changes to the plugin to stop this happening. The errors could be because of any other plugin slowing down the system and making the Arduino updates slow. Can you disable all your plugins except the Arduino and try it. If this is good then add your other plugins back in one at a time until you see the problem.

    Greig.
    Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
    X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
    Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
    Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
    Scripts =
    Various

    Comment


    • #3
      Dear Greig,

      Thx for the fast response. I did as you advised, shut down all my plugins except Arduino plugin. But unfortunately that did not do the trick. Same problem. Please see below. This only happens with Arduino plugin. I tried that before. At first I could live with this, but know I am using a second board (arduino mega) and this script can not handle delays.

      Any other clue?
      jun-16 16:30:28 Warning Dropping event callbacks due to full queue (Type: 16384) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
      jun-16 16:30:27 Warning Dropping event callbacks due to full queue (Type: 1024) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
      jun-16 16:30:27 Warning Dropping event callbacks due to full queue (Type: 1024) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
      jun-16 16:30:27 Warning Dropping event callbacks due to full queue (Type: 16384) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
      jun-16 16:30:27 Arduino Plugin Change of Device Screen living links 1-4 BC set position 3rd digit To Value 0
      jun-16 16:30:27 Warning Dropping event callbacks due to full queue (Type: 16384) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
      jun-16 16:30:02 Warning Dropping event callbacks due to full queue (Type: 16384) (500 entries), system may be too busy, plugins and HSTouch may not receive all device updates
      jun-16 16:29:59 Arduino Plugin Change of Device Screen living links 1-3 BC set position 2nd digit To Value 1
      jun-16 16:29:50 Arduino Plugin Change of Device Screen living links 1-2 BC set position 1st digit To Value 0
      jun-16 16:29:50 Arduino Plugin Change of Device Screen living links 1-1 Go to position To Value 1
      jun-16 16:29:50 Device Control Device: 3 Arduino Plugin Screen living links 1-4 BC set position 3rd digit to On (1) by/from: CAPI Control Handler
      jun-16 16:29:50 Device Control Device: 3 Arduino Plugin Screen living links 1-3 BC set position 2nd digit to Off (0) by/from: CAPI Control Handler
      jun-16 16:29:50 Device Control Device: 3 Arduino Plugin Screen living links 1-2 BC set position 1st digit to On (1) by/from: CAPI Control Handler
      jun-16 16:29:50 Device Control Device: 3 Arduino Plugin Screen living links 1-1 Go to position to Off (0) by/from: CAPI Control Handler
      jun-16 16:29:46 Event Running script in background: C:/Program Files/Homeseer HS3/scripts/ZZZ Ontwikkeling/Test 8.vb
      jun-16 16:29:46 Event Event Trigger "ZZ ontwikkelomgeving Test event"

      Comment


      • #4
        You might need to reset your system to clear the queue. Can you post the script that is causing this as I can hot see how this is happening.
        Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
        X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
        Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
        Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
        Scripts =
        Various

        Comment


        • #5
          Also, your queue limit shows 500. This was updated to 2000 in more recent versions of HS, so you may want to try the latest version of HS (.534).
          HS 3.0.0.548: 1970 Devices 1148 Events
          Z-Wave 3.0.1.262: 123 Nodes on one Z-Net

          Comment


          • #6
            The system looks fine. When I restart the whole system and retry, the warnings are there again. The script is only simulating pushes as you can see. But when I set 1 device by home page capi, I have sometimes the same warning. Depends, some times I have, some times i haven't. I can't find out why. But only with Arduino unfortunately. And when there where warnings, then a new try can be without warnings. It looks random. But with the script (more devices set at once) then there are always these delays and warnings.

            I did research recently and it looks Plugin related some are writing in the forum. But you already has adapted the plugin you wrote. In what version did you made changes?

            This is the script:


            Sub Main(parm as object)
            Dim Value1 As String = ""
            Value1 = "Off"
            Dim Value2 As String = ""
            Value2 = "On"
            hs.CAPIControlHandler(hs.CAPIGetSingleControl(2002,true ,Value1,false,false))
            hs.CAPIControlHandler(hs.CAPIGetSingleControl(2004,true ,Value2,false,false))
            hs.CAPIControlHandler(hs.CAPIGetSingleControl(2006,true ,Value1,false,false))
            hs.CAPIControlHandler(hs.CAPIGetSingleControl(2008,true ,Value2,false,false))

            End Sub

            Comment


            • #7
              sparkman. Thanks for the tip! I read about that and I also tried .500. But unfortunately this came with other problems, i think because of the build in support for homeseer mobile. My system became less stable especially HSTouch. So i returned to 435. I first have to find out how to get that system stable. For now I would like a solution for 435 if possible if there is?

              Comment


              • #8
                Originally posted by Ralfmen View Post
                sparkman. Thanks for the tip! I read about that and I also tried .500. But unfortunately this came with other problems, i think because of the build in support for homeseer mobile. My system became less stable especially HSTouch. So i returned to 435. I first have to find out how to get that system stable. For now I would like a solution for 435 if possible if there is?
                There have been many bug fixes since .435, so it may be impossible to get it stable if one of those bugs is impacting your issue. Might be worth trying a version newer than .500 then as whatever caused the stability issues for you may have been fixed since.
                HS 3.0.0.548: 1970 Devices 1148 Events
                Z-Wave 3.0.1.262: 123 Nodes on one Z-Net

                Comment


                • #9
                  So I updated to 534. And it is indeed looking promising! Looks very stable during the short time I am running this version. When I run the same script, the warnings are gone. So the amount for the queue does matter, although it looks like. But the delays are unfortunately not gone. Below the log. As you can see, there is a substantial delay of almost half a minute. That is by far to much for me. Maybe something within a second could be programmed.

                  Any idea what is causing this?

                  And how to solve?

                  THX!
                  jun-16 19:29:01 Arduino Plugin Change of Device Screen living links 1-4 BC set position 3rd digit To Value 0
                  jun-16 19:28:52 Arduino Plugin Change of Device Screen living links 1-3 BC set position 2nd digit To Value 0
                  jun-16 19:28:37 Arduino Plugin Change of Device Screen living links 1-2 BC set position 1st digit To Value 0
                  jun-16 19:28:37 Arduino Plugin Change of Device Screen living links 1-1 Go to position To Value 0
                  jun-16 19:28:37 Device Control Device: 3 Arduino Plugin Screen living links 1-4 BC set position 3rd digit to On (1) by/from: CAPI Control Handler
                  jun-16 19:28:37 Device Control Device: 3 Arduino Plugin Screen living links 1-3 BC set position 2nd digit to On (1) by/from: CAPI Control Handler
                  jun-16 19:28:37 Device Control Device: 3 Arduino Plugin Screen living links 1-2 BC set position 1st digit to On (1) by/from: CAPI Control Handler
                  jun-16 19:28:37 Device Control Device: 3 Arduino Plugin Screen living links 1-1 Go to position to On (1) by/from: CAPI Control Handler
                  jun-16 19:28:26 Event Running script in background: C:/Program Files/Homeseer HS3/scripts/ZZZ Ontwikkeling/Test 8.vb
                  jun-16 19:28:26 Event Event Trigger "ZZ ontwikkelomgeving Test event"
                  jun-16 19:28:26 Event Event ZZ ontwikkelomgeving Test event triggered by the event page 'Run' button.

                  Comment


                  • #10
                    can you please send me a debug log of you running the script.
                    Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
                    X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
                    Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
                    Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
                    Scripts =
                    Various

                    Comment


                    • #11
                      I have run tests here and cannot reproduce this in any way. I have run your script and get the following results.

                      Jun-16 20:31:43 Arduino Plugin Sent to IP:192.168.0.198 Port No:60050 = 1 O 48 0 7 ,Output Set Command
                      Jun-16 20:31:43 Arduino Plugin Sent to IP:192.168.0.198 Port No:60050 = 1 O 47 1 6 ,Output Set Command
                      Jun-16 20:31:43 Arduino Plugin Sent to IP:192.168.0.198 Port No:60050 = 1 O 46 0 4 ,Output Set Command
                      Jun-16 20:31:43 Arduino Plugin Sent to IP:192.168.0.198 Port No:60050 = 1 O 45 1 3 ,Output Set Command
                      Jun-16 20:31:43 Event Running script in background: C:/Program Files/HomeSeer HS3/scripts/Arduino Out Test.vb
                      Jun-16 20:31:43 Event Event Trigger "test Arduino Out test"

                      All outputs trigger in the same second.

                      Are you using the API?

                      Greig.
                      Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
                      X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
                      Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
                      Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
                      Scripts =
                      Various

                      Comment


                      • #12
                        dear Greig,

                        Sorry for the somewhat delayed response.

                        Regarding your first comment. I did run 2 tests. Below the HS logfile, and attached the corresponding debug file: ArduinoDebug.txt As you can see the delay is somewhere 22 seconds. Then I ran a second test. That performed about the same 21 seconds. Please see below first log. The delays are almost the same, but hey differ when you look at teh details in de HS log file.

                        I'm very curious what you can see in de two Arduino debug files as attached. Hopefully this is what you asked for.

                        Then your second response. If I'm using the API. I am using shield v2, connection IP and Type Arduino. There is indeed an option Arduino API, but I did not select this. Is this better for me? What does this do?

                        And what do I have to do? Download the sketch again with selecting this option and upload the sketch to the Arduino Mega?

                        Many thanks for your advice!



                        jun-17 18:29:37 Arduino Plugin Debug logging Disabled
                        jun-17 18:29:10 Arduino Plugin Change of Device Screen living links 1-4 BC set position 3rd digit To Value 0
                        jun-17 18:29:09 Arduino Plugin Change of Device Screen living links 1-3 BC set position 2nd digit To Value 0
                        jun-17 18:29:09 Arduino Plugin Change of Device Screen living links 1-2 BC set position 1st digit To Value 0
                        jun-17 18:29:08 Arduino Plugin Change of Device Screen living links 1-1 Go to position To Value 0
                        jun-17 18:29:08 Device Control Device: 3 Arduino Plugin Screen living links 1-4 BC set position 3rd digit to On (1) by/from: CAPI Control Handler
                        jun-17 18:29:08 Device Control Device: 3 Arduino Plugin Screen living links 1-3 BC set position 2nd digit to On (1) by/from: CAPI Control Handler
                        jun-17 18:29:08 Device Control Device: 3 Arduino Plugin Screen living links 1-2 BC set position 1st digit to On (1) by/from: CAPI Control Handler
                        jun-17 18:29:08 Device Control Device: 3 Arduino Plugin Screen living links 1-1 Go to position to On (1) by/from: CAPI Control Handler
                        jun-17 18:28:48 Event Running script in background: C:/Program Files/Homeseer HS3/scripts/ZZZ Ontwikkeling/Test 8.vb
                        jun-17 18:28:48 Event Event Trigger "ZZ ontwikkelomgeving Test event"
                        jun-17 18:28:48 Event Event ZZ ontwikkelomgeving Test event triggered by the event page 'Run' button.
                        jun-17 18:28:06 Arduino Plugin Logging Level changed to Outputs
                        jun-17 18:28:02 Arduino Plugin Debug logging Enabled
                        And I run a second test.
                        Below the HS logfile, and attached the corresponding debug file: ArduinoDebug (1).txt
                        jun-17 18:32:15 Arduino Plugin Debug logging Disabled
                        jun-17 18:31:46 Arduino Plugin Change of Device Screen living links 1-4 BC set position 3rd digit To Value 1
                        jun-17 18:31:38 Arduino Plugin Change of Device Screen living links 1-3 BC set position 2nd digit To Value 1
                        jun-17 18:31:38 Arduino Plugin Change of Device Screen living links 1-2 BC set position 1st digit To Value 1
                        jun-17 18:31:37 Arduino Plugin Change of Device Screen living links 1-1 Go to position To Value 1
                        jun-17 18:31:37 Device Control Device: 3 Arduino Plugin Screen living links 1-4 BC set position 3rd digit to Off (0) by/from: CAPI Control Handler
                        jun-17 18:31:37 Device Control Device: 3 Arduino Plugin Screen living links 1-3 BC set position 2nd digit to Off (0) by/from: CAPI Control Handler
                        jun-17 18:31:37 Device Control Device: 3 Arduino Plugin Screen living links 1-2 BC set position 1st digit to Off (0) by/from: CAPI Control Handler
                        jun-17 18:31:37 Device Control Device: 3 Arduino Plugin Screen living links 1-1 Go to position to Off (0) by/from: CAPI Control Handler
                        jun-17 18:31:25 Event Running script in background: C:/Program Files/Homeseer HS3/scripts/ZZZ Ontwikkeling/Test 8.vb
                        jun-17 18:31:25 Event Event Trigger "ZZ ontwikkelomgeving Test event"
                        jun-17 18:31:25 Event Event ZZ ontwikkelomgeving Test event triggered by the event page 'Run' button.
                        jun-17 18:31:06 Arduino Plugin Debug logging Enabled



                        Attached Files

                        Comment


                        • #13
                          Ralfmen,

                          Sorry, but I can not see the debug attached to the forum. Can you send it by e-mail to the address you get by clicking on the Enigmatheatre at the top of the Plugin config page?

                          Greig.
                          Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
                          X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
                          Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
                          Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
                          Scripts =
                          Various

                          Comment


                          • #14
                            Greig, I did send you the 2 files by mail. Like to hear from you. Thx!

                            Comment


                            • #15
                              Hi Greig,

                              I repeat the advice you gave me by mail so that someone who has the same problem, also has the solution. Your advice was:

                              You will have to update the Plugin then the boards to the new sketch. I would also recommend updating the IDE to
                              V1.8.9 so you are all up to date.

                              I did, and as you said this did the job!! So many thx!!

                              But the journey to a working system was one with a lot of work. Of course updating everything (Homeseer .534 and plugin .159) was quite easy.


                              However the new Homeseer version gave me issues with the camera's in HSTouch that where not there in .435. I mentioned before, that I tried .500 and rolled back to .435. So I first had to sort this out, because this was messing up the whole system and CPU. I completely rebuild the camera system to HTML elements in HSTouch (instead of choose the video option in HSTouch elements). Determining the problem and working out the solution, unfortunately took me a day.

                              Then I updated the plugin and Arduino software. It was quite easy to get the first board, an Arduino MEGA board, to work. And immediately it worked fast. So the problem I started this thread with, is gone as mentioned. Really great!

                              The Arduino UNO board however was a pain in the ***. Before I got this connected it took a lot of attempts. Unfortunately I did not saw straight away the option “UNO” in the plugin. My mistake. But after I did, the problems where not solved. And also the Arduino MEGA that was working before, gave problems connecting at that moment.

                              When I in the end got both boards connected, the Arduino UNO sketch was not working without problems for me. At least the two outputs I use with relays, were triggering very fast on/off. Did not matter if I choose ON or OFF in HS. The relays were making a lot of noise all the time they were powered. And the analogue inputs gave lots of wrong values in between a row of good values. I checked these pins on the board itself and the voltage for each pin was ok. So I cannot think of something else then the sketch itself that is causing this. V148 did work. V159 not in my case.

                              After trying a lot, new sketches, restarting the system, uploading again, and again, I switched to a Arduino MEGA board instead of the UNO. And from that moment on, everything was ok. With the Arduino MEGA the plugin works great! And maybe also with an UNO, but not in my case.

                              If I remember wright, I saw on this forum, that you already worked on that (memory issue?). I don’t know what the cause is. Unfortunately I do not have made any logfiles for you. After the MEGA worked, I did not switched back anymore. The hardware is in a “deep” place, so replacing is very time consuming. Al together it took me another day. But it is hobby and my reward is, that everything is working great for me now. And from now on, with future expanding, I will use MEGA boards instead of UNO. No problem for me.

                              So many thanks!

                              Comment

                              Working...
                              X