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
    • CommentTimeJan 18th 2014
     
    Get is set up with the normal distribution of Wheezy and get it networked to your PC and try out PuTTY and TightVNC for starters as you will be networking to it a lot.
    • CommentAuthorgaree
    • CommentTimeJan 20th 2014
     
    Ed - thanks for responding to my battery suggestion. Maybe I'll stick to writing software :-)

    Mikeee - If you're recording your Dylos data to a PC, I've finally managed to come up with a GNUplot config file that will produce a graph from a Dylos csv file. See http://www.greenbuildingforum.co.uk/forum114/comments.php?DiscussionID=9926&page=1#Item_20

    G.
    • CommentAuthorMackers
    • CommentTimeJan 22nd 2014
     
    Ok, got it set up after some messing with my wireless keyboard that caused me difficulty. Going to get it set up with PuTTY over the weekend.

    Whats the difference in PuTTY and TightVNC?
    • CommentAuthorSprocket
    • CommentTimeJan 22nd 2014 edited
     
    PuTTY is primarily for Telnet (a plain text terminal protocol) over SSL (encryption through a network socket). So it is a text terminal thing. It works great for a remote command-line environment and does not usually need any extra setting up on the Pi side at all.

    PuTTY also can support doing the same thing for an X-client. ie. it can transport the raw command stream a graphics terminal. You still need to add an X-terminal client though. In practice this is not usually as convenient or useful as it sounds and a lot more bother to set up.

    VNC is like Remote Desktop. Your device typically runs it's normal desktop, appearing on a monitor, and VNC allows you to remotely view and operate that desktop. Applications that you run don't see any difference from the normal desktop manager environment.
    TightVNC is very easy to install and very easy to use. And it works very well. Definitely recommended.
    •  
      CommentAuthorSteamyTea
    • CommentTimeJan 22nd 2014
     
    TightVNC is a rascal to get to autostart at boot, I use Upstart for autostarting now (apt-get install upstart).
    Then some mucking about.

    WinSCP is useful to transfer files, you can write some code on your PC and then just drag the file onto the Linux box. It is just like the old Windows 3.1 File Mangler.
    • CommentAuthorMackers
    • CommentTimeJan 22nd 2014
     
    Can't wait to get started, all this seems way beyond me but I'm sure ill be ok once I get started
    • CommentAuthorcbatjesmond
    • CommentTimeJan 23rd 2014 edited
     
    Posted By: SteamyTeaWinSCP is useful to transfer files, you can write some code on your PC and then just drag the file onto the Linux box. It is just like the old Windows 3.1 File Mangler.

    After using Unix+X11 graphics since the '80s, I'm now forced to use MS/Windows at work: I've (unofficially) installed MobaXterm*1 (from http://mobaxterm.mobatek.net/) on my work PC. The interface is a bit retro but it provides the functionality of PuTTY + WinSCP + X11 server + Cygwin*2 +VNC + RDP in one package, and can run from a USB drive when the "If it's not MicroSoft, it's not allowed" fasci^Wfriendly system administrators from the next row come around.

    *1 It's free for personal use, but does remind you regularly that you can pay them if you want to.
    *2 Unix command-line utilities for MS/Windows
    •  
      CommentAuthorSteamyTea
    • CommentTimeJan 23rd 2014
     
    I like portable apps, shall have a look at that one.

    I like Windows as well, just wish it could read Linux partitions, would make editing the SD card so easy.
    • CommentAuthorSprocket
    • CommentTimeJan 23rd 2014
     
    > I've (unofficially) installed MobaXterm

    Oh!
    Wow!
    That looks nice.

    I can't believe I had not come across that before.
    Thanks very much.
    •  
      CommentAuthorSteamyTea
    • CommentTimeJan 23rd 2014 edited
     
    It does look useful, shall have a play with it later.

    Has loads of plugins, anyone know if this one will allow me to connect to my RPi from my local cafe?

    Connect-Proxy: Simple relaying command to make network connection via SOCKS and https proxy
    • CommentAuthordereke
    • CommentTimeJan 24th 2014
     
    Another useful tool if you are stuck on windows is ConEmu (https://code.google.com/p/conemu-maximus5/)
    It gives you tabbed terminals, bash, cmd etc.
    • CommentAuthorSeret
    • CommentTimeFeb 5th 2014
     
    Steamy, re your efforts to run an RPi off batteries, have you seen this?

    http://www.theregister.co.uk/2014/02/05/mopi_smart_battery_power_for_raspberry_pi/
    •  
      CommentAuthorSteamyTea
    • CommentTimeFeb 5th 2014
     
    I hadn't, but for my application it is not large enough unfortunately.
    I just need a very large battery pack, size of a suitcase and about 1000 quid.:sad:
    • CommentAuthorborpin
    • CommentTimeFeb 5th 2014
     
    Posted By: SteamyTeaI hadn't, but for my application it is not large enough unfortunately.
    Remind me again what you are trying to gather? Just temps? What was the distance to mains power?
    •  
      CommentAuthorSteamyTea
    • CommentTimeFeb 5th 2014
     
    Posted By: borpinRemind me again what you are trying to gather? Just temps? What was the distance to mains power?
    I have a wireless signal from the CT clamps, then the receiver is at the nearest 13A socket. Trouble is, it is on farms, and then tend not to have many 13A sockets within about 10m of the transmitter.
    •  
      CommentAuthorSteamyTea
    • CommentTimeFeb 14th 2014
     
    Right, been playing with the RPi today and have been trying to find out how to upload files to 'the cloud'.
    I was going to use my 4share account as it supports ftp. Trouble is I am struggling to find out how to set the RPi up to do this.
    I keep going round in circles with wget, git, weex, cron. All seems very complicated.
    Help anyone.
    • CommentAuthorEd Davies
    • CommentTimeFeb 14th 2014 edited
     

    curl(1) Curl Manual curl(1)

    NAME
    curl - transfer a URL

    SYNOPSIS
    curl [options] [URL...]

    DESCRIPTION
    curl is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP,
    FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET
    and TFTP). The command is designed to work without user interaction.

    curl offers a busload of useful tricks like proxy support, user authentication, FTP upload, HTTP post, SSL
    connections, cookies, file transfer resume and more. As you will see below, the number of features will make
    your head spin!

    curl is powered by libcurl for all transfer-related features. See libcurl(3) for details.
    E.g., to send a file called “w.js” from my laptop (“bill” as in Bill Hewlett) to my tablet (“edwin” as in Edwin Hudl :wink: ) which is running an FTP server on the non-standard port 3721:
    edavies@bill:~/temp$ curl -T w.js ftp://edwin:3721/
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 6162 0 0 100 6162 0 42626 --:--:-- --:--:-- --:--:-- 67714
    edavies@bill:~/temp$
    Still, FTP is horribly old-fashioned and insecure (passwords sent un-encrypted and so on). If there's any chance to SSH then take it. rsync would be your friend then, though scp would be fine. There's also SFTP (FTP over SSH) but I've not had cause to use that and would have to research if/how curl supports it.
    • CommentAuthorEd Davies
    • CommentTimeFeb 14th 2014
     
    Just had a look at 4share.

    I think you can put files via https (WebDAV):

    curl -T somefile --tlsuser steamy --tlspassword secret https://webdav.4shared.com/

    or something like that.
    •  
      CommentAuthorSteamyTea
    • CommentTimeFeb 14th 2014
     
    Curl did make my head spin. I have tried wput, like wget but the other way around.
    Having trouble getting it to log into my 4share account, but that may be a different issue.

    With these file transfer programs is it always the files you want to move followed by your account details and then account location.
    And do I have to type in user, followed by a space before my username, some seem to want it and others not.
    • CommentAuthorSeret
    • CommentTimeFeb 14th 2014
     
    Curl is the way to go ST, give it a crack.
    • CommentAuthorEd Davies
    • CommentTimeFeb 14th 2014 edited
     
    Posted By: SteamyTeaWith these file transfer programs is it always the files you want to move followed by your account details and then account location.
    Generally it's options, in any order including the file to be sent, then the URL at the end.

    Posted By: SteamyTeaAnd do I have to type in user, followed by a space before my username, some seem to want it and others not.
    Unfortunately, that tends to depend on the program.
    Curl, for example, accepts:

    -Tw.js
    -T w.js
    --upload-file w.js

    but not, of course:

    --upload-filew.js

    Other programs with similar options might also accept:

    -T=w.js
    --upload-file=w.js

    but curl seems not to. This is, indeed, an area of annoying inconsistency.
    •  
      CommentAuthorSteamyTea
    • CommentTimeFeb 14th 2014
     
    Right, have installed curl but seem to be having trouble getting into my account. Shall play with it after I have fed the poor and needy.
    • CommentAuthorEd Davies
    • CommentTimeFeb 14th 2014 edited
     
    Just created a 4shared account and tried to upload using WebDAV as shown above. It failed because a client certificate is required, not that the message is exactly explicit about the problem:

    $ curl -T dsc00205-small.jpg --tlsuser secret@edavies.me.uk --tlspassword secret https://webdav.4shared.com/
    curl: (35) error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure

    I also tried following their instructions for accessing it from Linux

    https://www.4shared.com/features/access_to_4shared_with_webdav/howto.jsp#q2

    and that didn't seem to work, either - just hung. Could connect to the FTP server on my tablet that way, OK.

    Would try FTP to 4shared but that's a premium service - not paying for that.
    •  
      CommentAuthorSteamyTea
    • CommentTimeFeb 14th 2014
     
    It used to work with FTP a few years back (I uploaded my 'Grass Growing' video using it and filezilla. Might have changed since then.

    Anyone know of a free FTP web based storage?
    • CommentAuthorborpin
    • CommentTimeFeb 14th 2014
     
    • CommentAuthorEd Davies
    • CommentTimeFeb 14th 2014
     
    How about just emailing the data back to yourself?

    There are various Linux command line utilities to do that sort of thing but they all seem to want to take over the world rather than just send a single message.

    Probably simplest to do it in Python if you're running some of that anyway. Just sent myself a message via my web provider's SMTP server (which is secured using TLS) from the Python command prompt - only half a dozen or so lines. Will write it up properly tomorrow if you're interested.
    •  
      CommentAuthorSteamyTea
    • CommentTimeFeb 15th 2014
     
    I am interested in how to do it from Python as I have a script running anyway.
    • CommentAuthorEd Davies
    • CommentTimeFeb 15th 2014 edited
     
    Main reference:

    http://docs.python.org/2/library/email-examples.html

    Very useful to do:
    import smtplib
    help(smtplib)
    then scroll down to read about SMTP_SSL.

    Following sends me an email with numbers 0 to 9 on separate lines:#!/usr/bin/python3

    import smtplib
    from email.mime.text import MIMEText
    from datetime import datetime

    data = [i for i in range(10)]

    frm = 'cowshed@edavies.me.uk'
    to = 'ed@edavies.me.uk'

    msg = MIMEText('\n'.join(str(x) for x in data))
    msg['Subject'] = 'Methane production to %s' % datetime.utcnow().isoformat()
    msg['To'] = to
    msg['From'] = frm

    s = smtplib.SMTP_SSL('domain name of smtp server')
    s.login('user name on smtp server', 'password on smtp server')
    print(s.send_message(msg, from_addr=frm, to_addrs=to))
    s.quit()
    Numbers just show that what MIMEText wants is a single string with new line characters between the lines.

    You could just email yourself the data every time it grows to 50 kilobytes or so. I'd suggest doing it whenever there's more than the set amount of data and you haven't tried in the last few minutes. If the email seems to have worked then clear the data and start it building up again. If not, leave the data and try again in a few minutes.

    Wrap the whole send process in a try/catch block. Also check the response to send_message for errors. Needs some investigation what send_message returns if things haven't worked.
    • CommentAuthorEd Davies
    • CommentTimeFeb 15th 2014
     
    Changing the obvious lines to:

    to = ['ed@edavies.me.uk', 'steamytea@xxx.com']

    msg['To'] = ','.join(to)
    sends to multiple recipients, it seems. The send_message(to_addrs) parameter naturally takes a list. I hope Steamy got a copy at his actual mail server which is not entirely the same as 'xxx'.
    •  
      CommentAuthorSteamyTea
    • CommentTimeFeb 15th 2014
     
    Yes I have, wondered what it was.

    Seems I have screwed my image that I was using trying to set it up to run Google Drive. Email seems an easier method.

    So shall be trying it on a spare RPi.
    Thanks
   
The Ecobuilding Buzz
Site Map    |   Home    |   View Cart    |   Pressroom   |   Business   |   Links   
Logout    

© Green Building Press