Bones-74 / radial-sockets

Timer control of domestic switchgear for a radial electric circuit, with aim to remove need for 'timer sockets'
GNU General Public License v3.0
0 stars 0 forks source link

use udev to name the usb-gpio devices in a deterministic manor #4

Open Bones-74 opened 5 years ago

Bones-74 commented 5 years ago

the usb driver currently grabs the first usb device of its type (ft232h). this needs to change to that a specific usb device is always being grabbed by the same label.

make use of the com port field in the config to uniquely identify the usb device and pass the info through to the apps driver for that device

Bones-74 commented 5 years ago

Don't think this can be done with the ft232h device because they do not report their serial number to udev. so I've gonna swap it out with MCP23017 that communicate over i2c. Using I2c o n this io expander means I can get a raspPi 1/2 with fewer gpio cos i don't need them now but it also takes less current.

the board type will be the name and the 'port' in the config (should be changed to some less specific to serial like "identifier") will be it's address which is configurable on the hardware