OpenVoiceOS / ovos-installer

Open Voice OS and/or HiveMind installer using Ansible with an intuitive and easy Text-based User Interface
https://www.openvoiceos.org
48 stars 13 forks source link

Unable to deploy containers on RPi if I2C is not enable #35

Closed goldyfruit closed 6 months ago

goldyfruit commented 6 months ago

ovos_phal container doesn't start because /dev/i2c-1 is not available on the RPi.

        "State": {
            "Status": "created",
            "Running": false,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 128,
            "Error": "error gathering device information while adding custom device \"/dev/i2c-1\": no such file or directory",
            "StartedAt": "0001-01-01T00:00:00Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        }

image

goldyfruit commented 6 months ago

On Raspberry PI, the I2C must be enabled on the configuration and the kernel module should be loaded.

In /boot/config.txt:

dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=spi=on

Then load the kernel module:

sudo modprobe i2c-dev
goldyfruit commented 6 months ago

The installer should detect if I2C is enabled, if not then it should remove the /dev/i2c-1 device from ovos_phal container.

goldyfruit commented 6 months ago

Fixed by https://github.com/OpenVoiceOS/ovos-installer/commit/c2a09a0a8b74665086ae01c2851e7226b9a6b16d