ConnorRigby / my_sensors

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.Gateway.add_transport(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.Gateway.add_transport(MySensors.Transport.TCP, [host: {192, 168, 1, 40}, port: 5001])

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

About

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

License:MIT License


Languages

Language:Elixir 100.0%