Announcement

Collapse
No announcement yet.

Arduino Script Testing. (Enigmatheatre)

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

  • Originally posted by Gerard View Post
    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.
    Gerard,

    Thanks this looks great. I would love to see an example of sending data over tcp to the arduino from a HS vb.net script as I cant get this to work correctly. Do you have something like that?

    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


    • Originally posted by enigmatheatre View Post
      Gerard,

      Thanks this looks great. I would love to see an example of sending data over tcp to the arduino from a HS vb.net script as I cant get this to work correctly. Do you have something like that?

      Greig.
      Sorry never done it directly with vbscript as I just used the get url function and made the Arduino act as a web server and parse the URL prams.

      Comment


      • First I want to say thanks for all your work. The script is working great.

        Can you add an option to display the device name instead of just the following in the Homeseer log?

        Arduino Board 1, Input 17, Value = Off

        Comment


        • Originally posted by enigmatheatre View Post
          HI All,

          This is a to discuss the Homeseer to arduino script that i have created.

          The script is attached to this post.

          IntroductionThis has been removed for now as it is proving to be a problem. It will be added again when i can make it stable.

          I'm sorry that the Ethernet interface is taking so long but this is not easy and time is short. I will be working on an Ethernet interface at some point. It looks like everyone would benefit from this and I will do my best to get this working asap. I need to test the current version of the script then I will set it free.

          Tested boards

          1. Uno
          2. Mega
          3. nano
          4. mini.
          Please tell me and I will add any other boards you get this to work with.

          Please feel free to post any thoughts or comments on the script. (be gentle on me as this is my first script release)

          Greig
          FYI, I tried to download the .zip file that's attached to your post #1, but what I got was a file called attachment.php. File size is about the same, so I renamed it from attachment.php to attachment.zip, and then I was able to unzip it and read the pdf manual.

          I'll soon be adding some sensors to my arduino Uno R3, and so I'd like to interface with HS2. Presently I have v1.05 of the arduino IDE software, and I've run the blinking LED sketch on the arduino. i.e. it works, but I'm at the very beginning of learning how to use it.

          How is the arduino physically connected with HS2? Via a USB cable? The impression I get from this thread is that the Ethernet connection isn't working (and no ETA as to when it will), but there is a beta version of an arduino-to-homeseer Ethernet connection that runs under HS3 (but not HS2). Is that correct? Is there a more current download than the v1.1.0 "zip file" in post #1 for HS2, or has everything arduino moved on to HS3?

          Comment


          • Originally posted by NeverDie View Post
            FYI, I tried to download the .zip file that's attached to your post #1, but what I got was a file called attachment.php. File size is about the same, so I renamed it from attachment.php to attachment.zip, and then I was able to unzip it and read the pdf manual.

            I'll soon be adding some sensors to my arduino Uno R3, and so I'd like to interface with HS2. Presently I have v1.05 of the arduino IDE software, and I've run the blinking LED sketch on the arduino. i.e. it works, but I'm at the very beginning of learning how to use it.

            How is the arduino physically connected with HS2? Via a USB cable? The impression I get from this thread is that the Ethernet connection isn't working (and no ETA as to when it will), but there is a beta version of an arduino-to-homeseer Ethernet connection that runs under HS3 (but not HS2). Is that correct? Is there a more current download than the v1.1.0 "zip file" in post #1 for HS2, or has everything arduino moved on to HS3?
            HI,

            Yes all my work has moved to HS3 and over to a plugin. I have some people testing this now with the Ethernet interface and the first bunch of tests have been good.
            If you want to test the HS2 script then it would have to be with usb.
            The HS3 plugin is also lots easer to setup as there is only a couple of things to change on the board and you can add pins on the fly from Homeseer.

            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


            • Originally posted by enigmatheatre View Post
              HI,

              Yes all my work has moved to HS3 and over to a plugin. I have some people testing this now with the Ethernet interface and the first bunch of tests have been good.
              If you want to test the HS2 script then it would have to be with usb.
              The HS3 plugin is also lots easer to setup as there is only a couple of things to change on the board and you can add pins on the fly from Homeseer.

              Greig.
              Any idea when you will have something available for broader distribution/testing?
              _______________________________________________

              HS3 : HSpro (3.0.0.460) on Win2012 (vm on ESXi)
              Plugins: HSTouch, UPBSpud, Kinect, Nest, IFTTT, DirecTV, EasyTrigger, Imperihome, Zwave, RFXcom, UltraMon3, UltraWeatherBug3, UltraGCIR3, UltraLog3, UltraPioneer, PHLocation, Pushover, Pushalot, MCSSPrinklers S, JowiHue
              Jon00 Plugins: Bluetooth Proximity, Performance Monitor, DB Chart, Links

              Comment


              • Originally posted by jlrichar View Post
                Any idea when you will have something available for broader distribution/testing?
                I am going in to hospital this weekend and will be off work for 4-6 weeks so I am guessing if all is well about 1-2 months time for it to be in the updater but I am hoping to post a beta on the board sooner. I am waiting to get some results from the beta testers I am using.

                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


                • Best wishes for a rapid recovery!

                  Comment


                  • Originally posted by NeverDie View Post
                    Best wishes for a rapid recovery!
                    +1
                    _______________________________________________

                    HS3 : HSpro (3.0.0.460) on Win2012 (vm on ESXi)
                    Plugins: HSTouch, UPBSpud, Kinect, Nest, IFTTT, DirecTV, EasyTrigger, Imperihome, Zwave, RFXcom, UltraMon3, UltraWeatherBug3, UltraGCIR3, UltraLog3, UltraPioneer, PHLocation, Pushover, Pushalot, MCSSPrinklers S, JowiHue
                    Jon00 Plugins: Bluetooth Proximity, Performance Monitor, DB Chart, Links

                    Comment


                    • Hello and first of all, scuse me for my bad english.

                      Well, i want to hope best wishes for a rapid recovery to enigmatheatre........




                      I would like to know if is it possible to have an 'input' in Arduino that can activate a relay when Homeseer is not running.

                      I try to explain with an example:

                      I have an input (a push button) and an output (a relay turning on a light).
                      When i press the button, input goes high, Arduino 'tell' to Homeseer the input is high and Homeseer 'reply' to Arduino to turn on the relay.

                      Well, i would like, if Homeseer is off, Arduino can turn on the light.

                      So, if connection with Homeseer is not available, when i press the button, Arduino can turn on the relay.


                      Can someone suggest me how to do this?

                      Thank you and scuse me again for my bad english.

                      Ema from Italy

                      Comment


                      • In the Arduino sketch, i have seen the variable "IsConnected". This is set as "false", but i was not able to find when this change its status to "true".

                        Maybe this variable can be useful for me, because if Arduino is not connected, the input can do something different from when Arduino is connected.

                        Comment


                        • Originally posted by emabonacchi View Post
                          Hello and first of all, scuse me for my bad english.

                          Well, i want to hope best wishes for a rapid recovery to enigmatheatre........




                          I would like to know if is it possible to have an 'input' in Arduino that can activate a relay when Homeseer is not running.

                          I try to explain with an example:

                          I have an input (a push button) and an output (a relay turning on a light).
                          When i press the button, input goes high, Arduino 'tell' to Homeseer the input is high and Homeseer 'reply' to Arduino to turn on the relay.

                          Well, i would like, if Homeseer is off, Arduino can turn on the light.

                          So, if connection with Homeseer is not available, when i press the button, Arduino can turn on the relay.


                          Can someone suggest me how to do this?

                          Thank you and scuse me again for my bad english.

                          Ema from Italy

                          I am getting better thanks. I can now get up and about.

                          I think this could be done but you would have to modify the ino so that the your code would run outside the condition if (IsConnected == true) .

                          try changing the start of the loop to:

                          void loop() {

                          if (IsConnected == false)
                          {

                          //Add your code here.......
                          }
                          if (IsConnected == true)
                          {

                          do not add any delays to your code as this will stop the rest of the code from working. use millis(); if you need to delay something.

                          On the HS3 plugin I am working on there is an API ino so that you can add your own code to the board.

                          I am getting there with this but it is proving to be a little harder than I thought to write a plugin.

                          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


                          • Originally posted by emabonacchi View Post
                            In the Arduino sketch, i have seen the variable "IsConnected". This is set as "false", but i was not able to find when this change its status to "true".

                            Maybe this variable can be useful for me, because if Arduino is not connected, the input can do something different from when Arduino is connected.
                            I would think if you already had something in HS that looked for the switch device and sent a relay device ON then you could just write Sumer local change to she INO that always did the same thing as it should not matter that it is done by both. Of course you would have to make the change each time the INO is updated with a new release.

                            Comment


                            • Originally posted by enigmatheatre View Post
                              I am getting better thanks. I can now get up and about.

                              I think this could be done but you would have to modify the ino so that the your code would run outside the condition if (IsConnected == true) .

                              try changing the start of the loop to:

                              void loop() {

                              if (IsConnected == false)
                              {

                              //Add your code here.......
                              }
                              if (IsConnected == true)
                              {

                              do not add any delays to your code as this will stop the rest of the code from working. use millis(); if you need to delay something.

                              On the HS3 plugin I am working on there is an API ino so that you can add your own code to the board.

                              I am getting there with this but it is proving to be a little harder than I thought to write a plugin.

                              Greig.
                              Thank you for your fast reply!
                              I am happy you are better now. I hope you are fine.

                              I will try it tomorrow because in Italy now is very late......
                              I am sure it will ok. I will tell you tomorrow if it goes ok.

                              Best regards.

                              Ema from Italy

                              Comment


                              • Originally posted by Gerard View Post
                                I would think if you already had something in HS that looked for the switch device and sent a relay device ON then you could just write Sumer local change to she INO that always did the same thing as it should not matter that it is done by both. Of course you would have to make the change each time the INO is updated with a new release.

                                Hello Gerard and many thanks for you reply.

                                Scuse me, but my english is really very bad, so, i have not understood your reply. Can tou please try to explain with simpliest words what you were trying to explain?

                                I repeat....... very scuse me.......

                                Comment

                                Working...
                                X