As promised the Bwired XML upload data service is ready check the result at:
http://www.bwired.nl/domoticaworld.asp
It is now possible to upload your domotica Home Automation sensor data to the Bwired webserver. So Come on!
![Smile :-)](./images/smilies/icon_smile.gif)
The data is handled automatic and stored in a database (I tell you this upfront [:D]).
The data is stored per day so high and low values can be generated.
It would be nice the have outside Temp, Humidity, Energy, Water and Gas as standard devices.
If you want to upload some sensordata proceed as follows:
Make it possible that you can create an XML file with the following format:
<b>(Don't Leave any elements out, if not used leave the value blank)</b>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<BWired>
<Init>
<DateTime>13-3-2009 19:01:00</DateTime>
<UserName>Naam</UserName>
<Password>xxxxx</Password>
<ScreenName>Digit</ScreenName>
<Gpslat>52.30725</Gpslat>
<Gpslong>6.239371</Gpslong>
<City>Vught</City>
<Website>wwwhekkers.net</Website>
<WebCamPicUrl>wwwhekkers.net/cam.jpg</WebCamPicUrl>
<Title>Digit's Online Home</Title>
<UTCTimeZone>0</UTCTimeZone>
</Init>
<Entry>
<Name>Outside Temperature</Name>
<ID>1</ID>
<Units>C</Units>
<Value>10.7</Value>
</Entry>
<Entry>
<Name>Outside Humidity</Name>
<ID>1</ID>
<Units>%</Units>
<Value>70</Value>
</Entry>
<Entry>
<Name>Energy Today</Name>
<ID>1</ID>
<Units>kWh</Units>
<Value>12.042</Value>
</Entry>
<Entry>
<Name>Water Today</Name>
<ID>1</ID><Units>L</Units>
<Value>443</Value>
</Entry>
<Entry>
<Name>Gas Today</Name>
<ID>1</ID>
<Units>m3</Units>
<Value>4.78</Value>
</Entry>
</BWired>
Only 1 <ENTRY></ENTRY> is needed for uploading, but you send as many in the XML as you want, they will all show up within the marker on googlemaps.
Gps Lat and Long dont have to be accurate if privacy matters!
Check your Lat Long coordinates at:
http://www.gorissen.info/Pierre/maps/go ... cation.php
The <b><ID></b> for each sensor is used for sorting the data within the element <b>and has to be unique</b>
<b>Lenght and type of the XML elements:</b>
Username, varchar 30, mandatory
Password, varchar 20, mandatory
Devicename, varchar 40, mandatory
Units, varchar 25
Value, varchar 30, mandatory
Screenname, varchar 30, mandatory
Website varchar 100
Webcampicurl varchar 100
Title, varchar 50, mandatory
City, varchar 35, mandatory
All datefields are Datetime
Gpslat, Double 30, mandatory
Gpslog, double 30, mandatory
Sortid, integer 11,mandatory
UTCTimeZome, integer, (for example -2, -1, 0, 1, 2, 3 etc)
Below some ASP code sample on how to upload to the bwired webservice
the XML is put in a string as you can see below. The XML is not complete in the sample below, but just a small piece!
Code: Select all
<%
url = "http://www.bwired.nl/Bwiredservice/receive.asp"
information = "<?xml version='1.0' encoding='utf-8'?<BWired><Init><DateTime>01-03-2009 23:59:12</DateTime></Entry></BWired>"
Set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST", url, false
xmlhttp.setRequestHeader "Content-Type", "text/xml"
xmlhttp.send information
%>
This way it's very low on your resources as well. If the Bwired webservice is not available your system just checks a few seconds and the it will stop and tries it again the next round!
I did some testing with Digit and he created as first user the send service within his home automation system and this was running directly!
Best is to upload once every hour the data!
<u><b><font size="2"><b>UPDATE AVAILABLE SCRIPTS FOR UPLOADING (check also topics below):</b></font id="size2"></b></u>
<b><font size="2">Homeseer Xml2Bwired configuration tool:</font id="size2"></b>
Download Attachment:
The manual: http://www.jphuddlestone.co.uk/xml2bwir ... Bwired.pdf
The Tool: http://www.jphuddlestone.co.uk/xml2bwir ... Bwired.zip
<b><font size="2">Script for Perl:</font id="size2"></b>
Download Attachment:
http://www.domoticaforum.eu/uploaded/Jf ... xml.pl.txt
http://www.domoticaforum.eu/uploaded/Jf ... 50_XML.zip
<b><font size="2">Domotiga supports the Bwired uploadservice:</font id="size2"></b>
http://www.domotiga.nl/projects/domotiga
<b><font size="2">Script for Synology DS207+ :</font id="size2"></b>
Check the on page 3 the topic from ddgiel for script
<b>DOT.NET C# .net 2.0 / 3.5 sample project (Visual Studio 2008 solution) from Dutchnomad (topic below)</b>
Download Attachment:
http://www.domoticaforum.eu/uploaded/Bw ... Bwired.zip
<b>Simple Bwired Webservice multi-threaded class for Girder 5</b>
Download Attachment:
http://www.domoticaforum.eu/uploaded/mh ... bwired.zip
![Image](http://www.domoticaforum.eu/uploaded/Bwired/200931319429_bwiredupload.jpg)