Home  5  Books  5  GBEzine  5  News  5  HelpDesk  5  Register  5  GreenBuilding.co.uk
Not signed in (Sign In)

Categories



Green Building Bible, Fourth Edition
Green Building Bible, fourth edition (both books)
These two books are the perfect starting place to help you get to grips with one of the most vitally important aspects of our society - our homes and living environment.

PLEASE NOTE: A download link for Volume 1 will be sent to you by email and Volume 2 will be sent to you by post as a book.

Buy individually or both books together. Delivery is free!


powered by Surfing Waves




Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome to new Forum Visitors
Join the forum now and benefit from discussions with thousands of other green building fans and discounts on Green Building Press publications: Apply now.




    •  
      CommentAuthorSteamyTea
    • CommentTimeJun 8th 2012
     
    Going to look at it all later using TightVNC from my laptop :wink:

    If I ever work out how to install it that is.
    Then the fun can begin.
    •  
      CommentAuthorSteamyTea
    • CommentTimeJun 9th 2012
     
    Right, got TightVNC to work, seems you have to log in as root (yes I changed the password, must do the default Pi user one next).
    So from the comfort of my office chair I can now play.

    Next trick is to get it to recognise the serial to USB lead, think we covered this in the Linux thread a while back.
    • CommentAuthorEd Davies
    • CommentTimeJun 9th 2012
     
    Pi Box:

    http://www.adafruit.com/products/859

    Looks neat and quite cheap, considering.
    •  
      CommentAuthorSteamyTea
    • CommentTimeJun 10th 2012
     
    Right

    Plugged in my LabJack and then went though all this
    https://github.com/labjack/exodriver/blob/master/INSTALL.Linux

    Seems to have done the right things, but now how do I view what it can do.

    Any ideas?

    Where is Wookey :sad:
    • CommentAuthorEd Davies
    • CommentTimeJun 10th 2012
     
    If you've done the Python steps right at the end try “help(u3)”, “help(u3.U3)” or “help(d)”. That should tell you about the functions available to Python code which might be of interest if that's what you want to talk to the thing with.
    •  
      CommentAuthorSteamyTea
    • CommentTimeJun 10th 2012
     
    Do I have to make sure I am in the LabJack directory?
    • CommentAuthorEd Davies
    • CommentTimeJun 10th 2012
     
    Don't think so. I'd assume the ”sudo python setup.py install” step should set up the library for use anywhere. You have to do the “import u3” at the beginning of each Python run or program (sorry if that's teaching egg sucking — can't remember if you're a Pythonist).
    •  
      CommentAuthorSteamyTea
    • CommentTimeJun 10th 2012
     
    I know nothing about Python, even less about programming and even less about the Linux environment, but do quite like the apt-get idea.

    Is there a list somewhere of all the available downloads to be installed? For everything. Seems you have to 'know' what is available before you can get it, and that rather defeats the point, cause if you know, you know, if that makes sense.
    •  
      CommentAuthorJSHarris
    • CommentTimeJun 10th 2012 edited
     
    <blockquote><cite>Posted By: SteamyTea</cite>Is there a list somewhere of all the available downloads to be installed? For everything. Seems you have to 'know' what is available before you can get it, and that rather defeats the point, cause if you know, you know, if that makes sense.</blockquote>

    I'd be very interested in this too, as it's one of the single most frustrating things with Linux-based systems, IMHO, and is one of the reasons I've not got very far with them.
    • CommentAuthorSeret
    • CommentTimeJun 10th 2012 edited
     
    Assuming you're still using Squeeze you can check the repos online:

    http://www.debian.org/distrib/packages

    Be aware that they're pretty enormous. Tens of thousands of packages.

    If you're accessing it through VNC then you're using a graphical environment yes? I've not used straight Debian in a while, but there should be a GUI package manager tool in there (probably Synaptic?). If not, go ahead and install it, it's good. Package name is just synaptic. It's not too bulky, so the Pi should run it ok.

    Otherwise if you're SSH'd in then you can use APT on the command line:

    apt-cache search foo

    will find every package with the word foo in the description.

    apt-cache show foo

    Gives you the description.

    You could also try aptitude because it has a more complete interface on the command line. Just type aptitude to launch it, I believe it's in the default install, if not you can just apt-get it.
    •  
      CommentAuthorSteamyTea
    • CommentTimeJun 10th 2012
     
    The version that RPi use has a GUI in it (though VNC seems to have stopped working since I installed the Python script)

    So when they talk of 'binaries' they really mean programs, and 'compiling' is really installing or setting up?
    •  
      CommentAuthorDamonHD
    • CommentTimeJun 10th 2012
     
    Binaries would usually be ready-to-run things, and 'compiling' would only be involved if you pull down the 'source' version of something, eg where the binary is not available.

    Rgds

    Damon
    •  
      CommentAuthorSteamyTea
    • CommentTimeJun 10th 2012
     
    Right, so best stick to binaries then.

    So once things are installed/setup/working, how do you run them from the Terminal, My Labjack has a built in temperature sensor, so I should be able to read that, Does it write to a file somewhere (either in the LabJack or the Python directory).
    Failing that what are the steps to get it to do something?

    Rebooted it and it seems to be nice again via VNC.
    •  
      CommentAuthorDamonHD
    • CommentTimeJun 10th 2012
     
    Some things don't come as binaries, in which case you will need to get source and build tools and then issue some fairly simple magic words to generate and install binaries from the source.

    Rgds

    Damon
    • CommentAuthorSeret
    • CommentTimeJun 10th 2012 edited
     
    Posted By: SteamyTeaRight, so best stick to binaries then.


    Hell yes. I haven't compiled anything in years.


    So once things are installed/setup/working, how do you run them from the Terminal, My Labjack has a built in temperature sensor, so I should be able to read that, Does it write to a file somewhere (either in the LabJack or the Python directory).
    Failing that what are the steps to get it to do something?


    Normally to launch something on the command line you just launch it using the package name, or failing that you can type:

    man packagename

    For the manual. Some man pages are better than others though.

    However, your Labjack gizmo looks like a bit of a nightmare. Looks like all you've got is a roll-your-own lib and some scripts. Eugh.
    •  
      CommentAuthorSteamyTea
    • CommentTimeJun 10th 2012
     
    These 'build tools', are they what they are referring to when they talk of 'porting' to the RPi?
    • CommentAuthorSeret
    • CommentTimeJun 10th 2012
     
    Posted By: SteamyTeaThese 'build tools', are they what they are referring to when they talk of 'porting' to the RPi?


    I assume they're talking about a package called build-essential. It has all the gubbins you need for compiling things.
    •  
      CommentAuthorSteamyTea
    • CommentTimeJun 11th 2012 edited
     
    Posted By: SeretYou could also try aptitude

    Works, shows lots of information quite nicely. Though not sure why almost everything is 'held in current state', is it to stop idiots like me breaking it.
    • CommentAuthorSeret
    • CommentTimeJun 11th 2012
     
    Don't know, could be some optimisation for the Pi hardware. You can pin packages so that they don't get updated, but it's not the default configuration. Maybe ask on a Pi forum?

    Pretty hard to break stuff through APT btw, even if you accidentally remove something you shouldn't you can just reinstall it. The default setup for uninstalling leaves all the config intact.
    •  
      CommentAuthorSteamyTea
    • CommentTimeNov 28th 2012 edited
     
    Well at long last I have my RPi working with my current cost meter, tonight is the first night I am going to test it out with two channels.
    Tomorrow I shall try and make it look a bit prettier and see how the data fits in with the other one I have running on my PV.

    So what have I learnt.
    Linux is not user friendly
    Programming is not my thing at all
    Putty is not the best way of transferring files WinSCP is
    The RPi does not have an internal clock
    The CC device does have a clock but it stops when you power it down
    I can now clone a Linux disk though Windows
    Text files are the best for collecting data
    All the RPi software needed is 16.5 MB
    I can run headless apparently

    What have I got left to do

    Clean up the old development files
    Cut out all the unnecessary utilities from the OS
    Find out how to get remote access across the internet.
    Post the finished image file somewhere for others to use.
    And make a nice case for it
    Write up how to use it

    Sleep
    :cool:
    • CommentAuthorecohome
    • CommentTimeDec 15th 2012 edited
     
    •  
      CommentAuthorSteamyTea
    • CommentTimeDec 15th 2012
     
    Or get it to log temperature and electrical data every 6 seconds.
    Like this, fun eh

    Sensor,Time,Temp,Channel0,Channel1,Channel2
    0,20:35:17,18.7,00000,00000,00063,
    0,20:36:24,18.7,00000,00000,00065,
    0,20:36:48,18.7,00000,00000,00065,
    0,20:37:13,18.7,00000,00000,00064,
    0,20:40:28,18.7,00000,00000,00063,
    0,20:40:52,18.7,00000,00000,00066,
    0,20:40:58,18.7,00000,00000,00066,
    0,20:41:40,18.7,00000,00001,00065,
    0,20:41:46,18.7,00000,00001,00062,
    0,20:42:11,18.7,00000,00000,00064,
    0,20:43:30,18.7,00000,00000,00067,
    0,20:43:54,18.7,00000,00000,00065,
    0,20:44:00,18.7,00000,00000,00066,
    0,20:44:49,18.7,00000,00000,00066,
    0,20:44:55,18.7,00000,00000,00067,
    0,20:45:01,18.7,00000,00000,00066,
    0,20:45:20,18.7,00000,00000,00065,
    0,20:45:26,18.7,00000,00000,00065,
    0,20:45:32,18.7,00000,00000,00066,
    0,20:45:38,18.7,00000,00000,00066,
    0,20:46:20,18.7,00000,00000,00066,
    0,20:46:57,18.7,00000,00000,00066,
    0,20:47:33,18.7,00000,00000,00066,
    0,20:47:45,18.7,00000,00000,00066,
    0,20:47:51,18.7,00000,00000,00067,
    0,20:49:16,18.6,00000,00000,00066,
    0,20:49:28,18.7,00000,00000,00066,
    0,20:49:41,18.7,00000,00000,00065,
    0,20:50:11,18.6,00000,00000,00066,
    0,20:50:41,18.7,00000,00000,00065,
    0,20:51:18,18.7,00000,00000,00065,
    0,20:52:24,18.6,00000,00000,00065,
    0,20:53:50,18.6,00000,00000,00067,
    0,20:54:14,18.6,00000,00000,00068,
    0,20:55:02,18.6,00000,00000,00068,
    0,20:55:15,18.6,00000,00000,00065,
    0,20:56:46,18.6,00000,00000,00065,
    0,20:56:58,18.6,00000,00000,00066,
    0,20:57:17,18.6,00000,00000,00065,
    0,20:57:29,18.6,00000,00000,00066,
    0,20:58:48,18.6,00000,00000,00068,
    0,20:59:06,18.6,00000,00000,00066,
    0,20:59:42,18.6,00000,00000,00071,
    0,21:00:37,18.5,00000,00000,00067,
    0,21:01:01,18.5,00000,00000,00068,
    0,21:02:57,18.5,00000,00000,00397,
    0,21:03:15,18.5,00000,00000,00398,
    0,21:03:52,18.5,00144,00144,02501,
    0,21:04:05,18.5,00144,00144,02454,
    0,21:04:30,18.4,00144,00144,02478,
    0,21:05:51,18.4,00000,00000,00528,
    0,21:06:34,18.4,00000,00000,00531,
    0,21:06:58,18.4,00000,00000,00236,
    0,21:07:53,18.4,00000,00000,00226,
    0,21:08:05,18.4,00000,00000,00225,
    0,21:08:35,18.4,00000,00000,00225,
    0,21:08:48,18.4,00000,00000,00242,
    0,21:09:00,18.4,00000,00000,00225,
    0,21:09:06,18.5,00000,00000,00225,
    0,21:11:56,18.5,00000,00000,00291,
    0,21:12:39,18.4,00000,00000,00284,
    0,21:15:17,18.6,00000,00000,00270,
    0,21:15:59,18.6,00000,00000,00272,
    0,21:16:54,18.7,00000,00000,00295,
    0,21:17:00,18.7,00000,00000,00259,
    0,21:17:30,18.7,00000,00000,00255,
    0,21:17:43,18.7,00000,00000,00257,
    0,21:17:49,18.7,00000,00000,00253,
    • CommentAuthorborpin
    • CommentTimeDec 16th 2012 edited
     
    Posted By: SteamyTeaThe RPi does not have an internal clock
    If it is connected to the internet use NTP to correct the internal time or get the time as you get the reading. Certainly accurate enough for you.
    •  
      CommentAuthorSteamyTea
    • CommentTimeDec 16th 2012
     
    Yes, I have managed to get it to connect using a wireless adapter. Trouble is where they are going for my project there will not be a connection nearby, be plenty of cow poo and calves.
    Need to make a sturdy box next.

    But if anyone knows how to get a macro in Libreoffice's Calc to run every 5 minutes I would be grateful. Seemed easy in VBA using:
    dTime = Now + TimeValue("00:05:00")
    Application.OnTime dTime, "Copy_Paste"

    It is just to paste special some data.
    • CommentAuthorborpin
    • CommentTimeDec 16th 2012
     
    Posted By: SteamyTeaNeed to make a sturdy box next.
    You can buy cases now - can't remember from where though....
    •  
      CommentAuthorSteamyTea
    • CommentTimeDec 16th 2012
     
    Yes, these have to be agricultural though, so weather and stamp proof.
    I shall make them out of some MDF I think as that is pretty durable. I still have the water proof MDF samples I was sent.
    It also has to take the PSUs and the other sensors. So going to be quite large.
    • CommentAuthorEd Davies
    • CommentTimeDec 17th 2012
     
    Posted By: SteamyTea: “The RPi does not have an internal clock”

    Here's what looks like a convenient and cheap I²C clock which might be of interest:

    http://jeelabs.net/projects/hardware/wiki/RTC_Plug
    •  
      CommentAuthorSteamyTea
    • CommentTimeDec 17th 2012
     
    Thanks Ed
    May well get some of them if I can get them to talk to the RPi easily.

    Not the clock that is giving me trouble at the moment, though if there is a power loss and reboot it may. At the moment it uses the clock on the CC device, though that only gives hours, minutes and seconds. So a small, handwritten, note is my backup.

    What is giving me trouble is getting a macro in Calc to run every 5 minutes. I have it working in Excel just fine, but cant seem to get it to work in Calc at all. I hate any sort of scripting and programming, all Greek to me.
    •  
      CommentAuthordjh
    • CommentTimeDec 17th 2012
     
    SteamyTea said: "What is giving me trouble is getting a macro in Calc to run every 5 minutes. I have it working in Excel just fine, but cant seem to get it to work in Calc at all. I hate any sort of scripting and programming, all Greek to me."

    Don't know much about spreadsheets and even less about ss macros. A quick scan shows there is something in the libreOffice interface that allows you to call out to run a shell script:

    http://api.libreoffice.org/docs/common/ref/com/sun/star/system/SystemShellExecute.html
    http://api.libreoffice.org/docs/common/ref/com/sun/star/system/XSystemShellExecute.html

    So you might be able to shell out to a script that just does "sleep 300".

    There are also job control facilities that might do something useful:

    http://api.libreoffice.org/docs/common/ref/com/sun/star/task/module-ix.html

    There's a specific place to ask questions about LO that might be worth a try:

    http://ask.libreoffice.org/en/questions/ask/

    Or you could ask on Stack Overflow.
    •  
      CommentAuthorSteamyTea
    • CommentTimeDec 17th 2012
     
    Thanks

    Shall have a look at it tonight.
   
The Ecobuilding Buzz
Site Map    |   Home    |   View Cart    |   Pressroom   |   Business   |   Links   
Logout    

© Green Building Press