I'm new to Raspberry Pis. I'm not new to programming, but I know very little about electronics. For a first project I would love to make an outlet switch thing that is connect to an rpi that's connect to a thermometer, with the goal of regulating the temperature in a room with a cheap space heater. Where I'm stuck is the outlet switch (or whatever it's proper name is). The DIY smart outlet tutorials I'm finding are all using these wireless remote controlled outlets, which would require more work to set up then what I'm envisioning. I'm wondering if there's a simple device I could use to just stop/let through electricity at a wall outlet level, that I could easily control (via direct connection) with an rpi, Thanks!
One can find many more wirelessly controlled sockets in the market, nevertheless, there are also some based on control via Ethernet. Here is one example.
Typically they are more pricy than Wifi-controlled sockets. Depending on the modell they offer different interfaces for control (Windows application, web interface, ...). The one linked above for example host a webserver, which would allow you to control it with a Raspberry Pi or any other device inside your LAN.
What you're looking for is commonly called a solid-state relay (SSR.)
SSRs combine solid-state switching of AC power (via a triac) with optical isolation (between the control signal side, vs. the load side), so they're pretty safe if (and only if) you get one rated well above the voltage and current you plan to control. I'd suggest keeping to models with screw terminals for a beginner. For example, see http://powerswitchtail.com, though their products probably can't handle the current you'd need for a heater.
Suggest you learn wire up an LED+resistor to one of your RasPi's GPIO pins before attempting to control house current. And if you don't have a DMM, get yourself at least a basic/cheap one.
- Heaters typically draw lots of current. (Mine draws 12.5 Amps on high setting.)
- Many SSRs can't handle large, inductive loads.
- Unattended operation of a heater is a potential safety issue.
There are relay modules which can be controlled by the Pi, BUT building your own, requires expertise and a knowledge of electricity wiring techniques and safety rules.
I strongly advise against this approach, although you will find many examples.
The cheapest, easiest and safest approach is to use one of the wireless remote controlled outlets. Again, there are examples of this, but probably more for Arduino than Pi.
An Arduino would be more suitable for such a project.