There is no high voltage involved at all. I only look at lights, a magnetic sensor to see if the garage door is open and an ultrasonic sensor to see how thick the roll of my rolling shutters is - thick roll means they are up (though translating the thickness of the roll to a % open/closed was too ambitious).
The arduino is connected to an analog multiplex chip as in below diagram:
This is the wiring for sensorbar 3 which is wired to patch panel port 5 and 6 on the last picture higher up. (corresponds to 1st and 2nd half of nikobus module 3). (the label on the enable pin top right is wrong that one goes to 5V, not to 5-5)
A0-A3 are the address lines connected to 4 digital outputs on the arduino. Pin 28 OUT top left goes to an analog input on the arduino. So by stepping through all the addresses I can read 13 sensors pin by pin on the 506A chip to a single analog input. That one then senses if the LED on the module is on or off and informs Home Assistant through MQTT.
Switching a light on/off relies on the nikobus IR receiver - as my sketch messed up the timing of the arduino IR library I decided to link the MEGA to a NANO. The NANO scans the serial port and if it gets a command in over serial it emits that through infrared. (I connected common GND for the 2 boards and serial TX from the MEGA to serial RX on the NANO).
I don’t swich/sense high voltages and it’s a non-invasive solution: I look at LED lights and I send IR so no hacking of my installation was required.
Now that you can send MQTT reliably I think your remaining challenge is most likely on the arduino side - there is a quite busy arduino forum too.