News items for tag onewire - Koos van den Hout

2020-10-04 Moved the new Raspberry Pi ntp server to the shed and did the last bits of configuration 1 month ago
I moved the new ntp server to the shed today. I found a nice case for it: an actual wooden box. I climbed on the roof of the shed to find a place for the GPS antenna (with magnetic base). Parts of the enclosures around our solar panels are from ferrous metals, so I found a place with an ok view of the sky to place the antenna and led the cable to a ventilation shaft to get it inside the shed. I made sure the cable was going up in the ventilation shaft first to avoid having a drip loop on one of our bicycles.

Although I did most work on the w1retap configuration before I couldn't get it running at first. I kept seeing the error message:
koos@henkp:~ $ LD_LIBRARY_PATH=/usr/local/lib/w1retap w1find DS2490-1
Error 119: Failed to set libusb configuration
It took some serious searching to find a hint: that is caused by the usb device file access rights. Solution is to install the 45-w1retap.rules that comes with w1retap into /etc/udev/rules.d.

At the moment weather data is being fetched on the Raspberry but the wifi between shed and house is so bad that the data stays there. I'm not sure how that can be fixed. It turns out the external wi-fi dongle I bought was listed as having 5 GHz support, but the reviews of the chipset used say it doesn't. The congestion in the 2.4 GHz band makes it very difficult to reach the pi. Doing a ping test over longer time gives me 91% packet loss.

I dug up a different 2.4 GHz antenna from the junkbox and suddenly the connection is stable with a lot less packet loss. This antenna is directional and now pointing right at my access point.

Now the weather data is collected and forwarded to the server for Weather station Utrecht Overvecht.

NTP didn't seem to work on the first try, I'm not seeing any data for the GPS_NMEA server. This works again after a powerdown/up.
Read the rest of Moved the new Raspberry Pi ntp server to the shed and did the last bits of configuration

Tags: , , ,
2020-09-02 An update to the home 1-wire network 2 months ago
For more than 12 years now(!) the house has temperature sensors using the 1-wire protocol. I recently redid some of the wiring between floors and I finally got around to rerouting the 1-wire network via this new route.

I also added a temperature sensor in the big room in the attic, we are thinking of using that room more often. To get an idea of how good that idea is we wanted to get an idea of the temperatures up there and that's what I have 1-wire sensors for! I soldered an 18b20 sensor to the end of a 4-wire flat phone cable, added it to the network and it's measuring.

So now 12 environmental temperatures are measured every 5 minutes: 9 in the house, one in the weather hut, one in the shed and one on the roof of the shed.

I also updated the 1-wire projects overview with how I use 4-wire flat phone cable in RJ45 connectors for 1-wire network. I had to look up how I did that previously before I could start adding new cables!

Tags: , , ,
2019-07-25 First onewire stats ageing out 1 year ago
I was looking at some onewire temperature stats and noticed the first stats being aged out. I started monitoring temperatures with 1-wire sensors in January 2007 using rrdtool. I set up round robin archives with an expiry in 11 years, and those 11 years have passed now for the first measurements.

Tags: , , ,
2019-01-01 Switching to 1-wire over USB and forwarding a USB device to a guest VM 1 year ago
The new hardware for the homeserver has no external serial ports, so I could not use the old serial / 1-wire interface that has been doing the home monitoring for years. But I had a spare USB DS2490 interface. So I plugged this into the server and wanted to forward the USB device to the guest VM that runs all the monitoring.

First I had to blacklist all the loaded drivers to have the device available to kvm as-is. In /etc/modprobe.d/local-config.conf:
blacklist w1_smem
blacklist ds2490
blacklist wire
Next step was to attach the device to the right vm. I followed the hints at How to auto-hotplug usb devices to libvirt VMs (Update 1) and edited the definition for the vm to get the host device like:
    <hostdev mode='subsystem' type='usb' managed='no'>
        <vendor id='0x04fa'/>
        <product id='0x2490'/>
But that did not get the usb device attached to the running VM and I did not feel like rebooting it. So I created an extra file with the above and did a
root@conway:~# virsh attach-device --live gosper /tmp/onewire.xml 
Device attached successfully
And then I had to do the same blacklisting as above in the virtual machine. After doing that I detached and attached it from the VM without touching it with simply:
root@conway:~# virsh detach-device --live gosper /tmp/onewire.xml 
Device detached successfully

