Go to advanced search

by Bosse_B
Sun Oct 21, 2018 9:20 am
Forum: General discussion
Topic: AM2302 DHT sensor on RPi3 not working after reboot of RPi
Replies: 6
Views: 149

Re: AM2302 DHT sensor on RPi3 not working after reboot of RPi

And yesterday I disabled (using sudo raspi-config) the 1Wire, I2C and SPI interfaces, which I previously enabled because of the instructions on this webpage . After this I switched back the cron job to using GPIO4 and waited. Turns out that now the RPi has performed a reading every 30 minutes for ov...
by Bosse_B
Sat Oct 20, 2018 5:34 am
Forum: General discussion
Topic: AM2302 DHT sensor on RPi3 not working after reboot of RPi
Replies: 6
Views: 149

Re: AM2302 DHT sensor on RPi3 not working after reboot of RPi

I have switched GPIO pin to use GPIO17 instead of GPIO4. Now the logging is not giving up, so it seems like GPIO4 (which is also used by the 1wire system) is not usable. At least not when 1wire is enabled.... The cron job has successfully operated every 30 minutes over night and across a scheduled R...
by Bosse_B
Fri Oct 19, 2018 10:40 am
Forum: General discussion
Topic: AM2302 DHT sensor on RPi3 not working after reboot of RPi
Replies: 6
Views: 149

Re: AM2302 DHT sensor on RPi3 not working after reboot of RPi

