Bosse_B
Posts: 793
Joined: Thu Jan 30, 2014 9:53 am

WiFi temperature sensor for RPi3?

Sat Sep 02, 2017 10:20 pm

Is there a temperature sensor which can be used with an RPi3 (using its WiFi connectivity) such that one could install a number of such sensors and they will connect to the RPi and report the temperature?
I would like to put a few such sensors in my vacation home and hook them up using an RPi3, to which I can connect via the network (I have a mobile network router on location). The use would be to monitor the key temperatures over the winter to check that it does not get too cold there.
Bo Berglund
Sweden

Heater
Posts: 13271
Joined: Tue Jul 17, 2012 3:02 pm

Re: WiFi temperature sensor for RPi3?

Sat Sep 02, 2017 10:26 pm

No.

But you could connect temp sensors to an ESP32 and have it relay the temp to your Pi. http://espressif.com/en/products/hardwa ... 2/overview

Or use zigbee https://en.wikipedia.org/wiki/Zigbe

For example.

Bosse_B
Posts: 793
Joined: Thu Jan 30, 2014 9:53 am

Re: WiFi temperature sensor for RPi3?

Sat Sep 02, 2017 10:33 pm

I googled before posting and found nothing except stuff that used the 433 MHz band to broadcast their temperature and humidity values. But they all consisted of two units, one sensor and one receiver with a display (like a simple weather station).
But I want to be able to access the data from the internet via an RPi3 so I can collect a log and also publish the data for reading anywhere I happen to be using my phone...

Seems like WiFi would be a more useful radio standard than 433 MHz, but maybe there is a power usage issue with WiFi?
Battery operation over long periods might not be possible for example?

So another question then pops up:
Is there some RPi compatible 433 MHz receiver capable of reading data from commercially available sensors?
Bo Berglund
Sweden

User avatar
davidcoton
Posts: 4124
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: WiFi temperature sensor for RPi3?

Sat Sep 02, 2017 10:36 pm

Google "WiFi temerature sensor". Over 2m hits.

Most are not directly what you want, most cost more than the Pi, some do not even require a Pi.
But there must be some gold there somewhere....
Signature retired

User avatar
OutoftheBOTS
Posts: 711
Joined: Tue Aug 01, 2017 10:06 am

Re: WiFi temperature sensor for RPi3?

Sun Sep 03, 2017 2:35 am

What your wanting to do is now commonly called Iot (internet of things). Basically you want to connect stuff together over the net. It sort of works like this each sensor will be its own stand alone node (basically little computer), each node will collect its data and send it to a server then you can access this data from anywhere that you can connect to the server.

Now you could use a RPi zero W as your node although a RPi Zero W is a hell of sledge hammer to crack an egg but at $10US each it is a cheap sledge hammer. 1 of the links above is to the ESP site that sorts of specializes in making nodes, the link above is their latest release ESP32 but most commonly people r using the older ESP8285 for creating nodes

Now once you have decided on your node you will need to program it to read the sensor then send the data to the server, most commonly people use MQTT protocol (it is basically like computer sort of using this forum). The node will read the data then send this data via MQTT message (messages r known as payload) to the server (servers r known as brokers). U can then use your phone, computer or what ever to read these messages from the broker server. U can either setup this broker on your own network or use a cloud broker.

User avatar
pi-anazazi
Posts: 543
Joined: Fri Feb 13, 2015 9:22 pm
Location: EU

Re: WiFi temperature sensor for RPi3?

Sun Sep 03, 2017 7:58 am

Why wifi? It's just a PITA. I use various 433MHz temp/hum sensors and the respective receivers coupled to Pis.

As sthe software I use pilight which provides a webserver to display the values (and several other IoT options, such as 433MHz power switches).

You don't have to buy the whole 433MHz weather station, there are dealers selling only the temp/hum sensors, as normally the weather station comes with one sensors in a package, but the base station can handle 3 or more of those sensors. Therefore you can buy the sensors alone... :-)

Fun!
Kind regards

anazazi

Bosse_B
Posts: 793
Joined: Thu Jan 30, 2014 9:53 am

Re: WiFi temperature sensor for RPi3?

Sun Sep 03, 2017 8:40 am

Thanks,
I just checked the power requirements of WiFi and it is not compatible with a battery operated sensor.
Most sensors used in "wireless" indoor/outdoor thermometers seem to use 433 MHz systems that wake up once a minute or so and then take a thermal reading, starts up a 433 MHz transmitter and sends an encoded message whereupon they go back to sleep.

