Cannot seem to install I2C on VM. I need some help please

I have tried all the walk through on this page and I can’t get past line 2

mkdir /tmp/mnt
mount /dev/sda1 /tmp/mnt
mkdir -p /tmp/mnt/CONFIG/modules
echo -ne i2c-dev>/tmp/mnt/CONFIG/modules/rpi-i2c.conf
echo dtparam=i2c_vc=on >> /tmp/mnt/CONFIG/config.txt
echo dtparam=i2c_arm=on >> /tmp/mnt/CONFIG/config.txt
sync
reboot

[core-ssh ~]$ mkdir /tmp/mnt
mkdir: can’t create directory ‘/tmp/mnt’: File exists because I tried more than once
[core-ssh ~]$ mount /dev/sda1 /tmp/mnt
mount: mounting /dev/sda1 on /tmp/mnt failed: No such file or directory
[core-ssh ~]$ mount /dev/sdb1 /tmp/mnt
mount: mounting /dev/sdb1 on /tmp/mnt failed: No such file or directory
[core-ssh ~]$ mount /dev/mmcblk0p1 /tmp/mnt
mount: mounting /dev/mmcblk0p1 on /tmp/mnt failed: No such file or directory

Home Assistant Core 2022.5.5

Home Assistant Supervisor 2022.05.3

Home Assistant OS 8.1

Kernel version 5.15.41

Agent version 1.2.1

Did you try this ?

1 Like

I am not using a raspberry PI for my install

Your link to ‘this page’ doesn’t work.

Common Tasks - Operating System - Home Assistant (home-assistant.io)

Well, where do you want to connect the two wires for i2c in a VM?

I was going to connect them to an esp32

Then you need no i2c in HAOS.
Connect your i2c devices to the esp and flash it with esphome.
If you enable the api, HA will discover it.

I will give that a try thanks

Can you tell me exactly where to place the
api:
password: !secret api_password

does this go in the esp32 config or somewhere in the config file?

I have esphome installed I was looking for where to enable the api but I believe it is in the configuration then options api:
password: a password
key: vf9MMC+sssCrJOQq0O
I believe this is correct

Thank you that worked just fine

1 Like