/my_sensors

Elixir Library for https://www.mysensors.org/

Primary LanguageElixirMIT LicenseMIT

CircleCI Coverage Status

MySensors

Usage

The package can be installed by adding my_sensors to your list of dependencies in mix.exs:

def deps do
  [
    {:my_sensors, "~> 0.1.0-rc2"}
  ]
end

Then add a transport to the Gateway. By default you have two options:

UART

To use the UART transport, first wire up and flash your arduino according to the MySensors Serial Gateway Instructions. then you can start the gateway with:

MySensors.add_gateway(MySensors.Transport.UART, [device: "/dev/devicePath"])

TCP

to use the TCP transport, first wire up and flash your arduino according to the MySensors Ethernet Gateway Instructions. (Or you can use the MySensors WiFi Gateway.) then you can start the gateway with:

MySensors.add_gateway(MySensors.Transpoart.TCP, [host: {192, 168, 1, 40}, port: 5001])

Make sure you use the correct host. You can use local hostnames also, if resolvable.