So in order to use one of these types of sensors one has to provide the RPi3 with a 433 MHz receiver plus the needed decoding software.
And of course one has to be able to read the sensor's protocol, which may vary between manufacturers...
Extra sensors seem to be available at low prices, for example this:
http://www.clasohlson.com/uk/Temperatur ... er/36-1797

So the problem would be decoding, I will try to find ready-made software for that....
Bo Berglund
Sweden

User avatar
OutoftheBOTS
Posts: 711
Joined: Tue Aug 01, 2017 10:06 am

Re: WiFi temperature sensor for RPi3?

Sun Sep 03, 2017 10:52 am

you can use something like this as a node. It has built in WiFi and Bluetooth with WiFi range of about 1km and built in a micro controller on it as well as the needed USB to serial coms to program it from your computer. It can be programmed in NodeMCU Lua or Micro python or Ardunio IDE see https://www.aliexpress.com/item/New-Wir ... 12c6f9daf1

You can use something like this as your temp/humidity sensor here's a bundle of 10 https://www.aliexpress.com/item/10pcs-N ... 71da76db31

Just connect a sensor to the ESP8266 and write a program to send a MQTT message to a server running on your RPi

If you later want to add anything more i.e more sensors or have the ESP8266 output a control of something then this is easy too.

User avatar
OutoftheBOTS
Posts: 711
Joined: Tue Aug 01, 2017 10:06 am

Re: WiFi temperature sensor for RPi3?

Sun Sep 03, 2017 1:04 pm

A great tutorial on exactly what your trying to do see https://www.youtube.com/watch?v=_vcQTyLU1WY

timrowledge
Posts: 1284
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: WiFi temperature sensor for RPi3?

Sun Sep 03, 2017 4:13 pm

I used a WeMos esp8266 D1 mini pro (one of the more nicely built esp boards, see https://wiki.wemos.cc/products:d1:d1_mini_pro) with one of their SHT30 shields ( https://wiki.wemos.cc/products:d1_mini_ ... t30_shield) loaded up with mqtt to publish data in the usual way.
In fact I got six of each shipped express for $60 from their online aliexpress store. You can get cheaper esp boards but I found them really cheap.

You can read about how I hooked them up at http://wiki.squeak.org/squeak/6573 and my software is at
http://wiki.squeak.org/squeak/uploads/6 ... -tpr.1.zip

You'll need an mqtt broker running on some other machine and then a client to read the data and display it etc. Pi can do both easily enough. I wrote my own mqtt client and graphing code in Smalltalk of course, because why would I do anything else?
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

Bosse_B
Posts: 793
Joined: Thu Jan 30, 2014 9:53 am

Re: WiFi temperature sensor for RPi3?

Mon Sep 04, 2017 6:40 am

OutoftheBOTS wrote:
Sun Sep 03, 2017 1:04 pm
A great tutorial on exactly what your trying to do see https://www.youtube.com/watch?v=_vcQTyLU1WY
Thanks, seems like an interesting presentation, but...
One problem I have with this is that he talks way too fast.
I can't follow what he says.
Is there a written version on some webpage too?

WiFi Power?
And by the way, does not the ESP8266 pull way too much power to be battery operated for say 6 months?
My target is to place sensor units on different locations around the monitored property and have them report temperature (and possibly humidity) at a regular pace. Is the ESP8266 able to sleep most of the time and only wake up for a very short time when taking readings and reporting them?
I only have one location with power available and that is where I will have the RPi unit.
Bo Berglund
Sweden

User avatar
OutoftheBOTS
Posts: 711
Joined: Tue Aug 01, 2017 10:06 am

Re: WiFi temperature sensor for RPi3?

Mon Sep 04, 2017 7:01 am

Without looking up the exact specs of the ESP8266 I can't tell you how long the battery will last but it does have a very powerful WiFi so it is likely to use a bit of power to run it. Anytime you transmit a radio signal your using lots of power basically your sending out power through the air, that's how a radio transmitter works.

If you want to go wireless then your always going to use more power.

Yes he talks crazy fast, U will need to watch it bit my bit and keep stopping the vid and replaying but if you google around you should find lots of tiutorials to do this sort of thing as internet of things is the biggest crazy of 2017 :)

You would be able to google around and find other boards beside the ESP8266 that do the same thing, it is just more of a case that the ESP8266 was super popular because of price and amazing WiFi reception even at big distances from router (this great reception is likely to mean higher power consumption for the ESP8266 over other chips around)

