Mode Lighting eDIN+ Integration

I’m just starting out with Home Assistant but have one major system I would really like to control. It’s a centralised lighting system which is fully networked and the system has it’s own iOS app for control of the lighting and other connected systems.

I’ve searched the forums and have found nothing about any integration with Home Assistant. The system has an open API and I have full details of the IP control system. Does anyone have any custom integration for this lighting system? How easy would it be to write a custom integration for this?

Thanks for any pointers.

Anyone any pointers on this?

Ok just to see if anyone can help I’ve posted below some details from the manufacturers Gateway Quick Reference guide for this lighting control system. It’s one of the major control systems I need to enable through HA and I could really do with some help to hopefully get this working. The commands look fairly straightforward but I would also like feedback so the system reports a light (channel) on or off etc. This is supported in the Gateway documentation.

I hope someone is willing to help and guide me in the right direction.

Blockquote
Quick Reference Guide
Raw Ip Connection
• Raw TCP/IP via default port 26
• RS232 default settings 9600,8,1,none with no handshaking
Reply to a new connection opening:
!GATRDY;
!VERSION,;
Http Connection
• http://<npu_ip_address>/gateway? via default web port 80
• ajax POST, Content-Type:text/plain, data is valid cmd/query text
• for users add to ajax headers encrypted Authorization:Basic <user_authorisation_string>
General Syntax and Operation
$[,,,…]; for commands
?[,,,…]; for queries
![,,,…]; for replies and events

Commands and queries:
• are case insensitive,
• numeric parameters can be variable length with or without leading zeros,
• all extra characters between commands (such as and ) are tolerated and ignored.

Replies and events sent:
• are in upper case,
• have fixed length numeric parameters having leading zeros as necessary,
• have variable length text parameters but always as the last parameter,
• have and appended after each message.

Message acknowledgement:
• Message not recognised – !BAD;
• Message recognised but replies with an error – !OK; but no further response
• Message recognised and correct – full reply message !OK;!;

Administration Level Messages
• Debugging commands/requests
$DBGECHO,; $DBGACK,;
?DBGECHO; ?DBGACK;
• Commands
$OK;
$EVENTS,; $EVTOUT,;
$EVTERR,; $EVTDIS,;
$EVTCIN,; $EVTAIN,;
$EVTSCN,; $EVTADV,;
• User Log in & out
$USER,,;
$USER;
• Requests
?VERSION; ?USER;
?EVENTS; ?EVTOUT;
?EVTERR; ?EVTDIS;
?EVTCIN; ?EVTAIN;
?EVTSCN; ?EVTADV;
• Replies & Events
!GATRDY;
!VERSION,; !USER,;
!EVTOUT,; !EVTDIS,;
!EVTERR,; !EVTSCN,;
!EVTCIN,; !EVTAIN,;
!EVTADV,;
!DBGACK,; !DBGECHO,;

Channel Level Messages
• Commands
$CHANFADE,,,,,<fadetime(ms)>;
$CHANSTATE,,,,;
$CHANSTOP,,,;

$DALIFADE,,,,,<fadetime(ms)>;
$DALISTOP,,,;

$DMXLEVEL,,,,,<fadetime(ms)>;
$DMXLEVELSTOP,,,;
$DMXMODE,,,,,<crossfadetime(ms)>;
$DMXCOLR,,,,,,,;

$BTNCOLR,,,,;
$BTNTEXT,,,,;
$BTNSTATE,,,,;

$INPPIR,,,,;

$SHOWCHAN,,,;
$SHOWDALI,,,;
$SHOWDALI,,,;
$SHOWOFF,,

• Queries
?CHAN,,,;
?CHANACCESS,,,;

?DALI,,,;
?DALIACCESS,,,;

?DMX,,,;
?DMXACCESS,,,;

?BTN,,,;
?BTNCOLR,,,;
?BTNTEXT,,,;
?BTNACCESS,,,;

?INP,,,;
?INPACCESS,,,;

• Replies & Events
!CHANFADE,,,,,<fadetime(ms)>;
!CHANSTATE,,,,;
!CHANSTOP,,,;

