This library(?) uses TuyAPI and mntt to control certain Geeni/Merkury devices (and probably other Tuya products but I only own walmart smart products) I currently only support these Smart Plugs, Smart Light Switches, Smart 3 Way Light Switches, and Smart Bulbs
Well, in my very brief research I didn't find one that I liked, and I had a week off of school and also just felt like making something so here we are
You probably shouldn't, but if you just want questionable boilerplate code that can be somewhat easily extended, this might be the least wrong repo for you
(An example of setting up different devices can be found in index.js)
- Follow TuyAPI setup to get the ID and Localkey of a device
- (if using mqtt) rename mqtt_broker.conf.template to mqtt_broker.conf and fill in the info
- Import a class from one of the folders (mqttDevices for controlling through scripts and mqtt, or tuyaDevices for just controlling through scripts)
- Create an instance, passing the ID and Key in as arguments
- Call the connect method
Note: When using mqtt, call connect after the mqtt client has connected to the broker, see index.js