Announcement

Collapse
No announcement yet.

Arduino Plugin feature requests

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #91
    But can you send a variable from Homeseer to the sketch, that is what I mean. I know the sketch could be run separate from Homeseer, but it would be good if Homeseer could send a variable to the sketch as well, not the other way around. e.g. I have a variable for a server cupboard Max temp, I tell Homeseer to send a new variable e.g. 40.00 and this grey s stored in the eeprom or whereever on the arguing and my app code can read this and maybe turn on a fan if it exceeds this (irrespective of connection to homeseer), but then it could be changed later. I know part of this is achievable (e.g. Without homeseer) but it is sending a variable to the arguing from Homeseer I am most interested in.... (hope I explained it well)

    Sent from my SM-T815Y using Tapatalk
    HS3 PRO, Win10, WeatherXML, HSTouch, Pushover, UltraGCIR, Heaps of Jon00 Plugins, Just sold and about to move so very slim system.

    Facebook | Twitter | Flickr | Google+ | Website | YouTube

    Comment


      #92
      Originally posted by Ron View Post
      Hi Greig,

      I'm experimenting with the Arduino plugin for some days now, and i'm strugling with some issues.

      I'm using the normal configuration (no API), and i'm wondering if it is possible in an analog input to have a choice between update variation like with the API configuration. (eg. value only, string only or value/string)?

      or

      make it possible to insert special signs in the "unit" field. i'm not able to put "℃" (or any other special signs) in the "unit" field.

      I've tried to use API configuration, but then i'm not able to send floating point data.

      regards
      Ron
      Sorry Ron I must have missed your post. If needed this can be added to the device Suffix in the device status graphics configuration screen.

      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


        #93
        Originally posted by travisdh View Post
        But can you send a variable from Homeseer to the sketch, that is what I mean. I know the sketch could be run separate from Homeseer, but it would be good if Homeseer could send a variable to the sketch as well, not the other way around. e.g. I have a variable for a server cupboard Max temp, I tell Homeseer to send a new variable e.g. 40.00 and this grey s stored in the eeprom or whereever on the arguing and my app code can read this and maybe turn on a fan if it exceeds this (irrespective of connection to homeseer), but then it could be changed later. I know part of this is achievable (e.g. Without homeseer) but it is sending a variable to the arguing from Homeseer I am most interested in.... (hope I explained it well)

        Sent from my SM-T815Y using Tapatalk
        Yes you can. From the code in the Sketch:
        PHP Code:
            //************************
            //Add YOUR CODE HERE;
            //************************
            /* To Send Data to Homeseer use SendToHS(Device,Value)
             Eg.. SendToHS(1,200); where 1 is the API device in homeseer and 200 is the value to send
             To Recieve data from Homeseer look up the FromHS array that is updated when the device value changes.
             Eg.. FromHS[5] would be the data from API Output device 5
             All code that is located just below this block will execute regardless of connection status!
             You can include SendToHS() calls, however when there isn't an active connection, it will just return and continue.
             If you only want code to execute when HomeSeer is connected, put it inside the if statement below.
             */ 
        So you would use an API output device and set it to the value you want to send to the sketch and this is stored in the FromHS[] array under the device output number.

        Is this what you want to do?

        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


          #94
          Yep, that is fantastic!

          Sent from my SM-T815Y using Tapatalk
          HS3 PRO, Win10, WeatherXML, HSTouch, Pushover, UltraGCIR, Heaps of Jon00 Plugins, Just sold and about to move so very slim system.

          Facebook | Twitter | Flickr | Google+ | Website | YouTube

          Comment


            #95
            Originally posted by travisdh View Post
            Yep, that is fantastic!

            Sent from my SM-T815Y using Tapatalk
            I do my best.

            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
              Am I the only one that has CPU usage "issues" with the Arduino plugin... ?
              HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
              Running on Windows 10 (64) virtualized
              on ESXi (Fujitsu Primergy TX150 S8).
              WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

              Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

              Comment


                #97
                Originally posted by enigmatheatre View Post
                Sorry Ron I must have missed your post. If needed this can be added to the device Suffix in the device status graphics configuration screen.

                Greig.
                Hi Greig,

                I've tried this, but i was not able to get the right output because an analog input is made as String only, so the suffix is not presented. as shown in the pictures added.

                Click image for larger version

Name:	Arduino.png
Views:	1
Size:	23.1 KB
ID:	1184758

                Click image for larger version

