netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
16k stars 2.56k forks source link

Add coaxial/barrel (DC) power connectors IEC 60130-10:1971 (Ports, Outlets) #10546

Closed ypid closed 1 year ago

ypid commented 2 years ago

NetBox version

v3.3.4

Feature type

Data model extension

Proposed functionality

Add support for coaxial/barrel (DC) power connectors that are widely used by IT equipment. 60130-10:1971 seems to most comprehensive standard of barrel connectors. I don’t have access to the document (costs 40 $). But from the linked wikipedia article I translated a definition ready for https://github.com/netbox-community/netbox/blob/develop/netbox/dcim/choices.py so that we already have some code to talk about:

        ('60130-10:1971', (
            (TYPE_IEC_DC5521, 'Type A (5.5 mm OD, 2.1 mm)'),
            (TYPE_IEC_DC5525, 'Type A (5.5 mm OD, 2.5 mm)'),
            (TYPE_IEC_DC6021, 'Type B (6.0 mm OD, 2.1 mm)'),
            (TYPE_IEC_DC6025, 'Type B (6.0 mm OD, 2.5 mm)'),
            (TYPE_IEC_DC3811, 'Type C (3.8 mm OD, 1.1 mm)'),
            (TYPE_IEC_DC6331, 'Type D (6.3 mm OD, 3.1 mm)'),
            (TYPE_IEC_DC3413, 'Type E (3.4 mm OD, 1.3 mm)'),
        )),

The only question remaining for me is where the DC5521 comes from. I went with this notation because I often see it on devices, manuals. It correlates with the sizes of the connector. If it is described in 60130-10:1971 that it would be ideal to use as internal identifier. I guess one should get and read 60130-10:1971 before implementing this feature.

Use case

https://github.com/netbox-community/netbox/issues/792#issuecomment-581996536

Cc: @brotherdust, @bluikko

Database changes

Yes

External dependencies

No

jsenecal commented 2 years ago

Thanks for your submission, but... Isn't that too specific ? I mean, here we are covering the cases of the IEC 60130-10 standard, but then some other user may complain that the EIAJ power connector and/or DIN 45323 connectors are not represented...

Would it make sense to you to represent those simply under "DC" and add something like Coaxial power connector in there ? Or maybe even only DC power connector to represent all types (Barrel/Coaxial, Tip/Sleeve, Deans, XT60, XT90, etc.)

One must also not forget the "Port" side too.

jeremystretch commented 2 years ago

Also note that these would be connected via a cable with a type no more descriptive than "power."

ypid commented 2 years ago

NetBox already supports other IEC standards in detail. Also various USB connectors. Coaxial power connector is also very common in IT equipment so I am not convinced that we should draw the line here.

I have not seen DIN 45323 (I live in Germany) nor EIAJ in the wild yet. Other people would need to jump in if they have a use case for this in NetBox. I only want to push for standards that I know are in use in the wild.

these would be connected via a cable with a type no more descriptive than "power."

Good point, I removed "connections" from the issue title.

cpmills1975 commented 1 year ago

Modelling DC makes sense as a device can clearly be powered from an upstream DC rectifier but for me, those would always be just DC. For devices with DC barrel connectors, I look at the ports feeding the transformers - in the UK typically IEC C14, perhaps C6 or Type G as that determines the type of rack PDU I'm going to need to power it. I'm not going to start modelling small wall-warts or transformer blocks so specific barrel types isn't going to be interesting to me.

That said, if you do choose to model the transformers - perhaps as a device with a C14 input and a 2.5mm barrel output, and you need to replace one, then it would make sense to be able to record the type/connector size needed and it adds a small number of lines to an existing data structure that most people will likely ignore, but adds value to some so I see no good reason not to do this - although I'd perhaps move them all under the DC section and add a generic option (in my experience, this info is rarely published on data sheets):

