Schmidt Consulting

Outside Temperature/Humidity logger



Tom Schmidt



This is another WebControl 8 project. It provides real time web reporting of outdoor temperature and humidity as well as min/max temperature for the previous couple of days.




We have a very old Davis Weather Monitor station with software that updates temperature information on our internal web site. That no longer worked after I upgraded our computers to Windows 10. As much fun as it was having a personal weather station found we never used it for much other than checking overnight low temperature when we were concerned about first frost of the season or just to complain about how cold it was.

I decided to use another WebControl 8 PLC to create a data logger and post the information on our internal web server. That way the information is locally accessible from any networked device.  For security reasons have not made the information remotely accessible but it I ever need to do that will set up a VPN.

Real time temperature/humidity

For real time outdoor and inside temperature/humidity we purchased several ThermPro TP-60 wireless units. They have been very reliable and are pretty cheap. I installed a single transmitter in the weather station radiation shield for accurate reporting and located several displays around the house.

The downside is the lack of easy to use min/max temperature logging and you have to go to one of the indoor units to view temperature and humidity.


PLC data logger

I’ve used a bunch of these WebControl 8 programmable logic controllers for other home automation projects so decided to use it as the basis of the temperature logger. Unlike my other projects there is no additional electronics so I was able to use the off the shelf WebControl chassis to house the controller.

The controller is located near our Ethernet switch powered by a 9 volt SMPS wall wart. I used 4-pair Category rated cable to remote the temperature and humidity sensor. Each sensor only needs 3 wires each so I doubled up on grounds.

The temperature sensor is Maxim 18B20 digital sensor and the humidity sensor is an analog Honeywell HIH 4000. Both are readily available on eBay.

The web interface displays today’s min/max temperature and min/max for the previous couple of days. The daily update is done at 6AM to better account for overnight temperature changes.  The system sends out a daily email as part of the 6AM update. It also sends an email if the temperature sensor has a hard failure.

Outdoor radiation shield

For accuracy the temperature sensor must be protected from direct sunlight and surfaces that radiate heat.  I used the radiation shield from our old weather station mounted on the north side of a deck post about 12 feet from the west side of the house. The purpose of the radiation shield is to allow the free flow of ambient air while shielding the sensors for direct sunlight.

I attached a 6-postion screw terminal strip to the top of the radiation shield to mount the temperature and humidity sensors.

The shield houses both the WebControl 8 temperature/humidity sensors and the ThermPro wireless transmitter. Having two distinct systems quickly indicates problems.

It is interesting to see how effective the radiation shield is. We have another outdoor temperature sensor used by the greenhouse and mounted on the north facing wall of the house about 30 feet from the radiation shield. It is affected by the thermal mass of the house.  During rapid temperature swings the two sensors differ by several degrees.


Radiation shield mounting recommendations:

1.       Locate away from fences, buildings, trees or other obstructions that interfere with air flow

2.       Install over plants or soil to limit heat radiation

3.       Do not install over sprinklers, the shield is not designed to protect from water sprayed upward

4.       If attached to building preferred location is on the north side in the Northern Hemisphere.

5.       Locate temperature sensor 4-6 above the ground  



Web Interface

The WebControl web interface is not very beautiful. One of the items on my to-do list is to write some web server code to integrate all my DIY home automation widgets to make the information easier to read.

Cost rollup 

I used items I had laying around for this project. If you purchase everything new here is the expected cost.



CAINetworks WebControl 8


WebControl metal chassis


6-postion Jones terminal strip


Maxim 18B20 Temperature sensor


Honeywell HIH 4000 Humidity sensor


9V 1A Wall wart


AcuRite 06054M Radiation shield


Cat 5 cable









Outside Temperature/Humidity Monitor

T. Schmidt


*********** Change Log *********************

11/25/2019         Added another day to temp history log, current day and two

                                previous as of 6AM standard time. Divided temp by /10 displayed

                                in VARs to display in full degrees F.


                                Ordered Honeywell HIH-4000-003 humidity sensor on eBay. Other

                                then that had all the other parts on hand.


                                Installed system. Controller located on top of 16-port gig switch.

                                Sensors installed in Davis Weather radiation used with the old

                                Davis Weather stuff. Used Cat5e cable, doubled up on grounds

                                since only 6-conductors are needed. Added aluminum plate on the top

                                of the shield to attached 6-position Jones screw terminal.


                                Temp sensor +5V screw terminal does not work, ran temp and

                                humidity +5 to the humidity terminal block.


11/24/2019         Code start


