{"id":37430316,"url":"https://github.com/hashmapinc/tempus-connectors","last_synced_at":"2026-01-16T06:34:33.397Z","repository":{"id":57728008,"uuid":"150573252","full_name":"hashmapinc/tempus-connectors","owner":"hashmapinc","description":"Repo for library that allows kubeless to communicate with Tempus","archived":false,"fork":false,"pushed_at":"2018-10-19T10:40:51.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-07-17T12:55:14.100Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hashmapinc.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-09-27T11:00:33.000Z","updated_at":"2020-06-09T06:30:40.000Z","dependencies_parsed_at":"2022-08-30T09:11:19.044Z","dependency_job_id":null,"html_url":"https://github.com/hashmapinc/tempus-connectors","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hashmapinc/tempus-connectors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashmapinc%2Ftempus-connectors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashmapinc%2Ftempus-connectors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashmapinc%2Ftempus-connectors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashmapinc%2Ftempus-connectors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hashmapinc","download_url":"https://codeload.github.com/hashmapinc/tempus-connectors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashmapinc%2Ftempus-connectors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"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":[],"created_at":"2026-01-16T06:34:32.585Z","updated_at":"2026-01-16T06:34:33.388Z","avatar_url":"https://github.com/hashmapinc.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tempus-Connectors\n\nRepo for library that allows kubeless to communicate with Tempus.\n\nThere are two utilities provided in this repo:\n\n## InputParserUtility\n\nIt is used to parse the json data with some mandatory parameters/fields. \"id\" and either \"ts\" or \"ds\" are mandatory parameters in the json.\nThe user can add more fields whose presence he wants to validate. Refer to code snippet. Here \"key\" is extra field which the user wants to validate.\n\n```java\n    import com.hashmapinc.tempus.InputParserUtility;\n\n    InputParserUtility inputParserUtility = new InputParserUtility();\n            String jsonStr = \"{\\\"id\\\":\\\"1\\\", \\\"ts\\\":1483228800000, \\\"key\\\":\\\"val\\\"}\";\n            inputParserUtility.validateJson(jsonStr, Collections.singletonList(\"key\"));\n```\n\n## MqttConnector\n\nIt is used to publish timeseries and depthseries data to tempus through a gateway device via mqtt.\nThe json format for timeseries data to be published is\n\n```json\n    {\n      \"Device A\": [\n        {\n          \"ts\": 1483228800000,\n          \"values\": {\n            \"temperature\": 42,\n            \"humidity\": 80\n          }\n        },\n        {\n          \"ts\": 1483228801000,\n          \"values\": {\n            \"temperature\": 43,\n            \"humidity\": 82\n          }\n        }\n      ]\n    }\n```\nJson format for depthseries data is\n```json\n    {\n      \"Device A\": [\n        {\n          \"ds\": 200.4,\n          \"values\": {\n            \"temperature\": 42,\n            \"humidity\": 80\n          }\n        },\n        {\n          \"ds\": 300.3,\n          \"values\": {\n            \"temperature\": 43,\n            \"humidity\": 82\n          }\n        }\n      ]\n    }\n```\nInorder to publish data see the code snippets.\n\n```java \n    import com.hashmapinc.tempus.MqttConnector;\n```\nImport MqttConnector.\n\n```java \n    private static final String MQTT_URL = \"tcp://tempus.hashmapinc.com:1883\";\n    private static final String ACCESS_TOKEN = \"DEVICE_GATEWAY_TOKEN\";\n```\n\nGive mqtt url and access token of tempus gateway device.\n\n```java\n    Optional\u003cLong\u003e empty = Optional.empty();\n    String json = \"{\\\"calValue\\\":\\\"result\\\"}\";\n    new MqttConnector(MQTT_URL, ACCESS_TOKEN).publish(json, empty, Optional.of(200.6), \"device_name\" + inputData.id);\n```\nThis will publish depthseries data i.e \"json\" in above code to a new device whose name is combination of \"device_name\" and inputData.id.\nNote: In publish method empty is passed to \"ts\" long value. When publishing \"ds\" empty would be passed to \"ds\" double value.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashmapinc%2Ftempus-connectors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhashmapinc%2Ftempus-connectors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashmapinc%2Ftempus-connectors/lists"}