{"id":26709725,"url":"https://github.com/square-it/flogo-demo-iot","last_synced_at":"2026-04-28T14:34:28.095Z","repository":{"id":64303608,"uuid":"154666338","full_name":"square-it/flogo-demo-iot","owner":"square-it","description":"Screen application of the Square IT Flogo demo","archived":false,"fork":false,"pushed_at":"2019-02-16T10:47:10.000Z","size":2000,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-04T00:36:52.292Z","etag":null,"topics":["flogo","go","golang","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/square-it.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-25T12:23:04.000Z","updated_at":"2021-09-06T03:55:50.000Z","dependencies_parsed_at":"2023-01-15T10:00:50.277Z","dependency_job_id":null,"html_url":"https://github.com/square-it/flogo-demo-iot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/square-it/flogo-demo-iot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square-it%2Fflogo-demo-iot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square-it%2Fflogo-demo-iot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square-it%2Fflogo-demo-iot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square-it%2Fflogo-demo-iot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/square-it","download_url":"https://codeload.github.com/square-it/flogo-demo-iot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square-it%2Fflogo-demo-iot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32385199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["flogo","go","golang","raspberry-pi"],"created_at":"2025-03-27T08:18:18.387Z","updated_at":"2026-04-28T14:34:28.080Z","avatar_url":"https://github.com/square-it.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flogo demo by Square IT Services - IoT application\n\n![Flogo Demo display](doc/rpi_smiley.jpg)\n\n## Introduction\n\nThis repository is part of the [**Flogo Demo by Square IT Services**](https://github.com/square-it/flogo-demo).\n\n* [This Flogo application](#description) manages the screen display part.\n* [Another Flogo application](https://github.com/square-it/flogo-demo-services) is used to manage the interactions with end-users.\n\nCurrently, these two applications communicates very simply through a REST service.\n\n![Flogo Demo architecture](https://github.com/square-it/flogo-demo/blob/master/FlogoDemo.png)\n\n\n## Description\n\nThe application is running on a Raspberry Pi.\nIts goal is to display a smiley image on the display of the Raspberry Pi.\n\nThe smiley image is chosen using a **REST API over HTTP**.\nThis API is described by the file [swagger.yaml](spec/swagger.yaml)\n\n## Implementation\n\nThe application is built with [Flogo](http://www.flogo.io/) and [Square IT custom activities](https://github.com/square-it/flogo-contrib-activities).\n\nThe flow is composed of:\n\n- A REST trigger\n- A log activity to print the input request\n- A command activity to hide the previous smiley image displayed\n- A command activity to display the new smiley image\n- A return activity to reply to the client\n\nThe program [fbi](https://linux.die.net/man/1/fbi) is used by the application to display the images.\n\nThe smiley images used come from the [openmoji site](http://openmoji.org/).\n\n## Prerequisites\n\n* a Raspberry Pi with a screen display, sudoer right and SSH access (using Raspbian with default user ```pi``` is advised)\n* a system with Go \u0026 Flogo installed (for compilation only)\n\n## Usage\n\n### Prepare\n\n1. configure your SSH config (considering the Raspberry Pi is reachable at 192.168.1.2)\n```\nmkdir -p ~/.ssh\ntouch ~/.ssh/config\nexport RPI_IP=192.168.1.2\ncat \u003c\u003cEOF \u003e\u003e ~/.ssh/config\nHost rpi\n        HostName $RPI_IP\n        User pi\nEOF\n```\n\n2. copy the smileys to the Raspberry Pi\n```\nssh rpi 'curl -fsSL https://github.com/hfg-gmuend/openmoji/releases/download/1.0.0/618x618-color.zip \u003e /tmp/618x618-color.zip \u0026\u0026 rm -rf ~/emojis \u0026\u0026 unzip -q /tmp/618x618-color.zip -d ~/emojis'\n```\n\n3. install ```fbi```\n```\nssh rpi 'sudo apt-get update \u0026\u0026 sudo apt-get install -y fbi'\n```\n\n4. to enable OpenTracing, run a Zipkin collector (optional):\n```\ndocker run --name zipkin -d -p 9411:9411 openzipkin/zipkin\n```\n\u003e For detailed instructions read [OpenTracing collectors for Flogo](https://github.com/square-it/flogo-opentracing-listener#collectors).\n\n### Build from sources\n\n1. clone this repository\n```\ngit clone https://github.com/square-it/flogo-demo-iot.git\ncd flogo-demo-iot\n```\n\n2. compile the application into a native executable\n```\nGOOS=linux GOARCH=arm GOARM=7 flogo build -e\n```\n\n\u003e Go language supports cross-compilation out-of-the-box.\n\n### Test\n\n1. copy the executable to the Raspberry Pi\n```\nscp bin/linux_arm/flogo-demo-iot rpi:~\n```\n\n2. run the executable on the Raspberry Pi\n```\nssh rpi 'sudo DEMO_IOT_EMOJIS_DIR=~/emojis/618x618-color ~/flogo-demo-iot'\n```\n\nTo enable OpenTracing with a Zipkin HTTP collector listening on 192.168.1.1:9411, run instead\n```\nssh rpi 'sudo DEMO_IOT_EMOJIS_DIR=~/emojis/618x618-color FLOGO_OPENTRACING_IMPLEMENTATION=zipkin FLOGO_OPENTRACING_TRANSPORT=http FLOGO_OPENTRACING_ENDPOINTS=http://192.168.1.1:9411/api/v1/spans ~/flogo-demo-iot'\n```\n\n3. test with a sample smiley\n```\ncurl http://192.168.1.2:4445/v1/smiley/1F605\n```\n\n## Development\n\n1. run a Flogo Web UI\n```\ndocker run --name flogo -it -d -p 3303:3303 -e FLOGO_NO_ENGINE_RECREATION=false flogo/flogo-docker:v0.5.8 eula-accept\n```\n\n2. install custom-made activities contributions\n```\ndocker exec -it flogo sh -c 'cd /tmp/flogo-web/build/server/local/engines/flogo-web \u0026\u0026 flogo install github.com/square-it/flogo-contrib-activities/command'\ndocker exec -it flogo sh -c 'cd /tmp/flogo-web/build/server/local/engines/flogo-web \u0026\u0026 flogo install github.com/square-it/flogo-contrib-activities/copyfile'\n```\n\n3. restart the Flogo Web UI container\n```\ndocker restart flogo\n```\n\nThe Flogo Web UI is available at ```http://localhost:3303```.\n\nImport the application using the [provided *flogo.json*](./flogo.json).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquare-it%2Fflogo-demo-iot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquare-it%2Fflogo-demo-iot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquare-it%2Fflogo-demo-iot/lists"}