prasad-edlabadka / homebridge-tuya-ir

Allows homebridge to control Tuya Smart IR based devices
Apache License 2.0
50 stars 22 forks source link

Feature Request: Multiple IR Blasters #9

Closed madtempest closed 2 years ago

madtempest commented 2 years ago

Thank you for this plugin and hard work so far.

Can I please request that you add a feature to have multiple IR blasters configurable?

Thanks!

prasad-edlabadka commented 2 years ago

I don't have multiple device to test this. Code wise, this is not too complicated.

mgrosman commented 2 years ago

I'd like to upvote this request for ability to configure multiple IR blasters. Thanks!

mgrosman commented 2 years ago

@prasad-edlabadka If this is not difficult to add would you mind trying? I'm happy to help test :)

bkarlson commented 2 years ago

Same request here, multuple blasters is very useful, I can supply one in case you need.

prasad-edlabadka commented 2 years ago

@bkarlson @madtempest @mgrosman Please test with beta version v0.1.1-beta

bkarlson commented 2 years ago

thanks heaps! will test after Tuesday, away from home now

bkarlson commented 2 years ago

@prasad-edlabadka , can you clarify how to install beta version of the plugin from github?

I tried

$ npm install -g  git+https://github.com/prasad-edlabadka/homebridge-tuya-ir.git

or

npm -g link 

and nothing worked, I either get an install error (see below) or broken plugin:

npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /usr/local/lib/node_modules/homebridge-tuya-ir/node_modules/sshpk/bin/sshpk-conv
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/homebridge-tuya-ir/node_modules/sshpk/bin/sshpk-conv'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

Please help.

prasad-edlabadka commented 2 years ago

You should use homebridge-ui-x plugin to manage homebridge. It lets you install any version in a simple way.

bkarlson commented 2 years ago

Thanks for your help, UX was confusing (you'd have to click "Install previous version" in order to install next/beta version :), but all is good now.

I tested multiple IR blasters, and everything works as expected! Apart from I still cannot get all sub-devices discovered automatically, but if I add all IDs manuall everything's fine. You now can publish this beta as a release I guess.

Thanks so much for your work, @prasad-edlabadka !

prasad-edlabadka commented 2 years ago

Auto discovery works based on OEM hardware. I had contacted Tuya and they said not all devices will be returned in the API and is based on OEM (hardware vendor) plan with them.

I will close this issue now and create a release.

mgrosman commented 2 years ago

Great stuff guys, sorry just checking in after a while. @prasad-edlabadka looks like you've made lots of progress. @bkarlson Cheers for testing. Looking forward to try it out ad well in the coming days!

mgrosman commented 2 years ago

Hey @bkarlson @prasad-edlabadka can you please point me to the correct config for multiple IR blasters?

I added as below { "platform": "TuyaIR", "name": "TuyaIR", "client_id": "REDACTED", "secret": "REDACTED", "region": "eu", "autoFetchRemotes": true, "devices": [ "bf61f63ca5f06488e7m6wn", "bfa7222fa7c2a7277bsyyw" ], "deviceId": "bf0516c10a4c87ea2ckvm3", "smartIR": [ { "deviceId": "bf0516c10a4c87ea2ckvm3, bf22c49aa03094faf1s8m9", "autoFetchRemotes": true } ] }

Also looks like the bridge doesn't keep running after I start it:

image

mgrosman commented 2 years ago

Never mind figured it out. Missed the repeater for adding additional IR device block. All works as expected. Thanks!