timrowledge
Posts: 1284
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: WiFi temperature sensor for RPi3?

Mon Sep 04, 2017 4:40 pm

If you read the page about my weather station you would see how one can make an ESP go into deep sleep, where it uses tiny amounts of power. People have made similar setups that run for months on small cells.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

Bosse_B
Posts: 793
Joined: Thu Jan 30, 2014 9:53 am

Re: WiFi temperature sensor for RPi3?

Mon Sep 04, 2017 6:16 pm

OK, fair 'nuf. Thanks.
I bought a couple of ESP8266 boards (different makes) in March so I could try and find them and start experimenting.
Just verified that I could get them up and running at the time (working off of the USB power from my laptop).

It's a mess in my study, though, so it could take awhile to find them. I also bought a few temp/humidity sensors a longer time ago which look pretty much like those used in one of the suggested pages. Need to find these as well of course (they are smaller)...
Bo Berglund
Sweden

epoch1970
Posts: 3655
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: WiFi temperature sensor for RPi3?

Mon Sep 04, 2017 7:39 pm

Did you look at EnOcean devices?
More 30€ than 10€, but battery less operation.
Radio indoor range 10 (unlucky) to 30 (normal) meters, an USB transceiver (another 30€ bill) would receive data over serial on a Pi.
For protocol decoding you could consider FHEM.de or for a minimalistic option, there is EnOceanSpy on github.
HTH
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Earlton2
Posts: 61
Joined: Mon May 27, 2013 1:13 am
Location: Tonight it's -28C
Contact: Website

Re: WiFi temperature sensor for RPi3?

Mon Sep 04, 2017 9:05 pm

Not quite what you are asking for but I have used four Texas Instruments 1-wire TMP107 ( http://www.ti.com/lit/ds/symlink/tmp107.pdf ) daisy chained over 100 ft of telephone wire. The first sensors is wired to the serial port on a Pi-3 and ran in a barn over the Winter. The others are in three bee hives. Unfortunately there is no WiFi at the site so we are limited to periodically downloading via Ethernet to a laptop. I am hoping to use sshelper to rsync to a smartphone but I'm not there yet.
When the unit was being tested with WiFi access it would send an e-mail at midnight with the days measurements. i.e. one TMP107 and a Pi-Zero would fit your needs but still requires power and a few components. The data sheet has a basic circuit but I used an opto-coupler for Rx/Tx isolation as that's what I had.


khanafin
Posts: 2
Joined: Mon Jan 29, 2018 5:55 pm

Re: WiFi temperature sensor for RPi3?

Mon Jan 29, 2018 6:32 pm

Hello,
I am trying to get a set of tmp107 sensors to talk to my pi... any guidance appreciated.
Thanks in advance,
Karl

User avatar
TC9000
Posts: 9
Joined: Wed Jan 31, 2018 3:53 pm

Re: WiFi temperature sensor for RPi3?

Wed Jan 31, 2018 3:58 pm

Hi, a bit late I know but might be helpful for future searches.

I have created a number of home automation systems using what was wirelessthings stuff. it works very well with the RPI.

The company went bust, but luckily privateeyepi have picked up the designs.

To get wireless temp readings to your pi you use a base station that pops onto the GPIO and buy as many wireless sensors as you need (they all have a unique id, I have 5 around my home)

https://ha.privateeyepi.com/store/index ... ry&path=66

about 20 lines of code later you have the data.

If anyone wants to see my system (its just a hobby, never sold any) take a look here and contact me for bits of code etc, always happy to
share.
www.totalcontrol9000.co.uk

cheers

henmina53
Posts: 20
Joined: Thu Apr 05, 2018 4:49 am

Re: WiFi temperature sensor for RPi3?

Fri Jun 01, 2018 10:20 am

Hey
If you are still looking for some suggestions then I am using wireless sensor which is based on zigbee module you should give a try to this even I am using these sensor to get connect to internet through Losant IOT platform.

Hope This might help you

icewood
Posts: 3
Joined: Mon Jan 28, 2019 2:21 pm

Re: WiFi temperature sensor for RPi3?

Tue Jan 29, 2019 10:25 am

Bosse_B wrote:
Mon Sep 04, 2017 6:16 pm
OK, fair 'nuf. Thanks.
I bought a couple of ESP8266 boards (different makes) in March so I could try and find them and start experimenting.
Just verified that I could get them up and running at the time (working off of the USB power from my laptop).

It's a mess in my study, though, so it could take awhile to find them. I also bought a few temp/humidity sensors a longer time ago which look pretty much like those used in one of the suggested pages. Need to find these as well of course (they are smaller)...
I have a perfect solution for your needs: Meazurem. It's developed in Finland and it's designed exactly for monitoring vacation home temperatures and humidity. You can install the gateway software to your compatible RPi3 and check the environmental conditions with your phone. It has nice graphs and alarms too! The HW sensors are affordable too.

tpylkko
Posts: 382
Joined: Tue Oct 14, 2014 5:21 pm

Re: WiFi temperature sensor for RPi3?

Tue Jan 29, 2019 3:02 pm

You can do this in many ways. The simplest is to use a ESP or similar microcontroller and analog temp sensor. It would be around $3 total. Digital sensors might be easier to use and more accurate but slightly more expensive. The microcontroller can also do other things, have a local oled display to show the temp locally, for example. They can be put to sleep to make their battery life longer. Esp8266 will consune at least 70 mA when on and wifi can spike several hundred for short moments. But there are better mcu's. Adafruit has an arm board with wifi they claim consumes 11 ma transmiting over wifi. Other communicatiin methods will use less energy than wifi.

DIY. Don't buy some ready made thing. When you don't need it anymore you can invent a new use for it and you've learned some skills while at it.

PhatFil
Posts: 1363
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: WiFi temperature sensor for RPi3?

Tue Jan 29, 2019 4:55 pm

https://github.com/ThomDietrich/miflora-mqtt-daemon

and

https://zsiti.eu/xiaomi-mijia-hygrother ... pberry-pi/

if using node-red there is a contrib-Xiaomi-BLE node that handles all the coms etc and only needs a b/tooth mac addy to query a sensor ( both the above use the same protocols) and i suspect any future xiaomi ble products will also 'talk' in the same way too..

Bosse_B
Posts: 793
Joined: Thu Jan 30, 2014 9:53 am

Re: WiFi temperature sensor for RPi3?

Tue Jan 29, 2019 5:03 pm

This is my thread from Sept 2017......
Seems like it is not really in use of revival. I have solved my logging task in a different way (DIY).

So, I can supply the following updated information concerning Temp/Humidity logging:

1) Using RPi as controller
A DHT sensor type AM2302 can be connected directly to the GPIO pins of an RPi and be used as a logging device.
I have an RPi sitting in my summer house with one such DHT sensor connected and I have installed the Adafruit DHT driver on it.
I have written a short shellscript that is run by cron every hour to read the T/H values and send to my website through a small php script on the webserver. It receives the data and stuffs it into a MySql database.
Then I have created a few php scripts on the webserver that use plotly.js to display the data from the database in a user defined range as time graphs.