11/22/2019         Davis Weather Monitor II Ambient Weather web software does not play

                                nicely with Win 10. The only thing I use the weather station for is

                                to display min/max outdoor temperature. Plus I don't have the

                                outdoor humidity sensor module, so cant track outside humidity.


                                Project based on an old WebControl8 board I pulled from greenhouse

                                controller. Updated greenhouse WebControl to new hardware with SMPS

                                so I could increase system voltage to 12V for humidity exhaust fan.


                                System monitors outdoor temperature and humidity. Sensors are

                                located in the weather shield I had used for the Davis gear.

                                Firmware records daily min/max and two previous day's min/max

                                temperature. At 6AM sends email with the result.          


11/22/2019         Project start



*************** PCB Hardware/Firmware version ****************

Hardware: 2.2.2

Firmware: 3.02.17d

Static IP:


Customer loop executed every ~50ms (minimal test code)

VAR and RAM initialized to 0 by system at power up

To reset PLC to power up state - update network settings (Send)

RAM location reset to 0 on code upload, VAR not affected

WebControl takes about 400ms to init I/O at power up

Per CAI Support Temp sensors take up to 2 sec to stabilize at power up

Email takes about 1.5 sec to send, no timeout if SMTP server does not respond

TTL inputs have 10k pulldown

Output buffers 10mA per output, 30mA total

A/D 10V full scale 10-bits


9V power consumption:

                WebControl board: 120ma (Live Ethernet serving web page)



***************** I/O Defs **********************


Analog Inputs


AIP1 - not used

AIP2 - not used

AIP3 - not used


Digital Inputs


IP1 - not used

IP2 - not used

IP3 - not used

IP4 - not used

IP5 - not used

IP6 - not used

IP7 - not used

IP8 - not used


Digital Outputs


OP1 - not used

OP2 - not used

OP3 - not used

OP4 - not used

OP5 - not used

OP6 - not used

OP7 - not used

OP8 - not used


Temperature Sensors


T1 - Outside Temperature

T2 - not used

T3 - not used

T4 - not used

T5 - not used

T6 - not used

T7 - not used

T8 - not used


Temp Sensor status (1 = OK)











Humidity Sensor


H1 - Outside relative humidity


Email message Identifiers


EM1 - System status (init and temp hard failure)

EM2 - not used

EM3 - not used

EM4 - not used

EM5 - not used

EM6 - not used

EM7 - Morning daily status email (6AM)

EM8 - not used




VAR1 - System Status: 0 power up, 1 normal, 2 bad temp sensor

VAR2 - Bad temp Sensor state: 0=send email, 1-100 debounce counter, 101=email sent

VAR3 - current day max temperature in degrees F

VAR4 - current day min temperature

VAR5 - previous day max temperature

VAR6 - previous day min temperature

VAR7 - 2nd day max temperature

VAR8 - 2nd day min temperature




RAM1 - T1 Temp /10 

RAM2 -

RAM3 -

RAM4 -

RAM5 -

RAM6 -

RAM7 - 

RAM8 -


Web constants


UROM1 - not used

UROM2 - not used

UROM3 - not used

UROM4 - not used




                Runs once at power up. Delay for temp sensors to stabilize and sets VAR1

                status flag =1



                Fetches current temperature and sets current day min/max. Debounces bad temp

                status and sends email if hard failure.



                Sends email at 6AM (std time) with current temp/humidity and min/max value

                for previous two days.


******************* Code *************************



                TSTEQ   VAR1 0

                CALLSUB PUINIT

                CALLSUB OUTTEMP

                CALLSUB NEWDAY

                DELAY   1000





                SET         VAR1 1

                SET         VAR2 100

                DELAY   3000

                CALLSUB TEMPSTAT      

                TSTNE   VAR2 100

                GOTO    PUINIT1

                DIV         T1 10 RAM1

                SET         VAR3 RAM1

                SET         VAR4 RAM1


                EMAIL   EM1




                CALLSUB              TEMPSTAT

                TSTNE   VAR2 100



                DIV         T1 10 RAM1

                TSTGT   RAM1 VAR3

                SET         VAR3 RAM1

                TSTLT     RAM1 VAR4

                SET         VAR4 RAM1




                TSTNE   CH 6



                TSTNE   CM 0



                SET         VAR7 VAR5

                SET         VAR8 VAR6

                SET         VAR5 VAR3

                SET         VAR6 VAR4

                DIV         T1 10 RAM1

                SET         VAR3 RAM1

                SET         VAR4 RAM1

                EMAIL   EM7


                TSTEQ   CM 0

                GOTO    NEWDAY1                          




                TSTEQ   VAR2 101



                TSTNE   TS1 1

                GOTO    BADTEMP

                SET         VAR2 100




                DEC        VAR2

                TSTNE   VAR2 0



                SET         VAR1 2

                SET         VAR2 101

                EMAIL   EM1



******************* End **************************






Parting thoughts

It is nice being able to read outside temperature from any web enabled device at home and observe the min/max readings for the last couple of days.