First off- I'm also rather new, so this answer might not be the best.
I don't know much on the software side of things, but I think I can point you in the right direction with hardware.
- detecting the water temp- You'll want a temperature sensor for this, although the exact one I'm unsure of. You'll want it to be waterproof(I think) so you can submerge it in the water, and depending on the model you might also need a transistor.
- controlling the heating element- For this, you'll definitely need a relay and separate power source(probably outlet powered, but depending on whether or not you make your own you might need an inverter) the relay would need to be big enough to handle the 500w power that will flow through it, and I don't know much about their limits.
OR- you could use some sort of moving piece(not very practical and you probably shouldn't do this since it's a fire hazard and could hurt someone) to push a piece of metal to connect the wires if you can't find a relay to do this for you. This would require complicated coding stuff, so I'd suggest finding an alternative.
A little bit more- doing the OR option would require a motor or linear actuator or servo. motors would require a motor controller, which I would not recommend since it requires more coding. I have no experience with a linear actuator, so you can look into that. A servo is probably the best option of all of those, and requires minimal additional programming, but would be hard to set up right. just stick with the relay.
A brief bit on controlling it-
Depending on how far away you want to be when controlling it, a bluetooth controller might work, which would probably be a bit simpler than wifi enabled. Again, I'm new to coding, but I have used a wii remote to activate my pi from across my house from downstairs. If you want to control it while out and about(might come home to a burning house) You'll definitely need the wifi enabled and some other complicated stuff I can't help with much.
Response to your comment-
yes, the pi4 has built in wifi and bluetooth, which allows you to connect to the internet. some more experienced people can control the pi from a website(idk how to do that). if you plan on controlling more physical objects(motors, servos, leds) I'd recommend an Arduino because they are made specifically for stuff like that. That still doesn't solve the coding problem tho.
for connecting most anything to the pi(inputs, like buttons or temp sensors, and outputs, like relays) You'll want to use the GPIO pins on the pi. there should be 40 on the side with the ethernet connector(DO NOT connect anything to the 4 pins that are separate from the larger group labeled PoE). the GPIO pins can be used to send electricity(3.3v at 16ma) to trigger stuff, or also as an input. Check out this site for GPIO pin labels and general information. be careful, as connecting the wrong pins to each other can break your pi.
I've never used a temp sensor on GPIO, so you'll have to find a tutorial for that. as for relay, I can help a bit. For the circuit on the pi part, it will be GPIO->transistor->relay coil side->ground GPIO. the other side will go power->relay switch side->heating element->ground. Do not use a pi ground pin for the heating element. The relay will almost definitely need more than 16 ma, so you'll need a transistor to help with that(not sure which exact one).
Depending on how permanent you want the setup, it can be anywhere from jumper wires on a breadboard to a custom case with soldered wires. I'd recommend testing on a breadboard to make sure it works.
For coding, I only know python, and I think, but am not entirely sure, that it should work well for this application. here's a basic template of what the code should look like-
#setup GPIO pins
#You'll need to do this at least twice, check a tutorial for how to do this.
ON = 0
TEMP = 0
#define any functions(I don't think you'll need this part)
#begin While True loop
#the temp sensor tutorial should have a piece of code that goes here to update the TEMP variable, so put that here
if ON == 1:
turn relay off
if ON == 0:
turn relay on
# this turns sets the relay to on or off when desired.
if trigger and ON == 0:
#this code allows for turning the heating element off manually, but only once and stop the code completely.
if TEMP < 100:
ON = 0
if TEMP >= 100:
#might need to add an extra = right after the one already there if you get a syntax error.
ON = 1
#this portion turns the coil on and off from the temp sensor.
This code wont work as is, there are parts that need to be added and changed based on your trigger and the temp sensor
The pi4 is a great little computer, the one I have myself, and works well if you can get it working right. I'd also recommend using a sort of VNC viewer so you can leave the pi plugged in and reactivate the code from your computer without having to go to the pi and use a monitor next to your boiling water.
also just a thought- if this is the only thing you ever plan on doing with coding, maybe look into scratch and GPIO pins. I haven't done anything with it, but it should be a bit easier to understand.
Might also want to go to electrical engineering stack exchange for more help with the parts list.