<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>King Kludge &#187; Hacking</title>
	<atom:link href="http://www.kingkludge.net/tag/hacking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kingkludge.net</link>
	<description>Husband, father, hacker, maker. Addicted to all things geeky, especially robots.</description>
	<lastBuildDate>Wed, 28 Sep 2011 14:18:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Hardware hacking update</title>
		<link>http://www.kingkludge.net/2010/02/hardware-hacking-update/</link>
		<comments>http://www.kingkludge.net/2010/02/hardware-hacking-update/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 14:57:02 +0000</pubDate>
		<dc:creator>Bob</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[contraptor]]></category>
		<category><![CDATA[hackerspace]]></category>

		<guid isPermaLink="false">http://www.kingkludge.net/2010/02/hardware-hacking-update/</guid>
		<description><![CDATA[Lindsey and Alex have gone away for a couple of days, leaving me with some alone time to work on hacking projects. Alex&#8217;s Mobile: the wood work has been assembled, and now needs some varnishing before I put all the &#8230; <a href="http://www.kingkludge.net/2010/02/hardware-hacking-update/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Lindsey and Alex have gone away for a couple of days, leaving me with some alone time to work on hacking projects.</p>
<p><a href="/projects/maker/alexs-mobile/">Alex&#8217;s Mobile</a>: the wood work has been assembled, and now needs some varnishing before I put all the electronics in. The electronics has been moved from a breadboard to full soldered vero board.</p>
<p>On the <a title="got to the Contraptor site" href="http://www.contraptor.org/">Contraptor</a> front, last night I built all the <a title="Contraptor Linear Bearings" href="http://www.contraptor.org/make-linear-bearings">linear bearings</a>, <a title="Contraptor Linear Rails" href="http://www.contraptor.org/make-linear-rail">linear rails</a> and <a title="Contraptor Sliding Elements" href="http://www.contraptor.org/make-sliding-elements">sliding elements</a> and almost completed all the <a title="Contraptor Shaft Mounts" href="http://www.contraptor.org/make-shaft-mount">shaft mounts</a>.</p>
<p>Tuesday&#8217;s are normally <a title="London Hacker Space Wiki" href="http://london.hackspace.org.uk/">London Hacker Space</a> meetups, but tonight, I shall forgo the cheese and booze and carry on working at home.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kingkludge.net/2010/02/hardware-hacking-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maker Projects &#8211; Alex&#8217;s Mobile</title>
		<link>http://www.kingkludge.net/2010/01/maker-projects-alexs-mobile/</link>
		<comments>http://www.kingkludge.net/2010/01/maker-projects-alexs-mobile/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 11:49:01 +0000</pubDate>
		<dc:creator>Bob</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[Maker]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[baby mobile]]></category>

		<guid isPermaLink="false">http://www.kingkludge.net/?p=150</guid>
		<description><![CDATA[I&#8217;ve added a new section to my projects pages, and put a page in place for the baby mobile I&#8217;m creating for Alex. I&#8217;ve back dated a load of the updates, as I&#8217;d been meaning to post blog entries about &#8230; <a href="http://www.kingkludge.net/2010/01/maker-projects-alexs-mobile/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve added a new section to my projects pages, and put a page in place for the <a href="/projects/maker/alexs-mobile/">baby mobile I&#8217;m creating for Alex</a>.</p>
<p>I&#8217;ve back dated a load of the updates, as I&#8217;d been meaning to post blog entries about the work, but hadn&#8217;t gotten round to it.</p>
<p>So far I have a 3d design worked out a working prototype circuit and a full breadboard circuit also designed.</p>
<p>I&#8217;ll try and put up some full photo&#8217;s soon and maybe even some video of the prototype.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kingkludge.net/2010/01/maker-projects-alexs-mobile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TGIMBOEJ Part 3</title>
		<link>http://www.kingkludge.net/2009/12/tgimboej-part-3/</link>
		<comments>http://www.kingkludge.net/2009/12/tgimboej-part-3/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 17:36:21 +0000</pubDate>
		<dc:creator>Bob</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Maker]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[TGIMBOEJ]]></category>

		<guid isPermaLink="false">http://www.kingkludge.net/?p=131</guid>
		<description><![CDATA[TGIMBOEJ has left the building. It has been posted on to a fellow hacker in Kent. In the end I added quite a lot of stuff to the box. Amongst other things a 6MP CCD from an old Fujitsu S20 &#8230; <a href="http://www.kingkludge.net/2009/12/tgimboej-part-3/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="The Great Internet Migratory Box of Electric Junk" href="http://tgimboej.org/">TGIMBOEJ </a>has left the building.</p>
<p>It has been posted on to a fellow hacker in Kent.</p>
<p>In the end I added quite a lot of stuff to the box. Amongst other things a 6MP CCD from an old Fujitsu S20 pro camera, a bunch of motors from CD-ROM and floppy drives and a few discreet ICs</p>
<p>Soon I will try and post an update about what I did with the switches I took out of the box.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kingkludge.net/2009/12/tgimboej-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TGIMBOEJ Part 2</title>
		<link>http://www.kingkludge.net/2009/12/tgimboej-part-2/</link>
		<comments>http://www.kingkludge.net/2009/12/tgimboej-part-2/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 16:50:48 +0000</pubDate>
		<dc:creator>Bob</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Maker]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[TGIMBOEJ]]></category>

		<guid isPermaLink="false">http://www.kingkludge.net/?p=128</guid>
		<description><![CDATA[It has landed. There is some neat stuff in the box and I&#8217;ll been sending it on shortly. I have a bunch of junk to add, and here are the photos. I&#8217;ve removed a board that contained a load of &#8230; <a href="http://www.kingkludge.net/2009/12/tgimboej-part-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It has landed.</p>
<p>There is some neat stuff in the box and I&#8217;ll been sending it on shortly. I have a bunch of junk to add, and <a title="Photos of the Great Internet Migratory Box of Electric Junk" href="http://www.flickr.com/photos/b3cft/sets/72157622836782149/">here are the photos</a>.</p>
<p>I&#8217;ve removed a board that contained a load of backlit LCD buttons, probably to be integrated into the chest of a robot of the as an  emergency stop/go <span style="text-decoration: line-through;">kill</span> button etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kingkludge.net/2009/12/tgimboej-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TGIMBOEJ Part 1</title>
		<link>http://www.kingkludge.net/2009/11/tgimboej-part-1/</link>
		<comments>http://www.kingkludge.net/2009/11/tgimboej-part-1/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 18:44:49 +0000</pubDate>
		<dc:creator>Bob</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Maker]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[TGIMBOEJ]]></category>

		<guid isPermaLink="false">http://www.kingkludge.net/?p=115</guid>
		<description><![CDATA[Yesterday I spotted an email in my inbox from a guy named Conrad. He had contacted me because he had seen my name on the TGIMBOEJ.org, a site that coordinates Migratory Boxes of Electric Junk on the Internet. My name &#8230; <a href="http://www.kingkludge.net/2009/11/tgimboej-part-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday I spotted an email in my inbox from a guy named Conrad.</p>
<p>He had contacted me because he had seen my name on the <a title="The Great Internet Migratory Box of Electric Junk" href="http://tgimboej.org/">TGIMBOEJ.org</a>, a site that coordinates Migratory Boxes of Electric Junk on the Internet.</p>
<p>My name has been down on this site for at least a year, finally I get to participate!</p>
<p>So within a few days it should arrive and I&#8217;ll document here what&#8217;s in it and what I do with whatever I find.</p>
<p>I also have to add some stuff. I think for starters a NX18 Nixie Tube as seen in the Adafruit Ice Clock</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kingkludge.net/2009/11/tgimboej-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>T-JAM and the Tesco Grocery API</title>
		<link>http://www.kingkludge.net/2009/08/t-jam-and-the-tesco-grocery-api/</link>
		<comments>http://www.kingkludge.net/2009/08/t-jam-and-the-tesco-grocery-api/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 22:36:13 +0000</pubDate>
		<dc:creator>Bob</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[shopping]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[tesco]]></category>
		<category><![CDATA[tjam]]></category>

		<guid isPermaLink="false">http://www.kingkludge.net/2009/08/t-jam-and-the-tesco-grocery-api/</guid>
		<description><![CDATA[Finally found something I can talk about openly. Having spent so long working on commercially sensitive applications, which is now in the open. Anyway, apart from helping the Yahoo! OpenHack day, I also signed up to Tesco&#8217;s T-JAM event which &#8230; <a href="http://www.kingkludge.net/2009/08/t-jam-and-the-tesco-grocery-api/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Finally found something I can talk about openly.</p>
<p>Having spent so long working on <a href="http://www.kingkludge.net/2009/08/new-yahoo-homepage/">commercially sensitive applications</a>, which is now in the open.</p>
<p>Anyway, apart from helping the Yahoo! OpenHack day, I also signed up to <a href="http://techfortesco.blogspot.com/2009/08/two-days-until-tjam.html">Tesco&#8217;s T-JAM event</a> which certainly looks like it could be interesting.</p>
<p>Tesco&#8217;s API is a SOAP API, written in and for C# primarily, so it seems that some people had some issues getting started in PHP.</p>
<p>There is a revised API in the pipeline and also the addition of a REST API as well.</p>
<p>But here are some handy hints for getting started:</p>
<p>First off, PHP 5+ has a SOAP client (and server) built in, so here&#8217;s a quick script that generates a valid login to the TESCO dev API.</p>
<pre class="prettyprint">&lt;?php
define('SOAPSERVER', 'http://www.lansley.com/TescoAPI/TescoAPI.svc?wsdl');
define('DEV_KEY', 'your dev key');
define('APP_KEY', 'your app key');

$user  = 'email address of test user';
$pass  = 'password of test user';
$tesco = new SoapClient(SOAPSERVER);

$params = array(
                'email'          =&gt; $user,
                'password'       =&gt; $pass,
                'developerKey'   =&gt; DEV_KEY,
                'applicationKey' =&gt; APP_KEY
              );
$sess = $tesco-&gt;__soapCall('Login', array('parameters' =&gt; $params));
print_r($sess);</pre>
<p>Which generates the following output:</p>
<pre class="commandline">stdClass Object
(
    [LoginResult] =&gt; stdClass Object
        (
            [StatusCode] =&gt; 0
            [StatusInfo] =&gt;
        )

    [session] =&gt; stdClass Object
        (
            [ApplicationKey] =&gt; your app key
            [BranchNumber] =&gt; 2055
            [Cookies] =&gt; stdClass Object
                (
                    [string] =&gt; Array
                        (
                            [0] =&gt; sessionTest=
                            [1] =&gt; v=WggAACp8E%3d%3d
                            [2] =&gt; CustomerId=9xxx9
                            [3] =&gt; CID=93
                            [4] =&gt; BTCCMS=h1qzwp%c%3d
                            [5] =&gt; UIMode=00000
                            [6] =&gt; PS=CSC=D
                            [7] =&gt; SSVars=CustomerName=Bob&amp;basketTotal=&amp;basketCount=&amp;slotStart=&amp;slotEnd=&amp;addrName=
                            [8] =&gt; u=oQgttVAeDK%2bg%3d%3d
                            [9] =&gt; t=dgcAA28XbJWE%3d
                        )

                )

            [CustomerName] =&gt; Bob
            [DeveloperKey] =&gt; your dev key
        )

)</pre>
<p>I&#8217;ve monkeyed around with the values in some of the keys (as these are my login credentials) but you can see the general structure. The session object needs to be stored and used in subsequent requests.</p>
<p>To interrogate the API and view the functions and types available, there are some PHP functions to help:</p>
<pre class="prettyprint">&lt;?php
define('SOAPSERVER', 'http://www.lansley.com/TescoAPI/TescoAPI.svc?wsdl');
define('DEV_KEY', 'your dev key');
define('APP_KEY', 'your app key');

$tesco = new SoapClient(SOAPSERVER);

print_r($tesco-&gt;__getFunctions());</pre>
</p>
<p>Which shows the following SOAP methods available:</p>
<pre class="commandline">Array
(
    [0] =&gt; LoginResponse Login(Login $parameters)
    [1] =&gt; LogEventResponse LogEvent(LogEvent $parameters)
    [2] =&gt; ProductSearchResponse ProductSearch(ProductSearch $parameters)
    [3] =&gt; ListProductOffersResponse ListProductOffers(ListProductOffers $parameters)
    [4] =&gt; ListProductCategoriesResponse ListProductCategories(ListProductCategories $parameters)
    [5] =&gt; ListProductsByCategoryResponse ListProductsByCategory(ListProductsByCategory $parameters)
    [6] =&gt; SetProductRatingResponse SetProductRating(SetProductRating $parameters)
    [7] =&gt; GetProductRatingResponse GetProductRating(GetProductRating $parameters)
    [8] =&gt; GetMultipleProductRatingsResponse GetMultipleProductRatings(GetMultipleProductRatings $parameters)
    [9] =&gt; ListBasketItemsResponse ListBasketItems(ListBasketItems $parameters)
    [10] =&gt; AddItemToBasketResponse AddItemToBasket(AddItemToBasket $parameters)
    [11] =&gt; ChangeItemQuantityResponse ChangeItemQuantity(ChangeItemQuantity $parameters)
    [12] =&gt; DeleteItemFromBasketResponse DeleteItemFromBasket(DeleteItemFromBasket $parameters)
)</pre>
<p>And:</p>
<pre class="prettyprint">&lt;?php
define('SOAPSERVER', 'http://www.lansley.com/TescoAPI/TescoAPI.svc?wsdl');
define('DEV_KEY', 'your dev key');
define('APP_KEY', 'your app key');

$tesco = new SoapClient(SOAPSERVER);

print_r($tesco-&gt;__getTypes());</pre>
</p>
<p>Which shows the following types available:</p>
<pre class="commandline">Array
(
    [0] =&gt; struct ArrayOfstring {
 string string;
}
    [1] =&gt; struct ResponseStatus {
 int StatusCode;
 string StatusInfo;
}
    [2] =&gt; struct Session {
 string ApplicationKey;
 string BranchNumber;
 ArrayOfstring Cookies;
 string CustomerName;
 string DeveloperKey;
}
    [3] =&gt; struct ArrayOfProduct {
 Product Product;
}
    [4] =&gt; struct Product {
 string Id;
 string ImagePath;
 string Name;
 string OfferPromotion;
 string OfferValidity;
 double Price;
 int Quantity;
 float Rating;
}
    [5] =&gt; struct ArrayOfCategory {
 Category Category;
}
    [6] =&gt; struct Category {
 ArrayOfCategory Children;
 string Href;
 string Id;
 string Name;
 string RawHtml;
}
    [7] =&gt; struct ProductRating {
 string Id;
 int MyRating;
 float Rating;
 int Rating1Count;
 int Rating2Count;
 int Rating3Count;
 int Rating4Count;
 int Rating5Count;
}
    [8] =&gt; struct Login {
 string email;
 string password;
 string developerKey;
 string applicationKey;
}
    [9] =&gt; struct LoginResponse {
 ResponseStatus LoginResult;
 Session session;
}
    [10] =&gt; struct LogEvent {
 Session session;
 string eventText;
}
    [11] =&gt; struct LogEventResponse {
 ResponseStatus LogEventResult;
}
    [12] =&gt; int char
    [13] =&gt; duration duration
    [14] =&gt; string guid
    [15] =&gt; struct ProductSearch {
 Session session;
 string searchString;
 boolean getRatings;
}
    [16] =&gt; struct ProductSearchResponse {
 ResponseStatus ProductSearchResult;
 ArrayOfProduct products;
}
    [17] =&gt; struct ListProductOffers {
 Session session;
 boolean getRatings;
}
    [18] =&gt; struct ListProductOffersResponse {
 ResponseStatus ListProductOffersResult;
 ArrayOfProduct offers;
}
    [19] =&gt; struct ListProductCategories {
 Session session;
}
    [20] =&gt; struct ListProductCategoriesResponse {
 ResponseStatus ListProductCategoriesResult;
 ArrayOfCategory categories;
}
    [21] =&gt; struct ListProductsByCategory {
 Session session;
 Category shelf;
 boolean getRatings;
}
    [22] =&gt; struct ListProductsByCategoryResponse {
 ResponseStatus ListProductsByCategoryResult;
 ArrayOfProduct products;
}
    [23] =&gt; struct SetProductRating {
 Session session;
 Product product;
}
    [24] =&gt; struct SetProductRatingResponse {
 ResponseStatus SetProductRatingResult;
}
    [25] =&gt; struct GetProductRating {
 Session session;
 Product thisproduct;
}
    [26] =&gt; struct GetProductRatingResponse {
 ResponseStatus GetProductRatingResult;
 ProductRating productrating;
}
    [27] =&gt; struct GetMultipleProductRatings {
 Session session;
 string spaceDelimitedProductIDs;
}
    [28] =&gt; struct GetMultipleProductRatingsResponse {
 ResponseStatus GetMultipleProductRatingsResult;
 string productRatingsInfo;
}
    [29] =&gt; struct ListBasketItems {
 Session session;
}
    [30] =&gt; struct ListBasketItemsResponse {
 ResponseStatus ListBasketItemsResult;
 ArrayOfProduct products;
}
    [31] =&gt; struct AddItemToBasket {
 Session session;
 Product item;
}
    [32] =&gt; struct AddItemToBasketResponse {
 ResponseStatus AddItemToBasketResult;
}
    [33] =&gt; struct ChangeItemQuantity {
 Session session;
 Product item;
}
    [34] =&gt; struct ChangeItemQuantityResponse {
 ResponseStatus ChangeItemQuantityResult;
}
    [35] =&gt; struct DeleteItemFromBasket {
 Session session;
 Product item;
}
    [36] =&gt; struct DeleteItemFromBasketResponse {
 ResponseStatus DeleteItemFromBasketResult;
}
)</pre>
<p>Hope this helps, not just with the Tesco Grocery API, but in general debugging SOAP calls from within PHP.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kingkludge.net/2009/08/t-jam-and-the-tesco-grocery-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

