June 4, 2019 at 12:10 pm #60822
@Peter, I’m trying now to install Weather Service on my OSPi. When I want to “npm install” it always gets stuck – please see below:
Attachments:June 4, 2019 at 12:12 pm #60824
I tried to install nvm to get the newest version, but no success there either.June 5, 2019 at 4:44 pm #60836
Hey Jurgen, sorry for the delay. Did you get this working ?
I would recommend following the installation instructions provided on the OpenSprinkler Weather Service github page [HERE]. This does not use
nvmas it is not necessary for this installation.
If you are experiencing problems the I would suggest: 1) ensuring OSPi is on the latest Stretch release of rasbian, 2) ensuring the OSPi is up-to-date
sudo apt-get updateand
sudo apt-get upgrade; 3) removing anything in the
weatherdirectory and re-downloading from github; 4) then try the instructions again. I have certainly had versioning issues with node before.June 6, 2019 at 1:07 am #60847
Servus Peter, I’ve done the
sudo apt-get updateand
sudo apt-get upgradeon my OSPi before I started installing the Weather Service. After the
npm installstuck I also did a
rm -r weatherto delete the directory and I did reload it from github starting all over again. Finally nothing at all happened when I tried
npm installmeaning that the prompt just jumped to the next line. I gave up on the OSPi and I installed the Weather Service now on another RPi3 within my network. This time I did’t do
sudo apt-get updateand
sudo apt-get upgradeand I successfully installed
npm. Weather Service is up and running, but for what ever reason it doesn’t receive any data from the Pi Zero bridge. The Zero did pass the PWS data to WU before I continued to “Step 4: Configure the Intercept (Port Forwarding)”. I had a typo inserting the <Weather Service IP:PORT> so I maybe that caused troubles? I just redid the
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>with the correct values but it doesn’t forward the PWS data to the Weather Service now.
Attachments:June 6, 2019 at 9:29 am #60855
Sorry if duplicate post but the forum isn’t playing nice 8)
Jurgen, I am not sure why you could not install node.js on your OSPi. My only thought is that it might be an old version of raspbian on your OSPi. I am using the “stretch” version of raspbian and a compatible version of node without problem. If you enter
lsb_release -athen it should print out your Operating System version (e.g. Jessie). Let me know out of interest.
Looking at you screen image, you are setting up multiple forwarding rules. Each time you run
iptablesit adds another rule to the list. So it looks like you create the first rule to forward to port 3000 and then add a second rule to forward to port 3001. But the first rule is still active and because it is first in the list it will always be selected. The second rule will therefore never trigger. So all information is probably being get sent to the port 3000.
If you want to start afresh then you can “flush” out any existing rules with the command
sudo iptables -t nat --flush. You can then create the right forwarding rule that you want and then use
iptables-saveto ensure that it survives a reboot. Does that make sense ?June 6, 2019 at 10:49 am #60863
Peter, the OSPi OS is Jessie, the RPi3 running the Weather Service now is stretch.
As always your instructions and explanations make perfect sense, I do appreciate your patience. Now I can report my Weather Service is running and receiving data from my PWS. Happy now, I will report back next Thursday when I’m back from work.
I also prepared my Pi Zero W from scratch following your instructions on github. I will try to give some feedback there.
Once more, THANK YOU
Servus from Austria,
Jürgen.June 6, 2019 at 1:29 pm #60864
Peter, I had a look at GitHub but for me it’s just too much hassle to get into it. I’m a user having no clue about programming and it’s structure. I only have two points to add regarding your instructions:
1) Setup a Raspberry Pi To Intercept PWS Information (via Access Point)
“Do not enable the WiFi interface by providing a wpa_supplicant.conf file but do enable ssh. You can now ssh into the Pi via the ethernet network and contiue the setup process.” That way you have to connect the Pi Zero to a monitor for configuration (correct me if I’m wrong). I simply copied an empty ssh file into root and was able to ssh into the Pi. As most users might need an HDMI adapter for the Zero this could ease the process.
2) Installating a Local Weather Service onto a Raspberry Pi
Step 1: When executing
pi@OSPi:~ $ curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -lan advice was shown to
sudo apt-get install -y nodejsThe instruction shows
sudo apt install -y nodejsAgain, I don’t know if that is relevant or not.
Those instructions are well written and it was easy for me to follow them. As a result all working fine now.
Jürgen.June 6, 2019 at 2:24 pm #60865
Jurgen, that’s brilliant, I’ll review the points and update the documentation appropriately. Many thanks.
- You must be logged in to reply to this topic.