root@conway:~# virsh attach-device --live gosper /tmp/onewire.xml 
Device attached successfully
After that I had to set up rules for the telemetry user to have enough access to the USB device:
SUBSYSTEMS=="usb", GOTO="usb_w1_start"
ATTRS{idVendor}=="04fa", ATTRS{idProduct}=="2490", GROUP="telemetry", MODE="0666"
And now it all works:
telemetry@gosper:~$ digitemp_DS2490 -a
DigiTemp v3.7.1 Copyright 1996-2015 by Brian C. Lane
GNU General Public License v2.0 -
Found DS2490 device #1 at 002/003
Jan 01 21:53:11 Sensor 10A8B16B0108005D C: 9.500000
Jan 01 21:53:12 Sensor 28627F560200002F C: 17.062500
Jan 01 21:53:14 Sensor 10BC428A010800F4 C: 19.562500
Jan 01 21:53:15 Sensor 1011756B010800F1 C: 11.937500
Jan 01 21:53:16 Sensor 10B59F6B01080016 C: 16.312500
Jan 01 21:53:17 Sensor 1073B06B010800AC C: 18.687500
Jan 01 21:53:18 Sensor 102B2E8A010800F0 C: 29.250000
Jan 01 21:53:20 Sensor 28EF71560200002D C: 16.687500
Working house temperatures again!

Tags: , , , ,
2017-12-29 New temperature sensors in the shed 2 years ago
Since the powerfailure that caused problems for the weatherstation computer ritchie and the conclusion that even after the bios upgrade the serial ports kept failing there was no 'inside the shed' temperature.

But this week I needed a better view of the temperature inside the shed as we're using it to keep some meat cool. So I heated up the soldering iron and the heatshrink gun and made a cable with two DS18B20 sensors in it. I decided that if I started on measuring temperatures inside the shed I also wanted the temperature near the roof.

The interesting bit was adding the two sensors to the w1retap configuration. It seems the whole 1820 family of temperature sensors needs to be set up as a 'DS1820' and w1retap will find out how to read it. Resulting configuration:
and now I have logging of the temperatures:
2017-12-29T16:28:00+0100 Tempinside 2.812500 ⁰C
2017-12-29T16:28:00+0100 Temproof 2.687500 ⁰C
And it helps us to determine when we need to make space in our fridge and move some other things to the shed to keep them somewhat cool.

Tags: , ,
2016-01-04 Hobby Boards going out of business 4 years ago
I visited the Hobby boards website just out of interest and noticed they are going out of business. With the growing interest in home automation I thought they would be doing great but I guess 1-wire networks aren't as popular as the wireless home automation options (which don't seem to be designed for security and privacy).

I still have a number of temperature sensors so I can add those easily. I have ordered another humidity sensor since that is something I want to measure indoor in the crawlspace under our house.

Tags: ,
2015-09-12 Electrisch energieverbruik en gewoontes meten 5 years ago
In mijn 1-wire projecten was ook nog het plan om de watt-uur pulsen van de electricteitsmeter te gaan tellen. Met een schakeling met lichtgevoelige leds en een teller is het me nooit gelukt de pulsen betrouwbaar te tellen.

Ik ontdekte de YouLess die het tellen van zo'n ledje of van een draaischijfmeter terdege opgelost heeft en die niet begint met de data naar een externe dienst te sturen voor ik er naar kan kijken. Er is gewoon een simpele interface waarmee de tellingen van de YouLess via het netwerk uit te lezen zijn en die gebruik ik natuurlijk en maak er interne statistieken van.