!CHAN,,,,,,,;
!CHANACCESS,,,,;

!DALIFADE,,,,,<fadetime(ms)>;
!DALISTOP,,,;

!DALI,,,,,,,;
!DALIACCESS,,,,;

!DMXLEVEL,,,,,<fadetime(ms)>;
!DMXLEVELSTOP,,,;
!DMXMODE,,,,,<crossfadetime(ms)>;
!DMXCOLR,,,,,,,;

!DMX,,,,,,,,
;
!DMXACCESS,,,,;

!BTNCOLR,,,,;
!BTNTEXT,,,,;
!BTNSTATE,,,,;

!BTN,,,,,;
!BTNACCESS,,,,;

!INPLEVEL,,,,;
!INPSTATE,,,,;
!INPPIR,,,,;

!INP,,,,,
!INPACCESS,,,,;

!MODUERR,,,
!CHANERR,,,,;
!DALIERR,,,,;
!DALIERR,,,,;
!DMXERR,,,,;
!BTNERR,,,,;
!INPERR,,,,;

• DALI Repair & Emergency Lighting support
$DALISCAN,,;
$DALIREPAIR,,,,
;
$DALIACCEPT,,,;
$DALIDONE;

$SHOWDALI,,,;
$SHOWDALI,,,;

?DALISCAN,,;
?DALIFIX,,;

!DALISCAN,,,,;
!DALIFIX,,,,,,
,;
!DALIEND,,;

?DALIERR,,,;

$EMFUNC,,,;
$EMDURA,,,;
$EMSTOP,,,;
$EMREST,,,;
$EMINHIBIT,,,,;
$EMSHOW,,,;

?EMTEST,,,;
!EMTEST,,,,,,
;

System Level Messages
• Commands
$SCNRECALLX,,,<fadetime(ms)>;
$SCNOFF,; $SCNBACKON,;
$SCNRECALL,; $SCNFAST,;
$SCNRAISE,; $SCNLOWER,;
$SCNRAMP,; $SCNSTOP,;
$SCNNUDGEUP,; $SCNNUDGEDN,;
$SCNTOGGLE,; $SCNONOFF,;
$SCNSAVE,;

$SCNSET,;
$SCNFADE,,<fadetime(ms)>;
$SCNCHAN,,,,,;
$SCNDALI,,,,,;
$SCNDMXLEVEL,,,,,;
$SCNEND,;
$SCNABORT;

$DMXPALETTE,,,,,,,;

• Queries
?SYSTEMID; ?ERRORS;

?AREANAMES;
?SCNNAMES; ?SCNNAMES,;
?PLATENAMES; ?PLATENAMES,;
?CHANNAMES,;
?BTNSTYLE,,,;
?SCN,;
?SCNS; ?SCNS,;
?SCNCHANS,;
?SCNSET,;

• Replies & Events
!SYSTEMID,,,;

!AREANAME,,,,;
!SCNNAME,,,,;
!PLATENAME,,,,,,;
!CHANNAME,,,,,,;
!DALINAME,,,,,,;
!DMXNAME,,,,,,;
!BTNSTYLE,,,,,,;

!SCN,,,,;

!SCNSET,;
!SCNFADE,,<fadetime(ms)>;
!SCNCHAN,,,,,;
!SCNDALI,,,,,;
!SCNDMXLEVEL,,,,,;
!SCNEND,;
!SCNABORT;

!SCNRECALLX,,,<fadetime(ms)>;
!SCNOFF,;
!SCNRECALL,; !SCNFAST,;
!SCNRAISE,; !SCNLOWER,;
!SCNRAMP,; !SCNSTOP,;
!SCNNUDGEUP,; !SCNNUDGEDN,;
!SCNTOGGLE,; !SCNONOFF,;
!SCNSAVE,; !SCNBACKON,;

!CHAN,,,,,,,;
!DALI,,,,,,,;
!DMX,,,,,,,,
;

!MODUERR,,,
!CHANERR,,,,;
!DALIERR,,,,;
!DALIERR,,,,;
!DMXERR,,,,;
!BTNERR,,,,;
!INPERR,,,,;

