Forum Replies Created
-
AuthorPosts
-
SamerKeymasterIt’s possible the TP Link is acting as the DNS server for the OpenSprinkler and not replying correctly. I am just suggesting a possible source since the issue is only behind the TP Link wireless device and otherwise works in your wired environment.
If you could, explore the DNS settings on the TP Link and verify they are using your router’s DNS or just put Google’s DNS:
8.8.8.8
8.8.4.4Otherwise, I am not sure why it would work when wired and not on wireless but still allow you to control the device. I say this because being able to use the app or web interface of the OpenSprinkler proves IP connectivity is working and the only missing piece is DNS which is only used for the weather DNS lookup.
SamerKeymaster@David, I really need to improve my code base. When I started the development the code was in PHP and then I quickly rewrote it and was way too hasty. As a result, the file structure is non existent in regard to the JS code and the comments are poor.
At some point I really want to improve this. I setup Mocha for unit testing but I also haven’t gotten around to adding a good amount of tests (which can act as documentation to some degree).
Since I do have a full time job as a doctor my after work time with OpenSprinkler is limited and lately more features is winning against improving what’s already there. One day haha….thanks for the suggestion!
SamerKeymasterHey David,
Just to let you know here is the apps status function for the bottom bar:
https://github.com/OpenSprinkler/OpenSprinkler-App/blob/master/www/js/main.js#L5058For rain sensor, the check I use is as follows:
https://github.com/OpenSprinkler/OpenSprinkler-App/blob/master/www/js/main.js#L5153Hope this helps with that issue
August 9, 2015 at 1:10 am in reply to: SOLVED! Firmware flash OK, but LCD displays rectangle box & stations not working #39771
SamerKeymasterJust to clarify, the first question was regarding the software not the medium. USB is the only way to update however software wise you may be using our firmware updater GUI or avrdude manually from the command line. If you are using the command line, you have to be sure to download the correct HEX for your hardware version otherwise it will flash and malfunction.
SamerKeymasterThe two are completely different at this point.
The Python program was based on firmware 1.8.3 and has not adopted many of the new features especially with 2.1.0+ (such as the per station watering times).
The Python program just got renamed to SIP by Dan and has taken a different direction from the Unified firmware. The focus around the Python version are plugins and easy user customization and additions.
SamerKeymasterOkay great! I am still investigating where the encoding is coming from but at least we know we found the problem and fixed it.
Thanks!
SamerKeymasterWith your location known, I found the log entries for the queries to the weather service. One unique thing is the URL encoding. Here is what I am seeing in the log data:
[08/Aug/2015:01:11:18 +0000] "GET /weather1.py?loc=pws:KGAATLAN40&key=*removed*&fwv=215&wto=\x22h\x22:10,\x22t\x22:100,\x22r\x22:100 HTTP/1.1" 200
Notice the quotes are replaced with \x22 when the URL encoding should be %22.
I am not sure if this is being changed on our end however I have noticed you are not the only one being affected by this. I am going to update the script to handle this situation and see if it resolves the issue.
Update: The changes are done. I still am not confident this is the fix needed since you saw some variability when changing the options. With that said, let me know if this makes any difference.
SamerKeymasterCan we start by getting what location you are using @pantonvich? I can start dumping the values and doing some comparisons with that information.
Thanks!
SamerKeymaster@Shawn what do you mean when comparing 0 to null? I am using the triple equal sign to compare meaning it should be exactly the same and not just similar.
If I am misunderstanding this, do you mind pointing it out so we can take a look at it?
Thank you!
August 6, 2015 at 10:09 pm in reply to: Zimmerman – current water level too high? 112% with 2 inches of rain today #39721
SamerKeymasterThe verify button for the API key simply turns green for good and red for bad.
If the last successful call reads “–” then the controller has not successfully seen a weather reply. The weather data shown in the app is directly retrieved by the app.
What is the location you are using?
SamerKeymasterAs DaveC mentioned you need to check if use rain sensor is being used before reading the rain sensor status. Furthermore, starting with 2.1.6, you should specifically check if the value is 1 for rain sensor (instead of checking for truthy value using JS).
I mention this because 2.1.6 will be supporting a flow sensor using the same rain sensor port and allow the user to define how the port is being used. We plan on defining which type of sensor using the urs variable. We will provide a lot more details regarding the API specifically once we get ready to release but just wanted to give you a heads up.
August 3, 2015 at 11:29 pm in reply to: Zimmerman – current water level too high? 112% with 2 inches of rain today #39663
SamerKeymasterWe use Amazon Elastic Beanstalk which provides a load balancer and also changes EC2 instances on each code update. This was resulting in IP changes and because the controller is caching the DNS result indefinitely this was leading to all the issues we were experiencing with values not updated. We added an indirect fix to microcontroller version which would reboot it when the weather query was not updated in 24 hours (we didn’t know the issue but knew the “fix”). We didn’t add this to the Pi as it may be doing other tasks or might need user intervention to reboot.
Next version will do a DNS lookup per weather query (1 hour) and let the local router cache the DNS (as it normally does).
Thanks!
August 3, 2015 at 11:07 pm in reply to: Zimmerman – current water level too high? 112% with 2 inches of rain today #39660
SamerKeymasterThis is likely due to the controller caching the DNS result for the weather service. Try rebooting and seeing if the scale adjusts. We are addressing this in the next firmware update.
Thank you!
SamerKeymasterThe controller has an Ethernet port and can interface with any networked device such as a cellular hotspot that has a wired connection or using it with a wifi adapter such as the TP Link that we sell.
The only consideration is public IP and ability to port forward or access a service remotely using it.
SamerKeymasterSince this affected the weather service, no updates are needed on your part as the weather service has already been patched.
Also, if you notice the code changes, 2.1.6 will be adding an “Auto Rain Delay” which is a direct equivalent of my PHP based code which applied a rain delay that’s user configurable if it is raining. This is also similar to the OSPi plugin that I started. This allows the user to have weather based rain delay without affecting the watering level. We will announce this with 2.1.6 in the coming weeks.
Thanks!
SamerKeymasterI had made a mistake in the weather script which was applying rain adjustment to the scale for users not using weather adjustments. We patched this last night and the issue should no longer persist.
I apologize for the inconvenience this may have caused. If you are still having the issue please let us know.
Thanks!
Update: Here is the code change: https://github.com/OpenSprinkler/OpenSprinkler-Weather/commit/58bc020f3408798c4510385090e2d37836d4d8a5
SamerKeymasterI think it would probably be best to contact D-Link because it sounds like you know what you are doing and have correctly completed the process.
When you say you can access port 80 externally, I assume you have another server/service that’s being port forwarded to that port?
Update: When you say protocol 6, did you accidentally check IPv6? It should be IPv4 as OpenSprinkler does not support IPv6.
SamerKeymasterYes, when I say the weather call I mean the call to the cloud server. It’s a single call for all the data done once every one hour.
For the external IP, this is used by the app briefly to help the user determine if port forwarding is done (if not it shows a notification). Right now we are not offering a dynamic DNS service nor do we plan to. Our domain host, CloudFlare, only allows us 1000 DNS entries before we have to contact them to add more so providing such a service is not feasible at the moment. If we do add this we will definitely make it configurable as I understand the security consideration of concentrating all the OS IP’s on one domain.
SamerKeymasterIf you are not using the weather service the call is still made to resolve the timezone, DST settings, sunrise and sunset times, and external IP. Regarding the reboot, I am not sure if it will trigger when not using the weather service and will have to let Ray elaborate on that point.
Sure, I will get that added to the API documentation.
SamerKeymasterThat’s a good point and will add that to the list for the next app version.
SamerKeymasterFirmware 2.1.5 added a check for the last weather call and if the call was greater than 24 hours ago, the controller will reboot (micro controller only). This was done because we knew a reboot was fixing the issue but we’re not sure what the problem was.
We now know this is due to a variable IP on our weather service combined with a single DNS resolution in the firmware with an indefinite cache. We will be addressing this in 2.1.6.
For checking the lrun, the app checks the duration for a non zero value to know if the lrun array is valid.
SamerKeymaster500 is not a valid value and the range is 0 to 100%. You may try to switch between 0 and 100 for the most dramatic difference.
Thanks
SamerKeymasterThere really is no reason for it with the available apps for all platforms. The apps include the files needed to render the UI and therefore do NOT need an Internet connection. This alone is enough reason to remove the option which allows new features to fit in the firmware (due to limited memory and storage space).
We also had too many support requests regarding this item and was no longer worth dealing with. For reference, here are the supported platforms and links to the app. If you want additional platforms supported please let us know and we can make an effort to get it supported:
- Amazon Appstore
- Apple App Store – iOS
- Apple App Store – OS X
- BlackBerry AppWorld
- Firefox Marketplace
- Google Play Store
- Google Web Store
- Windows Phone Store
Please note the Google Web Store and Firefox Marketplace support all platforms that the browser supports. For Firefox, this installs as an app with a shortcut simulating an installed app.
Update: We also documented how to host the UI files on your own web server locally, if you wish to do so. The document is located here: https://opensprinkler.freshdesk.com/support/solutions/articles/5000164006-using-a-different-server-for-ui-assets
SamerKeymasterCan you explain what you mean with fiddle and what exactly is not working? Because the controller only updates the weather every one hour. So I am not sure what change you are looking for and what is occurring.
Thanks!
-
AuthorPosts