Go to advanced search

by TimWardCam
Wed Jun 02, 2021 4:41 pm
Forum: Automation, sensing and robotics
Topic: HC-SR04 in the real world
Replies: 1
Views: 144

HC-SR04 in the real world

Ah, the difference between the lab bench and the field. The last few days my HC-SR04 has taken to playing up around 2pm each day. When the outside air temperature is 25C or higher, and the device is in full direct sunlight. Still, I did realise, at that price, that I was buying amateur toys and not ...
by TimWardCam
Wed Jun 02, 2021 4:34 pm
Forum: Automation, sensing and robotics
Topic: DHT22 Remote Temperatire & Humidity Monitoring
Replies: 2
Views: 198

Re: DHT22 Remote Temperatire & Humidity Monitoring

I have code running on the Pi which takes regular readings from the DHT22 (and a number of other sensors) and uploads them to a database on my web server, from which I can pull down the data and visualise it however I like. So, the various moving parts are: Web server is running a LAMP stack, so tha...
by TimWardCam
Sun May 09, 2021 6:54 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SCT-013-030
Replies: 3
Views: 256

Re: SCT-013-030

And, amusingly, when I move the kit from the lab (my office) to the field (the greenhouse) when there's no load the differential reading is exactly zero every time. This was so unexpected that I took the kit apart again trying to find the soldering error! Eventually I came to the conclusion that the...
by TimWardCam
Sat May 08, 2021 6:21 pm
Forum: General discussion
Topic: Pi Zero / ZeroCam / PIR case?
Replies: 3
Views: 164

Re: Pi Zero / ZeroCam / PIR case?

Yes, I'd seen that one (the naturebytes one), but failed to find any way to actually buy one.

There's this fox which regularly walks through our garden but never stands still for long enough for us to go and find a camera.
by TimWardCam
Sat May 08, 2021 5:00 pm
Forum: General discussion
Topic: Pi Zero / ZeroCam / PIR case?
Replies: 3
Views: 164

Pi Zero / ZeroCam / PIR case?

Before I spend lots of time and effort coming up with something crude and horrible-looking from a spare bit of paxolin and a takeaway curry box, is anyone aware of a case which can take a Pi Zero a ZeroCam a PIR detector and, preferably, which will survive if accidentally left outdoors during a ligh...
by TimWardCam
Sat May 08, 2021 9:42 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SCT-013-030
Replies: 3
Views: 256

Re: SCT-013-030

OK, so it does work pretty much like that. In fact for me it worked a lot better to use the differential capability of the MCP3008 and compare the two sides of the SCT-013-030 against each other - this reduced the spurious current measured when there was actually none at all by a factor of 150. One ...
by TimWardCam
Fri May 07, 2021 6:51 pm
Forum: Python
Topic: blinka installation hangs?
Replies: 1
Views: 138

Re: blinka installation hangs?

Killed it and restarted it. It appeared to work the second time. Sooo tedious. Yes I know it's difficult to code around all possible network glitches and suchlike, but those of us of a certain age know that, to do something properly, whilst 95% of the work is in the error handling, it is also the ca...
by TimWardCam
Fri May 07, 2021 5:33 pm
Forum: Python
Topic: blinka installation hangs?
Replies: 1
Views: 138

blinka installation hangs?

This script configures your Raspberry Pi and installs Blinka RASPBERRY_PI_4B detected. Blinka WARNING Default System python version is 2.7.16. It will be updated to Version 3. Continue? [y/n] y Updating System Packages Blinka Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]...
by TimWardCam
Mon May 03, 2021 1:19 pm
Forum: Python
Topic: Persistent queue?
Replies: 13
Views: 542

Re: Persistent queue?

So I've gone with a flat file, which solves all the above.

It's as crude as ****, and will fall over horribly with different numbers (message throughput, wifi flakiness and so on), and you haven't got to mind the potential for lots of duplicate messages, but it seems to work for my use case.
by TimWardCam
Sun May 02, 2021 6:05 pm
Forum: Python
Topic: Persistent queue?
Replies: 13
Views: 542

Re: Persistent queue?

Well, I've been looking at MQTT, in particular the paho Python library, and I can't work out whether it meets the case. What I'd need to do in on_message is sit and wait for however many minutes it takes until the wifi is working and the message can be forwarded to the next system. I can't work out ...
by TimWardCam
Wed Apr 28, 2021 4:46 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SCT-013-030
Replies: 3
Views: 256

SCT-013-030

Well, I think that's what I've bought, what it actually says on it is "SCT013 30A/1V". So, I think this is a "voltage output" version, which I connect straight to an ADC chip without having to worry about adding my own load resistor, as I read is necessary for some other models o...
by TimWardCam
Wed Apr 28, 2021 10:37 am
Forum: Python
Topic: Persistent queue?
Replies: 13
Views: 542

Re: Persistent queue?

