{"id":20046031,"url":"https://github.com/johntalton/tca9548a","last_synced_at":"2026-03-01T13:33:43.251Z","repository":{"id":33959478,"uuid":"154047534","full_name":"johntalton/tca9548a","owner":"johntalton","description":"Texas Instruments I²C Bus Manager","archived":false,"fork":false,"pushed_at":"2025-09-24T04:57:09.000Z","size":151,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-24T06:25:03.094Z","etag":null,"topics":["8-channel","i2c","multiplexer","tca"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johntalton.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-10-21T20:05:18.000Z","updated_at":"2025-09-24T04:58:27.000Z","dependencies_parsed_at":"2024-06-04T20:16:17.396Z","dependency_job_id":"11c05d36-a6d3-4dbd-b1e1-9c4cbcfbb551","html_url":"https://github.com/johntalton/tca9548a","commit_stats":{"total_commits":85,"total_committers":4,"mean_commits":21.25,"dds":0.5529411764705883,"last_synced_commit":"8afda15710794d954b86eadcfe16a8e423a26206"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/johntalton/tca9548a","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johntalton%2Ftca9548a","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johntalton%2Ftca9548a/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johntalton%2Ftca9548a/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johntalton%2Ftca9548a/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johntalton","download_url":"https://codeload.github.com/johntalton/tca9548a/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johntalton%2Ftca9548a/sbom","scorecard":{"id":529119,"data":{"date":"2025-08-11","repo":{"name":"github.com/johntalton/tca9548a","commit":"4c8eac8e083040d766dbc340da31fb8748f653d1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/5 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/CI.yml:1","Warn: no topLevel permission defined: .github/workflows/DIAGRAMS.yml:1","Warn: no topLevel permission defined: .github/workflows/RELEASE.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/johntalton/tca9548a/CI.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/johntalton/tca9548a/CI.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/DIAGRAMS.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/johntalton/tca9548a/DIAGRAMS.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/DIAGRAMS.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/johntalton/tca9548a/DIAGRAMS.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/DIAGRAMS.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/johntalton/tca9548a/DIAGRAMS.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/RELEASE.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/johntalton/tca9548a/RELEASE.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/RELEASE.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/johntalton/tca9548a/RELEASE.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/CI.yml:12","Warn: npmCommand not pinned by hash: .github/workflows/RELEASE.yml:16","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 25 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T05:17:10.972Z","repository_id":33959478,"created_at":"2025-08-20T05:17:10.972Z","updated_at":"2025-08-20T05:17:10.972Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29970421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T13:32:00.443Z","status":"ssl_error","status_checked_at":"2026-03-01T13:32:00.084Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["8-channel","i2c","multiplexer","tca"],"created_at":"2024-11-13T11:20:28.981Z","updated_at":"2026-03-01T13:33:43.219Z","avatar_url":"https://github.com/johntalton.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TCA9548A\n\nA simple, but effective, solution for I²C bus management.\n\nThis package allows for direct and simple interaction with the channel (segment) selection API.  It also provides a `I2CBus` implementation for creating an abstraction layer for compositing multi-bus multi-sensor deployments.\n\n\n[Adafruit](https://learn.adafruit.com/adafruit-tca9548a-1-to-8-i2c-multiplexer-breakout?view=all) as always.\n\n[![npm Version](http://img.shields.io/npm/v/@johntalton/tca9548a.svg)](https://www.npmjs.com/package/@johntalton/tca9548a)\n![GitHub package.json version](https://img.shields.io/github/package-json/v/johntalton/tca9548a)\n![CI](https://github.com/johntalton/tca9548a/workflows/CI/badge.svg)\n![GitHub](https://img.shields.io/github/license/johntalton/tca9548a)\n[![Downloads Per Month](http://img.shields.io/npm/dm/@johntalton/tca9548a.svg)](https://www.npmjs.com/package/@johntalton/tca9548a)\n![GitHub last commit](https://img.shields.io/github/last-commit/johntalton/tca9548a)\n[![Package Quality](https://npm.packagequality.com/shield/%40johntal\n\n### `I2CBus` Abstraction\n\nThe [`I2CTca9548aBus`](github.com/johntalton/i2c-bus-tca9548a) implements this `I2CBus` interface, creating virtual bus instances for generic sensor consumption.  This allows for dynamic deployment environments with high code reuse.\n\n## API\n\nThe main interface and factory class is `Tca9548a`.  It provides the factory method `from` which is passed a valid I2CBus.\n\nChannel number for this 8-Channel device is 0 - 7\n\n##### `getChannels`\nQueries the device and returns and array of enabled channels. If not channels are enabled then the empty array is returned.\n\n##### `setChannels`\nSets the devices active channels.  Takes in an array of channels\n\n\n#### Example:\n\n```js\nconst i2c = require('i2c-bus');\nconst { Tca9548a } = require('@johntalton/tca9548a');\n\n// setup device\nconst i2c1 = await provider.openPromisified(1);\nconst device = await Tca9548a.from(new I2CAddressedBus(i2c1, 0x70));\nconst channels = await device.getChannels();\n\n// deconstruct and append channel three\nawait device.setChannels([...channels, 3]);\n\n```\n\n\n### Additional API\nThis package also provides an abstraction layer around Channel Management and the devices in order to expose a `I2CTcaBus` implementation.  This serves as a compliant `I2CBus` allowing for other Chip / Sensor implementations to abstract Bus Management and Sensor specific code.\n\n```js\n// ...\nconst i2c = // any comliant implementation like require('i2c-bus')\nconst virtualI2cX = await TcsBus.from(...);\n\nconst sensor = await SomeSensor.init(new I2CAddressedBus(virtualI2cX, sensorAddress));\n```\n\n\n## Concept\nThe TCA provides a management layer that exposes channels. Each channel is an I²C bus segment that can extends the host I²C bus. The management layer allow for forking and joining these channels.\n\nAs such, zero or more channel can extend the host bus.  Allowing for the host bus to address directly all connected devices to the unified channels.\n\n\n### Consider the following\nAssume four sensor are connected to the TCA chip via channel 0 and 1, and each sensor label by it's address.\n\n![example bus layout](examples/multibus.svg)\n\nUsing the above bus configuration, the following commands will describe and allow you to control the bus segments.\n```\n\u003e node tune off\n\u003e i2cdetect\n  0x10 0x70\n\u003e node tune 0\n\u003e i2cdetect\n  0x1 0x2 0x10 0x70\n\u003e node tune 1\n\u003e i2cdetect\n  0x3 0x4 0x10 0x70\n\u003e node tune 0 1\n\u003e i2cdetect\n  0x1 0x2 0x3 0x4 0x10 0x70\n```\n\nMake note of the last multi channel `tune` call.\nAlso the fact that `0x10` and `0x70` is always present from the host perspective as expected.\n\n### Overlapping static address multiplexing\nA simple / common use case is to use the TCA to select from sensor that would normally share an address (and create errors on the I²C bus) by placing each on individual channels:\n\n![example bus layout](examples/multiplex.svg)\n\nIn such a configuration the `tune` command would exclusively select each channel (never selecting more then one at a time), and the `i2cdetect` call would always return 0xA onto the host bus.\n\nSome care is needed by calling application layer when managing and caching recourses as called from code addressing 0xA (in this example) will result in read/write on different sensors depending on the channel configuration.\n\n\n## Interoperability / Dependencies\nThis project aims to provide a common / abstract I²C bus implementation such that transparent sensor logic can be written without knowledge of the bus layer.\n\nWrapper code for `i2c-bus` and `onoff` are well supported.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohntalton%2Ftca9548a","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohntalton%2Ftca9548a","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohntalton%2Ftca9548a/lists"}