Forum Replies Created
-
AuthorPosts
-
SamerKeymasterJust to add another option. If you use my mobile app you will notice the side panel has an export/import config. You can export the config, upgrade OSPi, and import the config back.
Of course it’s helpful to know what my app backs up which is: programs, station names, master operation bits (which stations use a master station) and all device options.
SamerKeymaster@Richp wrote:
Current status is much better, however, I would put the ‘last run’ section after the ‘sprinkler stations’ section, thereby keeping the station status as the primary focus. Not having to scroll to see the status of the first 8 stations would be ideal.
I just addressed these issues in the latest commits. On an iPhone 5 you can see 13 stations on the current status page and an iPad 16. The last run is in the footer of the status page now.
I still want to do more work on the status page, ex. add total program time remaining.
Update: Just realized that was commit #300! Been a long journey.
Update 2: I removed the firmware version from the status page. It stood out and didn’t belong there anymore in my opinion. I plan on moving this information over to the about page however since the about page is filled in on page load (currently) a HTTP request to the OpenSprinkler would slow down the initial page load. Therefore, I will poll the firmware version using AJAX when the about page is requested, in a future update.
SamerKeymaster
SamerKeymaster@kenbob you are absolutely correct. This problem is happening because Dan is following Ray’s code a little closer and for some reason (same issue as station names) the last element is an unused 0 (not sure why it’s there to be honest). Anyways, I now send a 0 as well which seems to work fine.
SamerKeymasterAh okay I get why you want more control now.
By the way as of right now the OSPi is only sequential however the feature for sequential on/off is being added to the OSPi and will hopefully be available soon.
SamerKeymasterThat’s the way the OpenSprinkler currently works (what I described above) and also the interval program for the OSPi.
I understand what your saying about timing individual stations but to me this fine control of what specific minute a station turns on isnt needed so long all the stations water for the correct duration inside the specified time window.
Glad your enjoying the web app!
SamerKeymasterThe way programs are scheduled is pretty awesome. I will just give an example since I don’t know how else to explain this:
Program 1:
M,W,F,S
2:00AM to 10:00AM
Station 1,3,5,7,9
30 minutes per stationProgram 2:
M,W,F,S
2:00AM to 10:00AM
Station 2,4,6,8,10
15 minutes per stationThis will run programs 1-10 in sequential mode (assuming that’s the mode you are in) and run them one after another altering between 30 mins and 15 mins based on which station it is (in this example odd vs even).
What I am trying to illustrate here is you don’t have to worry about time conflicts between programs. The way the scheduler processes program’s is by stations not locked to one program.
Hope this makes sense!
SamerKeymaster@aradke He wants Apache for the mobile web app. That’s why he installed it to begin with, I believe.
The better goal is to leave interval on default 8080. Use Apache on normal 80 and use the already existing port forward.
SamerKeymasterOkay so you are using the same port twice based on what you said. You need to resolve it using one of the following ways:
Use port 8080 for the interval program:
I assume: your end goal is to get the mobile app working from anywhere, correct?
If so, you want the interval program to launch with port 8080 and leave Apache to continue doing it’s thing.
You would use your RPi’s LAN IP and the port 8080 when installing.Disable Apache:
If your goal is to access the interval program from anywhere and subsequently have the ability to use Ray’s hosted mobile app, which also works anywhere than you can just disable Apache.
This can be done by removing it from runtime, uninstalling it, or changing it’s port.
SamerKeymasterThis is an awesome project!
Can the socket be encrypted by SSL?
SamerKeymasterSomething is using that port, typically. To help diagnose we would need the port your using for your interval program and then make sure you don’t have anything else running on that port (HTTPd such as Apache run on port 80).
Also, if you are trying to use port 80 it’s possible you don’t have privileges to open that port.
SamerKeymasterI finally addressed the multiple stations running issue with the status bar in the header, @djagerif.
Now, if multiple stations are running at the same time it will instead show the count of stations running and then show the program total duration countdown.
At the very least you now know more than one station is running and you get the program total. Going to hopefully incorporate the program total into the current status page as well but leaving that for the weekend.
Code: https://github.com/salbahra/OpenSprinkler-Controller/commit/ec7534707402b6f8deadff95e0d57bdf8610525a
SamerKeymaster@virtus Which version are you using?
For the hosted version (Ray’s website): In the side panel (the top left button on the homepage) there are two options. The first one is Change OS IP/password and the other is Remove OS IP/password. This version saves the password in your browser’s local storage. If you ever need to remove the current configuration you can delete the local storage for that specific website (each browser is different making it difficult to give instructions on how to accomplish this).
For the installed version: Inside config.php is a variable called $os_pw. After the equal sign and inside the quotes is the saved password, just replace it.
SamerKeymasterI finally added a running timer to the status page @kenbob. I honestly have not been able to test it accurately because I do not want to test on a live system and the OSPi interval program (latest copy) is giving me issues with runonce programs. Please let me know how it works, thanks!
Update: For anyone who skims through the code changes; I haven’t consolidated the update timer functions because I didn’t wanna break the homepage timer. Once I know this is working I will merge them.
SamerKeymasterThis is a topic I am very interested in and have spoken with Ray about on multiple occasions. I think this is required for the product to move up the ladder. I also think this is something that should be used with Ray’s server only because of trust issues. It is the same reason I have him hosting the hosted version of my web app.
I think the remote solution can be built into the firmware and use the already present HTTP GET API. This opens all the options off the bat and is backwards compatible. Here is how I see this system playing out:
1) On the firmware an additional button will exist next to the programs and weather buttons, up top, saying Remote Access.
2) That page, when opened, will show the registration status of the device and based off that show you the relevant information or present a form to register.
3) Registration is done using an email and a password. This becomes your login to the mobile app (the one hosted on Ray’s site) for example. This registration has a unique OpenSprinkler ID associated with it and is stored on the server with the account information. Each account can have multiple devices and when using such account you will be presented with a device selection screen on initial login.
4) The device uses an open socket it initiates to communicate meaning no port forwarding is required. This is the part I know the least about and need the most assistance with. The biggest obstacle here is remembering this will be programmed into a microcontroller. Resources are severely limited and doing security using SSL is pretty tough. Therefore, something such as PGP might be suitable? This is where my research has been focused.
SamerKeymaster@Zapp please let me know if updating to the newer interval program helps. For the record though, my app has no say in the controller being in rain delay or not. So, if you open my app and it says rain delay enabled then it directly got this information from the OpenSprinkler.
What I am trying to say is, when you see issues like this consult the native interface for the OpenSprinkler to help troubleshoot (at the very least this eliminates one variable from the equation).
Now, if the OpenSprinkler interface is showing something different than my web app, please let me know! In that situation, chances are something is wrong with my web app.
Thanks!
SamerKeymaster@andrew I love these weather based add ons for the system. I just want to highlight some hesitation I have and how I plan to get around them.
The first problem is the weather data. I want to make sure we choose the best source that won’t cause us problems down the road and contain trustworthy data. The other problem in regard to weather source is cost. Most are free for personal use but regardless all require an API key (something I suspect some user’s will have issues with). I understand most here in the forum say they can handle getting an API key but unfortunately I don’t think the general audience can.
The second problem is trust. Right now, my web app and the interval program are undergoing heavy changes and trying to bolt down a reliable weather control seems far-fetched to me. I personally would not trust my web app (yet) to handle complex weather analysis and program changes. The only weather based addition I have added was automatic rain delay because I trust that will work as advertised (not saying it’s the best solution, just saying I trust it to work).
As things begin to stabilize in the basic UI/function arena I hope people smarter than me can add on the weather based control’s to either my web app or directly to the firmware (which is probably ideal). I think adding weather control outside of the main device requires the server to always be in sync and connected to the OpenSprinkler which adds another link that can break. The nice thing about my web app is even if your server completely dies, the OpenSprinkler functions as normal.
SamerKeymasterIf you are interested in graphing of the CPU temp I highly suggest you explore options such as Cacti. They are wonderful with dealing with this information. You can install Cacti right on the Raspberry Pi or you can have another server do Cacti and use SNMP to poll the RPi.
By the way, the solution you came up with is awesome!
SamerKeymaster@momanz I will update the timer to help alleviate this issue.
@Zapp the interval program ignores DST and as a result the time my app gets is incorrect. This is a change documented by Dan. Also, there is a newer version dated July 10 that might help.
@wyone Files got deleted by accident. I’ve fixed them and all should be working again.
@djagerif I got your PM, the OS 2.0 allows 16 character names. The OSPi can easily support that too now if it wants otherwise I believe OS<2.0 and OSPi automatically trim anything sent over 12 characters.
SamerKeymasterYes, there’s three different timeouts. One is in Javascript for AJAX calls and is at the top of main.js.php. The other two are in main.php at the top. One is a socket timeout which is how long file_get_contents can wait when trying to communicate with Yahoo or OpenSprinkler. The third timer is a php execution limit. Let me know if changing any of these helps. Still find it odd only the first one has issues.
Thanks!
SamerKeymasterI like this idea however I am going to have to push this one off until MySQL is implemented. I have already figured out how to migrate all current user’s just left figuring out how to structure logging. I think it’s an inevitable switch and something almost every setup can cope with.
Thanks!
SamerKeymasterApostrophe breaks the interval program and the Arduino firmware. The normal javascripts sanitize the input however my mobile app isn’t doing this. Probably why this problem is just now occurring. I will fix my code to bring it in line with what the firmware’s expect.
Update: I actually don’t see any sanitization in Ray’s javascript’s (was a quick glance though). Do you want me to encode the strings using html codes?
SamerKeymaster@wyone I think your browser is aggressively caching the Javascript because I have updated the script and it is almost impossible for you to see undefined. If you are my best guess is an old, cached file. Try to F5 (Windows) or Ctrl + R (Mac) and see if that fixes anything.
SamerKeymaster@wyone Okay, I fixed the buttons at the bottom of the run-once page not working.
Also, where does it say undefined running?
SamerKeymasterI agree 30 was a bit limiting and will update my copy to reflect the new limits.
I would love to stuff everything into one page however some things are too difficult to cram in (especially on iPhone). I have some changes in the pipeline for the status page to bring it all into one page by making each station a “card” and allowing them to reflow based on the browser’s width.
The preview pages bug is eludes me apparently. Please let me know if you find any errors or anything that can hint at what is going wrong and I will be glad to fix it.
Thanks!
@wyone Okay let me see what I did and will try to get a fix ASAP. Just so you know run-once stopped working for me on OSPi but I don’t think you are using the Pi, are you? -
AuthorPosts