jvmahon / homebridge-smartshades

3 stars 5 forks source link

NEO Shade stopped working HB 1.4 #9

Closed boboxx closed 2 years ago

boboxx commented 2 years ago

For some reason my shades just stopped working. when ever I ask Siri to open my blinds, HB restarts... I can telnet to the Neo prior to asking Siri but once Siri sends the command my NEO controller is not reachable. after a few se. Later it comes back online.

I'm using Homebridge Smartshades homebridge-smartshades v0.0.13

[2/15/2022, 11:48:57 AM] Error: connect ECONNREFUSED 10.1.10.4:8839 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16) [2/15/2022, 11:48:57 AM] Got SIGTERM, shutting down Homebridge... [2/15/2022, 11:49:02 AM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [2/15/2022, 11:49:07 AM] [HB Supervisor] Restarting Homebridge... [2/15/2022, 11:49:07 AM] [HB Supervisor] Starting Homebridge with extra flags: -I [2/15/2022, 11:49:07 AM] [HB Supervisor] Started Homebridge v1.4.0 with PID: 13202

MianAtif-ahmad commented 2 years ago

Can you sure your configuration file. I am trying to configure but failing. Need real life example as I am not much of a programmer

boboxx commented 2 years ago

{ "platform": "NEOShades", "name": "NEOShades", "host": "10.1.1.4", "controllerID": "AAAAAAAAAXXXXXXXX", "shades": [ { "name": "Bedroom Left", "code": "148.101-01" }, { "name": "Bedroom Right", "code": "148.101-02" } ] }

boboxx commented 2 years ago

I did a fresh install of HB 1.4 with the latest Smartshades v0.0.13 I still have the issue, but ii can see this in the logs now:

[2/19/2022, 8:59:53 AM] Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:217:20) [2/19/2022, 8:59:53 AM] Got SIGTERM, shutting down Homebridge... ┌───────────────────────────────────────────────────┐ │ homebridge-smartshades update check failed │ │ Try running with sudo or get access │ │ to the local update config store via │ │ sudo chown -R $USER:$(id -gn $USER) /root/.config │ └───────────────────────────────────────────────────┘

Using theNeoSmartBlinds app, I have no problem controlling any of my blinds

jvmahon commented 2 years ago

@boboxx

ECONNREFUSED usually means that the controller can't be found. Is it possible that it's IP address changed? Check in your NeoSmartBlinds app to confirm the IP address.

boboxx commented 2 years ago

no Ip change, I can ping the controller no problem from the HB server

jvmahon commented 2 years ago

no Ip change, I can ping the controller no problem from the HB server

Unfortunately, I have no idea why this is happening. I just tested my own install and its fine. I'm running Node.js Version 16.14.0 with Homebridge 1.4.0 -- please check that you are using the same versions.

boboxx commented 2 years ago

same here it's very strange!

System Information Timezone GMT-0400 OS Ubuntu Bionic Beaver (18.04.6 LTS) Hostname homebridge-vm IPv4 (eth0) 10.1.1.2 IPv6 (eth0) fd80:f783:73ff:478b:215:5dff:fe01:aa25 Node.js Version v16.14.0 Npm Version v8.3.1 User root Storage Path /homebridge Config Path /homebridge/config.json Plugin Path /homebridge/node_modules Docker Yes

jvmahon commented 2 years ago