I thought that the problem was fixed by running the call to the py script as sudo (from AdaFruit's installation page), but unfortunately this was not the case. When I checked the log file I found that after a few successful measurements the DHT seemed to have locked up again and there was no output ...
by Bosse_B
Thu Oct 18, 2018 7:39 am
Forum: General discussion
Topic: AM2302 DHT sensor on RPi3 not working after reboot of RPi
Replies: 6
Views: 149

Re: AM2302 DHT sensor on RPi3 not working after reboot of RPi

Is it needed for the Adafruit DHT interface?
Is it somehow outputting data during boot that can lock up the DHT sensor?
by Bosse_B
Thu Oct 18, 2018 5:49 am
Forum: General discussion
Topic: AM2302 DHT sensor on RPi3 not working after reboot of RPi
Replies: 6
Views: 149

AM2302 DHT sensor on RPi3 not working after reboot of RPi

I have discovered a strange problem with a sensor I am deploying to my summer home in order to monitor temp/humidity over the winter. I have an RPi3 with the Adafruit_Python_DHT library installed and it worked just fine yesterday. Now following the nightly reboot of the RPi it has stopped working , ...
by Bosse_B
Tue Oct 16, 2018 4:05 pm
Forum: General discussion
Topic: AM2302 Temp/Humid sensor, improvement needed...
Replies: 1
Views: 75

Re: AM2302 Temp/Humid sensor, improvement needed...

OK, so I did not wait long enough... It turns out that after 39 s the call: ./AdafruitDHT.py 22 4 returns with an error message: Failed to get reading. Try again! Now I just need to figure out how I can set up a script that will log readings on a regular schedule with both a timestamp and the result...
by Bosse_B
Tue Oct 16, 2018 2:54 pm
Forum: General discussion
Topic: AM2302 Temp/Humid sensor, improvement needed...
Replies: 1
Views: 75

AM2302 Temp/Humid sensor, improvement needed...

I have a bunch of AM2302 sensors primarily used with ESP8266 WiFi modules as temp/humid sensors. Now I need to interface to an RPi3 and I found this webpage describing it all. I followed its directions on two RPi3 units with different versions of Raspbian and it seemed like the Adafruit_Python_DHT s...
by Bosse_B
Sat Sep 29, 2018 7:39 pm
Forum: Networking and servers
Topic: OpenVPN - how to limit client access inside target LAN?
Replies: 6
Views: 1202

Re: OpenVPN - how to limit client access inside target LAN?

iptables-save shows this: *filter :INPUT ACCEPT [15584849:2706590795] :FORWARD ACCEPT [1832370:466329194] :OUTPUT ACCEPT [6935632:558888964] -A FORWARD -s 10.8.0.128/25 ! -d 10.0.0.10/32 -j DROP -A FORWARD -s 10.8.1.128/25 ! -d 10.0.0.10/32 -j DROP COMMIT # Completed on Sat Sep 29 14:31:26 2018 # Ge...
by Bosse_B
Sun Sep 23, 2018 8:29 am
Forum: Networking and servers
Topic: OpenVPN - how to limit client access inside target LAN?
Replies: 6
Views: 1202

Re: OpenVPN - how to limit client access inside target LAN?

This thread is 8 months old (since last post) and the issue has been resolved. I ended up limiting the client IP range for these users to access only a single LAN IP address. I used IPTABLES for that. The users are identified by ccd entries where they get IP addresses in a different subnet (with the...
by Bosse_B
Thu Aug 23, 2018 5:16 am
Forum: Automation, sensing and robotics
Topic: Interfacing an AM2302 DHT sensor with RPi using freepascal?
Replies: 3
Views: 181

Re: Interfacing an AM2302 DHT sensor with RPi?

Thanks, I will try to use that.
But my preferred programming language is Pascal (as in Free Pascal /Lazarus) so do you know of an interface using Pascal?
by Bosse_B
Wed Aug 22, 2018 8:25 pm
Forum: Automation, sensing and robotics
Topic: Interfacing an AM2302 DHT sensor with RPi using freepascal?
Replies: 3
Views: 181

Interfacing an AM2302 DHT sensor with RPi using freepascal?

I have been using the Adsong AM2302 DHT sensors with ESP8266 WiFi modules (ESP-07) and it works OK. I used Arduino for the ESP-07. Programmed in C. But now I would like to attach the sensor to a RPi box and I don't really know where to begin. I have used RPi units a lot for various tasks but never f...
by Bosse_B
Fri Jul 27, 2018 6:38 am
Forum: Raspbian
Topic: OpenVPN connection from Raspbian to remote server
Replies: 7
Views: 317

Re: OpenVPN connection from Raspbian to remote server

I might add that this particular RPi box runs Jessie...

Code: Select all

lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 8.0 (jessie)
Release:        8.0
Codename:       jessie
by Bosse_B
Thu Jul 26, 2018 4:06 pm
Forum: Raspbian
Topic: OpenVPN connection from Raspbian to remote server
Replies: 7
Views: 317

Re: OpenVPN connection from Raspbian to remote server

Are you talking about logs on the VPN server (Ubuntu) or client (Raspbian) Where should I set the verb, on the server or in the ovpn file? My suggestion was to add "verb 6" to your client config file and see if the process is wedged or if it is alive but fails to connect. Looking at the server log ...
by Bosse_B
Thu Jul 26, 2018 9:49 am
Forum: Raspbian
Topic: OpenVPN connection from Raspbian to remote server
Replies: 7
Views: 317

Re: OpenVPN connection from Raspbian to remote server

Look at the log and push to "verb 6" or more, there might be some information there. Are you talking about logs on the VPN server (Ubuntu) or client (Raspbian) Where should I set the verb, on the server or in the ovpn file? If this machine is already used for other tunnels, make sure this config do...
by Bosse_B
Wed Jul 25, 2018 10:35 pm
Forum: Raspbian
Topic: OpenVPN connection from Raspbian to remote server
Replies: 7
Views: 317

Re: OpenVPN connection from Raspbian to remote server

Well, I opened a command prompt and used the command: sudo openvpn--config /home/pi/xxxx.ovpn I had to type in the encryption password and then the connection completed. At this stage the command window did not return to the prompt but stayed on a blank line. So I started another command window and ...
by Bosse_B
Wed Jul 25, 2018 8:55 pm
Forum: Raspbian
Topic: OpenVPN connection from Raspbian to remote server
Replies: 7
Views: 317

OpenVPN connection from Raspbian to remote server

I have an OpenVPN server at my home LAN (Ubuntu Server 16.04-3 LTS). I can connect fine from my Windows clients and also from my phone and tablet. But for the life of me I cannot find out how I can connect from a Raspbian box (RPi3B)... This RPi3B box runs an openvpn server itself which I use to con...
by Bosse_B
Sun Jun 17, 2018 5:09 pm
Forum: Raspbian
Topic: Scripting problem extracting IP address
Replies: 23
Views: 712

Re: Scripting problem extracting IP address

My bad! I thought that I had upgraded all of my RPi3 units to Stretch by now, but: cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)" NAME="Raspbian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.ras...
by Bosse_B
Sun Jun 17, 2018 3:04 pm
Forum: Raspbian
Topic: Scripting problem extracting IP address
Replies: 23
Views: 712

Re: Scripting problem extracting IP address

This is the exact replies to your test commands as copied from the terminal ("nothing" describes it well): [email protected]:~$ ifconfig wlan0 | awk 'sub(/.*inet addr:/,"") { print $1 }' [email protected]:~$ ifconfig wlan0 | grep "inet addr:" [email protected]:~$ awk -W version mawk 1.3.3 Nov 1996, Copyright...
by Bosse_B
Sun Jun 17, 2018 2:20 pm
Forum: Raspbian
Topic: Scripting problem extracting IP address
Replies: 23
Views: 712

Re: Scripting problem extracting IP address

Gosh, stirred up some discussion... Thanks to all participants! My problem is solved and I don't need any efficiency improvement, after all it runs once 60 seconds after boot... Summary: What I discovered when I fired up the OSMC box at my summer home was that the IP address was not part of the emai...
by Bosse_B
Sun Jun 17, 2018 8:39 am
Forum: Raspbian
Topic: Scripting problem extracting IP address
Replies: 23
Views: 712

Re: Scripting problem extracting IP address

Thanks, that fixed it!
by Bosse_B
Sun Jun 17, 2018 5:57 am
Forum: Raspbian
Topic: Scripting problem extracting IP address
Replies: 23
Views: 712

Re: Scripting problem extracting IP address

Thanks, this worked as used in my script: IPAddrWiFi=$(ifconfig wlan0 | grep inet | sed 's/addr://' | awk '{ print $2 }') However this also worked: IPAddrWiFi=$(ifconfig wlan0|sed -n "s/^ *inet [^0-9.]*\([0-9.]*\) .*$/\1/p") What happened when I tested the last line above was that I had a typo in th...
by Bosse_B
Sat Jun 16, 2018 8:41 pm
Forum: Raspbian
Topic: Scripting problem extracting IP address
Replies: 23
Views: 712

Re: Scripting problem extracting IP address

When I add the trailing ) on the Raspbian version of the script I get this output when echoing the WiFi IP address: WiFi addr: 192.168.117.174 Trying the hexdump On OSMC: ifconfig wlan0 | grep -m 1 inet | hexdump -C -bash: hexdump: command not found I could not install hexdump via apt-get on OSMC: E...
by Bosse_B
Sat Jun 16, 2018 6:25 pm
Forum: Raspbian
Topic: Scripting problem extracting IP address
Replies: 23
Views: 712

Re: Scripting problem extracting IP address

I get this reply when running on both Raspbian and OSMC: ./ipreport.sh: line 17: unexpected EOF while looking for matching `)' The script contains this on that line: IPAddrWiFi=$(ifconfig wlan0|sed -n "s/^ *inet [^0-9.]*\([0-9.]*\) .*$/\1/p" EDIT: If I add a trailing closing ) at the end of the line...
by Bosse_B
Sat Jun 16, 2018 5:29 pm
Forum: Raspbian
Topic: Scripting problem extracting IP address
Replies: 23
Views: 712

Scripting problem extracting IP address

I have a script that extracts the IP address and MAC of eth0 and wlan0 and sends this to my website. I am putting this script on every RPi box I build so I will get a report of its IP address so I can connect to it when it is moved between networks. This has worked very well for several years on a h...
by Bosse_B
Sat Jun 02, 2018 1:11 pm
Forum: Raspbian
Topic: Jessie 2 Stretch questions
Replies: 8
Views: 390

Re: Jessie 2 Stretch questions

Do you have any scripts running or scheduled that access the network devices like eth0? When I installed a new RPi using the stretch image all of my scripts had problems until I realized that Stretch had changed the names of the network interfaces to something totally undecipherable... Had to google...

Go to advanced search