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.