OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Ambient Weather sensor data
- This topic has 57 replies, 4 voices, and was last updated 5 years, 3 months ago by Peter.
-
AuthorPosts
-
May 31, 2019 at 11:23 am #60720
jhaug40ParticipantThe output of http://10.0.0.38:3000/weather1.py?loc=50,1&wto=%22h%22:100,%22t%22:100,%22r%22:100,%22bh%22:70,%22bt%22:59,%22br%22:0 is
&scale=100&rd=-1&tz=56&sunrise=354&sunset=1315&eip=167772185&rawData={“h”:null,”p”:null,”t”:null,”raining”:0}
I’m not sure if the fact we use degree Celsius here has an influence or it’s not working.
May 31, 2019 at 11:26 am #60721
jhaug40Participantis it just “npm stop” to kill it?
May 31, 2019 at 11:37 am #60722
PeterParticipantThe
rawData={“h”:null,”p”:null,”t”:null,”raining”:0}
means that the PWS is not sending data to the Weather Service successfully so we have a problem.Can I check that when you had the PWS connected to the Pi Zero (but before the intercept) that it was sending data to Weather Underground successfully i.e. did you confirm that was the case by visiting your PWS page on Weather Underground and seeing the data update. That would confirm that the problem is with the intercept rather than any infrastructure or the Access Point software.
I assume that you managed to setup the Synology to auto-start the Weather Service otherwise you could just stop the service with a CTRL-C or a reboot of the NAS. If you did configure auto-start then at the Synology command line you could run
ps -ax
to list all of the running processes and look for any that show something similar tonode server.js
. You can the stop that process using the ID number in the first column withkill -9 ID
. The you can start the process manually withnpm start
.May 31, 2019 at 11:48 am #60723
jhaug40ParticipantPeter, appreciate your help – DANKE
You can see my PWS as ISTEIERM133 on the WU. It’s currently sending data. I do confirm it’s runnung through the Pi Zero. I did’nt setup auto-start as my Synology runs 24/7 and is connected to an USV. I will continue tomorrow as I have to leave now.
All the best, Jürgen.
May 31, 2019 at 8:43 pm #60734
PeterParticipantApologies if duplicated posting
——————————-
Jurgen, I have replicated your setup on my network “faking” a wifi PWS so hopefully near enough to the real thing. By doing this I found a couple of incorrect steps in my comments. I had forgotten to ask you to edit/etc/sysctl.conf
in order to uncomment the linenet.ipv4.ip_forward=1
. I also didn’t realise the iptable command for a bridged connection is different:sudo iptables -t nat -A PREROUTING -m physdev --physdev-in wlan0 -s <PWS IP> -p tcp --dport 80 -j DNAT --to-destination <Weather Service IP:PORT>
I have created a full instruction document for this scenario and checked it into the OpenSprinkler github [HERE].
Could I ask a favor ? Would you be willing to start afresh with the Raspberry Pi Zero and see if you can follow the instructions in the link provided. I am keen to get something written down for this use-case so that others can more easily set this up. Let me know if you find any issues.
June 1, 2019 at 12:57 am #60738
jhaug40ParticipantGood morning Peter, it works!
When I followed your link for “Using the Raspberry Pi as an access point to share an internet connection (bridge)”, towards the end it tells you “The access point setup is almost the same as that shown in the previous section. Follow all the instructions in the Configuring the access point host software (hostapd) section above to set up the hostapd.conf file and the system location, but add bridge=br0 below the interface=wlan0 line, and remove or comment out the driver line. The passphrase must be between 8 and 64 characters long.” Following this it includes uncommnenting the line net.ipv4.ip_forward=1. But it’s not straight forward and I will have a look at your documentation and instructions once I prepared our pool today. 🙂
I just checked my LAN connections on my router to identify the PWS IP and edited your command line above. After npm start I got the following:
Attachments:
June 1, 2019 at 1:01 am #60740
jhaug40ParticipantNext step is to redirect the OSPi to take the weather data from my NAS. I also will try to get the auto-start Weather Service to work in case of future updates of the NAS OS.
June 1, 2019 at 1:03 am #60741
jhaug40ParticipantFinally I will start from scratch to follow your new instructions step by step. I will do this tomorrow and I will keep you posted.
Jürgen.
June 1, 2019 at 1:09 am #60745
jhaug40Participant&scale=106&rd=-1&tz=56&sunrise=353&sunset=1316&eip=167772185&rawData={“h”:28.26,”p”:0,”t”:60.3,”raining”:0}
June 1, 2019 at 3:39 am #60747
PeterParticipantJurgen, that’s great ! Let me know if the instructions are clear for setting this up and any feedback you may have.
June 1, 2019 at 8:47 am #60750
jhaug40ParticipantHi Peter, just one more question before I start from scratch to test your setup guide: How can I setup my OSpi to make use of this Weather Service?
June 1, 2019 at 9:26 am #60752
PeterParticipantJurgen, if you go to
htto://<ospi ip>:8080/su
then you should see a configuration page. On that page, you can enter theip:port
of the Synology Weather Service and then hit save. I suggest you backup the working SD card before testing the guide just in case 8). Thanks, PeteJune 1, 2019 at 9:47 am #60753
jhaug40ParticipantPeter, I get the following page where I set IP:PORT of the Weather Service. But it seems not to store it. If I call it again it shows weather.opensprinkler.com I also checked the App and it still doesn’t show my PWS data.
Attachments:
June 1, 2019 at 10:00 am #60755
PeterParticipantHmm, strange, so you should just need to replace
weather.opensprinkler.com
withweather_service_ip:port
. You will need to enter your password in the last text field and click submit. The password is by defaultopendoor
but you may have updated it to something else.June 1, 2019 at 10:07 am #60756
jhaug40ParticipantOf course I forgot to enter the password. Now it seems to work. Is there any way to check if the correct PWS data is used by my OSPi?
June 1, 2019 at 10:10 am #60757
jhaug40ParticipantOne more, sorry. Is all data stored permanently on my NAS and how to clean it up in case it’s getting too much?
June 1, 2019 at 10:24 am #60758
PeterParticipantTo see if the data is being used then you can check if the Weather Service is publishing the same
scale
as is being shown in the App. Browse to the the Weather Service endpoint mentioned before (the one with the t/h/p and bt/bh/bp items) and see if that generates the same scale as is shown on the App front page. They may be slightly different as the App only updates every couple of hours.There shouldn’t be much data stored on the NAS as there is only a few variables so it shouldn’t impact. Just so you know, you could have installed the Weather Service on the OSPi itself if you wanted. Not a big difference just wanted to make sure you knew it was an option.
June 1, 2019 at 10:53 am #60759
jhaug40ParticipantAll copied. Once the auto-start of Weather Service is configured on my NAS I will format the Pi Zero SD and follow step by step your instructions. Any feedback here or somewhere else?
June 1, 2019 at 11:07 am #60760
PeterParticipantJurgen, feel free to open an issue on the opensprinkler-weather github page with any feedback on the documentation. That would be very welcome.
June 1, 2019 at 11:08 am #60761
jhaug40ParticipantI found a syno-upstarter. Hope that works…
June 1, 2019 at 11:13 am #60762
jhaug40ParticipantPeter, never done this on github before. I will do my best to give a proper feedback. I’m very happy it is running now. I have no clue what I’ve done but for me the result counts. 😉 Thank you very much for your support, I really appreciate it.
Jürgen.
June 2, 2019 at 2:23 am #60774
jhaug40ParticipantGood morning, I realized the Water Level is stuck at 136%. That is for the last 14hrs where the weather has changed significantly. I checked the Weather Service on my NAS and it was stopped. Whenever I close the PuttY Session it stops. How to set it up to run permanently? I also have issues to get upstart run.
June 2, 2019 at 2:53 am #60775
jhaug40ParticipantWater Level seems to work now. I had removed the location because I thought it’s not needed. I added it now again and the Water Level is close to the scale calculation. When I enter a location the close by weather information is shown in the App. Does this weather also influence the scale calculation?
Work in progress is to run Weather Service permanently and to configure the NAS auto-start using “upstart”.
June 2, 2019 at 6:57 am #60777
PeterParticipantJurgen, I dont know the specifics of Synology upstart I am afraid. I think a more maintainable solution may be to host the Weather Service on your OSPi. This would take one machines out of the equation and you could then use the
systemd
method to keep the service running. Just a thought. Not that every time the Weather Service restarts then it takes around 24 hours for thescale
to stabilize as it ideally wants to use a full 24 hours of information.The location is not used by the Weather Service when in PWS mode to calculate watering scale. The location is however used by the App to provide the “current” weather conditions and the five-day outlook that you get when you click on the weather icon. These are two different things.
June 3, 2019 at 12:18 am #60795
jhaug40ParticipantJust another thought: How about installing the Weather Service on the Pi Zero? I don’t know if it then could be usable for all OpenSprinkler, not only the Pi Versions? Could be beneficial for even more users…
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Ambient Weather sensor data