('DC', (
            (TYPE_DC, 'DC Terminal'),
            (TYPE_DC_IEC,'Coax/Barrel'),
            (TYPE_DC_IEC_DC5521, 'Coax/Barrel Type A (5.5 mm OD, 2.1 mm)'),
            (TYPE_DC_IEC_DC5525, 'Coax/Barrel Type A (5.5 mm OD, 2.5 mm)'),
            (TYPE_DC_IEC_DC6021, 'Coax/Barrel Type B (6.0 mm OD, 2.1 mm)'),
            (TYPE_DC_IEC_DC6025, 'Coax/Barrel Type B (6.0 mm OD, 2.5 mm)'),
            (TYPE_DC_IEC_DC3811, 'Coax/Barrel Type C (3.8 mm OD, 1.1 mm)'),
            (TYPE_DC_IEC_DC6331, 'Coax/Barrel Type D (6.3 mm OD, 3.1 mm)'),
            (TYPE_DC_IEC_DC3413, 'Coax/Barrel Type E (3.4 mm OD, 1.3 mm)'),
        )),

Related and perhaps more importantly a PowerPort could have an optional input_voltage field added to record whether it takes -48V, +12V or +24V, etc?

ypid commented 1 year ago

I would summaries my understanding of the discussion here as barrel connectors standards are not as viable on devices/manufactures. Also, there are multiple standards and I can confirm that IEC 60130-10:1971 does not cover all the devices I have in NetBox. So I withdraw this proposal and instead rethought the approach and opened #10838.

ypid commented 1 year ago

Connector types need to be defined in NetBox, that is the only way (https://github.com/netbox-community/netbox/wiki/Frequently-Asked-Questions#how-can-i-add-new-interface-types). Therefore I reopen.

stovakor commented 1 year ago

Up to you guys on implementing each individual 'type' of barrel plug, but it would be nice to at least have a generic option for barrel plug connector type.

Right now, the only available option under the 'DC' power type is 'DC Terminal', would be nice if we had at least a few more options 'Barrel Plug'

jsenecal commented 1 year ago

Modelling DC makes sense as a device can clearly be powered from an upstream DC rectifier but for me, those would always be just DC. For devices with DC barrel connectors, I look at the ports feeding the transformers - in the UK typically IEC C14, perhaps C6 or Type G as that determines the type of rack PDU I'm going to need to power it. I'm not going to start modelling small wall-warts or transformer blocks so specific barrel types isn't going to be interesting to me.

That said, if you do choose to model the transformers - perhaps as a device with a C14 input and a 2.5mm barrel output, and you need to replace one, then it would make sense to be able to record the type/connector size needed and it adds a small number of lines to an existing data structure that most people will likely ignore, but adds value to some so I see no good reason not to do this - although I'd perhaps move them all under the DC section and add a generic option (in my experience, this info is rarely published on data sheets):

('DC', (
            (TYPE_DC, 'DC Terminal'),
            (TYPE_DC_IEC,'Coax/Barrel'),
            (TYPE_DC_IEC_DC5521, 'Coax/Barrel Type A (5.5 mm OD, 2.1 mm)'),
            (TYPE_DC_IEC_DC5525, 'Coax/Barrel Type A (5.5 mm OD, 2.5 mm)'),
            (TYPE_DC_IEC_DC6021, 'Coax/Barrel Type B (6.0 mm OD, 2.1 mm)'),
            (TYPE_DC_IEC_DC6025, 'Coax/Barrel Type B (6.0 mm OD, 2.5 mm)'),
            (TYPE_DC_IEC_DC3811, 'Coax/Barrel Type C (3.8 mm OD, 1.1 mm)'),
            (TYPE_DC_IEC_DC6331, 'Coax/Barrel Type D (6.3 mm OD, 3.1 mm)'),
            (TYPE_DC_IEC_DC3413, 'Coax/Barrel Type E (3.4 mm OD, 1.3 mm)'),
        )),

Related and perhaps more importantly a PowerPort could have an optional input_voltage field added to record whether it takes -48V, +12V or +24V, etc?

I think a Generic "Barrel Plug" would suffice most needs. You can be more specific in the DeviceType description if you want ?

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

github-actions[bot] commented 1 year ago

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.