{"id":16422331,"url":"https://github.com/stephenhillier/instr","last_synced_at":"2025-10-15T05:32:24.231Z","repository":{"id":66138101,"uuid":"141786166","full_name":"stephenhillier/instr","owner":"stephenhillier","description":"A client/server for remote geotechnical datalogging","archived":false,"fork":false,"pushed_at":"2018-07-21T06:10:49.000Z","size":7724,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-07T08:12:37.342Z","etag":null,"topics":["geotechnical-engineering","go","grpc"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stephenhillier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-21T06:10:14.000Z","updated_at":"2021-01-03T22:39:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"fe62810d-cc52-4212-b5bb-d7a81522a43d","html_url":"https://github.com/stephenhillier/instr","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"258bf4c9a3e3222f9ba2e1c220c98aaf1e06916c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenhillier%2Finstr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenhillier%2Finstr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenhillier%2Finstr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenhillier%2Finstr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephenhillier","download_url":"https://codeload.github.com/stephenhillier/instr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240527091,"owners_count":19815782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geotechnical-engineering","go","grpc"],"created_at":"2024-10-11T07:36:12.671Z","updated_at":"2025-10-15T05:32:24.182Z","avatar_url":"https://github.com/stephenhillier.png","language":"Go","readme":"# Earthworks Instrumentation\n\ngRPC server/client implementation for transmitting instrumentation readings to a central data store\n\n## Server\n\nThe **instr** server receives incoming connections through gRPC from clients and stores readings in a database. Currently supports PostgreSQL (see `backend/database` folder)\n\n## Clients\n### therm\n\nThe therm client collects automated readings from a thermistor. A thermistor's resistance varies when it is heated or cooled, and the measured resistance can be converted a temperature. One application of a thermistor for civil engineering is for observing seasonal or annual trends in ground temperature.\n\n## Instructions\n\n### Running the Server\n\nTo run the server, a [PostgreSQL](https://www.postgresql.org/) connection is required.  The application is written in Go.\n\nCreate a database user and a database. ([PostgreSQL tutorial](https://www.postgresql.org/docs/current/static/tutorial.html))\n\nCreate a table with resistance and device columns:\n```sql\nCREATE TABLE reading(\n  id SERIAL PRIMARY KEY,\n  resistance FLOAT NOT NULL,\n  device TEXT NOT NULL CHECK (char_length(device) \u003c 100)\n)\n```\n\nSet the following environment variables:\n\n* DBHOST: the database hostname (localhost if running on the same machine)\n* DBPORT: the database port (postgres default is 5432)\n* DBNAME: the name of your database\n* DBUSER: the database user with privileges on the database\n\nMake sure the database is ready to accept connections and start the instrumentation server: from the `backend/server` folder, run `go run main.go`. Alternatively, build the package with `go build main.go` and execute the binary.\n\n### Running the client\n\nThe **therm** client can be run on a Raspberry Pi with Docker. An ADS1015 analog to digital converter was used.\n\nBuild the executable in the `clients/therm` folder:\n```sh\ncd clients/therm\nGOOS=linux GOARCH=arm go build main.go\n```\n\nBuild the docker image:\n```\ndocker build -t instr .\n```\n\nand run it from the Raspberry Pi (see [Docker documentation](https://docs.docker.com/) for building and pushing your own images). Use the --device flag to allow the container to access `/dev/i2c-1`:\n```\ndocker run --device=/dev/i2c-1 instr\n```\n\nWhen a collection is established, you will begin to see server responses in the client logs and thermistor readings in the server logs and database.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenhillier%2Finstr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephenhillier%2Finstr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenhillier%2Finstr/lists"}