Announcement

Collapse
No announcement yet.

Arduino Plugin feature requests

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

  • bdraper
    replied
    Originally posted by rprade View Post
    I have 4 Arduino Mega boards in use, each one has a single OneWire temperature probe. 2 have analog inputs used for a luminance sensors. 3 of the boards are in use with multiple digital inputs and outputs, PWM outputs, etc. Two of the production boards have 20-30 digital I/O connections. One of the boards is a test platform and only has a OneWire, a luminance sensor and 4 digital I/O pins. The CPU usage for my Arduino plug-in executable is usually under 1%. When there is I/O activity it will spike to 4-5%.
    Great stats Randy. I should probably monitor the Arduino executable for CPU usage. What version of the plugin and sketch are you using? Did you make any adjustments to the sketch? If so what were your changes?

    Thanks again for the information.

    Leave a comment:


  • rprade
    replied
    I have 4 Arduino Mega boards in use, each one has a single OneWire temperature probe. 2 have analog inputs used for a luminance sensors. 3 of the boards are in use with multiple digital inputs and outputs, PWM outputs, etc. Two of the production boards have 20-30 digital I/O connections. One of the boards is a test platform and only has a OneWire, a luminance sensor and 4 digital I/O pins. The CPU usage for my Arduino plug-in executable is usually under 1%. When there is I/O activity it will spike to 4-5%.

    Leave a comment:


  • bdraper
    replied
    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.

    Leave a comment:


  • petez69
    replied
    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...

    Leave a comment:


  • bdraper
    replied
    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.

    Leave a comment:


  • swanie2000
    replied
    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!

    Leave a comment:


  • sparkman
    replied
    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

    Leave a comment:


  • swanie2000
    replied
    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

    Leave a comment:


  • bdraper
    replied
    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.

    Leave a comment:


  • swanie2000
    replied
    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!

    Leave a comment:


  • Ron
    replied
    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

    Leave a comment:


  • Moskus
    replied
    Am I the only one that has CPU usage "issues" with the Arduino plugin... ?

    Leave a comment:


  • enigmatheatre
    replied
    Originally posted by travisdh View Post
    Yep, that is fantastic!

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

    Greig.

    Leave a comment:


  • travisdh
    replied
    Yep, that is fantastic!

    Sent from my SM-T815Y using Tapatalk

    Leave a comment:


  • enigmatheatre
    replied
    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.

    Leave a comment:

Working...
X