vectraboyv6
Posts: 43
Joined: Fri Aug 17, 2012 11:28 am

Re: 240 v mains controller

Fri Nov 15, 2013 2:02 pm

bump :)

User avatar
emgi
Posts: 357
Joined: Thu Nov 07, 2013 4:08 pm
Location: NL

Re: 240 v mains controller

Fri Nov 15, 2013 11:39 pm

Hugh Jarse wrote:I have made some updates since I first posted the remote mains socket controller info.

The link now contains an update to the source code to work with the latest versions of the bcm2835 library, an example of using cron for automatic timed switching of sockets on/off, and update the circuit diagram, and a few corrections.

http://www.mhr.me.uk/projects/socketcontrol.html
Hi Hugh,

Your work fascinated me so much that I decided to write an alternative web interface for it.
The one I saw was pretty basic and I hope you haven't yet started work on improvements. :roll:
What I made today has a few features that make your system even more usable.
Additions:
1: Before accessing the switchboard you need to log in.
2: It is possible to use an alternate name for the sockets which can be updated via the website.
Image

User data and socket names are stored in an embedded sqlite database.
The webserver I used is lighttpd which works out of the box with perl cgi.
Actual status of the ports is reflected in four variables; Socket01 - 04.
It is also really lightweight. The .tar file with all files from /var/www/ is just 61k.
http://cable-79-207.zeelandnet.nl/RCMS-Pi.tar

This is the very first version, not yet fully tested. Everything can be customized further if necessary.


/emgi
Last edited by emgi on Fri Nov 15, 2013 11:59 pm, edited 1 time in total.

Hugh Jarse
Posts: 46
Joined: Mon Mar 05, 2012 5:03 pm

Re: 240 v mains controller

Fri Nov 15, 2013 11:46 pm

Hi stuart

to prevent the inversion you should set the line
#define k_Invert 1
to
#define k_Invert 0

and recompile.

Always best to confirm it is doing what you expect with a scope.


The compilation instructions are in the header and are basically
gcc -o sckctrl sckctrl.c -l bcm2835

Obviously this assumes that you have installed the bcm2835 library

regards
Hugh

Hugh Jarse
Posts: 46
Joined: Mon Mar 05, 2012 5:03 pm

Re: 240 v mains controller

Fri Nov 15, 2013 11:54 pm

emgi wrote: Hi Hugh,

Your work fascinated me so much that I decided to write an alternative web interface for it.
The one I saw was pretty basic and I hope you haven't yet started work on improvements. :roll:
What I made today has a few features that make your system even more usable.
Additions:
1: Before accessing the switchboard you need to log in.
2: It is possible to use an alternate name for the sockets which can be updated via the website.
Image

User data and socket names are stored in an embedded sqlite database.
The webserver I used is lighttpd which works out of the box with perl cgi.
Actual status of the ports is reflected in four variables; Socket01 - 04.
This is the very first version, not yet fully tested. Everything can be customized further if necessary.

/emgi
Hi emgi

You are right that my user interface was very basic, I guess it was a proof of concept, but I am pleased to see that you are making some nice improvements. The idea of some form of security is an important one - this is also possible I using the web server itself to authenticate the user. Nice idea to add some presentation strings in a database so that if you redeploy the sockets to another room or another use, you dont have to hack the web page itself.

regards
Hugh

Return to “Automation, sensing and robotics”