!DMXPALETTE,,,,,,,;

Enumerations
• Device Codes
devCode Product Code Products
01 EVO-LCD-55 LCD Wall Plate
02 EVO-SGP-xx 2, 5 and 10 button Wall Plates,
Coolbrium & Icon plates
04 EVO-RP-03-02 Evo 2-channel Relay Module
08 EVS-xxx All Evo Slave Packs
09 EVO-INT_CI_xx Evo 4 & 8 channel Contact Input modules
12 DIN-02-08 eDIN 2A 8 channel dimmer module
14 DIN-03-04 eDIN 3A 4 channel dimmer module
15 DIN-INT-00-08 eDIN 8 channel IO module
16 DIN-RP-05-04 eDIN 5A 4 channel relay module
17 DIN-UBC-01-05 eDIN Universal Ballast Control module
18 DIN-COUT-00-08 eDIN 8 channel Configurable Output module
24 ECO_MULTISENSOR eDIN Mk 1 Multisensor
144 DIN-RP-05-04 eDIN 5A 4 channel mains sync relay module
145 DIN-UBC-01-05 eDIN Universal Ballast Control 2 module

• Contact Input and Button State
value state
0 Release-off
1 Press-on
2 Hold-on
5 Short-press
6 Hold-off

• PIR Input State
value state
0 Empty
1 Triggered
2 Timeout
3 Set
4 Hold
5 Clear

• Plate Styles
value Products
1 2, 5 and 10 button SGP Wall Plates
2 Coolbrium plates
3 Icon plates

• eDIN Button Palette Colours

value Name
0 Black
1 White
2 Red
3 Green
4 Blue
5 Orange
6 Cyan
7 Magenta
8 Yellow
9 DimWhite
10 DimRed
11 DimGreen
12 DimBlue
13 DimOrange
14 DimCyan
15 DimMagenta
16 DimYellow

value Name
128 User1
129 User2
130 User3
131 User4
132 User5
133 User6
134 User7
135 User8
136 User9
137 User10
138 User11
139 User12
140 User13
141 User14
142 User15
143 User16

• eDIN DMX Palette and Modes

value	Mode
1-15	Static Colour
Palette code
Static wash using palette colour
64-68	Solid Colour Sequence
64	Long Rainbow Solid
65	Short Rainbow Solid
66	Hot Colours Solid
67	Cold Colours Solid
68	User Colours Solid
96-100	Ripple Colour Sequence
96	Long Rainbow Ripple
97	Short Rainbow Ripple
98	Hot Colours Ripple
99	Cold Colours Ripple
100	User Colours Ripple

Palette code Default Name
1 Red
2 Orange
3 Yellow
4 LawnGreen
5 Green
6 Mint
7 Cyan
8 DeepSkyBlue
9 Blue
10 Purple
11 Magenta
12 DeepPink
13 User1
14 User2
15 User3

• eDIN Module Palette and Modes

value	Mode
1-15	Static Colour
Palette code
Static wash using palette colour

Palette code Default Name
1 Red
2 Yellow
3 Green
4 Cyan
5 Blue
6 Magenta
7 UserColour
8 Candlelight
9 SoftWhite
10 WarmWhite
11 White
12 CoolWhite
13 BrightWhite
14 Daylight
15 UserTemperature

• Status Codes
value Error Description
0 Status Ok No Errors
2 Device missing Device or Module is not responding to MBus messages.
4 Bad Device Firmware System is configured to use features that are not present in current module firmware.
5 No AC Module uses mains AC and it does not detect any main AC power
6 Too Hot The module has detected that its internal temperature is above its maximum rated operating temperature.
10 Channel Load Failure The module has detected there is a problem with the external load a channel is driving
20 No DALI PSU The module has detected that there is no PSU on its DALI bus.
21 No DALI
Commissioning Data The DALI universe on this module does not contain any commissioning data.
22 DALI Commissioning problem The module has detected that the actual DALI fixtures detected do not match with the commissioning data
25 DALI Lamp failure A DALI fixture on this channel is indicating a lamp failure condition
26 DALI missing ballast A DALI fixture that is in the commissioning data is not present (is not responding).