2) Using the ESP8266 as controller

I have also built a few boards using the ESP-07 module and a few DHT sensors (AM2302 again) using the Arduino framework and suitable libraries.
In this case I have put one in the attic of my house to monitor the climate there. I have connected 4 DHT sensors to this board (available pins on the ESP-07 limit the number of sensors). THis system is powered by a USB charger since I have mains in the attic.
These devices also have scheduled measurements occurring at predefined intervals (currently also once per hour) and they send the data using the same php script on my webserver as the RPi solution does.
This has worked fine for 5 months now.

3) I am now working on making the ESP-07 solution battery powered.
This is attainable by using the deepsleep() function in the ESP via the Arduino library. I have prototyped the design on a breadboard and verified that in deep sleep it pulls 20 uA from a 4.5 V battery pack. When starting up it pulls 90 mA for a short while (2 seconds) then drops back to 74 mA until the readings are done and sent out the same way as above. Then after about 4s it goes back to deepsleep.

Now building the final board using a veroboard 60x60 mm, one ESP-07, a 3-place AA battery pack, a handful of resistors and capacitors, a low-current 3.3V regulator and a few transistors to switch the sensor power on/off. And a plastic box. Will use 2 DHT sensors (AM2302).

All of this is using the same infrastructure I put on my webserver (php scripts, MySql database, display pages in php).

Final note:
Of course the ESP solutions are not really RPi, but if you put a webserver on your RPi with the database etc, then you will be able to say it is a Raspberry solution...
Bo Berglund
Sweden

tpylkko
Posts: 382
Joined: Tue Oct 14, 2014 5:21 pm

Re: WiFi temperature sensor for RPi3?

Sat Mar 23, 2019 9:13 pm

You might want to look into LiFePo4 batteries. These run at a around 3.3 V voltage meaning that you can directly run these 3.3 V microcontrollers from them (without the regulators and all)...

Return to “General discussion”