Last active
April 4, 2024 08:01
-
-
Save bahamas10/dfac91f6a33c8e75d4b778cd1db89d87 to your computer and use it in GitHub Desktop.
Home Assistant on SmartOS LX Zone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"alias": "hass", | |
"brand": "lx", | |
"autoboot": true, | |
"quota": 20, | |
"delegate_dataset": true, | |
"kernel_version": "4.3.0", | |
"image_uuid": "7b5981c4-1889-11e7-b4c5-3f3bdfc9b88b", | |
"max_physical_memory": 1024, | |
"nics": [ | |
{ | |
"nic_tag": "admin", | |
"ip": "10.0.1.42", | |
"netmask": "255.255.255.0", | |
"gateway": "10.0.1.1", | |
"primary": true | |
} | |
], | |
"resolvers": [ | |
"10.0.1.2", | |
"10.0.1.3" | |
] | |
} | |
# add device to zone | |
https://docs.oracle.com/cd/E19044-01/sol.containers/817-1592/z.conf.start-73/index.html | |
zonecfg -u <uuid> | |
> add device | |
> set match=/dev/cua/0 | |
> end | |
> exit | |
# fix zwave thing | |
./simple--wave.d | |
test with: | |
echo -e -n "\x01\x08\x00\xF2\x51\x01\x00\x05\x01\x51" > /dev/cua/0 | |
# bootstrap zone | |
apt-get update | |
apt-get upgrade -y | |
>>> idk if all of this is necessary | |
apt-get install -y build-essential | |
apt-get install -y git | |
apt-get install -y libyaml-0-2 | |
apt-get install -y pkg-config | |
apt-get install -y libudev-dev | |
# install python3.6 | |
add-apt-repository ppa:deadsnake/ppa | |
apt-get update | |
apt-get install -y python3-pip | |
apt-get install -y python3.6 | |
apt-get install -y python3.6-venv | |
apt-get install -y python3.6-dev | |
# create user | |
# i don't think dialout is necessary cuz zone owns the device 0666 | |
useradd -rm homeassistant -G dialout | |
# put data in right place | |
ln -s "/zones/$(zonename)/data" /data | |
# install hass | |
mkdir /data/homeassistant # where the source lives | |
mkdir /data/.homeassistant # where the config will live | |
ln -s /data/.homeassistant /home/homeassistant/.homeassistant | |
cd /data/homeassistant | |
sudo -Hsu homeassistant | |
python3.6 -m venv . | |
. bin/activate | |
python3.6 -m pip install --upgrade pip | |
python3.6 -m pip install wheel | |
python3.6 -m pip install homeassistant | |
# run hass | |
(in that dir as that user with the venv setup) | |
hass | |
(ctrl-d twice to get back to root) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/sbin/dtrace -qs | |
usbsacm_ds_set_port_params:entry { | |
this->acmp = (usbsacm_state_t *)arg0; | |
this->acm_port = (usbsacm_port_t *)&this->acmp->acm_ports[arg1]; | |
print(this->acm_port); | |
printf("acm_cap = %d\n", this->acm_port->acm_cap); | |
printf("run the following in mdb -kw if cap != 2: 0x%p/W 2\n", | |
&this->acm_port->acm_cap); | |
} |
I see this in dmesg
:
2020-05-17T22:57:09.759385+00:00 headnode usba: [ID 349649 kern.info] usba:#011no driver found for interface 1 (nodename: 'interface') of Silicon Labs HubZ Smart Home Controller 81300CC8
Anyone know where I can get the driver for this?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I noticed that
/dev/usb/device0
is present when the USB is in but when I pass that device through to the LX Ubuntu zone ZHA in Home Assistant doesn't recognize it. It should be presented as two different serial ports so I wouldn't expect/dev/usb/device0
to work anyway.