Announcement

Collapse
No announcement yet.

Arduino Plugin feature requests

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

  • 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:


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

    Leave a comment:


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

    Leave a comment:


  • enigmatheatre
    replied
    Originally posted by travisdh View Post
    With the API version of the plugin sketch, it would be great to be able to send double variables to the device, so that the sketch can function on its own with the variables sent if needed (e.g. heating control), rather than needing to have homeseer run an event based on device value changes. In some cases it would be better to have the arduino reporting 'status' to homeseer, but essentially being able to operate autonomous of homeseer if needed.
    Travis,

    If I understand you correctly this can be done with the API Sketch as it is at the moment. There is a section to enter your code that runs when connected to Homeseer and another that will run code all the time so you can store the Variables that you need and run the code in that section an it will run what you want and only update Homeseer when connected.

    Greig.

    Leave a comment:


  • travisdh
    replied
    With the API version of the plugin sketch, it would be great to be able to send double variables to the device, so that the sketch can function on its own with the variables sent if needed (e.g. heating control), rather than needing to have homeseer run an event based on device value changes. In some cases it would be better to have the arduino reporting 'status' to homeseer, but essentially being able to operate autonomous of homeseer if needed.

    Leave a comment:


  • Moskus
    replied
    Originally posted by usLEDsupply View Post
    can we use the Arduino Map function in the math section on the analog inputs? Value = map(x, 0, 1023, 0, 150);
    or in my case something like Value = map(x, 50, 955, 0, 200);

    i have a bunch of analog sensors to measure water and air pressure and i can get the normal value pretty close with the standard math but it would be nice to get the full range more accurate
    The map function is actually very well described in the Arduino setup:

    Code:
    long map(long x, long in_min, long in_max, long out_min, long out_max)
    {   return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; }

    Leave a comment:


  • Moskus
    replied
    .103 CPU usage!
    I have HS3 running with several plugins, but enabling the Arduino plugin eats alot of CPU.

    Guess when I enabled the Arduino plugin:


    It's still not ALOT, but doubling the CPU usage for just one plugin seems like a little extreme.


    What is it the plugin is doing every other minute?

    Leave a comment:

Working...
X