This has gone up before and you need to look carefully the requirements of standards for your country .
Some parts are classified as hazardous areas ( based on grain dust being explosive ) , not suitable for DIY electrics.
If you are tying into a control panel only connecting to 120v connections , then that will be in a safe area . I would just use relays and use the contacts as your inputs there .
Beware about being able to remotely stop or start a process .
Regard the safety aspects told by @hammy.
What currents will be used for the 120 volt side? To avoid possible sparks from relays maybe SSR, Solid State Relays is one way to go.
Other safety aspects could be: If the controller hangs up, will fans, heaters etc create a dangerous situation running uncontrolled? If so, additional safety devices totally independent of the micro controller will be needed.
No really a task for hobby equipment.
Since the OP only needs to know if the light is off or on, would a photo diode or photo transistor give the necessary off/on so a digital pin could be used?
The power side of the light? Assume the lights are also AC operated, use small current transformers to monitor the current. Light off, no current, etc.
Would a portenta be best suited for this task? I have a lot more experience with ladder logic and PLCs. I just started reading about Arduino portenta last night.
At this point my main goal is to the average measure the moisture of the incoming grain and the moisture of the outgoing grain. So that I can more actually predict where to set the thermostat(by hand for now) that tells the dryer when to turn off the burner.
I'm going to first test the accuracy of the cheap moisture sensors. Then if that doesn't work (and I don't expect it will) I'll move to a moister sensor that will. Any suggestions?
The %m of the grain can vary a lot from field to field. Ideally the dryer can be set and walk away if the moister of the grain is doesn't vary much but here in the mountains of PA the fields are smaller and planting dates are drawn out.
I'd like to the %m in and out of each batch to be recorded in an Excel spreadsheet. I'm not sure how to go about that either. I do have the beings of a sketch
Is that a batch dryer or a continuous? A common way that grain moisture is measured is by using a humidity and temperature sensor. Basically you measure the humidity of the air around the grain and from that their is a calculation to find the moisture content of the grain. I am using SHT35 humidity sensors and DS28EA00 onewire temperature sensors to build temp/humidity cables for inside of my grain bins that I read with an arduino nano or esp8266. I have the humidity sensor protected by a sintered SS filter but I have also seen ones that just use a PTFE membrane. I think that it would be pretty much the same idea here. I bet you could also get the arduino to fully control the dryer with a couple relays. There were some guys doing this over on agtalk and thecombineforum as well, would be a good idea to check them out.
It's a batch dryer. I did not know about it using a humidity sensor. I'm going to have to look into that. That's really helpful!. Yeah long term I'm hoping to run the dryer with it. Short term I want to take the pain out of testing every batch by hand.
You could also try and read the moisture by measuring the capacitance of a sample like the Motocomp 919 testers do. I believe that the esp32 has a capacitive touch feature and you may be able to use that. The real trick would be figuring out a way to get a consistent sample size and compaction. Then their is a polynomial equation that takes will give you a % moisture content. If you could get that to work it would be way more accurate than any other system.