Asked — Edited

Automated Ez-Room

hey ARC s! I was looking to automate my room using the ez-board. I planned on being able to turn things on and off, weather reports, checking rss feeds, etc. I have a desktop computer in my room that i never use but would be perfect to run the software 24/7. To control outlet power/power strip for each individual plug Im assuming i would need some type of relay in line with the plug? The programming would be the easy part. However Im not sure what i would need so that the digital port on the board can interact with the plugs. Does anyone have a safe and reliable way of going about controlling outlet plugs so i don't electrocute myself or burn my house down?

I feel like I remember someone doing this a long time ago with their workshop. But i was unable to find the thread again. Any help or suggestions would be great! I just saw the new iron man/stark industries piece that disneyland put in the innovations building and want to build my own Jarvis-like system using a dedicated ez-board and desktop:D


ARC Pro

Upgrade to ARC Pro

Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success.

United Arab Emr
#2  

Well it depends how far you want to go . Relay cards are widely available on eBay to be used with arduino and many other boards that can simply be connected to ezb to do the job. Safe and easy to plug in. Just use 5v input signal to control

Example: Two channel relays

More options:

Other options is to have easybulb led bulbs that can be controlled wirelessly thru ARC on your laptop or your mobile that activate any lamp or light intensity depending on room normal light or demand. Air conditioner or fans can be controlled using thermometer sensors connected to your computer and EZB.

You can use IR transmitter with EZB o control your TV and home surrounding systems. Automated door lock for your room.

Simply look for arduino sensors and should do the job with EZB.

Just ideas that , where you can find sensors easily on eBay. with your programming skills you can reach your target easily.

PRO
Synthiam
#3  

Someone did a home automation robot also. It had a panel on the wall and a robot. The panel controlled the robot And lights. Oh and told weather and stuff too. I think he was going for the house from the TV show Eureka! Which is pretty cool! I'm on my phone and can't search for the thread right now though. Ill try later

#5  

To save you time if you really want an automated home check out HAL (Home Automated Living) at www.automatedliving.com it will do all you want and more.

New Zealand
#6  

The workshop one was possibly me.... but I have gone backwards with my project and pulled everything out as we are in the process of shifting house....

I did hack a couple of multi boards and put a 6-way relay unit into them. See:

https://synthiam.com/Community/Questions/1835&page=1

I made sure to keep things safe by using the first two relays as a power breaker where one had to be on and the other off in order for the unit to receive power. This way if the data line was dropped or the system went mad and all lines went high then the power would not go to the board.

I have continued to script in and around home automation. I'ill post something in the next few days as school holidays approach here in New Zealand.

@Tameion

#7  

you can do something like this PHK05 this is what i did. Just wired remote to ezb and now i can have robot turn on/off any light or what ever i have pluged in. It is nice because i can turn on lights on second floor and did not have to run wires

United Kingdom
#8  

One day I'll post full details on my system (JARVIS) however it is very complex. The basics are it uses RF outlets and modules (very cheap), an RF tranceiver, and EventGhost to do the leg work. A web server running a very basic PHP code to broadcast over the network which can be used with the HTTPGet function to operate anything connected to the system.

But since it's not exactly EZ-B driven I've not posted much info on it. Once Melvin is talking to it properly, and it talking to Melvin I may expand on it all.

An old demo of the voice guided system, it's been improved since.

All of that can be done via HTTPGet()