YouLess stroomgebruik per kwartier
Gemeten electriciteitsgebruik per kwartier
Van die statistieken maak ik ook een grafiek met een nauwkeurigheid per kwartier. Die keuze is omdat de 'slimme meter' per kwartier uitgelezen kan worden en ik wil wel eens weten wat je er dan uit kan halen. Heel veel dus! Uit de kwartierwaarden is een hoop te halen over onze dagelijkse gewoonten, zeker als je ze over een lange termijn beschikbaar hebt. Voor de meeste pieken kan ik een verklaring bedenken en als eenmaal bekend is welke actie welke hoeveelheid energie gebruikt kan je daarna andere pieken ook weer uitleggen. Opvallend is dat zelfs bij de resolutie van 15 minuten een kort maar duidelijk gebruik zoals de waterkoker of een lange termijn wijziging zoals het licht aan of uit schakelen prima te zien is.
Read the rest of Electrisch energieverbruik en gewoontes meten

Tags: , , ,
2015-07-05 Moving the lightning detector to the shed and testing 5 years ago
A year in lightning strikes and activity on 20M PSK31
The last year in counted lightning strikes, showing clearly that I got active on 20meter psk31 in October 2014. The 'blips' before that are real thunderstorms.
I thought of this ages ago: Moving the lightning strike detector to the shed but only today got around to it because we had some serious chances of a thunderstorm earlier today which showed up on the lightning strike detector but the graph was completely screwed up again after I tried some psk31 digital mode transmissions on the 20 meter amateur band (14.000 to 14.250 MHz for me).

So now it is in the shed. Moving it to a lower position does mean I will not get readings for thunderstorms as far away as I used to but I'd rather have usable readings at this moment. First tests with transmitting psk31/psk63 on 20 the meter amateur band after I changed it look like it doesn't count the transmissions anymore. Now to wait for the next good thunderstorm to see how that gets counted. Some blips are showing up.

Update 2015-07-14: The first result seems to be that using the lights in the shed (tubelights with starters) shows up clearly. Using the radio still has no effect. I now await the first thunderstorm for more results.

Update 2015-07-28: No thunderstorm has been reported by the KNMI weather institute thunderstorm archive within a short distance of my sensor. I guess the maximum range is quite limited now.

Tags: , , ,
2014-11-28 Moving the lightning strike detector to the shed 6 years ago
I have noticed the lightning strike detection in Weather station Utrecht Overvecht goes completely mad when I transmit on the 20 meter amateur band. With the detector being quite close to the antenna I can understand this.

The solution will be to find a place to mount the detector in the shed. It will be lower (less reception of the radio energy of the strikes) but it will also be further away from my interference.

That also means the reading of the detector will have to be done using w1retap since that is what I use on the shed weatherstation computer. I was a bit confused whether w1retap supports this counter but I found out it's based on the DS2423 counter chip which is supported in w1retap, as part of a wind speed meter in a TAI8515 weather station, but w1retap will give the count on readout and the conversion is up to the user.

