Announcement

Collapse
No announcement yet.

Arduino Script Testing. (Enigmatheatre)

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

    #91
    Originally posted by noopara View Post
    You mention that you have tested the script with an Arduino Mega. Did you test it with the Mega 2560 R3 or an earlier Mega version?
    My main board is an R3 but my test board is older i think!

    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


      #92
      Arduino Mega 2560 r3

      Greg,
      Thanks for a great script, totally new to arduino so a little bit of learning.

      Hi Noopara,
      I have a Mega 2560 r3 connected with no problems so far, it's only configured for 52 digital inputs and 12 PWM's. Yet to connect the hardware but these are only N/O relay contacts and magnetic reed switches so don't forsee a problem there. The PWM I am going to use for driving a couple of relays and a super bright LED.
      Peter

      Comment


        #93
        OK, thanks!

        I'm going to get a Mega board then. This looks like it could be the solution I have been after to add a bunch of I/O capability to HS.

        Thanks for all the effort putting this together. Along with HS3 this could make a great combination.

        -- greg

        Comment


          #94
          Comms problem with Arduino Uno R3

          Hi,

          I have the scripts all installed and running and hooked up an Arduino Uno R3 successfully to the server via USB. I can get homeseer to send and receive instructions to the arduino but after a short while, I get an error message. The following lines show the board connecting:

          <TABLE border=0 cellSpacing=2 cellPadding=0 width="100%"><TBODY><TR><TD class=LOGDateTime1 noWrap align=left>24/06/2013 20:47:48 </TD><TD class=LOGType1 colSpan=3 align=left>Arduino </TD><TD class=LOGEntry1 colSpan=8 align=left>Connecting to Arduino Board 1 on Com Port=4 baud= 115200 Parity= 0 DataBits= 8 stopBits= 1</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>24/06/2013 20:47:48 </TD><TD class=LOGType0 colSpan=3 align=left>Arduino </TD><TD class=LOGEntry0 colSpan=8 align=left>Board 1 Version 1.0.9 and Script Version 1.0.9 are compatible.</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>24/06/2013 20:47:48 </TD><TD class=LOGType1 colSpan=3 align=left>Arduino </TD><TD class=LOGEntry1 colSpan=8 align=left>Connected to Board 1 on Com port 4</TD></TR></TBODY></TABLE>

          After a few test instructions that are provided through a simple script, and prove to be successful, I leave the system and then several hours later when the automation wants to run the script again, it fails to communicate with the comm port, with the following error in the log:

          <TABLE border=0 cellSpacing=2 cellPadding=0 width="100%"><TBODY><TR><TD class=LOGDateTime1 noWrap align=left>25/06/2013 01:35:14 </TD><TD class=LOGType1 colSpan=3 align=left>Error </TD><TD class=LOGEntry1 colSpan=8 align=left>Writing data to COM port 4 :Unable to write to COM port</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>25/06/2013 01:35:45 </TD><TD class=LOGType0 colSpan=3 align=left>Warning </TD><TD class=LOGEntry0 colSpan=8 align=left>Timeout waiting for COM Port write to finish</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>25/06/2013 01:36:16 </TD><TD class=LOGType1 colSpan=3 align=left>Warning </TD><TD class=LOGEntry1 colSpan=8 align=left>Timeout waiting for COM Port write to finish</TD></TR></TBODY></TABLE>

          Has anyone experience this and found a solution? How would I go about fault finding this issue? Basically my set-up is that I have homeseer connected to an Arduino Uno via USB and this board is then providing input on a second board, which has a MotorShield installed, to drive a Stepper Motor. My HomeSeer script sends an on/off to 5 digital pins, which then provide input to the second board, where the sequence is decoded and then interpreted into a steppermotor activity. All works, but then seems to die after a few hours.

          I have already gone to the lengths of changing out my HomeSeer server with a complete new hardware and software install, to eliminate anything being wrong with my USB ports. This brand new setup is showing exactly the same problem as before, so it is not my USB ports or homeseer computer (I think).

          Comment


            #95
            Originally posted by vossenh View Post
            Hi,

            I have the scripts all installed and running and hooked up an Arduino Uno R3 successfully to the server via USB. I can get homeseer to send and receive instructions to the arduino but after a short while, I get an error message. The following lines show the board connecting:

            <TABLE border=0 cellSpacing=2 cellPadding=0 width="100%"><TBODY><TR><TD class=LOGDateTime1 noWrap align=left>24/06/2013 20:47:48 </TD><TD class=LOGType1 colSpan=3 align=left>Arduino </TD><TD class=LOGEntry1 colSpan=8 align=left>Connecting to Arduino Board 1 on Com Port=4 baud= 115200 Parity= 0 DataBits= 8 stopBits= 1</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>24/06/2013 20:47:48 </TD><TD class=LOGType0 colSpan=3 align=left>Arduino </TD><TD class=LOGEntry0 colSpan=8 align=left>Board 1 Version 1.0.9 and Script Version 1.0.9 are compatible.</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>24/06/2013 20:47:48 </TD><TD class=LOGType1 colSpan=3 align=left>Arduino </TD><TD class=LOGEntry1 colSpan=8 align=left>Connected to Board 1 on Com port 4</TD></TR></TBODY></TABLE>

            After a few test instructions that are provided through a simple script, and prove to be successful, I leave the system and then several hours later when the automation wants to run the script again, it fails to communicate with the comm port, with the following error in the log:

            <TABLE border=0 cellSpacing=2 cellPadding=0 width="100%"><TBODY><TR><TD class=LOGDateTime1 noWrap align=left>25/06/2013 01:35:14 </TD><TD class=LOGType1 colSpan=3 align=left>Error </TD><TD class=LOGEntry1 colSpan=8 align=left>Writing data to COM port 4 :Unable to write to COM port</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>25/06/2013 01:35:45 </TD><TD class=LOGType0 colSpan=3 align=left>Warning </TD><TD class=LOGEntry0 colSpan=8 align=left>Timeout waiting for COM Port write to finish</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>25/06/2013 01:36:16 </TD><TD class=LOGType1 colSpan=3 align=left>Warning </TD><TD class=LOGEntry1 colSpan=8 align=left>Timeout waiting for COM Port write to finish</TD></TR></TBODY></TABLE>

            Has anyone experience this and found a solution? How would I go about fault finding this issue? Basically my set-up is that I have homeseer connected to an Arduino Uno via USB and this board is then providing input on a second board, which has a MotorShield installed, to drive a Stepper Motor. My HomeSeer script sends an on/off to 5 digital pins, which then provide input to the second board, where the sequence is decoded and then interpreted into a steppermotor activity. All works, but then seems to die after a few hours.

            I have already gone to the lengths of changing out my HomeSeer server with a complete new hardware and software install, to eliminate anything being wrong with my USB ports. This brand new setup is showing exactly the same problem as before, so it is not my USB ports or homeseer computer (I think).
            Harry did you get my email?

            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


              #96
              Hi Greig,

              Did not get your e-mail message unfortunately.

              Harry

              Comment


                #97
                Originally posted by vossenh View Post
                Hi Greig,

                Did not get your e-mail message unfortunately.

                Harry
                Sorry about that it says it sent.

                Here is the email.


                The first thing that comes to mind is that the usb port is running power saving and shutting down the port. can you check this.
                Is the arduino in a usb hub?
                What version of the script are you running? the latest version 1.1.0 can be found here: http://board.homeseer.com/showthread.php?t=157239
                I am not planning to update this version of the script as I am working on converting it to a plugin for HS3 which will have no setup in the ino as everything will be setup in Homeseer and sent to the board. I have not created a plugin before and the programming involved is a very big learning curve for me but I have a basic plugin up and working.

                Get back to me about your port and see if that helps as from the error it looks like homeseer thinks the port is open and it is something different on the pc that is closing the port.

                Regards.

                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


                  #98
                  Hi Greig,

                  I found the power settings in the USB root hub properties and this was indeed set to 'allow the computer to turn off the device to safe power' I have now un-checked this option for all my USB root hub devices to be sure they are not turned off and will see how that impacts the behaviour. I will let you know how it is tomorrow. Thanks for your swift response.
                  Harry

                  Comment


                    #99
                    Something you might be interested in, WiFi for Arduino

                    HI, I don't have an Arduino but noticed this today - seems like something this group would / might be interested in.

                    Cheap / easy WiFi for Arduino - I might get one to mess around with it - seems like it could be a game changer for HS (if it works).

                    Anyway - just FYI - sorry for the extra post if you all have already heard about it.

                    http://www.sparkdevices.com/#

                    and / or

                    http://www.kickstarter.com/projects/...ino-compatible

                    Comment


                      Originally posted by norcoscia View Post
                      HI, I don't have an Arduino but noticed this today - seems like something this group would / might be interested in.

                      Cheap / easy WiFi for Arduino - I might get one to mess around with it - seems like it could be a game changer for HS (if it works).

                      Anyway - just FYI - sorry for the extra post if you all have already heard about it.

                      http://www.sparkdevices.com/#

                      and / or

                      http://www.kickstarter.com/projects/...ino-compatible
                      I like it, thanks for the link. I've been doing a fair bit with Arduino's and PICAXES connected via bluetooth to my HS system and it is a little testing at times, this could be exactly the thing to solve my problems. That would probably be a bit more future proof than something like a jeenode which was my other upgrade consideration.

                      Comment


                        Has anyone tried to use the script with jeenodes?

                        Comment


                          May sound crazy but -Arduino as a HSTouch client for ethernet

                          I took some WireShark traces of the HSTouch interface and its a very simple straight foward message (thought it was SOAP XML but is not) interface(see attache text capture).

                          I think we could make the Arduino support this interface to get and send device updates Via Ethernet. I'm going to play with it some.

                          There are commands for everything from devisce change to trigger events to everything else.
                          Attached Files
                          Last edited by Gerard; July 19, 2013, 09:44 PM.

                          Comment


                            Originally posted by Gerard View Post
                            I took some WireShark traces of the HSTouch interface and its a very simple straight foward message (thought it was SOAP XML but is not) interface(see attache text capture).

                            I think we could make the Arduino support this interface to get and send device updates Via Ethernet. I'm going to play with it some.

                            There are commands for everything from devisce change to trigger events to everything else.

                            HI Gerard,

                            Interesting concept. Have you done any more with this?

                            I have created a plugin for HS3 if you have time to beta test then drop me an e-mail. I would love to make it Ethernet based but I am having troubles getting this to work at the moment.

                            See: Here

                            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


                              Yes I have a working sample and I had uploaded it but the post looks gone. Not sure why its gone. I did not get any hate mail that it was inapropriate. I will repost it and see what happens. I'm not running HS3 yet so no help there.

                              The HST code could help with the ethernet part for device status and control but not sure how it would help with your auto config type stuff unless maybe with the run script function.


                              Originally posted by enigmatheatre View Post
                              HI Gerard,

                              Interesting concept. Have you done any more with this?

                              I have created a plugin for HS3 if you have time to beta test then drop me an e-mail. I would love to make it Ethernet based but I am having troubles getting this to work at the moment.

                              See: Here

                              Greig.

                              Comment


                                OOPS - I put it in a diffrent post of its own.

                                http://board.homeseer.com/showthread.php?t=161166

                                Take a look. I also have some more updated code since I am working towards deploying it on my nodes. If your interested I can upload it in a day or so.

                                Originally posted by Gerard View Post
                                Yes I have a working sample and I had uploaded it but the post looks gone. Not sure why its gone. I did not get any hate mail that it was inapropriate. I will repost it and see what happens. I'm not running HS3 yet so no help there.

                                The HST code could help with the ethernet part for device status and control but not sure how it would help with your auto config type stuff unless maybe with the run script function.

                                Comment

                                Working...
                                X