You could find these on prefacelift DS5s more often, but later DS branded models were somewhat stripped down with equipment so this function became quite rare to find.
For more than 2 years I've bean looking up and collecting any useful information on how to install this in a second-hand car that didn't came with AFIL from factory. And I managed to gather almost everything I needed.
Special thanks for that to Albin and AlexMux from Drive2.ru; Leloman Lelo from DSTeam Portugal on FB and another member of that group: Rodrigo "the magician" from Brasil!
Now; here's what I did:
1) Automatic headlamp dipping
First step was gathering the Hw so the camera was obviouslly a mast-have. Not easy to find one, though! Took me 6 months till I found one in great condition and for a reasonable price (150€).
The camera replaces factory light/rain sensor on the windshield and you can use two of its wires (12V and GND). Other two you need to add in black connector on BSI (pins 10 and 12) and run them up the ceiling where the camera now is. Those two are CanH and CanL wires that will bring various information to BSI; if your car is centred within the lane, proximity of beams from the cars coming towars you (or the rear lights in front of you) as well as the rain and sunshine presence/level at given time. Once all Hw mounted and connected, you proceed to Sw, that is Diabox (offline) telecoding.
In BSI (within Miscellaneous section) you mark CMV camera as present (CMF in that manu), while selecting previous light/rain sensor as absent at the same time. I discovered that telecoding was sucessful only with engine off (but key in reader slot and with ignition ON, of course). That presumes your starter battery is in good shape and won't go in Economy mode for at least 5-7 minutes till you're done with telecoding...
Under Lights-Signaling section you also select Automatic headlams activation option as Present and Presence of the main beam headlamp assistant function. And that's all the telecoding for HBA!
Now you need buttons next to the steering wheel to switch those two functions On and Off. But those too are somewhat hard to find...
So in absence of those I added two virtual buttons in Drive menu of the NAC/RCC touchscreen (can't do it with older RT6 head unit - you need physical buttons for that system). But for adding missing functions and features without Diagbox and without access to Stellantis servers you need Arduino tool. That's bacically Arduino PCB and a CAN Bus Shield. All well explained in VLud's tutorial (in French) who exploited this method and made his sw free for personal use.
Depending on how savvy you are in IT, the virtual buttons will be telecoded to the touchscreen with more or less effort, but they wouln't stay ON unless you do a trick (thanks Rodrigo)! It takes adding one wire on pin 16 of the white connector to electronic dials on the dash (yeah, you need to remove the panel out). And with that wire you once touch any ground point you can find (there's a metal bar behind the clocks). That triggers the virtual button of Auto lights to ON position. If you turn it off on the touchscreen, it takes touching the GND point once more to set it to ON again. Touching the GND another time toggles it Off and so on.
Now with all the Hw and Sw done, and with Automatic headlamp dipping set to ON you're ready for the night drive to test it out! The lights on the indicator stalk must be in Auto position (so your low beam engages automatically) and then you pull the stalk towards you to engage the high beam. At that point high beam will stay on if there's no car comming towards you and you're not under the street lights, but in the dark on the open road. At the same time one new notiffication light comes up on the dashboard, letting you know that from that moment CMV camera and BSI handle switching between H and L beams and you can just enjoy the drive...
This is exactlly where I am now. Happy to have made this and grateful to anyone who contributed...
Once I obtain the physical AFIL buttons, I will add description on how to connect them to BSI so everything is as from the factory.
The same goes for the Lane Departure Warning. As soon as I get a hold on vibro-motors that go under the driver's seat and their Ecu, I'll proceed with second part of the AFIL retrofit and share here how it was done...