WS-1001 data direct to WD?

Just a quick update - the rain is recording perfectly (shows rain to .01 - with the WU api only showed to 1 place), had it running for a few days now - really is a great improvement, its like having a new weather station :slight_smile:

that’s good :wink:
would be good if a write up could be made detailing the steps needed so that others could do this maybe? :slight_smile:

I have tried to view this link on wxforum but it seems to be gone. :confused:
Ah well.

I suspect a http get to the ip address and port number of the station should
Return the data.It’s something I want to get working

hi

here is the current WS1001( Clones) output dumped when using the updateweatherstation.php to a file called ws1001.json on your server

{ “timestamp”:1467623507,“updated”:“12:11:47”,“outsideTemp”:“83.8”,“outsideHumidity”:“53”,“humiditytrend”:“53”,“dewpoint”:“64.9”, “dewpointtrend”:“64.9”,“windchill”:“83.8”,“heatindex”:85.5,“realfeel”:84.4,“windDir”:“240”,“windSpeed”:“5.8”,“windGust”:“12.3”, “rainrate”:“0.00”,“raintoday”:“0.00”,“rainweek”:“0.00”,“rainmonth”:“0.00”,“rainyear”:“17.63”,“radiation”:“623.82”,“UV”:“7”, “UVtrend”:“7”,“indoorTemp”:“83.7”,“indoorfeel”:84.5,“indoorHumidity”:“58”,“barometer”:“29.94”,“absbarometer”:“29.68”, “indoortrendTemp”:“83.7”,“indoortrendHumidity”:“58”,“trendTemp”:“83.8”,“windtrend”:“5.8”,“windgusttrend”:“12.3”, “trendbarometer”:“29.94”,“solartrend”:“623.82”,“softwaretype”:“ISTANBUL161 V2.2.5”,“month”:“July”,“year”:“2016”, “day”:“Monday”,“realtime”:“1”,“rtfreq”:“5”,“status”:“updateraw”,“timeutc”:“2016-7-4 9:11:46”,“power”:true }

the ws1001 (clones) only require a simple console file edit called server.ini it basically takes the weather underground upload protocol , using the updateweatherstation.php it also forwards the data directly to weather underground and simultaneously dumps the data to a file called ws1001.json .
the console does not have to be permanently connected to pc/mac it simply does everything for you .

it would a real bonus and benefit if weather display was able to read the file ws1001.json from a server or locally .

the updateweatherstation.php can be adapted to weather display tags (if thats correct phrase)

server.ini file
[Menu]
default=www.wunderground.com
web=1
web1=www.yourserver.com
web2=www.yourserver.com
[www.wunderground.com]
Server=yourserver.com
ServerType=php
ServerPort=80
UploadType=Customize
ReadOnly=true
[www.yourserver.com]
Server=yourserver.com
ServerType=php
ServerPort=80
UploadType=Customize
ReadOnly=true

updateweatherstation.php sample code

“updated” => date(“G:i:s”),
“outsideTemp” => $_GET[‘tempf’],
“outsideHumidity” => $_GET[‘humidity’],
“humiditytrend” => $_GET[‘humidity’],
“dewpoint” => $_GET[‘dewptf’],
“dewpointtrend” => $_GET[‘dewptf’],
“windchill” => $_GET[‘windchillf’],
“heatindex” => $_GET[‘heatindex’],
“realfeel” => $_GET[‘realfeel’],
“windDir” => $_GET[‘winddir’],
“windSpeed” => $_GET[‘windspeedmph’],
“windGust” => $_GET[‘windgustmph’],
“rainrate” => $_GET[‘rainin’],
“raintoday” => $_GET[‘dailyrainin’],
“rainweek” => $_GET[‘weeklyrainin’],
“rainmonth” => $_GET[‘monthlyrainin’],
“rainyear” => $_GET[‘yearlyrainin’],
“radiation” => $_GET[‘solarradiation’],
“UV” => $_GET[‘UV’],
“UVtrend” => $_GET[‘UV’],
“indoorTemp” => $_GET[‘indoortempf’],
“indoorfeel” => $_GET[‘indoorfeel’],
“indoorHumidity” => $_GET[‘indoorhumidity’],
“barometer” => $_GET[‘baromin’],
“absbarometer” => $_GET[‘absbaromin’],
“indoortrendTemp” => $_GET[‘indoortempf’],
“indoortrendHumidity” => $_GET[‘indoorhumidity’],
“trendTemp” => $_GET[‘tempf’],
“windtrend” => $_GET[‘windspeedmph’],
“windgusttrend” => $_GET[‘windgustmph’],
“trendbarometer” => $_GET[‘baromin’],
“solartrend” => $_GET[‘solarradiation’],
“softwaretype” => $_GET[‘softwaretype’],
“month”=> date(“F”),
“year”=> date(“Y”),
“day”=> date(“l”),
“realtime” => $_GET[‘realtime’],
“rtfreq” => $_GET[‘rtfreq’],
“status” => $_GET[‘action’],
“timeutc”=> $_GET[‘dateutc’],
“power” => $_GET[‘action’]== “updateraw”,
);