Nothing at all. I'm lazy so I was looking for a solution with less code that I'd have to write! Particularly managing file size and suchlike. Plus I know from long experience that using a RDBMS as a FIFO is about the worst thing you can do to it!
by TimWardCam
Wed Apr 28, 2021 10:25 am
Forum: Python
Topic: Persistent queue?
Replies: 13
Views: 542

Re: Persistent queue?

Yes. It's a Raspberry Pi.
by TimWardCam
Wed Apr 28, 2021 10:19 am
Forum: Python
Topic: Persistent queue?
Replies: 13
Views: 542

Re: Persistent queue?

"Use MQTT" looks interesting, thanks - Mosquito looks like it's got the functionality I would use from Kafka on a much smaller footprint. But "on a different device" appears, I'm afraid, to miss the point - what I'm trying to solve is flaking comms, and dealing with the times whe...
by TimWardCam
Mon Apr 26, 2021 6:54 pm
Forum: Python
Topic: Persistent queue?
Replies: 13
Views: 542

Re: Persistent queue?

Ta. Definitely worth a look. Performance looks less that wonderful but for a couple of dozen metrics every ten minutes I really don't care!
by TimWardCam
Mon Apr 26, 2021 4:53 pm
Forum: Python
Topic: Persistent queue?
Replies: 13
Views: 542

Persistent queue?

I've got a telemetry project, but the wifi connection is flaky - it comes and goes quite a lot. At present I'm collecting data and pushing it up to a REST interface as soon as I acquire it. Which means that when the network connection is down I simply lose data. So one approach would be to divide th...
by TimWardCam
Sat Apr 24, 2021 3:08 pm
Forum: Troubleshooting
Topic: DNS stopped working
Replies: 16
Views: 579

Re: DNS stopped working

I'm following the documentation. "Client mode" is what it tells me to use when I have a wired connection from the TP-LINK to a client device (the Pi) and I want the TP-LINK to make a wireless connection to the wifi router. Basically using the TP-LINK as a wifi adapter for the Pi, as the Pi...
by TimWardCam
Sat Apr 24, 2021 2:44 pm
Forum: Troubleshooting
Topic: DNS stopped working
Replies: 16
Views: 579

Re: DNS stopped working

The TP-LINK should have done all that for itself on being set into "client mode", I would have hoped. But I'll check all that stuff if/when I turn it on again.
by TimWardCam
Sat Apr 24, 2021 1:40 pm
Forum: Troubleshooting
Topic: DNS stopped working
Replies: 16
Views: 579

Re: DNS stopped working

... and after removing the wired connection it looks like it's working again. So, although I don't understand it, thanks for the suggestion! OK, so I haven't given the whole story here - the wired connection is only wired at the Pi end. There's CAT 5 from the greenhouse to the garage, and then in th...
by TimWardCam
Sat Apr 24, 2021 1:27 pm
Forum: Troubleshooting
Topic: DNS stopped working
Replies: 16
Views: 579

Re: DNS stopped working

Before making any changes: pi@raspberrypi:~ $ ip addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host...
by TimWardCam
Fri Apr 23, 2021 10:21 pm
Forum: Troubleshooting
Topic: DNS stopped working
Replies: 16
Views: 579

Re: DNS stopped working

I'll try those tomorrow.

Pulling the Ethernet cable may simply result in loss of communications - I put the cable in because the wireless connection was flaky at that range.
by TimWardCam
Fri Apr 23, 2021 8:19 pm
Forum: Troubleshooting
Topic: DNS stopped working
Replies: 16
Views: 579

Re: DNS stopped working

None of which suggests

(1) why it should have stopped working in the described pattern after working fine for weeks without any recent changes
(2) what I could do to get it working again.
by TimWardCam
Fri Apr 23, 2021 5:25 pm
Forum: Troubleshooting
Topic: DNS stopped working
Replies: 16
Views: 579

Re: DNS stopped working

Yeah. I think it's low probability, but I am wondering about the router. Particularly after my work laptop started behaving in a vaguely similar manner this afternoon. OTOH the work laptop was in the middle of a massive Windows update, which for me means that all bets are off anyway, and when I powe...
by TimWardCam
Fri Apr 23, 2021 4:59 pm
Forum: Troubleshooting
Topic: DNS stopped working
Replies: 16
Views: 579

Re: DNS stopped working

Virgin Media ones. As served by Virgin to my router, and then to all the other devices on my network, which is all working fine otherwise you wouldn't be reading this. What can I do to find out if "routing table going wrong"? I don't know what it looked like before it went wrong but this i...
by TimWardCam
Fri Apr 23, 2021 4:15 pm
Forum: Troubleshooting
Topic: DNS stopped working
Replies: 16
Views: 579

Re: DNS stopped working

resolv.conf already contains the addresses of known working DNS servers which continue to work fine from other machines on my home network via the same router.

I can ping other machines on the LAN by IP address but not external IP addresses.

Go to advanced search