Re: Wireless temperature & humidity measurement

2023-08-11 Thread Bruno Kleinert
Am Freitag, dem 14.07.2023 um 21:52 +0200 schrieb zithro:
> On 14 Jul 2023 10:53, Joe wrote:
> > On Fri, 14 Jul 2023 09:27:12 +0200
> > Bruno Kleinert  wrote:
> > 
> > > Hello,
> > > 
> > > I'm looking for a wireless way to measure temperature and humidity
> > > indoor with hardware off the shelf and software included in Debian 12
> > > bookworm.
> > > 
> > > Sensors --> Radio --> Receiver --> Any typical PC interface, e.g.,
> > > USB, Ethernet.
> > > 
> > > I don't need a visual interface, but plan to process measured values
> > > in shell scripts.
> > > 
> > > Do you have any hardware recommendations and can you share experience?
> 
> I use DS18B20 chips (1-wire protocol, nice for long distances cabling) 
> and some BME280s or MPL3115A2, plugged on Raspberry Pies.
> The DS18B20 can be directly manipulated via sysfs, while the BMEs and 
> the MPL3115A2 need a software library to interpret the sensors output (I 
> use Adafruit's one, in python).

Since I had two DS18B20 1-wire sensors running, I had experience with
that and liked its brain-dead simplicity to set up and use it. It seems
to me, there's currently a shortage in availability in Germany's web
shops. Also, some ready-to use sensors seemed expensive to me, so I put
1-wire technology on hold.

For testing puprosed I bought a Raspberry Pi 3 Model B+ and I decided
for Raspberry Pi Zero WH's and DHT20 temperature and humidity sensors,
which apparently is a newish I2C version of the DHTs, and can just be
wired to Raspberry Pis' IC2 connectors without any additional resistors
(My soldering skills got terribly rusty). I used i2cdetect of the i2c-
tools package to detect controllers and sensors and to play around with
the sensors' data I currently
use https://github.com/cjee21/RPi-DHT20/tree/main (not in Debian 12
bookworm). I'd prefere to use i2cget to read sensor data, but didn't
manage to get it working, yet.

Additionally I successfully can control a 4-relay board (controlled via
4 GPIOs) with gpioset of the gpiod package and I'm using a rain sensor
(signalling via GPIO) as a water leakage sensor with gpioget and
gpiomon from the gpiod package. I spontaneously decided to build a
sprinkler system and currently wait for the magnet valves to arrive.
I'm open to suggestions for a housing, as I didn't consider how to
protect the electronics outside, yet.

Funnily, I got crazy how charmingly well the stock (plus the firmware
packages from non-free and/or non-free-firmware) Debian 12 bookworm
images work on both Raspberry Pi types. Thanks a lot Gunnar, I think!
️

Thanks to everyone responding in the thread for your hints and
pointers!

Kind regards,
Bruno


signature.asc
Description: This is a digitally signed message part


Re: Wireless temperature & humidity measurement

2023-07-14 Thread Mike Castle
I was just researching this myself a couple of days ago, and spent
several hours going down a rabbit hole.

