{"id":88,"date":"2015-05-09T04:05:23","date_gmt":"2015-05-09T03:05:23","guid":{"rendered":"http:\/\/www.adienicholls.co.uk\/blogs\/?p=88"},"modified":"2017-03-11T19:37:21","modified_gmt":"2017-03-11T19:37:21","slug":"pitank-webui","status":"publish","type":"post","link":"http:\/\/www.adienicholls.co.uk\/blog\/pitank-webui\/","title":{"rendered":"Raspberry Pi Aquarium Controller WebUI"},"content":{"rendered":"<p>So after some playing around I am going for a Windows Metro style web interface for the Raspberry Pi powered aquarium controller.\u00a0 At the moment the interface can be used to view the current time and date of the system, display 2 different external temperature readings and control the 8 way 10 amp 240v relay which the filter, heater, lights and alike connect to.<\/p>\n<p><a href=\"http:\/\/www.adienicholls.co.uk\/blogs\/wp-content\/uploads\/2015\/05\/piTank_WebUI1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-89 size-medium\" src=\"http:\/\/www.adienicholls.co.uk\/blog\/wp-content\/uploads\/2015\/05\/piTank_WebUI1-600x361.jpg\" alt=\"piTank_WebUI_1\" width=\"600\" height=\"361\" srcset=\"http:\/\/www.adienicholls.co.uk\/blog\/wp-content\/uploads\/2015\/05\/piTank_WebUI1-600x361.jpg 600w, http:\/\/www.adienicholls.co.uk\/blog\/wp-content\/uploads\/2015\/05\/piTank_WebUI1-1024x616.jpg 1024w, http:\/\/www.adienicholls.co.uk\/blog\/wp-content\/uploads\/2015\/05\/piTank_WebUI1.jpg 1680w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><!--more-->The relay icons (on the right) were created using vector graphics before exporting to PNG. I see the raw .svg files can be served from the RPi and viewed in Firefox and recent browsers, i will work ot ow the resizing of .svg&#8217;s work out later&#8230;<\/p>\n<p>The blue box&#8217;s on the left are to display information and are created using CSS rather then an image block.<\/p>\n<p>Windows Metro inspired design, well, things in colored squares layed out in blocks basically&#8230;. I grabbed the Hex\/RGB codes from a Google search, there are some strange answers out there, remember not all Metro UI colors are &#8216;Websafe&#8217; which is strange I though, if MSWin* is trying to keep consistency of their products&#8230;.<\/p>\n<p>Blocks in blue are updated every 60 seconds reoccurring after page load to update both the time and temperature outputs.<\/p>\n<p>At the very bottom of the page is a simple output of the Raspberry Pi&#8217;s system info, this is updated every 5 minutes after the initial page load.<\/p>\n<p>I decided to have &#8216;timed auto reloads&#8217; on some of the sections incase the viewing page is left open at the users end, thus not having to manually refresh or start thinking &#8216;why is the time wrong&#8217;.<\/p>\n<p>The original source for the button code (java\/php files) were sourced from this <a href=\"http:\/\/www.instructables.com\/id\/Simple-and-intuitive-web-interface-for-your-Raspbe\/\">very useful Instructables guide <\/a>.\u00a0 See the link on how to create a web interface for an 8 way relays \/ LED&#8217;s.\u00a0 As you will see the guide provides a basic layout, design away from there!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So after some playing around I am going for a Windows Metro style web interface for the Raspberry Pi powered aquarium controller.\u00a0 At the moment the interface can be used to view the current time and date of the system, display 2 different external temperature readings and control the 8 way 10 amp 240v relay &hellip; <a href=\"http:\/\/www.adienicholls.co.uk\/blog\/pitank-webui\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Raspberry Pi Aquarium Controller WebUI<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":92,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,88],"tags":[],"_links":{"self":[{"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/posts\/88"}],"collection":[{"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=88"}],"version-history":[{"count":6,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/posts\/88\/revisions"}],"predecessor-version":[{"id":446,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/posts\/88\/revisions\/446"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/media\/92"}],"wp:attachment":[{"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.adienicholls.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}