Device for attaching electronic auxiliary components to a support structure for solar panels, comprising: - at least one coupling element configured for attaching the device to a support structure for at least one solar panel, in particular to a support rail of a support structure for at least one solar panel, and - at least one housing defining at least one receiving space and provided with at least one access opening for accommodating at least part of an electronic auxiliary component, wherein the housing comprises at least one lower wall and at least one top wall, wherein the at least one lower wall and the at least one top wall are oriented substantially parallel, wherein the access opening is provided with at least one securing element which is displaceable and/or deformable, while arranging at least part of the auxiliary component in the receiving space, with respect to the housing and pivotably connected to a further part of the device to secure the electronic auxiliary component in the housing, wherein the securing element at least partially blocks the access opening of the housing in an unloaded condition, wherein the securing element is on a side facing the electronic auxiliary component provided with a guiding surface for guiding the electronic auxiliary component into the receiving space, wherein the securing element is displaceable and/or deformable between a securing position, in which the securing element at least partially blocks the access opening of the housing, such that at least part of the electronic auxiliary component is secured in the housing, and a non-securing position, in which the securing element leaves the access opening of the housing substantially clear, such that at least part of an electronic auxiliary component can be arranged in the housing and such that a part of an electronic auxiliary component arranged in the housing can be removed from the housing, wherein the housing and the associated access opening define an insertion direction for at least part of the electronic auxiliary component, and wherein the upper side of the securing element acting as a guiding surface has an inclined orientation, such that a plane enclosed by the inclined upper side of the securing element encloses an angle with the insertion direction, and wherein a higher part of the upper side of the securing element faces the receiving space, while a lower part of the upper side of the securing element faces away from the receiving space. - at least one coupling element configured for attaching the device to a support structure for at least one solar panel, in particular to a support rail of a support structure for at least one solar panel, and - at least one housing defining at least one receiving space and provided with at least one access opening for accommodating at least part of an electronic auxiliary component, wherein the housing comprises at least one lower wall and at least one top wall, wherein the at least one lower wall and the at least one top wall are oriented substantially parallel, wherein the access opening is provided with at least one securing element which is displaceable and/or deformable, while arranging at least part of the auxiliary component in the receiving space, with respect to the housing and pivotably connected to a further part of the device to secure the electronic auxiliary component in the housing, wherein the securing element at least partially blocks the access opening of the housing in an unloaded condition, wherein the securing element is on a side facing the electronic auxiliary component provided with a guiding surface for guiding the electronic auxiliary component into the receiving space, wherein the securing element is displaceable and/or deformable between a securing position, in which the securing element at least partially blocks the access opening of the housing, such that at least part of the electronic auxiliary component is secured in the housing, and a non-securing position, in which the securing element leaves the access opening of the housing substantially clear, such that at least part of an electronic auxiliary component can be arranged in the housing and such that a part of an electronic auxiliary component arranged in the housing can be removed from the housing, wherein the housing and the associated access opening define an insertion direction for at least part of the electronic auxiliary component, and wherein the upper side of the securing element acting as a guiding surface has an inclined orientation, such that a plane enclosed by the inclined upper side of the securing element encloses an angle with the insertion direction, and wherein a higher part of the upper side of the securing element faces the receiving space, while a lower part of the upper side of the securing element faces away from the receiving space.