Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/isundaylee/tuya_exporter
Simple Prometheus exporter for Tuya IoT plugs.
https://github.com/isundaylee/tuya_exporter
Last synced: 29 days ago
JSON representation
Simple Prometheus exporter for Tuya IoT plugs.
- Host: GitHub
- URL: https://github.com/isundaylee/tuya_exporter
- Owner: isundaylee
- Created: 2021-03-07T21:17:00.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-09T04:33:11.000Z (3 months ago)
- Last Synced: 2024-08-09T05:33:47.862Z (3 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tuya Exporter
This is a very bare-bone exporter for exporting information from Tuya IoT
smart plugs that exports the following gauges:- `tuya_consumption_current` (in amps)
- `tuya_consumption_power` (in watts)
- `tuya_consumption_voltage` (in volts)I have only tested this with [these
plugs](https://www.amazon.com/gp/product/B07CVPKD8Z/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1).
But it might work with other similar Tuya plugs too.## Usage
You can either run `tuya_exporter.py` directly or run it via Docker using the
`isundaylee/tuya_exporter` image. In either case, pass the device
configuration as arguments on the command line with this format:```
$ tuya_exporter.py ::: \
::: \
...
```You can specify anything you like as the name - it shows up as part of the
Prometheus labels. How to retrieve device IP/ID/local key depends on your
particular plug model. Search the Internet for the most up-to-date way to
retrieve those information (e.g. [the tutorial
here](https://github.com/iRayanKhan/homebridge-tuya/wiki/Get-Local-Keys-for-your-devices)).For my test plugs, device IDs are 22-character alphanumeric strings, and
local keys are 16-character alphanumeric strings. But they might be different
for your plugs.## Changelog
- v0.0.2
- Support local keys with `:` in them.