iRayanKhan / homebridge-tuya-platform

This plugin has moved. Check: https://github.com/iRayankhan/homebridge-tuya
Https://Twitter.com/iRayanKhan
MIT License
9 stars 1 forks source link

smart blinds #9

Open Lestercity opened 4 years ago

Lestercity commented 4 years ago

first of all thanks for continuing this plugin, really appreciated. Finally got my way through getting the id and keys for my smart blinds controller through the uCoven Home app. Both controllers are discovered in Homebridge and show up in Home App. Unfortunately the status of them in Homebridge isn't correct and can't get them to control in Home App. Message in homebridge:

[TuyaAccessory] Sending first query to Rolluik Badkamer (3.3) [TuyaAccessory] Odd message from Rolluik Badkamer with command 10: � ˑ�|�ɝ��p�//B�0�g}(n�� [TuyaAccessory] Raw message from Rolluik Badkamer (3.3) with command 10: 000055aa000000010000000a0000002c00000001c90c1ccb9112967c02b218c99def1786709b2f2f42bc30fd1f677d28186e93eef627500b0000aa55

what I was wondering about the devices "id" and "key"; is the key dedicated standard for each device or is variable according to what app is used? Because I used to control them with the Smart Life app, but since the id and key couldn't be retrieved using that app I deleted the devices from the SmartLife app and added them to the uCoven app. After retrieving the id and key from the uCoven app, I added them back to SmartLife. Was wondering if that would be the issue? Should the app that was used to get the id and key be running in order to get them to work in Homebridge Home App? Thanks again.

iRayanKhan commented 4 years ago

Hi @Lestercity, The way the keys/id works is iffy, if you are primarily using HomeKit to control them, maybe you should leave them in the uCoven app. There also could be the issue of the fact that your blinds are using different status sets to be controlled.

Someone made a fork linked here that may fix this issue for you.

I am currently working on a fix to determine which blinds need which status set.

Lestercity commented 4 years ago

Hi Rayan. Thx for the fast respond. The blinds I am using are identical. Could you please send the link to fork for the fix. The link you pasted just brings me to the homepage of the plugin.

Thx again for your work.

Mvg Lester

vrijdag 7 februari 2020 20:08 +0100 van notifications@github.com notifications@github.com:

Hi @Lestercity , The way the keys/id works is iffy, if you are primarily using HomeKit to control them, maybe you should leave them in the uCoven app. There also could be the issue of the fact that your blinds are using different status sets to be controlled. Someone made a fork linked here that may fix this issue for you. I am currently working on a fix to determine which blinds need which status set. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or unsubscribe .

Lestercity commented 4 years ago

So I did a fresh installation. Added them back to the Ucomen app and again retrieved the id and keys. And kept them in Ucomen. And again they show up in Home App. Now no more error message. But the blinds dont respond on any action. Although Homebridge in Terminal is lined out with the commands I am giving in Home App to the Blinds, so that looks good. Only the blinds dont react. The status of the blinds, percentage open/close etc, given in Home App and Terminal isnt right either. There are now fully closed and the status in Home App is open. When adjusting the slider in Home App the tile will keep spinning for a few moment and then will end with a status in percentages open while it is fully closed still. Just a quick update of the situation. A little progress I believe but where are not there yet. Would really love to control my blinds through Home App. Heads up. Thanks

Mvg Lester

vrijdag 7 februari 2020 20:08 +0100 van notifications@github.com notifications@github.com:

Hi @Lestercity , The way the keys/id works is iffy, if you are primarily using HomeKit to control them, maybe you should leave them in the uCoven app. There also could be the issue of the fact that your blinds are using different status sets to be controlled. Someone made a fork linked here that may fix this issue for you. I am currently working on a fix to determine which blinds need which status set. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or unsubscribe .

iRayanKhan commented 4 years ago

Hi, I am still working on the fix, but a little busy too.

The link I sent gets sent to the fork, even if it looks like the main homepage.

iRayanKhan commented 4 years ago

Hey Lester, were you able try out the fork? I will publish a beta to make it easier instead of having to git clone it for everyone.

Lestercity commented 4 years ago

Hi Rayan. Thx for getting back to me. I wasnt able to try out the fork, thought installing the version of the fork was enough. But as I read your reply, I understand I need to git clone the fork. I didnt figure out yet how to do that. If you can guide me some steps on how to do that I am happy to try it. Thank you again. Still hoping 1 day it will work :-)

Mvg Lester

dinsdag 11 februari 2020 21:09 +0100 van notifications@github.com notifications@github.com:

Hey Lester, were you able try out the fork? I will publish a beta to make it easier instead of having to git clone it for everyone. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or unsubscribe .

iRayanKhan commented 4 years ago

Hey, I will have a beta release tomorrow that you should be able to test. I don't have any blinds to test this with, so if it crashes please let me know.

Lestercity commented 4 years ago

Ok great! Cant wait to try the beta. I let you know what happens. Thx again!

iRayanKhan commented 4 years ago

Hi @Lestercity sorry for the delay, I can publish the beta tomorrow as I tested some changes and you should be able to install it via NPM once it's live.

Lestercity commented 4 years ago

Ok great, cant wait :-). Please let me know when it is available. I will let you how it went. Thx again.

Mvg Lester

dinsdag 18 februari 2020 03:39 +0100 van notifications@github.com notifications@github.com:

Hi @Lestercity sorry for the delay, I can publish the beta tomorrow as I tested some changes and you should be able to install it via NPM once it's live. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or unsubscribe .

iRayanKhan commented 4 years ago

@Lestercity scratch that try installing it now using this command:

sudo npm i -g homebridge-tuya-platform@beta

Edit: You need to update your config. For the device type add "New" right before it.

So it would be: NewSimpleBlinds

Lestercity commented 4 years ago

So I installed the beta and it still giving me the same result, spinning tiles in Home App. Tried a fresh install but same outcome. I added some photos so you can check. Everything seems fine in Terminal Homebridge, but the blinds wont react on anything, just spinning tiles. 1A24F958-4CEC-4ECF-83D1-FA08267231F3

Lestercity commented 4 years ago

DB281D55-49A2-43CE-9FFE-427C8F7819A3

Lestercity commented 4 years ago

So I forgot to add the new device type “NewSimpleBlinds”. But after adding that to the config I am getting invalid type message when starting homebridge, see photo. 60677A5F-614D-4FF9-B3FB-51BFDA351E84

iRayanKhan commented 4 years ago

Hi @Lestercity I forgot to change the class name in the NewSimpleBlinds accessory file.

I pushed the changes to GitHub, but I have to wait 'till I get home to push the changes to NPM.

I will be able to push the changes to NPM in 4-5 hours.

Lestercity commented 4 years ago

Hi Rayan. Thx. Will wait for the change and proceed. Really big thanks for your effort and responses.

Mvg Lester

dinsdag 18 februari 2020 18:53 +0100 van notifications@github.com notifications@github.com:

Hi @Lestercity I forgot to change the class name in the NewSimpleBlinds accessory file. I pushed the changes to GitHub, but I have to wait 'till I get home to push the changes to NPM. I will be able to push the changes to NPM in 4-5 hours. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or unsubscribe .

Lestercity commented 4 years ago

Could you notify me when changes are active. Thx again.

Mvg Lester

dinsdag 18 februari 2020 18:53 +0100 van notifications@github.com notifications@github.com:

Hi @Lestercity I forgot to change the class name in the NewSimpleBlinds accessory file. I pushed the changes to GitHub, but I have to wait 'till I get home to push the changes to NPM. I will be able to push the changes to NPM in 4-5 hours. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or unsubscribe .

iRayanKhan commented 4 years ago

Hi @Lestercity just pushed a fix via npm install it link this: sudo npm i -g homebridge-tuya-platform@1.1.0

iRayanKhan commented 4 years ago

Hi @Lestercity, did you have a chance to test out the new version yet?

Lestercity commented 4 years ago

