{"action":"created","comment":{"url":"https://api.github.com/repos/mainflux/mainflux/pulls/comments/238334658","pull_request_review_id":180850124,"id":238334658,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODMzNDY1OA==","diff_hunk":"@@ -0,0 +1,113 @@\n+# LoRa Adapter\n+Adapter between Mainflux IoT system and [LoRa Server](https://github.com/brocaar/loraserver).\n+\n+This adapter sits between Mainflux and LoRa server and just forwards the messages form one system to another via MQTT protocol, using the adequate MQTT topics and in the good message format (JSON and SenML), i.e. respecting the APIs of both systems.\n+\n+LoRa Server is used for connectivity layer and data is pushed via this adapter service to Mainflux, where it is persisted and routed to other protocols via Mainflux multi-protocol message broker. Mainflux adds user accounts, application management and security in order to obtain the overall end-to-end LoRa solution.\n+\n+## Configuration\n+\n+The service is configured using the environment variables presented in the\n+following table. Note that any unset variables will be replaced with their\n+default values.\n+\n+| Variable                         | Description                           | Default               |\n+|----------------------------------|---------------------------------------|-----------------------|\n+| MF_LORA_ADAPTER_HTTP_PORT        | Service HTTP port                     | 8180                  |\n+| MF_LORA_ADAPTER_LOG_LEVEL        | Log level for the Lora Adapter        | error                 |\n+| MF_NATS_URL                      | NATS instance URL                     | nats://localhost:4222 |\n+| MF_LORA_ADAPTER_LORA_MESSAGE_URL | Loraserver mqtt broker URL            | tcp://localhost:1883  |\n+| MF_LORA_ADAPTER_ROUTEMAP_URL     | Routemap database URL                 | localhost:6379        |\n+| MF_LORA_ADAPTER_ROUTEMAP_PASS    | Routemap database password            |                       |\n+| MF_LORA_ADAPTER_ROUTEMAP_DB      | Routemap instance that should be used | 0                     |\n+| MF_THINGS_ES_URL                 | Things service event store URL        | localhost:6379        |\n+| MF_THINGS_ES_PASS                | Things service event store password   |                       |\n+| MF_THINGS_ES_DB                  | Things service event store db         | 0                     |\n+| MF_LORA_ADAPTER_INSTANCE_NAME    | LoRa adapter instance name            | lora                  |\n+\n+## Deployment\n+\n+The service is distributed as Docker container. The following snippet provides\n+a compose file template that can be used to deploy the service container locally:\n+\n+```yaml\n+version: \"2\"\n+services:\n+  adapter:\n+    image: mainflux/lora:[version]\n+    container_name: [instance name]\n+    environment:\n+      MF_LORA_ADAPTER_LOG_LEVEL: [Lora Adapter Log Level]\n+      MF_NATS_URL: [NATS instance URL]\n+      MF_LORA_ADAPTER_LORA_MESSAGE_URL: [Loraserver mqtt broker URL]\n+      MF_LORA_ADAPTER_ROUTEMAP_URL: [Lora adapter routemap URL]\n+      MF_LORA_ADAPTER_ROUTEMAP_PASS: [Lora adapter routemap password]\n+      MF_LORA_ADAPTER_ROUTEMAP_DB: [Lora adapter routemap instance]\n+      MF_THINGS_ES_URL: [Things service event store URL]\n+      MF_THINGS_ES_PASS: [Things service event store password]\n+      MF_THINGS_ES_DB: [Things service event store db]\n+      MF_LORA_ADAPTER_INSTANCE_NAME: [LoRa adapter instance name]\n+```\n+\n+To start the service outside of the container, execute the following shell script:\n+\n+```bash\n+# download the latest version of the service\n+go get github.com/mainflux/mainflux\n+\n+cd $GOPATH/src/github.com/mainflux/mainflux\n+\n+# compile the lora adapter\n+make lora\n+\n+# copy binary to bin\n+make install\n+\n+# set the environment variables and run the service\n+MF_LORA_ADAPTER_LOG_LEVEL=[Lora Adapter Log Level] MF_NATS_URL=[NATS instance URL] MF_LORA_ADAPTER_LORA_MESSAGE_URL=[Loraserver mqtt broker URL] MF_LORA_ADAPTER_ROUTEMAP_URL=[Lora adapter routemap URL] MF_LORA_ADAPTER_ROUTEMAP_PASS=[Lora adapter routemap password] MF_LORA_ADAPTER_ROUTEMAP_DB=[Lora adapter routemap instance] MF_THINGS_ES_URL=[Things service event store URL] MF_THINGS_ES_PASS=[Things service event store password] MF_THINGS_ES_DB=[Things service event store db] MF_LORA_ADAPTER_INSTANCE_NAME=[LoRa adapter instance name] $GOBIN/mainflux-lora\n+```\n+\n+### Using docker-compose\n+\n+This service can be deployed using docker containers.\n+Docker compose file is available in `<project_root>/docker/addons/lora-adapter/docker-compose.yml`. In order to run Mainflux lora-adapter, execute the following command:\n+\n+```bash\n+docker-compose -f docker/addons/lora-adapter/docker-compose.yml up -d\n+```\n+\n+## Usage\n+\n+First of all you must run your Loraserver. You need to clone the repository with command `go get github.com/brocaar/loraserver-docker`\u001D and deploy docker containers with command `docker-compose up` from `loraserver-docker` repository.","path":"lora/README.md","position":81,"original_position":81,"commit_id":"127c7f733ecb91e6547c7491d7f92f48f71c844c","original_commit_id":"2c3151aaeae2114a55ea8f3038f7debcf3fed934","user":{"login":"drasko","id":149944,"node_id":"MDQ6VXNlcjE0OTk0NA==","avatar_url":"https://avatars3.githubusercontent.com/u/149944?v=4","gravatar_id":"","url":"https://api.github.com/users/drasko","html_url":"https://github.com/drasko","followers_url":"https://api.github.com/users/drasko/followers","following_url":"https://api.github.com/users/drasko/following{/other_user}","gists_url":"https://api.github.com/users/drasko/gists{/gist_id}","starred_url":"https://api.github.com/users/drasko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drasko/subscriptions","organizations_url":"https://api.github.com/users/drasko/orgs","repos_url":"https://api.github.com/users/drasko/repos","events_url":"https://api.github.com/users/drasko/events{/privacy}","received_events_url":"https://api.github.com/users/drasko/received_events","type":"User","site_admin":false},"body":"it's called LoRa Server.","created_at":"2018-12-03T16:16:36Z","updated_at":"2018-12-03T16:20:21Z","html_url":"https://github.com/mainflux/mainflux/pull/481#discussion_r238334658","pull_request_url":"https://api.github.com/repos/mainflux/mainflux/pulls/481","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mainflux/mainflux/pulls/comments/238334658"},"html":{"href":"https://github.com/mainflux/mainflux/pull/481#discussion_r238334658"},"pull_request":{"href":"https://api.github.com/repos/mainflux/mainflux/pulls/481"}}},"pull_request":{"url":"https://api.github.com/repos/mainflux/mainflux/pulls/481","id":234736882,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0NzM2ODgy","html_url":"https://github.com/mainflux/mainflux/pull/481","diff_url":"https://github.com/mainflux/mainflux/pull/481.diff","patch_url":"https://github.com/mainflux/mainflux/pull/481.patch","issue_url":"https://api.github.com/repos/mainflux/mainflux/issues/481","number":481,"state":"open","locked":false,"title":"MF-166 - Add lora-adapter service","user":{"login":"manuIO","id":9677805,"node_id":"MDQ6VXNlcjk2Nzc4MDU=","avatar_url":"https://avatars2.githubusercontent.com/u/9677805?v=4","gravatar_id":"","url":"https://api.github.com/users/manuIO","html_url":"https://github.com/manuIO","followers_url":"https://api.github.com/users/manuIO/followers","following_url":"https://api.github.com/users/manuIO/following{/other_user}","gists_url":"https://api.github.com/users/manuIO/gists{/gist_id}","starred_url":"https://api.github.com/users/manuIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manuIO/subscriptions","organizations_url":"https://api.github.com/users/manuIO/orgs","repos_url":"https://api.github.com/users/manuIO/repos","events_url":"https://api.github.com/users/manuIO/events{/privacy}","received_events_url":"https://api.github.com/users/manuIO/received_events","type":"User","site_admin":false},"body":"### What does this do?\r\nAdd new lora-adapter service\r\n### Which issue(s) does this PR fix/relate to?\r\nResolves #166 \r\n### Notes\r\nDocumentation and tutorial is needed","created_at":"2018-11-29T18:14:36Z","updated_at":"2018-12-03T16:20:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"32959ce53081e14eee12cb08cacf4c81be93e657","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mainflux/mainflux/pulls/481/commits","review_comments_url":"https://api.github.com/repos/mainflux/mainflux/pulls/481/comments","review_comment_url":"https://api.github.com/repos/mainflux/mainflux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mainflux/mainflux/issues/481/comments","statuses_url":"https://api.github.com/repos/mainflux/mainflux/statuses/127c7f733ecb91e6547c7491d7f92f48f71c844c","head":{"label":"mainflux:lora-adapter","ref":"lora-adapter","sha":"127c7f733ecb91e6547c7491d7f92f48f71c844c","user":{"login":"mainflux","id":13207490,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMjA3NDkw","avatar_url":"https://avatars1.githubusercontent.com/u/13207490?v=4","gravatar_id":"","url":"https://api.github.com/users/mainflux","html_url":"https://github.com/mainflux","followers_url":"https://api.github.com/users/mainflux/followers","following_url":"https://api.github.com/users/mainflux/following{/other_user}","gists_url":"https://api.github.com/users/mainflux/gists{/gist_id}","starred_url":"https://api.github.com/users/mainflux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mainflux/subscriptions","organizations_url":"https://api.github.com/users/mainflux/orgs","repos_url":"https://api.github.com/users/mainflux/repos","events_url":"https://api.github.com/users/mainflux/events{/privacy}","received_events_url":"https://api.github.com/users/mainflux/received_events","type":"Organization","site_admin":false},"repo":{"id":38644318,"node_id":"MDEwOlJlcG9zaXRvcnkzODY0NDMxOA==","name":"mainflux","full_name":"mainflux/mainflux","private":false,"owner":{"login":"mainflux","id":13207490,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMjA3NDkw","avatar_url":"https://avatars1.githubusercontent.com/u/13207490?v=4","gravatar_id":"","url":"https://api.github.com/users/mainflux","html_url":"https://github.com/mainflux","followers_url":"https://api.github.com/users/mainflux/followers","following_url":"https://api.github.com/users/mainflux/following{/other_user}","gists_url":"https://api.github.com/users/mainflux/gists{/gist_id}","starred_url":"https://api.github.com/users/mainflux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mainflux/subscriptions","organizations_url":"https://api.github.com/users/mainflux/orgs","repos_url":"https://api.github.com/users/mainflux/repos","events_url":"https://api.github.com/users/mainflux/events{/privacy}","received_events_url":"https://api.github.com/users/mainflux/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mainflux/mainflux","description":"Industrial IoT Messaging and Device Management Server","fork":false,"url":"https://api.github.com/repos/mainflux/mainflux","forks_url":"https://api.github.com/repos/mainflux/mainflux/forks","keys_url":"https://api.github.com/repos/mainflux/mainflux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mainflux/mainflux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mainflux/mainflux/teams","hooks_url":"https://api.github.com/repos/mainflux/mainflux/hooks","issue_events_url":"https://api.github.com/repos/mainflux/mainflux/issues/events{/number}","events_url":"https://api.github.com/repos/mainflux/mainflux/events","assignees_url":"https://api.github.com/repos/mainflux/mainflux/assignees{/user}","branches_url":"https://api.github.com/repos/mainflux/mainflux/branches{/branch}","tags_url":"https://api.github.com/repos/mainflux/mainflux/tags","blobs_url":"https://api.github.com/repos/mainflux/mainflux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mainflux/mainflux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mainflux/mainflux/git/refs{/sha}","trees_url":"https://api.github.com/repos/mainflux/mainflux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mainflux/mainflux/statuses/{sha}","languages_url":"https://api.github.com/repos/mainflux/mainflux/languages","stargazers_url":"https://api.github.com/repos/mainflux/mainflux/stargazers","contributors_url":"https://api.github.com/repos/mainflux/mainflux/contributors","subscribers_url":"https://api.github.com/repos/mainflux/mainflux/subscribers","subscription_url":"https://api.github.com/repos/mainflux/mainflux/subscription","commits_url":"https://api.github.com/repos/mainflux/mainflux/commits{/sha}","git_commits_url":"https://api.github.com/repos/mainflux/mainflux/git/commits{/sha}","comments_url":"https://api.github.com/repos/mainflux/mainflux/comments{/number}","issue_comment_url":"https://api.github.com/repos/mainflux/mainflux/issues/comments{/number}","contents_url":"https://api.github.com/repos/mainflux/mainflux/contents/{+path}","compare_url":"https://api.github.com/repos/mainflux/mainflux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mainflux/mainflux/merges","archive_url":"https://api.github.com/repos/mainflux/mainflux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mainflux/mainflux/downloads","issues_url":"https://api.github.com/repos/mainflux/mainflux/issues{/number}","pulls_url":"https://api.github.com/repos/mainflux/mainflux/pulls{/number}","milestones_url":"https://api.github.com/repos/mainflux/mainflux/milestones{/number}","notifications_url":"https://api.github.com/repos/mainflux/mainflux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mainflux/mainflux/labels{/name}","releases_url":"https://api.github.com/repos/mainflux/mainflux/releases{/id}","deployments_url":"https://api.github.com/repos/mainflux/mainflux/deployments","created_at":"2015-07-06T20:31:50Z","updated_at":"2018-12-03T15:19:13Z","pushed_at":"2018-12-03T16:16:38Z","git_url":"git://github.com/mainflux/mainflux.git","ssh_url":"git@github.com:mainflux/mainflux.git","clone_url":"https://github.com/mainflux/mainflux.git","svn_url":"https://github.com/mainflux/mainflux","homepage":"","size":20593,"stargazers_count":241,"watchers_count":241,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":88,"mirror_url":null,"archived":false,"open_issues_count":42,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":88,"open_issues":42,"watchers":241,"default_branch":"master"}},"base":{"label":"mainflux:master","ref":"master","sha":"7db3b295be8428882bed3008127a0094432db750","user":{"login":"mainflux","id":13207490,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMjA3NDkw","avatar_url":"https://avatars1.githubusercontent.com/u/13207490?v=4","gravatar_id":"","url":"https://api.github.com/users/mainflux","html_url":"https://github.com/mainflux","followers_url":"https://api.github.com/users/mainflux/followers","following_url":"https://api.github.com/users/mainflux/following{/other_user}","gists_url":"https://api.github.com/users/mainflux/gists{/gist_id}","starred_url":"https://api.github.com/users/mainflux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mainflux/subscriptions","organizations_url":"https://api.github.com/users/mainflux/orgs","repos_url":"https://api.github.com/users/mainflux/repos","events_url":"https://api.github.com/users/mainflux/events{/privacy}","received_events_url":"https://api.github.com/users/mainflux/received_events","type":"Organization","site_admin":false},"repo":{"id":38644318,"node_id":"MDEwOlJlcG9zaXRvcnkzODY0NDMxOA==","name":"mainflux","full_name":"mainflux/mainflux","private":false,"owner":{"login":"mainflux","id":13207490,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMjA3NDkw","avatar_url":"https://avatars1.githubusercontent.com/u/13207490?v=4","gravatar_id":"","url":"https://api.github.com/users/mainflux","html_url":"https://github.com/mainflux","followers_url":"https://api.github.com/users/mainflux/followers","following_url":"https://api.github.com/users/mainflux/following{/other_user}","gists_url":"https://api.github.com/users/mainflux/gists{/gist_id}","starred_url":"https://api.github.com/users/mainflux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mainflux/subscriptions","organizations_url":"https://api.github.com/users/mainflux/orgs","repos_url":"https://api.github.com/users/mainflux/repos","events_url":"https://api.github.com/users/mainflux/events{/privacy}","received_events_url":"https://api.github.com/users/mainflux/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mainflux/mainflux","description":"Industrial IoT Messaging and Device Management Server","fork":false,"url":"https://api.github.com/repos/mainflux/mainflux","forks_url":"https://api.github.com/repos/mainflux/mainflux/forks","keys_url":"https://api.github.com/repos/mainflux/mainflux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mainflux/mainflux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mainflux/mainflux/teams","hooks_url":"https://api.github.com/repos/mainflux/mainflux/hooks","issue_events_url":"https://api.github.com/repos/mainflux/mainflux/issues/events{/number}","events_url":"https://api.github.com/repos/mainflux/mainflux/events","assignees_url":"https://api.github.com/repos/mainflux/mainflux/assignees{/user}","branches_url":"https://api.github.com/repos/mainflux/mainflux/branches{/branch}","tags_url":"https://api.github.com/repos/mainflux/mainflux/tags","blobs_url":"https://api.github.com/repos/mainflux/mainflux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mainflux/mainflux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mainflux/mainflux/git/refs{/sha}","trees_url":"https://api.github.com/repos/mainflux/mainflux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mainflux/mainflux/statuses/{sha}","languages_url":"https://api.github.com/repos/mainflux/mainflux/languages","stargazers_url":"https://api.github.com/repos/mainflux/mainflux/stargazers","contributors_url":"https://api.github.com/repos/mainflux/mainflux/contributors","subscribers_url":"https://api.github.com/repos/mainflux/mainflux/subscribers","subscription_url":"https://api.github.com/repos/mainflux/mainflux/subscription","commits_url":"https://api.github.com/repos/mainflux/mainflux/commits{/sha}","git_commits_url":"https://api.github.com/repos/mainflux/mainflux/git/commits{/sha}","comments_url":"https://api.github.com/repos/mainflux/mainflux/comments{/number}","issue_comment_url":"https://api.github.com/repos/mainflux/mainflux/issues/comments{/number}","contents_url":"https://api.github.com/repos/mainflux/mainflux/contents/{+path}","compare_url":"https://api.github.com/repos/mainflux/mainflux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mainflux/mainflux/merges","archive_url":"https://api.github.com/repos/mainflux/mainflux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mainflux/mainflux/downloads","issues_url":"https://api.github.com/repos/mainflux/mainflux/issues{/number}","pulls_url":"https://api.github.com/repos/mainflux/mainflux/pulls{/number}","milestones_url":"https://api.github.com/repos/mainflux/mainflux/milestones{/number}","notifications_url":"https://api.github.com/repos/mainflux/mainflux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mainflux/mainflux/labels{/name}","releases_url":"https://api.github.com/repos/mainflux/mainflux/releases{/id}","deployments_url":"https://api.github.com/repos/mainflux/mainflux/deployments","created_at":"2015-07-06T20:31:50Z","updated_at":"2018-12-03T15:19:13Z","pushed_at":"2018-12-03T16:16:38Z","git_url":"git://github.com/mainflux/mainflux.git","ssh_url":"git@github.com:mainflux/mainflux.git","clone_url":"https://github.com/mainflux/mainflux.git","svn_url":"https://github.com/mainflux/mainflux","homepage":"","size":20593,"stargazers_count":241,"watchers_count":241,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":88,"mirror_url":null,"archived":false,"open_issues_count":42,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":88,"open_issues":42,"watchers":241,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mainflux/mainflux/pulls/481"},"html":{"href":"https://github.com/mainflux/mainflux/pull/481"},"issue":{"href":"https://api.github.com/repos/mainflux/mainflux/issues/481"},"comments":{"href":"https://api.github.com/repos/mainflux/mainflux/issues/481/comments"},"review_comments":{"href":"https://api.github.com/repos/mainflux/mainflux/pulls/481/comments"},"review_comment":{"href":"https://api.github.com/repos/mainflux/mainflux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mainflux/mainflux/pulls/481/commits"},"statuses":{"href":"https://api.github.com/repos/mainflux/mainflux/statuses/127c7f733ecb91e6547c7491d7f92f48f71c844c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"drasko"}}