[RELEASE] OmniThing v0.8.2 - ESP8266/ESP32/RaspberryPi/Linux/Windows Web-based Configuration Tool

I have managed to get OmniThing working on a raspberry pi using a virtual ethernet interface.

Create a new file called /etc/network/interfaces.d/omnithing

In that file, paste the text below with a few modifications:

auto eth_omni
iface eth_omni inet static
  address 192.168.1.54/24
  hwaddress ether ba:4d:09:46:57:98
  pre-up ip link add eth_omni link eth0 type macvlan
  post-down ip link del eth_omni link eth0 type macvlan
  up ip netns add omnithing && ip link set eth_omni netns omnithing && ip netns exec omnithing ip addr add 192.168.1.54/24 dev eth_omni && ip netns exec omnithing ip link set eth_omni up
  down ip netns del omnithing

Replace “ba:4d:09:46:57:98” with whatever made up mac address you want for the virtual interface.

Replace both instances of “192.168.1.54/24” with whatever static IP you want to assign to the virtual interface (this should be a valid ip on your LAN’s subnet which isn’t already in use; NOTE: this should NOT be the same as the pi’s eth0 ip).

Now, edit the OmniThing script found at /opt/omnithing/omnithing.sh
Replace this line:

./OmniThing config.json >> logs/omnithing.log 2>&1

With this:

ip netns exec omnithing ./OmniThing config.json >> logs/omnithing.log 2>&1

Now, run this command to ensure new versions of the omnithing package will not overwrite your edited omnithing.sh:

sudo dpkg-divert --divert /opt/omnithing/omnithing.sh.new /opt/omnithing/omnithing.sh

If you already had OmniThing installed on your pi, be sure to update it before rebooting. I just released a fix for a nasty bug associated with the CommandExecuter:

sudo apt-get update && sudo apt-get upgrade

Now feel free to reboot, and OmniThing should use the virtual interface for now on.

When configuring OmniThing in the SmartThings app, be sure to use the ip and mac you set in the interfaces file above, not your pi’s eth0 ip and mac.

If you ever want to see information about your virtual interface, run:

sudo ip netns exec omnithing ip addr