Closed arrmo closed 2 years ago
Looks clean and and sane to me. Since it imports glob can you add it to the plugin's requirements.txt? If @deathbybandaid does not have any objections I will merge this tomorrow.
Is there any way to use ceton api to determine device type?
If so, that would be preferable to a config value
Also read some docs on glob.glob
and it appears to be Unix only. Does the Ceton pcie tuner work on Windows machines? If so I'd like to remove the glob.glob
logic for something more like
# at top of file
import os
if self.ceton_pcie:
pciedevices = len([os.path.join("/dev/ceton/", x) for x in os.listdir("/dev/ceton/") if x.startswith("ctn91xx_ctl")])
self.plugin_utils.logger.info('Ceton PCIe Device Count: %s' % pciedevices)
It might not be as pretty, but saves a dependency and retains an amount of compatibility.
I'm fine with making this change, no issue at all @DanAustinGH - go this way, to also allow Windows support? If you're good with it as well, I'll update the PR.
Thanks!
@arrmo make sure you test that logic, I just typed it up, and have no way to test at the moment.
Yes, absolutely!
@arrmo what does this return on your system? http://192.168.2001/get_var?i=0&s=diag&v=Host_Connection It shows 'Ethernet' for the standalone device
Best I can tell the PCI card was supported on windows prior to Win10, but then a driver architecture changed.
It shows 'Ethernet' for the standalone device
Shows pci/ethernet
for the internal card.
Updates as discussed at https://github.com/fHDHR/fHDHR_plugin_origin_ceton/issues/16