{"id":15163248,"url":"https://github.com/sergiogasquez/losant-example","last_synced_at":"2026-02-01T22:31:17.275Z","repository":{"id":65778711,"uuid":"533408564","full_name":"SergioGasquez/losant-example","owner":"SergioGasquez","description":"Simple example built for esp-rust-board that sends temperature and humidity to Losant","archived":false,"fork":false,"pushed_at":"2023-02-15T10:17:15.000Z","size":64,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T09:48:47.576Z","etag":null,"topics":["esp-rs","esp32","esp32c3","espressif","iot","losant","mqtt","rust"],"latest_commit_sha":null,"homepage":"https://app.losant.com/dashboards/6317314b80eae13991afeb09","language":"Rust","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/SergioGasquez.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":"2022-09-06T16:24:32.000Z","updated_at":"2022-10-05T14:37:24.000Z","dependencies_parsed_at":"2024-09-13T19:38:01.564Z","dependency_job_id":null,"html_url":"https://github.com/SergioGasquez/losant-example","commit_stats":{"total_commits":14,"total_committers":1,"mean_commits":14.0,"dds":0.0,"last_synced_commit":"83df0b053911b445d33d19f44ad0fb74d92e76f4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SergioGasquez/losant-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioGasquez%2Flosant-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioGasquez%2Flosant-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioGasquez%2Flosant-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioGasquez%2Flosant-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SergioGasquez","download_url":"https://codeload.github.com/SergioGasquez/losant-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SergioGasquez%2Flosant-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261756769,"owners_count":23205160,"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":["esp-rs","esp32","esp32c3","espressif","iot","losant","mqtt","rust"],"created_at":"2024-09-27T02:22:03.414Z","updated_at":"2026-02-01T22:31:17.269Z","avatar_url":"https://github.com/SergioGasquez.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Losant Example\n\n[![Continuous Integration](https://github.com/SergioGasquez/losant-example/actions/workflows/ci.yaml/badge.svg)](https://github.com/SergioGasquez/losant-example/actions/workflows/ci.yaml)\n\nSimple example built for [esp-rust-board](https://github.com/esp-rs/esp-rust-board) that sends temperature and humidity to\nLosant, via MQTT, where it can be [visualized in this dashboard](https://app.losant.com/dashboards/6317314b80eae13991afeb09).\n\n![Losant Dashboard](static/losant_dashboard.png)\n\nIf you want to reproduce this example:\n1. [Sign in or create an account](https://accounts.losant.com/signin).\n2. [Create a standalone Losant device with the proper atributes (in this case `humidity` and `temperature`)](https://docs.losant.com/devices/overview/)\n3. [Create Losant access key and secret](https://docs.losant.com/applications/access-keys/)\n4. Rename `cfg.toml.example` to `cfg.toml`\n5. Fill the `cfg.toml` with\n   1. `wifi_ssid`: Wifi SSID\n   2. `wifi_pass`: Wifi password\n   3. `client_id`: Losant device ID\n   4. `username`: Losant access key\n   5. `password`: Losant access secret\n6. [Create a Losant dashboard](https://docs.losant.com/dashboards/overview/)\n\n## Dev Containers\nThis repository offers Dev Containers supports for:\n-  [Gitpod](https://gitpod.io/)\n   - [\"Open in Gitpod\" button](https://www.gitpod.io/docs/getting-started#open-in-gitpod-button)\n-  [VS Code Dev Containers](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-an-existing-folder-in-a-container)\n-  [GitHub Codespaces](https://docs.github.com/en/codespaces/developing-in-codespaces/creating-a-codespace)\n\u003e **Note**\n\u003e\n\u003e In order to use Gitpod the project needs to be published in a GitLab, GitHub,\n\u003e or Bitbucket repository.\n\u003e\n\u003e In [order to use GitHub Codespaces](https://github.com/features/codespaces#faq)\n\u003e the project needs to be published in a GitHub repository and the user needs\n\u003e to be part of the Codespaces beta or have the project under an organization.\n\nIf using VS Code or GitHub Codespaces, you can pull the image instead of building it\nfrom the Dockerfile by selecting the `image` property instead of `build` in\n`.devcontainer/devcontainer.json`. Further customization of the Dev Container can\nbe achived, see [.devcontainer.json reference](https://code.visualstudio.com/docs/remote/devcontainerjson-reference).\n\nWhen using Dev Containers, some tooling to facilitate building, flashing and\nsimulating in Wokwi is also added.\n### Build\n- Terminal approach:\n\n    ```\n    scripts/build.sh  [debug | release]\n    ```\n    \u003e If no argument is passed, `release` will be used as default\n\n\n-  UI approach:\n\n    The default build task is already set to build the project, and it can be used\n    in VS Code and Gitpod:\n    - From the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) (`Ctrl-Shift-P` or `Cmd-Shift-P`) run the `Tasks: Run Build Task` command.\n    - `Terminal`-\u003e `Run Build Task` in the menu.\n    - With `Ctrl-Shift-B` or `Cmd-Shift-B`.\n    - From the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) (`Ctrl-Shift-P` or `Cmd-Shift-P`) run the `Tasks: Run Task` command and\n    select `Build`.\n    - From UI: Press `Build` on the left side of the Status Bar.\n\n### Flash\n\n\u003e **Note**\n\u003e\n\u003e When using GitHub Codespaces, we need to make the ports\n\u003e public, [see instructions](https://docs.github.com/en/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace#sharing-a-port).\n\n- Terminal approach:\n  - Using `flash.sh` script:\n\n    ```\n    scripts/flash.sh [debug | release]\n    ```\n    \u003e If no argument is passed, `release` will be used as default\n\n- UI approach:\n    - From the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) (`Ctrl-Shift-P` or `Cmd-Shift-P`) run the `Tasks: Run Task` command and\n    select `Build \u0026 Flash`.\n    - From UI: Press `Build \u0026 Flash` on the left side of the Status Bar.\n- Any alternative flashing method from host machine.\n\n\n### Wokwi Simulation\nWhen using a custom Wokwi project, please change the `WOKWI_PROJECT_ID` in\n`run-wokwi.sh`. If no project id is specified, a DevKit for esp32c3 will be\nused.\n\u003e **Warning**\n\u003e\n\u003e  ESP32-S3 is not available in Wokwi\n\n- Terminal approach:\n\n    ```\n    scripts/run-wokwi.sh [debug | release]\n    ```\n    \u003e If no argument is passed, `release` will be used as default\n\n- UI approach:\n\n    The default test task is already set to build the project, and it can be used\n    in VS Code and Gitpod:\n    - From the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) (`Ctrl-Shift-P` or `Cmd-Shift-P`) run the `Tasks: Run Test Task` command\n    - With `Ctrl-Shift-,` or `Cmd-Shift-,`\n        \u003e **Note**\n        \u003e\n        \u003e This Shortcut is not available in Gitpod by default.\n    - From the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) (`Ctrl-Shift-P` or `Cmd-Shift-P`) run the `Tasks: Run Task` command and\n    select `Build \u0026 Run Wokwi`.\n    - From UI: Press `Build \u0026 Run Wokwi` on the left side of the Status Bar.\n\n\u003e **Warning**\n\u003e\n\u003e  The simulation will pause if the browser tab is in the background.This may\n\u003e affect the execution, specially when debuging.\n\n#### Debuging with Wokwi\n\nWokwi offers debugging with GDB.\n\n- Terminal approach:\n    ```\n    $HOME/.espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gdb target/riscv32imc-esp-espidf/debug/losant_example -ex \"target remote localhost:9333\"\n    ```\n\n    \u003e [Wokwi Blog: List of common GDB commands for debugging.](https://blog.wokwi.com/gdb-avr-arduino-cheatsheet/?utm_source=urish\u0026utm_medium=blog)\n- UI approach:\n    1. Run the Wokwi Simulation in `debug` profile\n    2. Go to `Run and Debug` section of the IDE (`Ctrl-Shift-D or Cmd-Shift-D`)\n    3. Start Debugging by pressing the Play Button or pressing `F5`\n    4. Choose the proper user:\n        - `esp` when using VS Code or GitHub Codespaces\n        - `gitpod` when using Gitpod\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiogasquez%2Flosant-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergiogasquez%2Flosant-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiogasquez%2Flosant-example/lists"}