@
craggin Ah two leaves on the same tree.. I too Was using a full room controller based on the Arduino mega and custom code for many many years. As the first PI became available and mycodos popped up I started experimenting with it running side by side and using mycodos to control some functions on the arduino via USB. About 4 years ago I found Node MCU's, node red, and Sonoff's which lead me to tasmota, which is an amazingly simple yet powerful firmware. You can customize it to do just about anything just through the web based configuration. No coding needed. Just flash, config, and go. Temp sensors, C02, Humidity, thermostat, dimmer/power control it's all possible. Even custom sensor configuration. You can interact with them via PUSH,HTTP,MQTT,GET, Json. Really flexible.
All of my led drivers use sonoffs. Even the 600 watters though I use the remote on/off leads to turn em off/on as I really don't trust such a small device relay to handle that kind of load. I use a sonoff that switches a 5V wall wart connected to a relay opens/closes the remote wires. I could have hacked the sonoff to make it low voltage but this method makes everything stock and easy to replace in event of failure.
As for using the PC817's for dimming. I have at least 3 modules that have been in sevice for over 3 years with no failure. I used to work at a company that had well over 1000 817's in service for over 10 years in a commercial environment with 5 being replaced in that timespan. the Sharp PC817 is a workhorse from hell!
My current node red implementation is on a PI 3B+ running in docker and has plenty of speed to run everything I need since all of the timers n such are offloaded to the tasmota modules. I also run mosquito MQTT and open VPN on the same PI for secure remote access to the network.
On the subject of SD card corruption. I'd replace ur card about every 24 months with a new one, or make the SD read only and offload the settings/saves to a usb stick. or maybe setting up a esp8266 to act as a watchdog and when it doesn't receive a "heartbeat" from the PI it kicks you a txt or something. That way within seconds of failure you're aware of it.
I myself have very little code experience, I knew BASIC when I started messing with arduino. I basically learned C on the fly by using open source code for the arduino from many people and "mashing" it into the will of my controller LOL.
Same for linux, I know enough to be dangerous. This U tuber helped me alot in setting up my current config the installer he references makes setup of docker, portainer(for container management), and current containers for various things pretty painless even for a linux novice such as myself.
Sorry if I hijacked the thread folks. Apologies.
I do plan on implementing the PC817 for cloudline fan control and will report back if it is sustainable by itself or I needed to add the 2n2222 transistor. I'm betting you probably won't be running more than 1 of these per i/o pin on 3.3V devices but on a esp8266 almost every pin can be configured as PWM output so not a real concern for me plus if I need a tasmota module to do other things like trigger other modules (say for PWM on 3 separate fans) you could achieve that with "rules" or compile tasmota yourself and enable the scripting module for adding custom stuff.