Tags: , , , ,
2013-01-20 (#) 7 years ago
During some cleanup work today I accidentally bumped a cable of the 1-wire network out of its socket, leading to some missing temperature measurements. After I was finished for the day with the cleanup project I decided to improve the fetchdigitemp script which fetches the data from digitemp. The script fetchdigitemp now checks whether listed sensors have reported data. Just to be sure I also added the option for the sensor to be listed but disabled.

Tags: ,
2013-01-18 (#) 7 years ago
Interesting side-effect of continued energy monitoring and on-line access to the results: Busting Teenage Partying with a Fluksometer - Rowetel.

Mentioned in Anti-Drone Camouflage: What to Wear in Total Surveillance -
I recently saw Law & Order LA episode S01E16 "Big Rock Mesa" in which the police as part of investigations accessed data from smart meters without much trouble.

Tags: , ,
2010-11-23 (#) 10 years ago
Shednet with weatherstation
Shednet with weatherstation
In the recent days I have been running the shednet computer again, this time with the conrad weather station attached. This is mainly for finding out what the climate in the shed is to help decide on hardware choices and setup.

The climate (in the shed) is different from what I expected: humidity is (so far) within limits of what the current PC (a Dell optiplex GX270) can handle. I expected humidity to become a problem before temperature. Temperatures are at the moment dropping below 'operating range' and a couple of cold days are coming up here in the Netherlands.

You can view the results at the weather station page but remember this is in the shed. Real measurements done with (something resembling) meteorological standards will be later.

But these measurements have learned me a few things and helped with a few decisions for the project sundial weather station:

  • The humidity in the shed is not much of a problem.
  • The temperature might be, but if a really low-power PC in an IP66 housing can survive an outdoor climate, it should survive in the shed.
  • The conrad temperature sensor is not very precise in outdoor temperatures. So the 'outdoor' temperature / humidity will be measured using 1-wire sensors hooked up to the future weather station computer. The Netley Marsh 1 wire weather station has nice ideas and pictures how this can be done and a small 'sensor house' like the one they use would fit better in our back garden than a full-size Stevenson Screen (the official name of the white 'meteorological hut' which tries to shield thermometer and hygrometer from local influences).
The flickr picture is also some experimenting with the gimp.

Tags: , , ,
2010-07-11 (#) 10 years ago
A night with a heavy thunderstorm and high numbers of lightning strikes detected. No local damage, we just saw hailstones come down, break up and the parts still fly around for over a meter. So we were glad we weren't outside at that time.

Tags: , ,
2010-02-02 (#) 10 years ago
In following some links about 1-wire projects I found a German Supplier of 1-wire components which can be interesting: Fuchs Elektronik sells 1-wire components at a reasonable price such as the DS18B20 1-wire high resolution thermometer. Too bad they don't sell other interesting sensors like the barometer which could help in combining an order.

Tags: ,
2010-01-02 (#) 10 years ago
One wire sensor inside the room thermostat During all the work in the house some of the 1-wire temperature sensors were disabled and removed to avoid damage. Today I did some work on the house and re-installed them. The sensor in the living room is now installed inside the room thermostat so it's hidden and should give the same reading as the thermostat. I also re-installed the temperature sensor in the crawlspace which will show up in the sensors at home overview.

Tags: ,
2009-12-21 (#) 10 years ago
One wire sensor connected to the heater pipe The temperature sensor connected to the heater is working nicely and tells us the problem with the heater is only in the hot-water producing part.
And the picture is a nice update for the 1-wire projects page.

Tags: , ,
2009-12-14 (#) 10 years ago
Our heating seems to be having problem, probably related to the changes recently. But to diagnose the problem completely we need to see what is happening. So one of the one-wire temperature sensors is now tie-wrapped to the output pipe of the central heating and measurements are logged.

Tags: ,
2009-05-26 (#) 11 years ago
When I bought some 1-wire sensors a while ago at Hobby boards I included the lightning detector in the order. I installed it indoors in the attic where it also counts the switch of the fluorescent lights, so it will probably work better in an outdoor weather station further away from interference. But, in the early hours of today there was a heavy thunderstorm over this country and it counted like crazy. The stated sensitivity is about 80 kilometers:
this lightning detector will be able to pick up lightning more than 50 miles away
With the 75000 lightning strikes reported in the Netherlands for that night, the numbers don't look that strange.

Tags: , , ,
2008-11-06 (#) 12 years ago
When the heating started working for winter I noticed that the crawl space temperature was going up in the same patterns as the living room temperature. It looked like the whole crawl space was heated. I already wondered about the relation between crawl space temperature and heating up the room back in September. So the results are in: Not really necessary and costing us money. I looked in the crawl space and noticed that there is a really long set of heating pipes from the back of the house to the front (over 8 meters long). This has to do with the old design: the first central heating was in the shed in the garden. The long pipes pass within a meter of the temperature sensor. So I put pipe isolation on the long run, now to check the graphs for improvement.

Tags: , ,
2008-09-11 (#) 12 years ago
The replacement 1-wire interface arrived and the 1-wire network at home is working again. I also added a few temperature sensors so the assorted sensors at home now also show the crawl space temperature. Yes, I crawled under the house and hung a temperature sensor from the underside of the floor, connected to the 1-wire network. Correlating the temperatures over longer time with the weather can give me an insight whether underfloor isolation and heating pipe isolation will have a lot of influence on our heating bill.

Tags: ,
  Older news items for tag onewire ⇒
, reachable as PGP encrypted e-mail preferred.

PGP key 5BA9 368B E6F3 34E4 local copy PGP key 5BA9 368B E6F3 34E4 via keyservers pgp key statistics for 0x5BA9368BE6F334E4 Koos van den Hout
Other webprojects: Camp Wireless, wireless Internet access at campsites, The Virtual Bookcase, book reviews