Lighting control first test (again, it's been greatly improved since then)

It's all still work in progress. Jarvis has no physical presence which will change once Melvin is finished. It also does so much more than I've recorded (mainly based around media playback but lights, outlets, energy usage, temperature etc. are all running through him) but lack of time has stopped me from doing any more demos... heck I still have no proper interface for it!..

To add, something I have recently discovered (well I knew it was there but didn't look at it) is the command line controls through telnet. Those are easy to interface.

More will come on that all once Melvin is finished and Jarvis becomes a physical entity rather than just a voice.

I plan to use some EZ-Bs on it too for some fancy lighting effects, curtain motors and a few other things.

#9  

Wow thank you guys so much for the help! I am learning a lot about what is required to do this the right way. I only want to do this once if you know what i mean. haha I obviously have a lot of research to do

Tameion: yes the original project i remember seeing was yours! thank you for the link

New Zealand
#10  

Rich... you are a man in demand.... Can you answer a couple of questions?

Q1: What were the, " RF outlets and modules (very cheap), an RF tranceiver," you mentioned? Do you have a web address?

You have already introduced me to EventGhost and it is doing some of the leg work for me too...

But I am loving calling Exec directly from ARC... especially to open a web page or play a music file at a set time.

Q2: Can you give me an example of the "very basic PHP code to broadcast over the network" and the HTTPGet function to operate anything connected to the system." that you used....

It would save me a lot of time ...

United Kingdom
#11  

I use HomeEasy outlets, they are just the bog standard, cheap, RF socket outlets. From what I have found out many unbranded ones are the same.

It uses a USB RF Transceiver from RFXCom. The RFXtrx433

Also, it picks up OWL energy meters and a bunch more so it can log electric usage.

Temperature, humidity, external temp etc. all work differently through some custom python scripts, web pages, but requires linux so another PC. It's specific to my controls so will be useless here so wont post the full details yet.

The php code (never looked at tidying it up)


// Send event to EventGhost
// Usage - SendEvent.php?event=MyEvent&REFERER=next.html

<?
function sendMsg($args)
{
    $fp = fsockopen($args["host"],$args["port"], $errno, $errstr, 10);
    
    if (!$fp)
    { //Something didn't work....
        echo "ERROR: $errno - $errstr\n";
        return FALSE;

    } else {

        fputs($fp, "quintessence\n\r");
        
        $cookie = fgets($fp, 400);      
        
        $cookie = trim($cookie);
        
        $token = $cookie . ":" . $args["password"];
        
        $digest = md5($token);
        
        $digest = $digest . "\n";
                
        fputs($fp, $digest );
        
        $res = fgets($fp, 400);
        
        if ( trim($res) != "accept" )
        {
             fclose($fp);
             return FALSE;
        }
        
        if (isset($args['payload']))
        {
            if (is_array($args['payload']))
            {
                foreach($args['payload'] as $key => $value)
                    fputs($fp, "payload " . $value . "\n");
            }else
            {
                if ( $args["payload"] <> "" )
                    fputs($fp, "payload ".$args["payload"]."\n");      
            }      
        }
        fputs($fp, $args["eventstring"]."\n");
        
        fputs($fp, "close\n");
        
        fclose($fp);
            
        return TRUE;
    }
}


if (isset($_GET))
{   
    if(isset($_GET['host']))
        $args['host'] = urldecode($_GET['host']);
    else
        $args['host'] = '192.168.0.100';
    $args['port'] = 8083;
    $args['password'] = '';
    $args['eventstring'] =  urldecode($_GET['event']);
    foreach($_GET as $key => $value)
        if(strcasecmp(substr($key, 0, 3), 'pld') == 0)
            $args['payload'][] = urldecode($value);
    sendMsg($args);
    if(!isset($_GET['REFERER']))
        $_GET['REFERER'] = "control.html";
    header("Location: http://".$_SERVER['HTTP_HOST']
           . dirname($_SERVER['PHP_SELF'])
           ."/".$_GET["REFERER"]);
}
?>

REFERER is the page that should be displayed after the link Hopefully the forum formatting hasn't done much damage to the above.

Then just httpget("SendEvent.php?event=MyEvent&REFERER=next.html") and event is broadcast to EG.

Voice controls are done through VoxCommando however ARC could take it's place easily (mine is just all set up now so I haven't moved it over)

#13  

do you guys think that this relay could get the job done for each outlet?

relay

New Zealand
#14  

They look as good as any... Just makesure they are optically isolated and you follow best practice if working with mains voltages...

Ie. Check, recheck and then check again. And find a sparkie to check it one last time for you.

Anything I am doing at the moment has two relays turning on the device power... see pic.

User-inserted image

This way I have to turn one off and the other on even before the device receives power.... A bit old school but I feel safer... as well as that if the EZRobot pins high or all pins low for some reason my project will not power up by mistake.

I tend not to mod the actual mains device and only mod tthe multi board it plugs into... maintaining device integrity.

Most importantly... keep safe!

United Kingdom
#15  

Good advice. And by not modifying the mains equipment you don't invalidate the warranty either:)

#16  

hey rich (side note) Im really interested in Jarvis. have you created a showcase project? im really interested.

Back to the automated room topic.

United Kingdom
#17  

Jarvis doesn't run any EZ products (yet) so cannot do a showcase on here for him. Once he and Melvin are talking properly I will give details on that and any EZ-Enhancements I add (such as a cool idea for lighting control and automatic curtain openers).

#18  

oh... really? did you just create the program?

also, what windows voice are you using for JARVIS

United Kingdom
#19  

It's a combination of a few different programs, all combined. Everything is logged to a MySQL DB and can be pulled on request, I have a basic web page set up with the info on...

User-inserted image

The page continues down covering energy cost for daily, days of week, week total, month, previous month, year etc. and controls and status for lights, windows, doors, media players... it's only the alpha code, I need to get on and build a better looking UI for it all.

Any of this information is also available to Melvin through some clever HTTPGet scripting and PHP code. With it Melvin will know what temperature it is, if the doors or windows are open, if I'm home... he can know more than I do.

It also stores and lists all of my media (TV shows, Movies, Music) and synchronizes all media players libraries, updating watched status and even remembering where it was paused or stopped so it can be resumed in a different room. Automatically downloads TV shows if my PVR misses them for any reason (and more which I wont divulge)

User-inserted image

User-inserted image

Just added a few security cameras to it too, which I plan to use so Melvin will be directed to where ever an alert is triggered, using his camera will give me a better view.

He even posts on facebook and twitter by himself, scrobbles watched TV and movies to trakt and music to last.fm...

Can make images on the fly, if this works these should be dynamically updated when refreshed...

User-inserted image

I could go on but I'm hijacking a topic with something not yet EZ-B related (it will be though) I'll let you know the url for the website I'll be making detailing it all once I find time to make it.

And the voice is cereproc's William. Melvin will probably be given a cereproc voice too since they are pretty realistic and accurate but aren't free.

Anyway, back on to the topic before I get into trouble... although hopefully this has given people some ideas for their own Jarvis:)

PRO
United Kingdom
#20  

Hey Rich, very nice work there! I will send you a link to a private video of our Ai on Youtube, is a few years old and was taken late 2008, but I think it may be of interest as we "fronted" our Ai with a virtual human.