<?xml version="1.0" encoding="utf-8"?>
	<rss version="2.0">
		<channel>
			<title>Green Building Forum - RaspberryPi</title>
			<lastBuildDate>Wed, 16 Sep 2026 23:20:11 +0100</lastBuildDate>
			<link>https://www.greenbuildingforum.co.uk/newforum/</link>
			<description></description>
			<generator>Lussumo Vanilla 1.0.3</generator>
			<item>
		<title>RaspberryPi</title>
		<link>https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217525#Comment_217525</link>
		<guid isPermaLink="false">https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217525#Comment_217525</guid>
		<pubDate>Mon, 19 Jan 2015 09:00:05 +0000</pubDate>
		<author>SteamyTea</author>
		<description>
			<![CDATA[Caius<br />Thanks.<br />I think it was me that asked about one or many scripts to do things.<br />Going to start working on it in earnest today, I have a pencil with a rubber at the other end, let's see which end wears out quickest.]]>
		</description>
	</item>
	<item>
		<title>RaspberryPi</title>
		<link>https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217532#Comment_217532</link>
		<guid isPermaLink="false">https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217532#Comment_217532</guid>
		<pubDate>Mon, 19 Jan 2015 10:21:33 +0000</pubDate>
		<author>snyggapa</author>
		<description>
			<![CDATA[I use a cloud service to collect my energy readings and do the charting / analysis - gets data via an HTTP post and works very well for what i want to do - I use an arduino for the posting but the rPI should work equally well<br /><br />an example of what I get out (you can also get the raw data) is here <br /><br /><a href="https://grovestreams.com/singleDash.html?org=b1343ea7-bff5-303b-9d31-89469cd583ab&itemUid=7e8f1935-2742-3d22-87fe-0f4f1fa9c8ba&api_key=2c615462-fe55-38c3-b8b9-cb31f141bc84&title=FlottageBoard&titleColor=000000" target="_self" rel="nofollow">https://grovestreams.com/singleDash.html?org=b1343ea7-bff5-303b-9d31-89469cd583ab&itemUid=7e8f1935-2742-3d22-87fe-0f4f1fa9c8ba&api_key=2c615462-fe55-38c3-b8b9-cb31f141bc84&title=FlottageBoard&titleColor=000000</a><br /><br />grovestreams just gets raw data, it then derives the rest like daily usages, day/night split etc from the raw data. And it's free for less than 10,000 transactions/month and very little money for above that. I post a set of data every 5 minutes which comes to less that 10,000 per month, so free to me :)<br /><br />-Steve]]>
		</description>
	</item>
	<item>
		<title>RaspberryPi</title>
		<link>https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217579#Comment_217579</link>
		<guid isPermaLink="false">https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217579#Comment_217579</guid>
		<pubDate>Mon, 19 Jan 2015 16:18:06 +0000</pubDate>
		<author>Ed Davies</author>
		<description>
			<![CDATA[<blockquote ><cite >Posted By: borpin</cite>Better if the clients simply send the data regularly or by exception to a 'static' server. </blockquote>There have been a couple of comments on this theme. I'd agree in general but practically it might turn out in this case easier to open a port on the sensor machine's net than the central site's, particularly for Steamy's initial demo (because the sensor is on his home network whereas the central machine is in an office with separate IT people) . All a matter of circumstances. The key is not to have the overall design too dependent on the communications details.]]>
		</description>
	</item>
	<item>
		<title>RaspberryPi</title>
		<link>https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217750#Comment_217750</link>
		<guid isPermaLink="false">https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217750#Comment_217750</guid>
		<pubDate>Tue, 20 Jan 2015 22:27:08 +0000</pubDate>
		<author>cjard</author>
		<description>
			<![CDATA[&lt;blockquote&gt;&lt;cite&gt;Posted By: Ed Davies&lt;/cite&gt;the central machine is in an office with separate IT people&lt;/blockquote&gt;<br /><br />Nothing like making a job easy from the start eh? <br /><br />"Hmm.. I need to get into something regularly. I know. I'll use one of the cells at the prison where I work"<br /><br /><br /><br />When amazon and azure will give free micro virtual machines away with totally configurable security, choosing to site a server at a network where the security is under the control of people who have bigger problems and deeper concerns is perhaps not ideal]]>
		</description>
	</item>
	<item>
		<title>RaspberryPi</title>
		<link>https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217754#Comment_217754</link>
		<guid isPermaLink="false">https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217754#Comment_217754</guid>
		<pubDate>Tue, 20 Jan 2015 23:34:04 +0000</pubDate>
		<author>SteamyTea</author>
		<description>
			<![CDATA[I have done a bit, almost working on my home network.<br />I need to check if I can reach the RPi that is doing the logging at home from the big scary world (I know a cafe with a good view and free wireless).  Hopefully I have set up my port forwarding right, guess I will find out if I wake up to no files and plenty of Trojans.  Shall pull the lead on the NAS!<br />I can grab data of the logging RPi from a remote RPi using ssh in a Python script.  I have set up passwordless login with RSA, so hopefully I am secure.  All passwords have been changed to 'quite tricky ones'.  So tricky I keep getting them wrong.<br /><br />So my Python script on the Office RPi can send a request for data to my Logging RPi and that gets sent back.  It prints out to the screen no problem.<br />Unfortunate when I try and save that data as a .csv file I just get a stream of zeros.  There was some message about not being an int value (integer).  Need to look at that.  Not sure if it is the way the data is transported, or read 'back at the Office'.  Just surprised I have got this far without serious upset (writing things down does help).<br /><br />I lost a day re-writing my CC reading script, was pretty easy once I had finished (dumb mistake not defining it).  But now it just logs what I want rather than everything spewing out the CC.<br />Out of interest, and to save me having a go on something working, can I use 'or' in an if statement.  Something like:<br /><br />If == 100 or 200 or 300<br /><br />Where would I put the :<br />After every condition or just at the end?<br /><br />Off to bed now, not a real programmer, can't live off Red Bull and Pizza.<br /><br />Thanks for all your help and suggestion.]]>
		</description>
	</item>
	<item>
		<title>RaspberryPi</title>
		<link>https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217757#Comment_217757</link>
		<guid isPermaLink="false">https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217757#Comment_217757</guid>
		<pubDate>Wed, 21 Jan 2015 05:36:46 +0000</pubDate>
		<author>cjard</author>
		<description>
			<![CDATA[It the data looks right when you print it to the console then it won't be a transport issue. Consider looking for a library that makes csv files, there are some wheels not worth reinventing <br /><br />I'm no python expert but typically programming languages don't work like that. It's a very human thing to remember the left hand operand ( i ) and then look at everything to the right of the operator as the other operand. The computer just sees it as a bunch of operators ( = + * &gt; or  and so on) and on either side the two operators. As a result the computer sees if i == 1 or 2 or 3 as <br /><br />If ( i == 1 ) or ( 2 or 3)<br /><br />Whether it can resolve (2or3) to true depends on the language. In some it fails. In some it may become either a 2 or a 0, which may then be true or false depending on how it sees numbers and booleans. In some it may work, though the coding community would generally avoid those languages <br /><br />Your options for doing thus are varied. I'd choose the simplest:<br /><br />If k == 1 or k==2 or k==3 :<br /><br />The colon goes at the end of the line]]>
		</description>
	</item>
	<item>
		<title>RaspberryPi</title>
		<link>https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217775#Comment_217775</link>
		<guid isPermaLink="false">https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217775#Comment_217775</guid>
		<pubDate>Wed, 21 Jan 2015 11:02:00 +0000</pubDate>
		<author>Ed Davies</author>
		<description>
			<![CDATA[What cjard says but perhaps the colloquial Python way to do that would be:<br /><br />  if i in (100, 200, 300):<br /><br />or<br /><br />  if i in {100, 200, 300}:<br /><br />I.e., using membership testing on a tuple or set. Could use a list, [100, 200, 300], or a dictionary as well if wanted.]]>
		</description>
	</item>
	<item>
		<title>RaspberryPi</title>
		<link>https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217777#Comment_217777</link>
		<guid isPermaLink="false">https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217777#Comment_217777</guid>
		<pubDate>Wed, 21 Jan 2015 11:30:33 +0000</pubDate>
		<author>SteamyTea</author>
		<description>
			<![CDATA[Thanks<br /><br />The good news is that I can log in remotely using Firessh from a cafe overlooking the sea.  So that bit seems to be OK.<br />Just got to sort this strange thing with the zeros when I try and save the data to a file.<br /><br />I have a line something like<br /><br />fandata = (ssh pi@192.168.1.100 cat "/home/pi/CurrentCost/oneline.csv")<br /><br />This prints to the screen fine and updates every few seconds, but when I try and append it to a file with<br /><br />tfile = open("/home/pi/RemoteData/oneline.csv", "a")<br />tfile.write("%s"%fandata + "\n")<br />tfile.close()<br /><br />I just get this error message about int not being defined.<br /><br />I may have made an error in the fandata = line as I am doing that from memory.<br /><br />Edit<br /><br />Changed the code above as it was total nonsense.<br />But thinking about it, as I am using cat, I should be able to just write to an existing file as it concatenates.  Is that right?]]>
		</description>
	</item>
	<item>
		<title>RaspberryPi</title>
		<link>https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217878#Comment_217878</link>
		<guid isPermaLink="false">https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217878#Comment_217878</guid>
		<pubDate>Thu, 22 Jan 2015 15:05:40 +0000</pubDate>
		<author>Ed Davies</author>
		<description>
			<![CDATA[<blockquote ><cite >Posted By: SteamyTea</cite>Changed the code above as it was total nonsense.</blockquote>Good, it was. <img src="/newforum/extensions/Vanillacons/smilies/standard/smile.gif" alt=":smile:" title=":smile:" /> You need to use subprocess.Popen or something to execute a command, you can't just write it in a string.<br /><br />In general something like <code >&quot;%s&quot; % fandata</code> is pretty meaningless; you might as well just write <code >fandata</code> I'm not quite sure what you had in mind but perhaps it could be done a little more compactly with <code >&quot;%s\n&quot; % fandata</code><blockquote >But thinking about it, as I am using cat, I should be able to just write to an existing file as it concatenates.  Is that right?</blockquote>cat concatenates its input files to produce a single output file. (About the only time I use it like that is to concatenate public keys from multiple ssh clients to form the authorized_keys file in the .ssh directory on the host, as I described in email.) To concatenate the output of cat onto an existing file you need to use something else. If it's all on one machine:<br /><br /><code >cat input1 input2 &gt;&gt; output</code>adds the contents of the two input files in turn to the output file. Doing redirection like this over ssh or within a Python subprocess.Popen call is more tricky as redirections are handled by the shell (often bash or dash). What I think you want might be done in a shell script on the central data-collection machine using:<br /><br /><code >ssh pi@192.168.1.100 cat &quot;/home/pi/CurrentCost/oneline.csv&quot; &gt;&gt; /home/pi/RemoteData/oneline.csv</code>You could get a similar effect in a Python script fairly easily but it would be a few lines of code.<br /><br />If you were running a script on the sensor machine (the one with the CurrentCost connected) then something like:<br /><br /><code >cat &quot;/home/pi/CurrentCost/oneline.csv&quot; | ssh steamy@server.charity.org tee --append  /home/pi/RemoteData/oneline.csv</code>might append on the server appropriately - with a few tweaks to the file names.]]>
		</description>
	</item>
	<item>
		<title>RaspberryPi</title>
		<link>https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217880#Comment_217880</link>
		<guid isPermaLink="false">https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=217880#Comment_217880</guid>
		<pubDate>Thu, 22 Jan 2015 15:14:45 +0000</pubDate>
		<author>SteamyTea</author>
		<description>
			<![CDATA[I have managed to get something working on my home network.  Not very pretty but it is doing what it should, so can use that as the proof of concept.<br />If the tender is won, then I can try it out in the real world and worry about putting all the little things right, things like my router IP address changing.<br /><br />Working for the next few days so it will all come to a stop now till next week.  Quite chuffed that the concept is sound.<br /><br />Thanks for your help.]]>
		</description>
	</item>
	<item>
		<title>RaspberryPi</title>
		<link>https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=218371#Comment_218371</link>
		<guid isPermaLink="false">https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=218371#Comment_218371</guid>
		<pubDate>Mon, 02 Feb 2015 08:22:44 +0000</pubDate>
		<author>Chris P Bacon</author>
		<description>
			<![CDATA[<a href="http://www.theregister.co.uk/2015/02/02/raspberry_pi_model_2/" target="_self" rel="nofollow">http://www.theregister.co.uk/2015/02/02/raspberry_pi_model_2/</a>]]>
		</description>
	</item>
	<item>
		<title>RaspberryPi</title>
		<link>https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=218372#Comment_218372</link>
		<guid isPermaLink="false">https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=218372#Comment_218372</guid>
		<pubDate>Mon, 02 Feb 2015 08:40:51 +0000</pubDate>
		<author>SteamyTea</author>
		<description>
			<![CDATA[Rather they put an RTC in it, not going to make any difference to me having more cores.]]>
		</description>
	</item>
	<item>
		<title>RaspberryPi</title>
		<link>https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=218416#Comment_218416</link>
		<guid isPermaLink="false">https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=218416#Comment_218416</guid>
		<pubDate>Mon, 02 Feb 2015 21:40:52 +0000</pubDate>
		<author>cjard</author>
		<description>
			<![CDATA[<a href="https://www.modmypi.com/rasclock-raspberry-pi-real-time-clock-module" target="_self" rel="nofollow">https://www.modmypi.com/rasclock-raspberry-pi-real-time-clock-module</a> among others?]]>
		</description>
	</item>
	<item>
		<title>RaspberryPi</title>
		<link>https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=218422#Comment_218422</link>
		<guid isPermaLink="false">https://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=9179&amp;Focus=218422#Comment_218422</guid>
		<pubDate>Mon, 02 Feb 2015 22:52:38 +0000</pubDate>
		<author>SteamyTea</author>
		<description>
			<![CDATA[I have some, but they make using the GPIO pins tricky, including the 5V one.  Well the ones I have.  Then things don't fit in the cases too well.<br />I would rather and RTC was there than an ADC, though both would be best.]]>
		</description>
	</item>
	
		</channel>
	</rss>