Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

1wire programing

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
philipgm
Posts: 22
Joined: Tue 02 Sep 2014 5:20 am
Weather Station: WeatherDuino
Operating System: RaspberryPi
Location: Picton, NZ
Contact:

1wire programing

Post by philipgm »

I am looking for a small program that will read and store data from the 1-wire temperature sensor. This is a good way to add extra sensors for Cumulus users.
Maybe there is someone here who would like to give it a go.
Thank you
Philip
philipgm
Posts: 22
Joined: Tue 02 Sep 2014 5:20 am
Weather Station: WeatherDuino
Operating System: RaspberryPi
Location: Picton, NZ
Contact:

Re: 1wire programing

Post by philipgm »

I have now written a program using java that reads the 1-wire temperature sensor and stores it in the xml file. The xml file can be sent to your website and used as extra data for your website. I will be testing this as a soil temp reading.
This program will be useful as extra sensors can easily be added to the website.
I will keep you updated.
Cheers
Philip
philipgm
Posts: 22
Joined: Tue 02 Sep 2014 5:20 am
Weather Station: WeatherDuino
Operating System: RaspberryPi
Location: Picton, NZ
Contact:

Re: 1wire programing

Post by philipgm »

The program is at beta testing. I am using the program to read a soil temp sensor, and a sensor to read the sky temperature and compare that with the air temperature. The results then give a very good display of the amount of cloud at night. I will release the program in about a month.
At first I was using an xml file to send to the website for use but this has now changed to a onewiredata.txt file. A lot simpler to use.
User avatar
laulau
Posts: 678
Joined: Tue 13 Oct 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: 1wire programing

Post by laulau »

Steve about Cumulus MX wrote:The graphs are generated from JSON data using JavaScript, both in the user interface, and on the default supplied web site.
Why not going this way ? (along with .txt file)
Laurent

Image
philipgm
Posts: 22
Joined: Tue 02 Sep 2014 5:20 am
Weather Station: WeatherDuino
Operating System: RaspberryPi
Location: Picton, NZ
Contact:

Re: 1wire programing

Post by philipgm »

laulau wrote:
Steve about Cumulus MX wrote:The graphs are generated from JSON data using JavaScript, both in the user interface, and on the default supplied web site.
Why not going this way ? (along with .txt file)

That is way outside my programing skills!
Cheers
TNETWeather

Re: 1wire programing

Post by TNETWeather »

Curious what 1wire hardware you are using and where you got the code from or did you write it yourself?
Unit-53
Posts: 25
Joined: Tue 23 Dec 2014 8:48 pm
Weather Station: Davis - Vantage Vue
Operating System: Windows 8.0
Location: United States
Contact:

Re: 1wire programing

Post by Unit-53 »

TNETWeather wrote:Curious what 1wire hardware you are using and where you got the code from or did you write it yourself?
I have the book Weather Toys. In it has a lot of code you can use. Not sure if this is where he is getting the code from.
Bill,
Image
User avatar
JennyLeez
Posts: 316
Joined: Wed 16 Dec 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Re: 1wire programing

Post by JennyLeez »

I took on the role of Guinea Pig for Phil who sent me up the hardware all ready to go.
The soil 1 wire sensor was easy and I just buried it.

The owl 1 wire sensor a little more work :)
Drivers and 1 wire software installed on PC.
Software reads in the temp data. Stores in small txt file. Cumulus uploads small txt file.
Using basic php and that txt file, parameters are set to give the calculated night sky. In my case I have Overcast, Mostly Cloudy, Partly Cloudy, Scattered Cloud, Mostly Clear and Clear.
You can put what you Like.
I have then prefixed that condition in front of my Current Conditions script.
http://wairoaweather.net/index.php?lang=en
During the day the Current Conditions displays my sky conditions from my solar.
At night when no solar value. I use the owl sensor. Hence this prefixed value can only be seen at night.
The Current Condition Script is here:
https://cumulus.hosiene.co.uk/viewtopic.php?f=14&t=12831
This 1 wire temp sensor can also be used during the day if one did not have solar. I think Phil uses the 1 wire during the day as well.

Initially the owl sensor sat out on the rail of my deck. But between house and trees, too much shade, too much shielding plus it was extremely hot and I was afraid it was going to melt as it has no housing just a lot of black gu :)
So a pole was purchased and of course as a woman would do, it was painted to match deck. Sensor now clears the house and trees and working as it should.
What I have found though, is parameters set by Phil in his php script were incorrect for my location. These had to be changed. Once moved to top of pole, where it is slightly cooler, again the parameters were incorrect and I had to change them again
So anyone interested you will have to watch your night sky and set accordingly.
Basically the 1 wire temp is compared with the Weather Station’s air temperature. The clear sky sucks heat out of the black covered 1 wire owl sensor. The difference gives you a pretty spot on display of the amount of cloud at night.
Unit-53 Phil has written his own code ( 2 small php scripts) I have used that and added to it.

Image attached. Cat to the right, badly chopped up tree on the left :)
You do not have the required permissions to view the files attached to this post.
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image
philipgm
Posts: 22
Joined: Tue 02 Sep 2014 5:20 am
Weather Station: WeatherDuino
Operating System: RaspberryPi
Location: Picton, NZ
Contact:

Re: 1wire programing

Post by philipgm »

OK, we have the program working. I am using it for soil temp and for estimating the cloud cover at night. It can also be used for establishing the daytime cloud cover. To access the program and instructions see:
http://www.nzwebnet.co.nz/1_wire/index.php
Cheers
Philip
User avatar
JennyLeez
Posts: 316
Joined: Wed 16 Dec 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Re: 1wire programing

Post by JennyLeez »

Attached is a modified copy of the ‘Current Conditions’ Script - Version X.

Beteljuice has added in support for the 1 wire sensor as posted above by Phil.

There are two more choices listed under “User Variables’:
// *** NEW ***
$sensorCloudDAY = false; // Use 1wire cloud sensor DAYTIME (true/false)
$sensorCloudNIGHT = true; // Use 1wire cloud sensor NIGHTTIME (true/false)
Asd previously said, I am only using the 1 wire for the night Cloud cover hence ‘$sensorCloudNIGHT = true’ only.

NOTE: Although this version will work the same as the Original ‘Current Conditions’ Script
https://cumulus.hosiene.co.uk/viewtopic.php?f=14&t=12831

It is advisable to only use this version if you build Phil’s 1 wire Sensor for the cloud cover at night.

I just want to add a thanks to Phil here. This sensor is working pretty much spot on now for the cloud cover at night. I have stopped running in and out checking now, I trust my web site :)

Cheers
Jenny
You do not have the required permissions to view the files attached to this post.
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image
Post Reply