{"id":2533,"date":"2017-06-02T14:28:20","date_gmt":"2017-06-02T13:28:20","guid":{"rendered":"http:\/\/www.robertprice.co.uk\/robblog\/?p=2533"},"modified":"2017-06-02T14:42:49","modified_gmt":"2017-06-02T13:42:49","slug":"reading-a-temperature-sensor-using-php-on-a-raspberry-pi","status":"publish","type":"post","link":"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/","title":{"rendered":"Reading a temperature sensor using PHP on a Raspberry Pi"},"content":{"rendered":"<p>It&#8217;s easy to add a temperature sensor to a Raspberry Pi. In this example I&#8217;ll explain how to set it up and access the data using PHP.<\/p>\n<p>The <a target=\"_blank\" href=\"https:\/\/www.amazon.co.uk\/gp\/product\/B00CHEZ250\/ref=as_li_tl?ie=UTF8&#038;camp=1634&#038;creative=6738&#038;creativeASIN=B00CHEZ250&#038;linkCode=as2&#038;tag=robertprcouk-21&#038;linkId=fc89b4452df2ee31138ca4efecc69929\">DS18b20<\/a><img loading=\"lazy\" decoding=\"async\" src=\"\/\/ir-uk.amazon-adsystem.com\/e\/ir?t=robertprcouk-21&#038;l=am2&#038;o=2&#038;a=B00CHEZ250\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/> is a great digital temperature sensor. It only needs three wires and a resistor to get it working on the Raspberry Pi.<\/p>\n<p>The red wire is +3.3v, the black is ground, and yellow is data.<\/p>\n<p>The resistor is connected between red and yellow to pull up the voltage on the data line.<\/p>\n<p>Red is connected to pin 1 on the GPIO, black to pin 6, and yellow to pin 7.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.robertprice.co.uk\/robblog\/assets\/temperature-sensor.png\" alt=\"Connecting a temperature sensor to a Raspberry Pi\" width=\"1296\" height=\"1071\" class=\"aligncenter size-full wp-image-2535\" srcset=\"https:\/\/www.robertprice.co.uk\/robblog\/assets\/temperature-sensor.png 1296w, https:\/\/www.robertprice.co.uk\/robblog\/assets\/temperature-sensor-300x248.png 300w, https:\/\/www.robertprice.co.uk\/robblog\/assets\/temperature-sensor-768x635.png 768w, https:\/\/www.robertprice.co.uk\/robblog\/assets\/temperature-sensor-1024x846.png 1024w, https:\/\/www.robertprice.co.uk\/robblog\/assets\/temperature-sensor-1200x992.png 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<h2>Reading the temperature<\/h2>\n<p>Now the circuit is ready, we can access the data. We need to enable the relevant modules on the Raspberry Pi to do this.<\/p>\n<pre>\r\nmodprobe w1-gpio\r\nmodprobe w1-therm\r\n<\/pre>\n<p>If we now look in the \/sys\/bus\/w1\/devices\/ directory, we should see a directory starting with 28. This is where we can find the temperature data. Inside this directory is a file called w1_slave. This is the file we read get the data. When we read it, it actually asks the sensor for the data and return it. This means there is a slight delay before the data returns.<\/p>\n<pre>\r\npi@Nowscreen:~ $ cat \/sys\/bus\/w1\/devices\/28-031683a865ff\/w1_slave\r\n95 01 4b 46 7f ff 0c 10 65 : crc=65 YES\r\n95 01 4b 46 7f ff 0c 10 65 t=25312\r\n<\/pre>\n<p>The temperature is the value t=25312. We divide this by 1000 to get the temperature of 25.312 degrees celcius.<\/p>\n<h2>Reading the temperature with PHP<\/h2>\n<p>The first thing we need to do is to find the directory where the w1_slave file is. We can use globbing to help here.<\/p>\n<pre>\r\n$base_dir = '\/sys\/bus\/w1\/devices\/';\r\n$device_folder = glob($base_dir . '28*')[0];\r\n$device_file = $device_folder . '\/w1_slave';\r\n<\/pre>\n<p>Now we need to read in the data. We can use the file method as this returns each line of the file in an array.<\/p>\n<pre>\r\n$data = file($device_file, FILE_IGNORE_NEW_LINES);\r\n<\/pre>\n<p>Now we extract the temperature. We check the first line is correct by checking for the value &#8220;YES&#8221; at the end of the line. If this is present we get the value for &#8220;t=&#8221; at the end of the second line. Finally we divide the value by 1000, and return it.<\/p>\n<pre>\r\n$temperature = null;\r\nif (preg_match('\/YES$\/', $data[0])) {\r\n    if (preg_match('\/t=(\\d+)$\/', $data[1], $matches, PREG_OFFSET_CAPTURE)) {\r\n        $temperature = $matches[1][0] \/ 1000;\r\n    }\r\n}\r\n<\/pre>\n<p>Now we can display the temperature.<\/p>\n<pre>\r\nif ($temperature) {\r\n    echo \"Temperature is ${temperature}C\\n\";\r\n} else {\r\n    echo \"Unable to get temperature\\n\";\r\n}\r\n<\/pre>\n<h2>Final PHP temperature sensor code<\/h2>\n<p>Here&#8217;s the finished code. I&#8217;ve also included two system calls to modprobe to ensure the necessary modules are loaded before reading.<\/p>\n<pre>\r\n&lt;?php\r\n\r\nexec('modprobe w1-gpio');\r\nexec('modprobe w1-therm');\r\n\r\n$base_dir = '\/sys\/bus\/w1\/devices\/';\r\n$device_folder = glob($base_dir . '28*')[0];\r\n$device_file = $device_folder . '\/w1_slave';\r\n\r\n$data = file($device_file, FILE_IGNORE_NEW_LINES);\r\n\r\n$temperature = null;\r\nif (preg_match('\/YES$\/', $data[0])) {\r\n    if (preg_match('\/t=(\\d+)$\/', $data[1], $matches, PREG_OFFSET_CAPTURE)) {\r\n        $temperature = $matches[1][0] \/ 1000;\r\n    }\r\n}\r\n\r\nif ($temperature) {\r\n    echo \"Temperature is ${temperature}C\\n\";\r\n} else {\r\n    echo \"Unable to get temperature\\n\";\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s easy to add a temperature sensor to a Raspberry Pi. In this example I&#8217;ll explain how to set it up and access the data using PHP. The DS18b20 is a great digital temperature sensor. It only needs three wires and a resistor to get it working on the Raspberry Pi. The red wire is &hellip; <a href=\"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Reading a temperature sensor using PHP on a Raspberry Pi&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":2540,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[84],"tags":[87,50,85,88],"class_list":["post-2533","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hardware","tag-gpio","tag-php","tag-raspberry-pi","tag-sensors"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Reading a temperature sensor using PHP on a Raspberry Pi - Robert Price<\/title>\n<meta name=\"description\" content=\"A working example showing how to add a DS18b20 temperature sensor to a Raspberry Pi, and how to read and process the data from it using PHP.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Reading a temperature sensor using PHP on a Raspberry Pi - Robert Price\" \/>\n<meta property=\"og:description\" content=\"A working example showing how to add a DS18b20 temperature sensor to a Raspberry Pi, and how to read and process the data from it using PHP.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/\" \/>\n<meta property=\"og:site_name\" content=\"Robert Price\" \/>\n<meta property=\"article:published_time\" content=\"2017-06-02T13:28:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-06-02T13:42:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.robertprice.co.uk\/robblog\/assets\/temperature-image.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"rob\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rob\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\\\/\"},\"author\":{\"name\":\"rob\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/#\\\/schema\\\/person\\\/fac6d5b076e0e14e1fb13e15b542a6c5\"},\"headline\":\"Reading a temperature sensor using PHP on a Raspberry Pi\",\"datePublished\":\"2017-06-02T13:28:20+00:00\",\"dateModified\":\"2017-06-02T13:42:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\\\/\"},\"wordCount\":363,\"image\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/assets\\\/temperature-image.jpg\",\"keywords\":[\"GPIO\",\"PHP\",\"Raspberry Pi\",\"sensors\"],\"articleSection\":[\"Hardware\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\\\/\",\"url\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\\\/\",\"name\":\"Reading a temperature sensor using PHP on a Raspberry Pi - Robert Price\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/assets\\\/temperature-image.jpg\",\"datePublished\":\"2017-06-02T13:28:20+00:00\",\"dateModified\":\"2017-06-02T13:42:49+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/#\\\/schema\\\/person\\\/fac6d5b076e0e14e1fb13e15b542a6c5\"},\"description\":\"A working example showing how to add a DS18b20 temperature sensor to a Raspberry Pi, and how to read and process the data from it using PHP.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/assets\\\/temperature-image.jpg\",\"contentUrl\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/assets\\\/temperature-image.jpg\",\"width\":1200,\"height\":600,\"caption\":\"PHP temperature sensor code in action\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Reading a temperature sensor using PHP on a Raspberry Pi\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/#website\",\"url\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/\",\"name\":\"Robert Price\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/#\\\/schema\\\/person\\\/fac6d5b076e0e14e1fb13e15b542a6c5\",\"name\":\"rob\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g\",\"caption\":\"rob\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Reading a temperature sensor using PHP on a Raspberry Pi - Robert Price","description":"A working example showing how to add a DS18b20 temperature sensor to a Raspberry Pi, and how to read and process the data from it using PHP.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/","og_locale":"en_GB","og_type":"article","og_title":"Reading a temperature sensor using PHP on a Raspberry Pi - Robert Price","og_description":"A working example showing how to add a DS18b20 temperature sensor to a Raspberry Pi, and how to read and process the data from it using PHP.","og_url":"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/","og_site_name":"Robert Price","article_published_time":"2017-06-02T13:28:20+00:00","article_modified_time":"2017-06-02T13:42:49+00:00","og_image":[{"width":1200,"height":600,"url":"https:\/\/www.robertprice.co.uk\/robblog\/assets\/temperature-image.jpg","type":"image\/jpeg"}],"author":"rob","twitter_card":"summary_large_image","twitter_misc":{"Written by":"rob","Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/#article","isPartOf":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/"},"author":{"name":"rob","@id":"https:\/\/www.robertprice.co.uk\/robblog\/#\/schema\/person\/fac6d5b076e0e14e1fb13e15b542a6c5"},"headline":"Reading a temperature sensor using PHP on a Raspberry Pi","datePublished":"2017-06-02T13:28:20+00:00","dateModified":"2017-06-02T13:42:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/"},"wordCount":363,"image":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/#primaryimage"},"thumbnailUrl":"https:\/\/www.robertprice.co.uk\/robblog\/assets\/temperature-image.jpg","keywords":["GPIO","PHP","Raspberry Pi","sensors"],"articleSection":["Hardware"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/","url":"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/","name":"Reading a temperature sensor using PHP on a Raspberry Pi - Robert Price","isPartOf":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/#primaryimage"},"image":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/#primaryimage"},"thumbnailUrl":"https:\/\/www.robertprice.co.uk\/robblog\/assets\/temperature-image.jpg","datePublished":"2017-06-02T13:28:20+00:00","dateModified":"2017-06-02T13:42:49+00:00","author":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/#\/schema\/person\/fac6d5b076e0e14e1fb13e15b542a6c5"},"description":"A working example showing how to add a DS18b20 temperature sensor to a Raspberry Pi, and how to read and process the data from it using PHP.","breadcrumb":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/#primaryimage","url":"https:\/\/www.robertprice.co.uk\/robblog\/assets\/temperature-image.jpg","contentUrl":"https:\/\/www.robertprice.co.uk\/robblog\/assets\/temperature-image.jpg","width":1200,"height":600,"caption":"PHP temperature sensor code in action"},{"@type":"BreadcrumbList","@id":"https:\/\/www.robertprice.co.uk\/robblog\/reading-a-temperature-sensor-using-php-on-a-raspberry-pi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.robertprice.co.uk\/robblog\/"},{"@type":"ListItem","position":2,"name":"Reading a temperature sensor using PHP on a Raspberry Pi"}]},{"@type":"WebSite","@id":"https:\/\/www.robertprice.co.uk\/robblog\/#website","url":"https:\/\/www.robertprice.co.uk\/robblog\/","name":"Robert Price","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.robertprice.co.uk\/robblog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.robertprice.co.uk\/robblog\/#\/schema\/person\/fac6d5b076e0e14e1fb13e15b542a6c5","name":"rob","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g","caption":"rob"}}]}},"_links":{"self":[{"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/posts\/2533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/comments?post=2533"}],"version-history":[{"count":7,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/posts\/2533\/revisions"}],"predecessor-version":[{"id":2542,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/posts\/2533\/revisions\/2542"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/media\/2540"}],"wp:attachment":[{"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/media?parent=2533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/categories?post=2533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/tags?post=2533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}