• DALI Fixture Status Codes
value Error Description
0 Ok No Error with fixture
1 Lamp Failure Fixture is reporting Lamp Failure
2 Missing Fixture is not responding to messages on DALI bus.
5 New Fixture is present but does not match commissioned (expected) fixture list
9 Unassigned Fixture does not exist or does not have a valid DALI short address.

I suspect this might be too late to be helpful, but I’ve managed to cobble together a pretty barebones integration with feedback for standard dimmable lighting using the 8Ch dimmer and NPU (as this is the hardware I currently have available to test on). In theory most of what I’ve written should generalise, but it doesn’t handle exceptions at all at present. If you have any coding skills, I’d gratefully accept any help/pull requests in making this more robust! GitHub - sftgunner/edinplus-integration: Edin+ Home Assistant Integration

I have a similar EDIN+ system and built an integration a fews years back based on Node-RED to serialise and buffer requests to the NPU. I only just ran across this integration and I wondered whether this might be a more tightly coupled configuration than my Node-RED abstraction.

I’m a JS/TS developer and might be able to contribute to the integration if that is productive. I tried to do a test deploy but could not get it to work. I suspect that my NPU firmware (SW00121.2.3.6.9) is too old as the /info?what=names endpoint does not exist.

The Mode website does not have any later firmware published, where did you get SW00120.2.4.1.44 from?

You need to contact Mode Lighting to get access to the firmware via a Dropbox shared folder. They update the firmware quite often.

Couple of questions.I’ve got a big HA setup, but the only thing not automated in my house is my lighting, because it is a mode setup.

I’ve contacted the company, and as the install is from 2009 it needs quite a lot of upgrades to then allow this integration to work.

Alternatively I could replace it with something less bespoke and more future proof.

  1. Anyone have any idea how I would replace it with something else? The wiring seems so bespoke I’m not even sure it it possible.
  2. Apart from replacement parts, if I did upgrade then mode went bust for some reason, there wouldn’t be a problem would there?

Hi @chrism_s,

I hope I can answer some of your queries and provide some experience.

My eDIN system also dates back to around 2012 so required a lot of updating to get it to eDIN+. The update is not exactly straightforward but can be done provided you have the required hardware - RS232 to USB adaptor, Windows OS and lots of patience! I have quite a large eDIN system with multiple dimmers, I/O Modules, Relay Modules, keypads and two NPUs. It took quite a while to upgrade everything but I’ve experienced no problems since the update and old configurations can be imported into the new eDIN+ system.

In terms of replacement you have, I assume, a centralised system where all lighting and control cabling comes back to a single point in the property? If so there are many systems which could replace eDIN but is it worth the expense and disruption? The eDIN system hardware is, from my experience, very robust and works extremely well. I would say the weak point is the software but with eDIN+ now incorporating a gateway protocol then connection to control systems like HA makes that side of things manageable. The main issue with replacement may be the keypads as this uses 4 core screened cable, although CAT5e/CAT6 data cable can be used but is not recommended. This cable connects all the keypads back to the power supply and NPU via a two wire BUS. It’s not uncommon for this type of wiring to be used but a lot of keypads these days utilise mains wiring or CAT5e/CAT6. The rest of the system uses standard data cabling between eDIN modules and the normal mains AC wiring from each “zone”. So replacement perfectly possible but I wouldn’t recommend it.

With regard to Mode going out of business I wouldn’t worry about that side of things. The hardware is very reliable and this would be the only issue if a replacement was needed for a failed module. However eDIN is NOT cloud based and needs no connection to the outside world - perfect for HA. The current firmware allows full integration (well almost!) with HA so you then have control over your lighting and power circuits without needing to use keypads or the eDIN app. I foresee no problem going forward once your system is updated with Mode ceasing trading - I don’t know the financial state of the company but it has been around a long time and is more involved with the commercial sector than domestic which I would say is a good thing in terms of survival.

I hope the above helps but if you have any other questions then please ask and I’ll do my best to help. @sftgunner has been invaluable with getting eDIN+ working with HA and all credit must go to him for his hard work and dedication to getting things as good as they are.