When people have problems with homebridge and one of my plugins, its almost always on a Ubuntu/Docker/Linux system and almost always some form of a permission problem. The only thing I can suggest is, if you have a spare Raspberry Pi, you can create a "homebridge" specific image directly from Raspberry Pi imager (see https://www.raspberrypi.com/software/ , navigate the menus: Choose OS -> "Other specific-purpose OS" -> "Home assistants and home automation" -> Homebridge). I think that's the easiest way to set up Homebridge and have all the permissions correct.

MianAtif-ahmad commented 2 years ago

image

Similar problem

jvmahon commented 2 years ago

Are you running multiple plugins? I run the plugin as a child bridge device - are you doing that? If not, maybe that's why mine works and you're having problems.

To set up child bridge devices, first install config-ui-x. The access the Bridge Settings from config-ui-x: image

Turn on the "Child Bridge" and pair with iOS as a child bridge.

Not sure this will help, but there must be some reason why it still works for me but doesn't for you.

jvmahon commented 2 years ago

Also, the obvious - try unplugging and then rebooting both the NEO controller as well as homebridge.

This link, which is for a different plugin, reports similar problems and indicates its a low-level networking issue, not the homebridge software or a plugin.: https://github.com/chrisjshull/homebridge-nest/issues/345

Reboot your router, wifi, etc. I have occasionally had homebridge problems that went away after wifi router reboots.

Basically, I'm down to the "have you tried turning it off and on again" method of fixing it.

boboxx commented 2 years ago

@MianAtif-ahmad, yes same issue as me!

@jvmahon , I tried rebooting the controller, I also did a Homebridge reinstall. (from Ubuntu container to a docker image). Everything was working fine until the last few updates.

alexgm1290 commented 2 years ago

Hey! I’m having the same exact issue. Any solutions?

jvmahon commented 2 years ago

Hey! I’m having the same exact issue. Any solutions?

Also using Docker / Ubuntu?

boboxx commented 2 years ago

I tried the pi image on a pi3 and the problem was the same. It’s not a install issue.

jvmahon commented 2 years ago

I just did a full / clean install on Windows and it works fine.

It also works fine on my RPI setting. But I have two non-default settings set on RPI, so may be you can try them . . .

Can you guys try . . . In the main Homebridge config-ui-X window, select "Homebridge Settings" . . .

image

Then in the settings window, change "mDNS Advertiser" to "Avahi" and Enable "Insecure" mode.

image

jvmahon commented 2 years ago

As a FYI, here's the config.json that I used in Windows . . .

{
    "bridge": {
        "name": "HomeBridge",
        "username": "CD:22:3D:E3:DE:93",
        "port": 51869,
        "pin": "234-56-789",
        "advertiser": "ciao"
    },
    "description": "Homebridge Bridge",
    "platforms": [
        {
            "name": "Config",
            "port": 8582,
            "auth": "none",
            "theme": "auto",
            "tempUnits": "f",
            "lang": "auto",
            "platform": "config"
        },
        {
            "platform": "NEOShades",
            "name": "NEOShades",
            "host": "192.168.1.192",
            "controllerID": "220055000b504b5350313220",
            "shades": [
                {
                    "name": "Kitchen Window",
                    "code": "045.149-01"
                },
                {
                    "name": "Living Room",
                    "code": "169.170-02"
                }
            ]
        }
    ],
    "accessories": []
}

Note that the "advertiser" variable on RPI / Linux should be "avahi"

boboxx commented 2 years ago

I was on ciao but switched to avahi, same issue.

I think the issue is related to node.js with ipv6

jvmahon commented 2 years ago

The only remaining thing I can think of is to try an update of all the npm packages that you are using, on linux / RPI . . .

sudo hb-service stop
sudo npm -g update
sudo hb-service start
alexgm1290 commented 2 years ago

Not sure why, but I just unplug the controller and plugged it back in and it worked.

Stay hungry, stay foolish.

On Feb 27, 2022, at 9:34 AM, jvmahon @.***> wrote:



The only remaining thing I can think of is to try an update of all the npm packages that you are using, on linux / RPI . . .

sudo hb-service stop sudo npm -g update sudo hb-service start

— Reply to this email directly, view it on GitHubhttps://github.com/jvmahon/homebridge-smartshades/issues/9#issuecomment-1053573889, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE45C5APNVCPT6OFWH6JWZLU5IY6DANCNFSM5OPD6OMA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.***>

jvmahon commented 2 years ago

Not sure why, but I just unplug the controller and plugged it back in and it worked.

Glad that worked. Here's some general guidance for all these types of issues:

https://youtu.be/nn2FB1P_Mn8

alexgm1290 commented 2 years ago

Update: it’s not working again. Same error as described in previous messages.

boboxx commented 2 years ago

I have the same outcome, if I power cycle the Neo Controller it works in HomeBridge for a few times then it starts to crash the services again.. meanwhile I have no problem using the Neo Smart blind app on the iPad.

jvmahon commented 2 years ago

Sorry, no idea why some are having these problems. My RPi and Windows installs work fine. Not sure if this is a debian / other linux / HOOBS / or other platform-specific issue.

jvmahon commented 2 years ago

Not sure if this will help with the problems here, but ...

Update the plugin to 0.0.14

Try configuring it using the config-ui-x interface.

jvmahon commented 2 years ago

@boboxx , @alexgm1290 @MianAtif-ahmad

I checked with NEO and they did make changes to the shade control protocol. Specifically, you now have to specify the type of shade motor you are using (Bofu is now the default, but the plugin now supports 10 different options).

I have updated the plugin to version 1.0.0 and you should update. The plugin also now supports the Config-UI-X interface for configuration (which you should use instead of manually editing the config.json file)

Here's my recommendation for how to try and fix it . . .

  1. From the homebridge config-ui-x, first completely remove the old plugin. image

  2. Then in the "Search for plugins to install box" search for homebridge-smartshades. Install the latest version (as of my writing this, that's version 1.0.0 with a date of 2022-03-09).

  3. After that installs, click on "Settings" image

  4. Then configure the plugin using the new "Settings" dialog:

image

jvmahon commented 2 years ago

Oh, and let me know if it works now.

jvmahon commented 2 years ago

No further response, so closing the issue.

boboxx commented 2 years ago

It's still the same issue. even with the new config editor. I know it's not a configuration as this was working before migrating to HB 1.4 and the latest Neo Shade plugin.

jvmahon commented 2 years ago

It's still the same issue. even with the new config editor. I know it's not a configuration as this was working before migrating to HB 1.4 and the latest Neo Shade plugin.

AT this point, there is really nothing I can do with the plugin to fix the issue. The plugin works for me and others, so the issue is somewhere else.

The only suggest is a complete delete of npm, homebridge, etc. and start over. Sorry, wish I could be more helpful, but I can't.

boboxx commented 2 years ago

I don't think it's the install, I have done 2 fresh OS install and the preconfigured Pi install. They all have the same issue. I know your code did not change much but the dependencies and the version of HB did change, It has to be related to this as this is the only change that has happened on my side.

jvmahon commented 2 years ago

Update the plugin to 1.0.4 Then, in your NEO shade app, check the motor code for each shade you are trying to use with the plugin. If the motor codes aren't set right, the plugin wont work.

boboxx commented 2 years ago

I have confirmed that my config matched the NEO shade app Motor code for each blind. They are all set to "bf".

jvmahon commented 2 years ago

I have confirmed that my config matched the NEO shade app Motor code for each blind. They are all set to "bf".

Unfortunately, I can't think of anything else to suggest right now. The problem I'm having is I can't reproduce the error - i.e., its working fine on my controller.

boboxx commented 2 years ago

I will try do do a new deployment with just this plug in. I currently have TuyaWebPlatform, Homebridge Midea Air, Homebridge myQ and Homebridge TPLink Smarthome also installed.

boboxx commented 2 years ago

homebridge-config-ui-x v4.43.0 fix the blind issue!! looks like it was a "routing" issue

alexgm1290 commented 2 years ago

I got it to work properly with the new update. Just make sure to select the right motor.

Stay hungry, stay foolish.

On Mar 14, 2022, at 11:57 AM, boboxx @.***> wrote:



I don't think it's the install, I have done 2 fresh OS install and the preconfigured Pi install. They all have the same issue. I know your code did not change much but the dependencies and the version of HB did change, It has to be related to this as this is the only change that has happened on my side.

— Reply to this email directly, view it on GitHubhttps://github.com/jvmahon/homebridge-smartshades/issues/9#issuecomment-1066989562, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE45C5EPGIG3AQ4LVDNYOG3U75OWNANCNFSM5OPD6OMA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.***>

DavithkbY commented 1 year ago

Hi, I have the same issue. It worked for a few days and now I can't get it to work. Even with postman when I send a manuel get request with all the right parameters I still get ECONNRESET error.

Screenshot:

image
Beeso27 commented 2 weeks ago

Try rebooting the Neo Smart Controller by turning on/off for 10+ seconds. When the controller gets too many requests too quickly it starts to refuse a connection from that IP address. The plugin is 'well behaved' and has a 0.5 second wait between sending commands but sometimes the controller just seems to block them. This worked for me after many hours of trying to debug code and various options to call the controller. Nothing more frustrating than when the 'try turning it on/off' works!