Unipi PLC in home automation

Anyone using PLC from UniPi.technology ?
I plan to buy UniPi Neuron / Patron for switching lights and other electric parts.

I don’t plan to run Home Assistant in Unipi PLC, but I plan to control Unipi PLC from Home Assistant. What you suggest to use? EVOK API? How to ingegrate into HA?
Thanks

Hello,

I am using one since a few months (Neuron) and am very happy with it.
I use it with their image containing NodeRED and have a minimal setup that just converts the inputs/outputs to sensible MQTT topics. There is no automation on there.

Regarding the integration with HA, I only have MQTT entities in HA. NodeRed (an other instance than the one running on the Unipi controlelr) for automations. I basically only use HA as a fancy UI + a logger to InfluxDB.

You can setup the controller such that some input always toggle/follow/etc. the output with same number, as long as the controller has power + default power on state. So even if I completely hose the OS on it, the lights still works, I still have hot water and heating but no automation.

I am using many DI (digital input) and RO (relay output), one AI (analog input) and the 1-Wire bus.

I use the 1-Wire temp+humidiy wall sensors + the 8-port hub they sell as well. The wall temperature sensors won’t win any beauty contest but are relatively discreet non the less.

If I had to do it again, I’m not entirely sure I would go the Neuron route. At first, I was planning on PXE booting the Raspberry Pi but never got that working reliably (once it booted it was flawless, but it sometimes refused to netboot for no apparent reason.) I have a (bad) workaround for my other RPis (simple cycle the POE until they boot) but that does not work with the Unipi.
So I’ve resorted to using SD cards again recently. For this reason, maybe consider buying a Patron (or be ready to regularly replace the SD card as they wear out and/or disable writes.)

An other thing to pay attention to, is that the Unipi is relatively dense (in terms of connectors per DIN unit), so it’s quite difficult to have good cable management.

If you have any other questions, don’t hesitate to shoot ! :slight_smile:

2 Likes

Hello @Spottyq, thank you for you answer! (:
Exactly the same reason I have also for not using Neuron but Patron because of reliability and life of SD cards. Maybe it can be solved with booting from SSD disk via USB.

[Q1] I’m planning to use also 1-wire temp+humidity sensors. How long wires do you have? Length 5 meters should be OK (without any “noise”)? Reading data will be reliable with that length?

I would like to be able to control relay outputs that will control the external 24V relays that will switch ~230V (lights, plugs). So I want to be ensure to know a reliable way how to control relay outputs from external HA server. Also wall switches will be connected to Unipi’s digital inputs so I need to send state changes of digital inputs to external HA.

I have a wiring scheme prepared which counts with non-working PLC - so in case if PLC fails I will be able to control lights with wall switches. I can add here wiring scheme tomorow.

[Q2] Do you read states of digital inputs and change states of relay outputs via MQTT from HA?

Thanks

You’re welcome !

Q1 :
I don’t remember of the top of my head, but it must around 20-30m total ? I have 3 sensors in a 80sqm apartment. It is ran on Cat6 cable though (I was also afraid about bus issues). It has never missed a beat.

Q1.5 :
The relays are isolated in groups of 2, and they support up to 5A, at up to 50VDC or 240VAC if memory serves.
Most of them directly switch lights (220VAC). Some switch 24VDC to an external DIN rail relay for loads higher than 5A. I have a few 24VDC LED strips, these are also directly switched by the Unipi.

Q2 :
The direct switch feature is always working. :wink: So you have nothing to do for the lights in NodeRED/HA, they will switch if someone presses the switch. For the rest (door and motion sensors, or switches that don’t have a direct switch output), I have NodeRED listening to MQTT messages, deciding what needs to be done an eventually sending an MQTT message back to the PLC.

1 Like

Thanks! Now the things are more clear for me.

I’m not sure if it helps :thinking: but I plan to use the external relays in order to achieve longer service life for internal relays. Because replacing external relay(s) (in case of failure) is better than replacing not so cheap whole Unipi unit.

BTW here is much better community than in unipi forum.

I am going the same route as Lukáš. Using external relays for longer lifetime of the Unipi unit. Around the house will be momentary switches connected via UTP to Unipi digital inputs. Relay outputs should then trigger the external relays.

Unipi is running Node-red where I want to keep all automations. Home assistant will serve as GUI and connection to Homekit etc.

I have some more questions:

Q 3:
I’m trying to find out the way how to do dimming lights. Any ideas?

Q4:
Kind of noob question…how do I set static IP to the unit? Please mind that I have flashed the unit with Node red image

Thanks

Great article, but it would be nice if you added an example with navigation.

Hi !
Welcome to the club ! :stuck_out_tongue:

For Q3 : I haven’t found a good solution for that. I have all the main lights controlled by relays on the Unipi and use smart bulbs in secondary/accent fixtures to have the dimming. That way the main lighting will always work, and I still have some possibility to be creative with dimming/color temp/color.
For example, during nighttime the sensors will only turn on the accent fixtures on lower brightness, not the (non-dimmable) primary lights.
I have a friend who uses a Loxone PLC that outputs 0-10V to a DIN dimmer that takes that as an input. This get expensive real fast (as AO are more expensive than RO + you need an external dimmer.)
Also, on Unipi you then can’t use DirectSwitching, which is a requirement to me from a reliability point of view.

Q4: The Node-Red image is pretty much a vanilla Debian (or Ubuntu? I don’t remember) OS. Connect to it via SSH and follow any guide on how to setup a static IP with a Raspberry Pi.

Thanks for the static IP advise- I will have to dig into it deeper (not a big fan of terminal).

Would your friend mind sharing which DIN dimmer is he using? I will have only 3 dimming lights so I would to keep it with all mains power.