if you would like further info or a ws1001.json to work with realtime drop us a line i can provide a realtime working file updated every 16 seconds.

brian

Hi
I actually already do have this ability available in WD. recent version
see the Ambient WS1001 wifi raw data from script
and their you select the raw data file

try that
(in the weather station type setup)

hi

i downloaded the mac version earlier i didn’t see the reference to ws1001 but ill take a closer many thanks …, and also let me apologise for not reading the whole thread i was about to post and the electric went so you beat me to it …

brian

hi

please excuse me it is probably my total lack of knowledge of using this software but I downloaded the mac version and could not find any reference to using the ws1001 , can you give me a pointer where to look , i don’t see any options in the stationless tab .

brian

I have not added this ability I mentioned above to the Mac version
(but I could…it was refering to the windows version)

Hello Brian,

Ive moved here from my other thread.

I have read through this thread. Is it suggesting that I use the Ws 1001 wiwfi file raw data file from script ?
So I need to set up a local server and have the station send its data there so that the ws 1001 option reads it ?

Is this the only way ? I will have to look up how to do it as I’ve never ceated a local server before. I take it that wd at present
cannot directly query the ip address of the station ?

Thanks,

Michael

. I take it that wd at present cannot directly query the ip address of the station ?
we have not worked on to see if that will actually work we could certainly try that what happens when you put the IP address and port of the station into a normal browser window URL and hit return..i.e like 192.168.0.1:5000

Hi Brian,

If I type the ip address with the port number it doesn’t find it and reports an error. The ip address on its own, works.
I have just downloaded easyweather 3.0 and it looks like it should be able to read my data and store it, but it cannot find the device.

I hope there is a way, it would be great to receive the data as fast as the station reports.

Michael

if you can get the data returned to a web page URL via the IP address (+port ?) then we are in business
(as that is what a HTTP GET request will be able to do)
maybe someone else with more knowledge of how it all works can chime in?

Hello,

The ip address followed by /livedata.htm goes straight to the live data page, but not sure that helps as it does not mention the port.
The data is in the html file, but have no idea how to extract it from the whole page.

Michael

try this test program
http://www.weather-display.com/downloadfiles/Projecttestip.zip
and see what shows in the file testip.txt
after putting in the url to the livedata.htm and clicking on go

Hello Brian,

I had to put the whole address in, including http:// and /livedata.htm

The response was:

OK
OK

Thanks, Michael

what shows in the testip.txt file?

Hello Brian,

Apologies, here is the text, it looks like all the data values are there and also maybe a form and a js script ?
If you look at this, can you look at the possibility of retrieving the data faster than 16 seconds, as I believe the wind sensor updates faster :smiley:

LiveData
            <tr>
                <td colspan="2" bgcolor="#EDEFEF"><div class="subitem_1">Live Data</div></td>
            </tr>   
             <tr>
                <td width="533" bgcolor="#EDEFEF"><div class="item_1">Receiver Time:</div></td>
                <td width="307" bgcolor="#EDEFEF">
                <input name="CurrTime" disabled="disabled" type="text" class="item_2" style="WIDTH: 120px" value="22:33 07/13/2016" maxlength ="20"></td>
            </tr>
            <tr> 
                <td width="533" bgcolor="#EDEFEF"><div class="item_1">Indoor Battery Status</div></td>
                <td width="307" bgcolor="#EDEFEF">
                <select name="inBattSta" class="item_2" disabled="disabled"  style="WIDTH: 120px">
                        <option value="0" selected >Normal</option>
                        <option value="1"          >Indoor Bat Low</option>
                </select></td>
            </tr>  
            <tr> 
                <td width="533" bgcolor="#EDEFEF"><div class="item_1">Outdoor Battery Status</div></td>
                <td width="307" bgcolor="#EDEFEF">
                <select name="outBattSta" class="item_2" disabled="disabled"  style="WIDTH: 120px">
                        <option value="0" selected >Normal</option>
                        <option value="1"          >Outdoor Bat Low</option>
                </select></td>
            </tr>                 
            <tr>
                <td width="533" bgcolor="#EDEFEF"><div class="item_1">Indoor Sensor ID</div></td>
                <td width="307" bgcolor="#EDEFEF"><input name="IndoorID" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="0xa8" maxlength="6"></td>
            </tr>
            <tr>
                <td bgcolor="#EDEFEF"><div class="item_1">Outdoor Sensor1 ID</div></td>
                <td bgcolor="#EDEFEF"><input name="Outdoor1ID" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="0x13" maxlength="6"></td>
            </tr>

            <tr>
                <td bgcolor="#EDEFEF"><div class="item_1">Outdoor Sensor2 ID</div></td>
                <td bgcolor="#EDEFEF"><input name="Outdoor2ID" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="0x--" maxlength="6"></td>
            </tr>

            <tr>
                <td bgcolor="#EDEFEF"><div class="item_1">Indoor Temperature</div></td>
                <td bgcolor="#EDEFEF"><input name="inTemp" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="15.5" maxlength="8"></td>
            </tr>

            <tr>
                <td bgcolor="#EDEFEF"><div class="item_1">Indoor Humidity</div></td>
                <td bgcolor="#EDEFEF"><input name="inHumi" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="69" maxlength="4"></td>
            </tr>
            <tr>
                <td bgcolor="#EDEFEF"><div class="item_1">Absolute Pressure </div></td>
                <td bgcolor="#EDEFEF"><input name="AbsPress" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="1017.40" maxlength="6"></td>
            </tr>	
            <tr>
                <td bgcolor="#EDEFEF"><div class="item_1">Relative Pressure </div></td>
                <td bgcolor="#EDEFEF"><input name="RelPress" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="1013.70" maxlength="6"></td>
            </tr>	
            <tr>
                <td bgcolor="#EDEFEF"><div class="item_1">Outdoor Temperature</div></td>
                <td bgcolor="#EDEFEF"><input name="outTemp" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="12.6" maxlength="8"></td>
            </tr>

            <tr>
                <td bgcolor="#EDEFEF"><div class="item_1">Outdoor Humidity </div></td>
                <td bgcolor="#EDEFEF"><input name="outHumi" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="84" maxlength="4"></td>
            </tr>

            <tr>
                <td bgcolor="#EDEFEF"><div class="item_1">Wind Direction </div></td>
                <td bgcolor="#EDEFEF"><input name="windir" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="304" maxlength="5"></td>
            </tr>

            <tr>
                <td bgcolor="#EDEFEF"><div class="item_1">Wind Speed </div></td>
                <td bgcolor="#EDEFEF"><input name="avgwind" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="0.0" maxlength="6"></td>
            </tr>

            <tr>
                <td bgcolor="#EDEFEF"><div class="item_1">Wind Gust </div></td>
                <td bgcolor="#EDEFEF"><input name="gustspeed" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="0.0" maxlength="6"></td>
            </tr>    
                 
            <tr>
                <td bgcolor="#EDEFEF"><div class="item_1">Solar Radiation </div></td>
                <td bgcolor="#EDEFEF"><input name="solarrad" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="0.00" maxlength="12"></td>
            </tr>
            
            <tr>
                <td bgcolor="#EDEFEF"><div class="item_1">UV </div></td>
                <td bgcolor="#EDEFEF"><input name="uv" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="1" maxlength="12"></td>
            </tr>
            
            <tr>
                <td bgcolor="#EDEFEF"><div class="item_1">UVI </div></td>
                <td bgcolor="#EDEFEF"><input name="uvi" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="0" maxlength="4"></td>
            </tr>
            
            <tr>
                <td bgcolor="#EDEFEF"><div class="item_1">Hourly Rain Rate</div></td>
                <td bgcolor="#EDEFEF"><input name="rainofhourly" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="0.00" maxlength="8"></td>
            </tr>

			<form name="Rain_1" method="POST" onsubmit="return chkForm(0);">  
                <tr>
                    <td bgcolor="#EDEFEF"><div class="item_1">Daily Rain</div></td>
                    <td bgcolor="#EDEFEF"><input name="rainofdaily"  type="text" class="item_2" style="WIDTH: 80px" value="0.00" maxlength="8">
                    <span id="rainofdaily_msg" class="errMsg0"></span></td>
                </tr>

                <tr>
                    <td bgcolor="#EDEFEF"><div class="item_1">Weekly Rain</div></td>
                    <td bgcolor="#EDEFEF"><input name="rainofweekly" type="text" class="item_2" style="WIDTH: 80px" value="0.00" maxlength="8">
                     <span id="rainofweekly_msg" class="errMsg0"></span></td>
                </tr>

                <tr>
                    <td bgcolor="#EDEFEF"><div class="item_1">Monthly Rain</div></td>
                    <td bgcolor="#EDEFEF"><input name="rainofmonthly" type="text" class="item_2" style="WIDTH: 80px" value="0.00" maxlength="8">
                     <span id="rainofmonthly_msg" class="errMsg0"></span></td>
                </tr>

                <tr>
                    <td bgcolor="#EDEFEF"><div class="item_1">Yearly Rain</div></td>
                    <td bgcolor="#EDEFEF"><input name="rainofyearly" type="text" class="item_2" style="WIDTH: 80px" value="0.00" maxlength="8">
                     <span id="rainofyearly_msg" class="errMsg0"></span></td>
                </tr>
            
                <tr>
                    <td colspan="2" bgcolor="#EDEFEF">&nbsp;</td>
                </tr>
                <tr align="center">
                    <td colspan="2" bgcolor="#EDEFEF"><input name="Apply" type="submit" class="item_2" style="WIDTH: 60px; HEIGHT: 24px;" onclick="setSubmitType(1)" value="Apply" />
                        <input name="Cancel" type="reset" class="item_2" style="WIDTH: 60px; HEIGHT: 24px;" value="Cancel" /></td>
                </tr>
        	</form>

            <tr>
                <td colspan="2" bgcolor="#EDEFEF">&nbsp;</td>  
            </tr>

            <tr>
                <td colspan="2" align="center" bgcolor="#EDEFEF"> 
                 	<input name="rain_Default" type="button" class="item_2" style="WIDTH: 110px; HEIGHT: 24px;" onclick="raindef()" value="Rain Reset">
                    <input id="refresh_st" type="button" class="item_4" style="WIDTH: 110px; HEIGHT: 24px;"  onclick="uiCtrl(this.value);" value="Refresh">
                    <input id="refresh_sp" type="button" class="item_2" style="WIDTH: 110px; HEIGHT: 24px;"  onclick="uiCtrl(this.value);" value="Stop Refresh">
                </td>
            </tr>
        </form>
        <tr>
            <td colspan="2" bgcolor="#EDEFEF">&nbsp;</td>
        </tr>
        <tr>
            <td colspan="2" bgcolor="#C0C0C0">&nbsp;</td>
        </tr>
    </table>

	<script src="axjs0.js" type="text/javascript"></script>
    <script language="JavaScript" type="text/javascript">
        <!--
        var rfTaskRuningFlag = 0, rfTimeId;
        uiCtrl('Refresh');

		function uiCtrl(uiCmd)
		{
		    if (uiCmd=='Refresh'){
		        document.getElementById('refresh_st').disabled = true;
		        document.getElementById('refresh_sp').disabled = false;
		        rfTaskRuningFlag = 1;
		        rfTaskState = 0;
		        rfTimeId = setInterval("ss()",16000);
		    }else if (uiCmd=='Stop Refresh'){
		        document.getElementById('refresh_st').disabled = false;
		        document.getElementById('refresh_sp').disabled = true;
		        rfTaskRuningFlag = 0;
		        clearInterval(rfTimeId);
		    }
		}

		function ss()
		{
		    if (rfTaskRuningFlag)
		    {
		        window.top.location.reload();
		    }
		}
		//-->
	</script>
</body>

Michael

 
      Weather Logger 2.1
Version:2.1.9

this is good
this is what I hoped would get returned
I just need to parse out the data from that returned html /xml code (and yes update every 16 seconds) :wink:

Hello Brian,

Many thanks, wind updates appear to be as fast as 5 seconds, ive just been refreshing the live data page.

Michael