Forum Replies Created

Viewing 25 posts - 301 through 325 (of 1,705 total)
  • Author
    Posts
  • in reply to: Running OSPi Unified Firmware on RPi with no OSPi HW #40062

    Samer
    Keymaster

    You can use the standard Raspberry Pi image and simply download and run the program as follows:

    
    // Downloads the firmware code
    git clone https://github.com/OpenSprinkler/OpenSprinkler-Firmware
    
    // Enter the directory that contains the above code
    cd OpenSprinkler-Firmware
    
    // Compile the firmware (this step will also ask if you want to run on system startup)
    ./build.sh ospi
    
    // Run the program now (if you installed on system startup you could also start that way)
    ./OpenSprinkler
    

    Hope that helps!

    Update: You can even run the code on OS X, etc by using ‘build.sh demo’. The demo is also publicly available here: http://demo.opensprinkler.com.


    Samer
    Keymaster

    Probably so, it originated with just an IP and quickly allowed any URL really as it just concats http or https to form the full URL. Thanks again for all the information which made this easy to debug!


    Samer
    Keymaster

    Oh sorry, just put the following for the IP: my.domain.com/os


    Samer
    Keymaster

    Yes, the app works well with subdirectory type proxies. In fact, it’s what I have been using for over two years now 🙂

    Glad it’s working now! That version will hit the app store very soon, just finishing up testing on the new version.


    Samer
    Keymaster

    Do you have an ad blocker on your phone by any chance? The app is technically just using a Chrome webview so it’s likely some sort of hook is there mangling the URL by accident? I did review all the lines of code from the string “/js” to the actual command being sent and see no way for it to gain an extra slash. Anything is possible, but it isn’t apparent to me at this moment.

    The weird thing is you said the browser on the same phone works fine and the issue is localized to the app. Have you tried just deleting and re-installing the app? You can even install the latest build of the app from here: https://build.phonegap.com/apps/1373249/install if you want to test. You will need to enable 3rd party app source in order to install from there.

    Thanks!


    Samer
    Keymaster

    Not sure if it will help but here is my proxy pass configuration:

    
    <IfModule mod_ssl.c>
    	<VirtualHost _default_:443>
    		ServerAdmin webmaster@localhost
    
    		DocumentRoot /var/www
    
    		SSLEngine on
    		SSLProtocol all -SSLv2
    		SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
    		SSLCertificateFile /etc/apache2/ssl/ssl.crt
    		SSLCertificateKeyFile /etc/apache2/ssl/ssl.key
    		SSLCACertificateFile /etc/apache2/ssl/ca.pem
    
    		ProxyRequests Off
    		ProxyPreserveHost Off
    		AllowEncodedSlashes On
    		KeepAlive Off
    
    		<Location /os/>
    			AuthType Basic
    			AuthName "Restricted"
    			AuthUserFile /etc/apache2/.htpasswd
    			AuthBasicProvider file
    			Require user admin
    			ProxyPass http://10.0.2.23/ timeout=1200 KeepAlive=On
    			ProxyPassReverse http://10.0.2.23/
    			<IfModule mod_headers.c>
    				Header set Access-Control-Allow-Origin "*"
    			</IfModule>
    		</Location>
    	</VirtualHost>
    </IfModule>
    

    This allows me to access the device using: https://my.domain.com/os and also uses Basic authentication. You can try to fit that into your configuration and see if it helps.


    Samer
    Keymaster

    This is what I am seeing but please note I am testing on a 2.1.6 beta (not released yet):

    Samers-iMac:~ salbahra$ curl http://10.0.3.8/js?pw=a6d82bced638de3def1e9bbb4983225c
    {"sn":[0,0,0,0,0,0,0,0],"nstations":8}
    
    Samers-iMac:~ salbahra$ curl http://10.0.3.8/js/?pw=a6d82bced638de3def1e9bbb4983225c
    {"sn":[0,0,0,0,0,0,0,0],"nstations":8}
    

    Update: You are right that result:32 would cause a connection failed error on the app. So likely, you are right this is the issue. Wonder why it differs now…let me discuss with Ray and get back to you.


    Samer
    Keymaster

    Apologizes, I missed the last bit of your original post.

    Regarding the extra slash though, it doesn’t seem to be an issue when querying the controller. In other words, for me both /js/?pw and /js?pw work and return the expected reply. Therefore, I am not even sure if that is the issue.

    If you don’t mind, the best way to identify the error would be to debug using Chrome. You can plug your phone into your computer using a micro USB cable and change the settings to allow USB debugging. You might need to unlock the developer menu to accomplish this which can be done by tapping the build version in the about screen 7 times (if memory serves). Once this is completed, you can open Chrome and navigate to: chrome://inspect.

    You should see your phone listed (when the app is open) and it will allow you to “Inspect” it. Here you will have access to the web developer console which allows you to look at the network traffic tab and the console in hopes of identifying the error.

    Would you mind trying the above steps to see if you see any errors or warnings?

    Thanks!

    in reply to: Connectivity Options #40014

    Samer
    Keymaster

    For Ethernet, yes the port acts as a LAN (access using the 3G connection) or WAN (used to provide Internet to the device). So this would work fine.

    For the public IP, this is the tricky part and conjunction with the port forwarding. There are many devices like the one I linked and just used that for illustration purposes. However I would double check the product manual/website to confirm it has the ability to port forward, etc. Verizon is the only carrier I know that sells public IP’s which are a one time fee of $500, I believe. I really don’t know anything about T-Mobile though.


    Samer
    Keymaster

    Thank you for the detailed post! I took a quick look at this and find it very odd it’s only adding the slash for /js and not the others. Furthermore, I took a look at my code and the /js is only defined on one line:

    https://github.com/OpenSprinkler/OpenSprinkler-App/blob/master/www/js/main.js#L1026 and I can’t imagine how a slash could be added so my theory is the reverse proxy is adding the slash. If the packets you are showing me are down stream of the proxy, then could you provide the proxy configuration or at least double check to ensure it’s not adding the extra slash?

    Also when using the web browser UI, the slash is not present correct?

    in reply to: UI Assets on MicroSD #40007

    Samer
    Keymaster

    Finally updated the support document (although screenshots may still be incorrect).

    Thanks for pointing it out.

    in reply to: API: how to find next scheduled program start #40006

    Samer
    Keymaster

    This isn’t something the firmware keeps track of therefore it’s not something you can request. The only way is to simulate the program preview until you find a station running (not ideal at all). This is why the app also doesn’t have this feature. If you have any ideas on how to determine the next run without doing such intense calculations let me know please.

    Thanks!

    in reply to: Connectivity Options #40005

    Samer
    Keymaster

    Sorry if I am missing something however won’t something like this be a lot easier? http://www.amazon.com/Huawei-E5151-Hotspot-Ethernet-T-Mobile/dp/B00B4AYPLU

    in reply to: Cleanup and upgrade to latest firmware. #40004

    Samer
    Keymaster

    Sorry for the delay but let me address your questions:

    1) You can simply use the app to backup your programs and settings (on Android). I recommend you use the email export so you have a tangible copy of the data.

    2) You can start over with a fresh image instead of having to worry about what to clean and what to keep. This can be done by following the latest instructions: https://opensprinkler.freshdesk.com/support/solutions/articles/5000524845

    3) Flow meter support, including logging, is now added in 2.1.6 which will be released soon.

    Thank you!

    in reply to: Bye bye OSPi, been burned too many times #39995

    Samer
    Keymaster

    The software you mentioned and used isn’t the official software. I understand your reasoning but do encourage you to try the Unified firmware before concluding the software is bad. Guide: https://opensprinkler.freshdesk.com/support/solutions/articles/5000524845-initial-configuration-of-raspberry-pi

    Furthermore, OSPi is more for advanced users who wish to tinker with software and the hardware whereas our Arduino solution is a fully assembled ready to go device with the official software preloaded. I highly encourage not choosing OSPi if you want a solution that just works.

    Thank you for your feedback!

    in reply to: Licensing #39984

    Samer
    Keymaster

    I went ahead and officially addressed this by adding the AGPL v3 license to the application. I chose the Affero GPL as the code can be modified to run as a service and this ensures modifications are published.

    Thank you for bringing this to my attention.

    Changes: https://github.com/OpenSprinkler/OpenSprinkler-App/commit/405998fc90aad0d0763348e42a94876bc8c656e8

    in reply to: UI Assets on MicroSD #39944

    Samer
    Keymaster

    For the record, the UI is served over a valid SSL. The relevant code define can be found here:

    https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/defines.h#L112

    in reply to: UI Assets on MicroSD #39941

    Samer
    Keymaster

    I understand what you are saying but first, I’ve already outlined available apps for the desktop which means it’s not restricted to mobile phones and tablets. Please refer to the list of apps that I have linked.

    Second, not sure how a user managing his own DNS would be more secure than our DNS. We take every security precaution with our DNS hosting accounts and use CloudFlare for added protection.

    The issue isn’t the size of the SD but the speed of the processor and Ethernet controller. These make it very slow and incur a high failure rate. Furthermore, not all devices have an SD so depending on that cannot work.

    Regarding the SSL/TLS support, no Arduino could support this and instead depends on other measures for security. We are looking at cloud access instead of port forwarding in which case we will use AES 128 for communication. In the mean time, you may setup a reverse proxy that adds SSL and even BASIC auth if you wish, as the app does support this.

    Thank you

    in reply to: Watering Percentage 0 but still watering #39928

    Samer
    Keymaster

    It’s possible however I would check the log data to rule that out or in. Under the table view of the logs page you will see a water level average under each day. This might shed some light on the issue. Let us know what you find.

    Thanks!

    in reply to: Watering percentage not changing #39889

    Samer
    Keymaster

    Awesome! Let us know if you continue to have issues.

    Thanks!

    in reply to: Watering percentage not changing #39887

    Samer
    Keymaster

    We released firmware 2.1.5 (2) which fixes this issue. More detail can be found here: https://opensprinkler.com/forums/topic/unified-firmware-2-1-5-minor-revision-2-released/

    in reply to: API: Logs manual mode and water level #39862

    Samer
    Keymaster

    Here is the function I use to resolve the program name: https://github.com/OpenSprinkler/OpenSprinkler-App/blob/master/www/js/main.js#L7017-7029

    You will notice the PID 255 or 99 mean a manual program and PID of 254 or 98 is a run-once program.

    For the water level, it uses the same request however you add a type=wl to the URL. We will update the API document to reflect these items

    in reply to: New Unified Firmware and OSPi #39847

    Samer
    Keymaster

    That project is run by Dan Kimberling who contributes everything in his free time. I believe he has a rewrite planned but I am not sure of the planned feature changes.

    in reply to: messed the install on my PI #39830

    Samer
    Keymaster

    We want to badly build a new install script that can be used for any Pi owner to install or update the program.

    Basically: you run a command such as the one to install homebrew for OS X. Then it scans for all types of sprinkler software we know and presents them to you saying which ones it can upgrade or which conflict (due to same port), etc. Or it finds nothing and walks you through the install. The install will also include things like certifying DNS and that RTC is working, etc.

    Basically a nice vision just need time to execute. I’m a little weak with bash scripting but maybe I can just use a different language and whip this up soon. It should make the process less confusing and more importantly less dependent on distribution of images. Instead use the Pi image and guides for initial setup then run our script, done.

    We just finished redoing the updater for Arduino so soon hopefully after 2.1.6 is out.

    in reply to: messed the install on my PI #39826

    Samer
    Keymaster

    What do you mean the installer? Right now we instruct users to do a git clone for new installs and to perform a “git pull” to update. It shouldn’t create another directory.

    Can you let us know what procedure you followed to upgrade?

    Thanks

Viewing 25 posts - 301 through 325 (of 1,705 total)