Hi Rayan. How are you? My wife took my macbook, that is running homebridge, with her to work. :-(. She will be back in about a hour. So cant wait to test it with the new version. In about 1-2 hours I will get back to you with the results. I will install the new beta over the old beta and will adjust the type to “NewSmartBlinds” in the config.json.  

Mvg Lester

woensdag 19 februari 2020 20:24 +0100 van notifications@github.com notifications@github.com:

Hi @Lestercity , did you have a chance to test out the new version yet? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or unsubscribe .

iRayanKhan commented 4 years ago

I'm good, thanks for asking, how are you? Can't wait to hear how it works for you! Also if you wanted to, you could get a raspberry pi to run homebridge on, that's what I did to keep it running 24/7.

Lestercity commented 4 years ago

Yes I was looking already at a rpi for running it 24/7.

About the new fix. After installing it and running homebridge I am getting errors in Terminal:

464389DF-B9B7-45B3-A2EA-E66E4DB8632A

Lestercity commented 4 years ago

Error: the requested platform ‘TuyaLan’ was not registered by any plugin.

Lestercity commented 4 years ago

Should I change anything else in the config.json besides the “Type”? Because the 1.1.0 version installs fine. But when launching Homebridge in Terminal I am getting error message: the requested platform ‘TuyaLan’ was not registered by any plugin.

iRayanKhan commented 4 years ago

I have to see, I mean if installed via NPM it should run. Let me do some more research.

Edit: Can you also paste your config with the keys redacted and such?

iRayanKhan commented 4 years ago

Are you using a Pi, sorry if I already asked. If so I'll show you how to git clone, as I think I just fixed the issue.

Lestercity commented 4 years ago

Hi Rayan. Thanks for getting back to me. Really appreciated! I am using a macbook to run homebridge. I am overthinking to get a pi as you advised, but for now I have only my macbook. Would it be possible to git clone using a mac?

iRayanKhan commented 4 years ago

Yes you should be able to. try typing git clone in terminal and see if it spits out a long list of commands.

Lestercity commented 4 years ago

I did. And indeed it does.

Mvg Lester

vrijdag 21 februari 2020 19:32 +0100 van notifications@github.com notifications@github.com:

Yes you should be able to. try typing git clone in terminal and see if it spits out a long list of commands. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or unsubscribe .

iRayanKhan commented 4 years ago

Yay! Ok so try doing this in terminal. Make sure you are in your NPM directory where the other NPM plugins are: git clone -b newBlinds https://github.com/iRayanKhan/homebridge-tuya-platform

Lestercity commented 4 years ago

Sorry for noob question. But how do I know or how do I make sure I am in the npm directory? :-(

iRayanKhan commented 4 years ago

Type cd (path)

Sent with GitHawk

iRayanKhan commented 4 years ago

I don’t know the path off the top of my head, the internet may help. Just search up “npm path macOS”

Sent with GitHawk

Lestercity commented 4 years ago
image
Lestercity commented 4 years ago

is this good

iRayanKhan commented 4 years ago

Looks good, make sure to remove the old Tuya-platform plugin

Hendriks046 commented 4 years ago

@Lestercity do you use the Tuya Curtain Module? @iRayanKhan I am running Homebridge on my rpi. Through Hoobs. If you are okay with it. I'll be happy to try.

Lestercity commented 4 years ago

Yes I do.

Mvg Lester

vrijdag 21 februari 2020 20:12 +0100 van notifications@github.com notifications@github.com:

@Lestercity do you use the Tuya Curtain Module? @iRayanKhan I am running Homebridge on my rpi. Through Hoobs. If you are okay with it. I'll be happy to try. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or unsubscribe .

Hendriks046 commented 4 years ago

@Lestercity I also see you are Dutch. Wich I am too!

Lestercity commented 4 years ago

ok great.

Lestercity commented 4 years ago

Rayan. So the betas still giving me the same message, SimpleBlinds not defined and requested platform not registered. After doing the git clone thing Homebridge was giving me lots of errors about writing access and Homebridge wouldn't start at all. After I wasn't able to install the 'normal' version of Homebridge Tuya Platform which was free of errors within Terminal. So I deleted the Tuya Platform and took the Tuya part out of the config.json. Now Homebridge starts up again but still giving me message:

ERROR LOADING PLUGIN homebridge-tuya-platform: [2/21/2020, 8:29:21 PM] ReferenceError: SimpleBlindsAccessory is not defined

Why is it still trying to load that plugin when I uninstalled it and took it out of the config?

iRayanKhan commented 4 years ago

@Lestercity re-add the plugin to the config and in terms of install type sudo before git cloning.

iRayanKhan commented 4 years ago

Ohhh I know why it isn't working. The plugin is still recognised as "homebridge-tuya-lan" in the config, but use sudo before git cloning. Should work

Lestercity commented 4 years ago

ok so I should reinstall latest beta 1.1.0. Then do the git clone part?

Lestercity commented 4 years ago
image
iRayanKhan commented 4 years ago

remove the old version of the plugin, and install via git clone

Hendriks046 commented 4 years ago

what's the command for removing the gitclone one? if I command sudo apt-get remove homebridge-tuya-platform. It says unable to locate package

iRayanKhan commented 4 years ago

@Hendriks046 you are using linux correct? If so the command is the same for macOS, sudo rm -rf homebridge-tuya-platform (To delete plugin)

Make sure you are in the correct path of where the plugin is stored

Hendriks046 commented 4 years ago

i am using macOS. i'm on my macbook. But i'm using the terminal in hoobs UI.

iRayanKhan commented 4 years ago

I don't have much experience with hoobs. Do you know where the plugin is stored in terms of file path?