It seems that many folks are going the way of using an open source
solution, Home Assistant (aka, HA), (https://www.home-assistant.io/).
Even to the point where I found that folks that used to have
standalone code that could maybe read a sensor was migrated over to HA
and then only supported there.  HA really wants to be the only thing
installed on a machine, to the point where if you do install it on
Debian, if you add any other packages, they won't support you.  But,
installing their HA Operating System (HAOS), which appears to be
Debian based, can be with any number of VMs, some stuff via OCI
compatible stuff (like Docker, and I suppose, Linux containers, though
I'm less sure of this).

All of that is overkill for what you (and I) are looking for:  simple
scraping abilities.

But, it does have a large list of supported hardware and protocols.
So, you could go through the hardware list, find something you like,
and then extract the appropriate software bits.  Or at least identify
what software packages are necessary.

Good luck!  And please, if you find something you like and get up and
running, follow up.

mrc



Re: Wireless temperature & humidity measurement

2023-07-14 Thread debian-user
zithro  wrote:
> On 14 Jul 2023 10:53, Joe wrote:
> > On Fri, 14 Jul 2023 09:27:12 +0200
> > Bruno Kleinert  wrote:
> >   
> >> Hello,
> >>
> >> I'm looking for a wireless way to measure temperature and humidity
> >> indoor with hardware off the shelf and software included in Debian
> >> 12 bookworm.
> >>
> >> Sensors --> Radio --> Receiver --> Any typical PC interface, e.g.,
> >> USB, Ethernet.
> >>
> >> I don't need a visual interface, but plan to process measured
> >> values in shell scripts.
> >>
> >> Do you have any hardware recommendations and can you share
> >> experience?  
> 
> I use DS18B20 chips (1-wire protocol, nice for long distances
> cabling) and some BME280s or MPL3115A2, plugged on Raspberry Pies.
> The DS18B20 can be directly manipulated via sysfs, while the BMEs and 
> the MPL3115A2 need a software library to interpret the sensors output
> (I use Adafruit's one, in python).
> 
> A cron script records the values in a CSV, which I've linked in the 
> apache folder so remote hosts can access the data file (trying to 
> display a graph from 5 sensors values on a full year time period is a
> no go on a Raspi B v3).
> I've also created 2 webpages, one to quickly display the last X
> values (tail -n X), one to display a pretty graph, depending on some
> web form parameters (source host, from day X to Y, last week, etc).
> I'm using jpgraph, a PHP graph lib (free for personal use), to
> display nice curves.
> If you're not a web dev, you could also use OoO Calc or Excel to
> build the graphs from the CSV files.
> 
> As you want wireless, I'd recommend a Raspi zero as it has BT+wifi 
> built-in,

FWIW, a Pi Zero DOESN'T have WIFI & BT. You need a Pi Zero W for that.
I have one as another source to my OEM emonBase and it works well. I 
use an Si7021 sensor although I do have some BME680 as well. It all
depends how comfortable you are playing with hardware and fiddling with
software. The emon boxes I suggested earlier are more plug and play.

> a clock (kind of), an IP stack, a webserver, etc.
> Of course an Arduino is simpler, but requires a bit more work (and
> maybe money) : no built-in storage, no built-in comms, no date/time.
> But ok, you don't need local storage or a clock/time if only sending
> values to another host, the remote host can set the time before
> recording. Although if you operate on batteries, an Arduino would be
> the best choice, as it requires a lot less energy.
> 
> Another choice could be a Raspberry Pi Pico, but that's closest to an 
> Arduino than to a Raspi (ie. no OS). But if I'm not mistaken, the 
> advantage of the Pico is that it has built-in BT+wifi (I've not
> tested it, only read about it).
> 
> In all cases, you could also turn the wireless chip(s) off till not 
> sending data, or even go to (deep) sleep mode between polls (IIRC 
> Arduino/Pico only).
> 
> > and a bit of PHP to make a 7-day graph web page of T and H. Boot
> > script to set up the serial port and initiate logging on reboot.  
> 
> Joe, out of curiosity, what are you using to display the graphs ?
> If you didn't read above, I'm using jpgraph, a PHP lib.
> 



Re: Wireless temperature & humidity measurement

2023-07-14 Thread Joe
On Fri, 14 Jul 2023 21:52:01 +0200
zithro  wrote:


> 
> Joe, out of curiosity, what are you using to display the graphs ?
> If you didn't read above, I'm using jpgraph, a PHP lib.
> 

Basic stuff, Imagick which is a PHP binding to some ImageMagick
functions.

-- 
Joe



Re: Wireless temperature & humidity measurement

2023-07-14 Thread zithro

On 14 Jul 2023 10:53, Joe wrote:

On Fri, 14 Jul 2023 09:27:12 +0200
Bruno Kleinert  wrote:


Hello,

I'm looking for a wireless way to measure temperature and humidity
indoor with hardware off the shelf and software included in Debian 12
bookworm.

Sensors --> Radio --> Receiver --> Any typical PC interface, e.g.,
USB, Ethernet.

I don't need a visual interface, but plan to process measured values
in shell scripts.

Do you have any hardware recommendations and can you share experience?


I use DS18B20 chips (1-wire protocol, nice for long distances cabling) 
and some BME280s or MPL3115A2, plugged on Raspberry Pies.
The DS18B20 can be directly manipulated via sysfs, while the BMEs and 
the MPL3115A2 need a software library to interpret the sensors output (I 
use Adafruit's one, in python).


A cron script records the values in a CSV, which I've linked in the 
apache folder so remote hosts can access the data file (trying to 
display a graph from 5 sensors values on a full year time period is a no 
go on a Raspi B v3).
I've also created 2 webpages, one to quickly display the last X values 
(tail -n X), one to display a pretty graph, depending on some web form 
parameters (source host, from day X to Y, last week, etc).
I'm using jpgraph, a PHP graph lib (free for personal use), to display 
nice curves.
If you're not a web dev, you could also use OoO Calc or Excel to build 
the graphs from the CSV files.


As you want wireless, I'd recommend a Raspi zero as it has BT+wifi 
built-in, a clock (kind of), an IP stack, a webserver, etc.
Of course an Arduino is simpler, but requires a bit more work (and maybe 
money) : no built-in storage, no built-in comms, no date/time. But ok, 
you don't need local storage or a clock/time if only sending values to 
another host, the remote host can set the time before recording.
Although if you operate on batteries, an Arduino would be the best 
choice, as it requires a lot less energy.


Another choice could be a Raspberry Pi Pico, but that's closest to an 
Arduino than to a Raspi (ie. no OS). But if I'm not mistaken, the 
advantage of the Pico is that it has built-in BT+wifi (I've not tested 
it, only read about it).


In all cases, you could also turn the wireless chip(s) off till not 
sending data, or even go to (deep) sleep mode between polls (IIRC 
Arduino/Pico only).



and a bit of PHP to make a 7-day graph web page of T and H. Boot script
to set up the serial port and initiate logging on reboot.


Joe, out of curiosity, what are you using to display the graphs ?
If you didn't read above, I'm using jpgraph, a PHP lib.



Re: Wireless temperature & humidity measurement

2023-07-14 Thread debian-user
Nate Bargmann  wrote:
> * On 2023 14 Jul 02:37 -0500, Bruno Kleinert wrote:
> > Hello,
> > 
> > I'm looking for a wireless way to measure temperature and humidity
> > indoor with hardware off the shelf and software included in Debian
> > 12 bookworm.  
> 
> Off the shelf the Davis Vantage Pro 2 is probably one of the most
> popular.

I think the OP said they were looking for temperature and humidity
indoors, so I don't think an outdoor weather station quite fits the
bill as well as being an order of magnitude too expensive! :(

There are quite a few battery-powered T+H sensors with wi-fi, but I'm
not up to date with which ones can be intercepted to provide data
directly rather than uploading to a 'cloud'.

Certainly some emonTH plus an emonBase from
https://shop.openenergymonitor.com/ would do the job, but I expect
there are other alternatives

>  I have one and the Integrated Sensor Suite (ISS) is placed
> about 100 meters from the console.  Davis claims nearly 300m (1000
> feet) of distance between the ISS and console, but obstructions will
> surely limit that.  The big problem with the Davis is that to get the
> interface adapter one must buy their software package.  There are
> some independent sources of interfaces (called loggers) which can be
> found mentioned at the wxforum.net[1].
> 
> > Sensors --> Radio --> Receiver --> Any typical PC interface, e.g.,
> > USB, Ethernet.
> > 
> > I don't need a visual interface, but plan to process measured
> > values in shell scripts.  
> 
> For software I use Weewx but it is not part of the Debian repositories
> but does have a Debian package available.[2]  I have been using this
> package for several years and am running the latest release of 4.10.2.
> My data is uploaded to Weather Underground[3], CWOP [4](Citizens
> Weather Observation Program) and my own Web host[5][6].  I've
> customized the generated pages with additional images.  Weewx also
> supports supplying data to other providers as well.  It is quite
> flexible.
> 
> > Do you have any hardware recommendations and can you share
> > experience?  
> 
> The Davis VP2 is likely among the most turnkey of stations available.
> It does not have serial/Ethernet output included so that must be
> sourced either through buying the Davis software package or from a
> third party. Prior to the Davis I had a Peet Bros wired system but it
> caused and was subject to interference to/from my amateur radio
> operations.  I've had no interference problems with the Davis.
> 
> I recently did a bit of refurbishing of my ISS by replacing the
> tipping spoon with a new design and replacing the anemometer sensing
> cartridge. Those parts were easily sourced through Scaled
> Instruments[7].  They carry complete stations for many brands as well
> as parts.
> 
> The aforementioned wxforum.net is a good place to seek out better
> answers to your questions.
> 
> HTH,
> 
> - Nate
> 
> [1] https://www.wxforum.net/index.php?board=59.0
> [2] http://weewx.com/
> [3]
> https://www.wunderground.com/dashboard/pws/KKSBREME2?cm_ven=localwx_pwsdash
> [4] http://www.findu.com/cgi-bin/wxpage.cgi?call=n0nb [5]
> https://www.n0nb.us/weather/ [6]
> https://www.n0nb.us/weather/seasons/index.html [7]
> https://www.scaledinstruments.com/
> 



Re: Wireless temperature & humidity measurement

2023-07-14 Thread Jeffrey Walton
On Fri, Jul 14, 2023 at 3:37 AM Bruno Kleinert  wrote:
>
> I'm looking for a wireless way to measure temperature and humidity indoor 
> with hardware off the shelf and software included in Debian 12 bookworm.
>
> Sensors --> Radio --> Receiver --> Any typical PC interface, e.g., USB, 
> Ethernet.
>
> I don't need a visual interface, but plan to process measured values in shell 
> scripts.
>
> Do you have any hardware recommendations and can you share experience?

Off-topic, if you are into RaspberryPi's, then they have sensor
hats.[1,2] The price looks reasonable (to me).[3]

Armbian (and friends) are close to Debian. But they probably have some
proprietary blobs.

Jeff

[1] https://www.raspberrypi.com/products/sense-hat/
[2] 
https://projects.raspberrypi.org/en/projects/getting-started-with-the-sense-hat/7
[3] https://www.amazon.com/dp/B014HDG74S



Re: Wireless temperature & humidity measurement

2023-07-14 Thread Nate Bargmann
* On 2023 14 Jul 02:37 -0500, Bruno Kleinert wrote:
> Hello,
> 
> I'm looking for a wireless way to measure temperature and humidity
> indoor with hardware off the shelf and software included in Debian 12
> bookworm.

Off the shelf the Davis Vantage Pro 2 is probably one of the most
popular.  I have one and the Integrated Sensor Suite (ISS) is placed
about 100 meters from the console.  Davis claims nearly 300m (1000 feet)
of distance between the ISS and console, but obstructions will surely
limit that.  The big problem with the Davis is that to get the interface
adapter one must buy their software package.  There are some independent
sources of interfaces (called loggers) which can be found mentioned at
the wxforum.net[1].

> Sensors --> Radio --> Receiver --> Any typical PC interface, e.g., USB,
> Ethernet.
> 
> I don't need a visual interface, but plan to process measured values in
> shell scripts.

For software I use Weewx but it is not part of the Debian repositories
but does have a Debian package available.[2]  I have been using this
package for several years and am running the latest release of 4.10.2.
My data is uploaded to Weather Underground[3], CWOP [4](Citizens Weather
Observation Program) and my own Web host[5][6].  I've customized the
generated pages with additional images.  Weewx also supports supplying
data to other providers as well.  It is quite flexible.

> Do you have any hardware recommendations and can you share experience?

The Davis VP2 is likely among the most turnkey of stations available.
It does not have serial/Ethernet output included so that must be sourced
either through buying the Davis software package or from a third party.
Prior to the Davis I had a Peet Bros wired system but it caused and was
subject to interference to/from my amateur radio operations.  I've had
no interference problems with the Davis.

I recently did a bit of refurbishing of my ISS by replacing the tipping
spoon with a new design and replacing the anemometer sensing cartridge.
Those parts were easily sourced through Scaled Instruments[7].  They
carry complete stations for many brands as well as parts.

The aforementioned wxforum.net is a good place to seek out better
answers to your questions.

HTH,

- Nate

[1] https://www.wxforum.net/index.php?board=59.0
[2] http://weewx.com/
[3] https://www.wunderground.com/dashboard/pws/KKSBREME2?cm_ven=localwx_pwsdash
[4] http://www.findu.com/cgi-bin/wxpage.cgi?call=n0nb
[5] https://www.n0nb.us/weather/
[6] https://www.n0nb.us/weather/seasons/index.html
[7] https://www.scaledinstruments.com/

-- 
"The optimist proclaims that we live in the best of all
possible worlds.  The pessimist fears this is true."
Web: https://www.n0nb.us
Projects: https://github.com/N0NB
GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819



signature.asc
Description: PGP signature


Re: Wireless temperature & humidity measurement

2023-07-14 Thread jeremy ardley



On 14/7/23 15:27, Bruno Kleinert wrote:

Do you have any hardware recommendations and can you share experience?



The big problem is power at the collection point. Some people use a 
solar panel and batteries but other options are available


Once you know your power budget you can use a variety of low cost 
hardware such as Arduino or Nano Pi at the data collection point. There 
are many sensors available using low complexity connections such as I2C 
and One-Wire.


For communications you can be really fancy and use full WiFi or you can 
use a variety of point to point connections such as zigbee


So work out how much power you have and then choose the technology. Most 
likely it will be arduino, I2C for a combined temperature humidity 
sensor such as DHT22 AM2302 DHT11/DHT12 AM2320, and matching zigbee modules.




Re: Wireless temperature & humidity measurement

2023-07-14 Thread Joe
On Fri, 14 Jul 2023 09:27:12 +0200
Bruno Kleinert  wrote:

> Hello,
> 
> I'm looking for a wireless way to measure temperature and humidity
> indoor with hardware off the shelf and software included in Debian 12
> bookworm.
> 
> Sensors --> Radio --> Receiver --> Any typical PC interface, e.g.,
> USB, Ethernet.
> 
> I don't need a visual interface, but plan to process measured values
> in shell scripts.
> 
> Do you have any hardware recommendations and can you share experience?
> 
>
I've used a DHT22 for a few years for this. 
https://www.sparkfun.com/datasheets/Sensors/Temperature/DHT22.pdf

Hardware off the shelf but not software. I have a pair of XBee (Zigbee
compatible) radio transceivers, an Arduino at the sensor end to format
and time the data a bit, and a serial-USB converter to put the receiver
output into my server. Then a bit of scripting to log the received data,
and a bit of PHP to make a 7-day graph web page of T and H. Boot script
to set up the serial port and initiate logging on reboot.

There are probably better and cheaper ways to do it now. I had a spare
pair of XBees, but Chinese 433MHz PCBs are much cheaper. On the other
hand, you need to add your own validation to make sure you're not
trying to interpret nearby doorbell rings and weather stations. The
XBees have serial numbering and other features built in, in fact you
need the manufacturer's application (Windows only, of course) to
configure them.

-- 
Joe