Name:	Arduino2.png
Views:	1
Size:	11.6 KB
ID:	1184759

                tnx Ron

                Comment


                  #98
                  Watch Dog Feature?

                  I would like to request a watch dog feature. My Arduino sometimes disconnects from homeseer. I am using the Ethernet shield. Sometime the disconnect can be fixed by homeseer, by sending a reset signal to the arduino, but other times, even the homeseer command to reset will not solve the problem.

                  I am using the MEGA arduino, as a pool controller. When it gets locked up, I may not notice it for days. I added some code to homeseer to track this, and send me an email when it detects this, but sending an automated homeseer reset signal to the arduino will not fix it when the communication is down. You have to walk all the way out to the pool controller, and actually push the button on the board. Then everything is perfect again, until the next time it locks up.

                  I would like to see code that forces the ardunio to reset (all by its self) every 15 minutes, unless it receives a "keep alive" signal from homeseer every 10 minutes. As soon as homeseer can no longer talk with the arduino, to tell it to keep going, the arduino will time out, and reset, and restore communication.

                  I read through the 2 pages of request, and did not see this mentioned. If this feature is already available, please point me in the correct direction.

                  Thanks!

                  Comment


                    #99
                    Originally posted by swanie2000 View Post
                    I would like to request a watch dog feature. My Arduino sometimes disconnects from homeseer. I am using the Ethernet shield. Sometime the disconnect can be fixed by homeseer, by sending a reset signal to the arduino, but other times, even the homeseer command to reset will not solve the problem.

                    I am using the MEGA arduino, as a pool controller. When it gets locked up, I may not notice it for days. I added some code to homeseer to track this, and send me an email when it detects this, but sending an automated homeseer reset signal to the arduino will not fix it when the communication is down. You have to walk all the way out to the pool controller, and actually push the button on the board. Then everything is perfect again, until the next time it locks up.

                    I would like to see code that forces the ardunio to reset (all by its self) every 15 minutes, unless it receives a "keep alive" signal from homeseer every 10 minutes. As soon as homeseer can no longer talk with the arduino, to tell it to keep going, the arduino will time out, and reset, and restore communication.

                    I read through the 2 pages of request, and did not see this mentioned. If this feature is already available, please point me in the correct direction.

                    Thanks!
                    Michael, I had a similar problem with a Arduino Uno with an Ethernet shield. Right now I am testing the Uno and it is only monitoring temperature in a few locations. You can do some very cool stuff with these things. I too found that my Uno would sometimes go offline, not a lot, but sometimes. I found that stopping/starting the Arduino Plugin would clearup the problem for me. I started using Jon00's Plugin Enable/Disable Utility. It allows me to stop/startup the Arduino plugin nightly if I want. Seems to have solved my minor/random disconnect issue I was having with my Uno. When you have issues with your Arduino, have you tried stopping/starting the Arduino Plugin rather than resetting the Arduino? Restarting the plugin has worked for me in the past.

                    My latest project: I am working on using a Uno to measure the level of rain water in a 55 gallon drum. I have a few areas in my yard that are near or slightly below street level so some of the rain water from the gutters and the driveway has no where to go or moves rather slowly to the street. We are working on a using the 55 gallon drum to catch the water, then use a trash pump to move the water to the street. On my first one, I setup a catch basin in my driveway with a french drain put in plastic drum (that I found at Lowes) below grade, put in a trash pump and it moves all of the water in a timely fashion to the street. The drum I found at Lowes was small, about 22 gallons. At the time, I did not even think about using a 55 gallon plastic drum. These drums are fairly cheap, found some food/liquid drums on Craigslist for 10 dollars. If you cut the top off, I found a place that sells plastic manhole covers fairly reasonable. Anyway the final location will have the 55 gallon drum and and sensors to measure the water level in the tank. We plan on adding sensors to the first tank and possibly replacing it if this setup works well.
                    Billy

                    Comment


                      Originally posted by bdraper View Post
                      Michael, I had a similar problem with a Arduino Uno with an Ethernet shield. Right now I am testing the Uno and it is only monitoring temperature in a few locations. You can do some very cool stuff with these things. I too found that my Uno would sometimes go offline, not a lot, but sometimes. I found that stopping/starting the Arduino Plugin would clearup the problem for me. I started using Jon00's Plugin Enable/Disable Utility. It allows me to stop/startup the Arduino plugin nightly if I want. Seems to have solved my minor/random disconnect issue I was having with my Uno. When you have issues with your Arduino, have you tried stopping/starting the Arduino Plugin rather than resetting the Arduino? Restarting the plugin has worked for me in the past.

                      My latest project: I am working on using a Uno to measure the level of rain water in a 55 gallon drum. I have a few areas in my yard that are near or slightly below street level so some of the rain water from the gutters and the driveway has no where to go or moves rather slowly to the street. We are working on a using the 55 gallon drum to catch the water, then use a trash pump to move the water to the street. On my first one, I setup a catch basin in my driveway with a french drain put in plastic drum (that I found at Lowes) below grade, put in a trash pump and it moves all of the water in a timely fashion to the street. The drum I found at Lowes was small, about 22 gallons. At the time, I did not even think about using a 55 gallon plastic drum. These drums are fairly cheap, found some food/liquid drums on Craigslist for 10 dollars. If you cut the top off, I found a place that sells plastic manhole covers fairly reasonable. Anyway the final location will have the 55 gallon drum and and sensors to measure the water level in the tank. We plan on adding sensors to the first tank and possibly replacing it if this setup works well.
                      Hi Billy,
                      Thanks for the heads up, sounds like a good idea, will give it a look. I have maybe 20 different events that handle the pool pump speeds, solar heater, and the valves for the skimmer, vacuum and heater. One of my routines is a pool pump shut down routine, that cleans up everything, resetting all the counters and flags back to normal for the next day.

                      When I started having trouble with the Arduino, I added a command to reset the Arduino every day, in the pool pump shut down routine. I thought that would fix it, but I still get random disconnects/errors.

                      I honestly never thought about turning the entire plugin off and then back on, I will give that a shot. I can add that command to the end of my shutdown routine, instead of the reset.

                      I am thinking that the code for the Arduino and/or the Ethernet shield may get buggy over time, and it just needs to be reset? (kind of like Windows ) I have read that others are having the same disconnect issues with their Ethernet shields as well. That was why I suggested a watchdog idea, to constantly expect a ping from the host(Homeseer) to keep the Arduino alive. Without this constant ping from the host, the Arduino would force reset on its own.

                      The problem I had yesterday was so bad, nothing I did via Homeseer would ever get through to the Arduino. I don't think turning the plugin off and back on would have helped yesterday, however, I did not try it. MAYBE, turning the plugin off and back on, daily, will stop the code from running too long, and getting buggy, and then having random disconnects? It's worth a shot.....

                      Michael

                      Comment


                        Originally posted by swanie2000 View Post
                        Hi Billy,
                        Thanks for the heads up, sounds like a good idea, will give it a look. I have maybe 20 different events that handle the pool pump speeds, solar heater, and the valves for the skimmer, vacuum and heater. One of my routines is a pool pump shut down routine, that cleans up everything, resetting all the counters and flags back to normal for the next day.

                        When I started having trouble with the Arduino, I added a command to reset the Arduino every day, in the pool pump shut down routine. I thought that would fix it, but I still get random disconnects/errors.

                        I honestly never thought about turning the entire plugin off and then back on, I will give that a shot. I can add that command to the end of my shutdown routine, instead of the reset.

                        I am thinking that the code for the Arduino and/or the Ethernet shield may get buggy over time, and it just needs to be reset? (kind of like Windows ) I have read that others are having the same disconnect issues with their Ethernet shields as well. That was why I suggested a watchdog idea, to constantly expect a ping from the host(Homeseer) to keep the Arduino alive. Without this constant ping from the host, the Arduino would force reset on its own.

                        The problem I had yesterday was so bad, nothing I did via Homeseer would ever get through to the Arduino. I don't think turning the plugin off and back on would have helped yesterday, however, I did not try it. MAYBE, turning the plugin off and back on, daily, will stop the code from running too long, and getting buggy, and then having random disconnects? It's worth a shot.....

                        Michael
                        You may want to consider an external hardware watchdog timer. Here's one example: http://www.freetronics.com.au/produc...g-timer-module.

                        This will reset the Arduino if it hangs. The ping from a host won't work if the Arduino itself is locked up as it won't be able to execute code to reset itself. Arduino's do have a built-in watchdog timer, but the problem with them is that the maximum time interval is 8 seconds. If you have loops that take longer to execute, or it takes longer than that to load your sketch, an external watchdog timer is best.

                        Cheers
                        Al
                        HS 4.2.8.0: 2134 Devices 1252 Events
                        Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                        Comment


                          Originally posted by sparkman View Post
                          You may want to consider an external hardware watchdog timer. Here's one example: http://www.freetronics.com.au/produc...g-timer-module.

                          This will reset the Arduino if it hangs. The ping from a host won't work if the Arduino itself is locked up as it won't be able to execute code to reset itself. Arduino's do have a built-in watchdog timer, but the problem with them is that the maximum time interval is 8 seconds. If you have loops that take longer to execute, or it takes longer than that to load your sketch, an external watchdog timer is best.

                          Cheers
                          Al
                          Yes, this looks like a good way to address my problem. I am curious to learn more about the built in watchdog? I wasn't aware of it. My pool controller monitors 8 switch inputs, 4 one wire temp sensors, and controls 8 relays. I think 8 seconds will work fine. I need to do some more research, and find out how to implement this built in watch dog. Thanks!

                          Comment


                            Originally posted by swanie2000 View Post
                            Hi Billy,
                            Thanks for the heads up, sounds like a good idea, will give it a look. I have maybe 20 different events that handle the pool pump speeds, solar heater, and the valves for the skimmer, vacuum and heater. One of my routines is a pool pump shut down routine, that cleans up everything, resetting all the counters and flags back to normal for the next day.

                            When I started having trouble with the Arduino, I added a command to reset the Arduino every day, in the pool pump shut down routine. I thought that would fix it, but I still get random disconnects/errors.

                            I honestly never thought about turning the entire plugin off and then back on, I will give that a shot. I can add that command to the end of my shutdown routine, instead of the reset.

                            I am thinking that the code for the Arduino and/or the Ethernet shield may get buggy over time, and it just needs to be reset? (kind of like Windows ) I have read that others are having the same disconnect issues with their Ethernet shields as well. That was why I suggested a watchdog idea, to constantly expect a ping from the host(Homeseer) to keep the Arduino alive. Without this constant ping from the host, the Arduino would force reset on its own.

                            The problem I had yesterday was so bad, nothing I did via Homeseer would ever get through to the Arduino. I don't think turning the plugin off and back on would have helped yesterday, however, I did not try it. MAYBE, turning the plugin off and back on, daily, will stop the code from running too long, and getting buggy, and then having random disconnects? It's worth a shot.....

                            Michael
                            It would interesting to know if the next time you have the problem, if a restart of the plugin would solve the problem. I have very few issues, just measuring temperature from a few sensors right now. I have not converted all of my 18 temperature senors form a TEMP08 unit to the Arduino. I am working on expanding the use of the Arduino with measuring the level of water in the 55 gallon drums. So far right now when mine has a connection problem, which is rare, restarting the plugin has solved the issue. I hope it works for you as well.

                            Originally posted by sparkman View Post
                            You may want to consider an external hardware watchdog timer. Here's one example: http://www.freetronics.com.au/produc...g-timer-module.

                            This will reset the Arduino if it hangs. The ping from a host won't work if the Arduino itself is locked up as it won't be able to execute code to reset itself. Arduino's do have a built-in watchdog timer, but the problem with them is that the maximum time interval is 8 seconds. If you have loops that take longer to execute, or it takes longer than that to load your sketch, an external watchdog timer is best.

                            Cheers
                            Al
                            This is a cool find Al, thanks for sharing. Could be a viable solution.
                            Billy

                            Comment


                              Originally posted by sparkman View Post
                              You may want to consider an external hardware watchdog timer. Here's one example: http://www.freetronics.com.au/produc...g-timer-module.

                              This will reset the Arduino if it hangs. The ping from a host won't work if the Arduino itself is locked up as it won't be able to execute code to reset itself. Arduino's do have a built-in watchdog timer, but the problem with them is that the maximum time interval is 8 seconds. If you have loops that take longer to execute, or it takes longer than that to load your sketch, an external watchdog timer is best.

                              Cheers
                              Al
                              Al

                              I note from Griegs notes there should be NO wait/delay type statements in anyones API routines as you will get weird ethernet behaviour. BlinkwithoutDelay is a good example of how to do timers....

                              I believe you already know that, I was just going to share it with anyone else reading the thread...
                              HS 2.2.0.11

                              Comment


                                Originally posted by Moskus View Post
                                Am I the only one that has CPU usage "issues" with the Arduino plugin... ?
                                Moskus, which version of the Arduino plugin are you using? I am on version 1.0.0.100.

                                Until only recently I have only been playing around with the Arduino, basically just monitoring a few temp sensors on a breadboard. Everything was working well so I thought I would expand the system to a few of my temp sensors on my 1-wire network. I have 20 or so DS1820s monitored by a TEMP08 unit spread out in and outside the house. Our attic is split so I have a sensor in each side and also one in the crawlspace. Other temp senors are located in the duct work and in some rooms. he documentation states that the The Arduino plugin will monitor 15 one-wire sensors, so I was able to easily split my system up and add 13 sensors. I noticed after doing this the CPU usage on my HomeSeer application usually averaged around 10% (using Jon00s PerfMon utility), now it is averaging around 25%. Everything is still working well with the increase in CPU, however it is notable. I plan on adding an additional board at a later date and wonder if it will increase more. I am sure there is something that I could do just not sure what? It appears that the sensors update quite frequently, some every few seconds, the CPU increase could be due to this activity. I wonder if adding a timer into the default sketch would reduce the overall CPU usage. I am using sketch V1.0.0.99, the only modifications to it were adding in the IP addresses.
                                Billy

                                Comment

                                Working...
                                X