Found out that EMC was not an issue, but the LED power supply. I added a 10k resistor in parallel to the 0-10V input which fixed the 0V problem.
Only poor thing now is the bad behaviour of Mervis with the AO extension board. I added a ramp for smooth dimm up and down, but it's actually not smooth but rather stepwise:
Any idea how to fix? Maybe the problem comes from the transformation "to_uint(real)" ?
if you use Mervis on UniPi 1.1, then you have practically no other option other than to use ModbusTCP. On the RaspberryPi you can create a Python script utilizing the pymodbus library and program the logic in a way the DIs and ROs are mapped to the coils and AO/AI are mapped to registers.
thank you for your input. The problem were the internal pull-ups, set to low. Usually the python library, I'm using, does this job, but there seems to be a problem with the Raspberry Pi 4. Nevertheless I was able, to get everything up and running again, by setting needed GPIO pull-ups to high via /boot/config.txt. It's not the best solution, because it should be fixed software-wise. But it's the proof, that the problem is not related to hardware. Thank you so much for helping me, figure this out.
EVOK isn't physically tested with the UniPi 1.0 anymore, which is the reason why it is not mentioned. Additionally as Tomas Hora mentioned the AO will behave slightly differently. But it should still work fine in ~99% of cases.
You can use e.g the rc.local file, as with standard Linux. Another option would be systemctl, which is what we use ourselves, but it is more complex.
This question isn't really related to EVOK though, so I've moved this to the UniPi 1.1 section.
@TriathletC The IP changes because the ADSL router is a DHCP server that assigns the IP addresses randomly after each reboot to each DHCP client (eg. your PC and of course UniPi).
If you do not want this, configure UniPi with a static IP address in PLC parameters within the range of your network.
Vytvořil jsem novou globální proměnnou "Local Time" a v režimu ladění už mi správný čas ukazuje. Díky.
Ještě mne prosím zkuste nasměřovat, aby se jsem tu novou lokální proměnnou dostat do HMI, popřípadě kde ji mám v dostupných promměnch hledat
I don't want to give up the classical switches, which operates on 220V.
In this way the each light will be almost independent on UniPi, which could be installed in house later.
(Only each relay of UniPi will be replaced by hard-connected cables to simulate 3-way switch)
Why do you thing my design is not possible?