rthewhite / homebridge-homewizard

23 stars 13 forks source link

homebridge stops after one or two hours #64

Open jeroen1973 opened 7 years ago

jeroen1973 commented 7 years ago

hi there

i have a rapberrypi 3 with raspbian jessie updated to the latest version.

plugins: homebridge-homewizard 0.0.59 homebridge-nest

When i start homebridge al runs well, no errors, i can find homebridge in homekit on iphone.

After several hours it becomes unresponvive and cant be controlled anymore....

what is going wrong?

niorg commented 7 years ago

Same issue here, running only with latest homebridge-homewizard plugin. Have spent quite some time already, but have not found a cause.

jeroen1973 commented 7 years ago

Found the solution! all is working fine now! here are the steps i did:

Stop homebridge,

update homebridge (sudo npm install -g --unsafe-perm homebridge)

Deleted the PERSIST and ACCESSORIES folders in the ~/.homebridge directory R estart Avahi (sudo systemctl restart avahi-daemon)

Delete homekit house on ios

start homebridge

add to homekit andf it works like a charm!

sabiwa commented 7 years ago

I have the same issue

I am curious how long it will work then. I have done this a few times before and in the end it stops after a while and in the log I only see updating the screens every minute and not the rest

I turned on debug and noticed that it works now without issue. What I see is that the screens update are in front of all the others and there is a debug message between them:

Aug 21 21:07:59 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Refresh... Aug 21 21:07:59 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved currentPosition WindowCovering for: Screen2 is:100 Aug 21 21:07:59 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved positionState WindowCovering for: Screen2 is:2 Aug 21 21:07:59 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved currentPosition WindowCovering for: Screen1 is:100 Aug 21 21:07:59 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved positionState WindowCovering for: Screen1 is:2 Aug 21 21:07:59 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] IncomingMessage { Aug 21 21:07:59 raspberrypi homebridge[12004]: _readableState: Aug 21 21:07:59 raspberrypi homebridge[12004]: ReadableState { Aug 21 21:07:59 raspberrypi homebridge[12004]: objectMode: false, Aug 21 21:07:59 raspberrypi homebridge[12004]: highWaterMark: 16384, Aug 21 21:07:59 raspberrypi homebridge[12004]: buffer: BufferList { head: null, tail: null, length: 0 },

and then after a while : Aug 21 21:08:00 raspberrypi homebridge[12004]: heatlinks: [Array], Aug 21 21:08:00 raspberrypi homebridge[12004]: kakusensors: [Array] } } } Aug 21 21:08:00 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved power state for: Thuis, true Aug 21 21:08:00 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved power state for: Weg, false Aug 21 21:08:00 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved power state for: Slapen, false Aug 21 21:08:00 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved power state for: Vakantie, false Aug 21 21:08:00 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved power state for: Buitenlamp - 1 Aug 21 21:08:00 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved power state for: Vitrine - 1 Aug 21 21:08:00 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved temperature for: Temp Buiten its 18 degrees Aug 21 21:08:00 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved humidity for: Temp Buiten its 74 % Aug 21 21:08:00 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved temperature for: Binnen temp its 22.9 degrees Aug 21 21:08:00 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved humidity for: Binnen temp its 59 % Aug 21 21:08:00 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved current heating state for:HeatLink its:off Aug 21 21:08:00 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved current temperature for:HeatLink its:22.847 degrees Aug 21 21:08:00 raspberrypi homebridge[12004]: [2017-8-21 21:07:59] Retrieved target temperature for:HeatLink its:20 degrees

When it goes wrong the second part doesn't show

ronzelver commented 7 years ago

Same here, even after I completely followed the steps above including clearing the Homebridge caches and re-initializing the Home App in iOS. Currently the logs of Homebridge show the following, apparently the Homewizard plugin is only retrieving the window cover status with it's refresh cycle every minute?!? Something must be wrong with the plugin as it only partially responds!

root@SACLRPi3:/home/pi# systemctl status homebridge
homebridge.service - Node.js HomeKit Server
   Loaded: loaded (/etc/systemd/system/homebridge.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2017-09-29 23:33:53 CEST; 10h ago
 Main PID: 1128 (homebridge)
   CGroup: /system.slice/homebridge.service
           └─1128 homebridge

Sep 30 10:04:13 SACLRPi3 homebridge[1128]: [2017-9-30 10:04:13] [HomeWizard] Refresh...
Sep 30 10:04:13 SACLRPi3 homebridge[1128]: [2017-9-30 10:04:13] [HomeWizard] Retrieved currentPosition WindowCovering for: Rolluik
Sep 30 10:04:13 SACLRPi3 homebridge[1128]: [2017-9-30 10:04:13] [HomeWizard] Retrieved positionState WindowCovering for: Rolluik is
Sep 30 10:04:13 SACLRPi3 homebridge[1128]: [2017-9-30 10:04:13] [HomeWizard] Retrieved currentPosition WindowCovering for: Zonwerin
Sep 30 10:04:13 SACLRPi3 homebridge[1128]: [2017-9-30 10:04:13] [HomeWizard] Retrieved positionState WindowCovering for: Zonwering
Sep 30 10:05:13 SACLRPi3 homebridge[1128]: [2017-9-30 10:05:13] [HomeWizard] Refresh...
Sep 30 10:05:13 SACLRPi3 homebridge[1128]: [2017-9-30 10:05:13] [HomeWizard] Retrieved currentPosition WindowCovering for: Rolluik
Sep 30 10:05:13 SACLRPi3 homebridge[1128]: [2017-9-30 10:05:13] [HomeWizard] Retrieved positionState WindowCovering for: Rolluik is
Sep 30 10:05:13 SACLRPi3 homebridge[1128]: [2017-9-30 10:05:13] [HomeWizard] Retrieved currentPosition WindowCovering for: Zonwerin
Sep 30 10:05:13 SACLRPi3 homebridge[1128]: [2017-9-30 10:05:13] [HomeWizard] Retrieved positionState WindowCovering for: Zonwering
lines 1-17/17 (END)

I'm running on the latest npm and homebridge versions (npm@5.4.2, node@v8.4.0, homebridge@0.4.28, homebridge-homewizard@0.0.59) and this my config.json:

root@SACLRPi3:/home/pi# cat /var/homebridge/config.json
{
    "bridge": {
        "name": "Homebridge",
        "username": "AA:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154"
    },

    "description": "This is the configation file of Homebridge",

    "accessories": [
    {
        "accessory"      : "NefitEasy",
        "name"           : "thermostaat",
        "authentication" : {
            "serialNumber" : "xxxxxxxxx",
            "accessKey"    : "xxxxxxxx",
            "password"     : "xxxxxxxxx"
        }
    },
    {
        "accessory": "homebridge-rpitemp.RpiTemp",
        "name": "RPi CPU Temp",
        "tempid": "cpu"
    }
    ],

    "platforms": [
    {
        "platform": "HarmonyHub",
        "name": "Harmony Hub Woonkamer"
    },
    {
        "platform": "HomeWizard",
        "url": "http://192.168.1.10",
        "password": "xxxxxxxx",
        "filtered": ["accessoryName"],
        "debug": false,
        "heatlinks" : 0,
        "switchTypes": {
                "accessoryName": "fan",
                "accessoryName": "outlet",
                "accessoryName": "switch",
                "accessoryName": "lightbulb"
        },
        "createPresetSwitches": true,
        "presetNames": {
                "home": "Home Preset",
                "away": "Away Preset",
                "sleep": "Sleep Preset",
                "holiday": "Holiday Preset"
        },
        "createSceneSwitches": false
    },
    {
        "platform": "FoscamCamera",
        "name": "Foscam Woonkamer",
        "cameras": [{
        "username": "xxxxxxx",
        "password": "xxxxxxx",
        "host": "192.168.1.14",
        "port": "88",
        "stay": "0",
        "away": "8",
        "night": "4"
        }]
    }
    ]
}
Martinvdm commented 7 years ago

Same issue here. It was working well with an onder version. Now after upgrading to latest issue as described.

rthewhite commented 6 years ago

I don't have a working setup anymore since i don't have a HomeWizard anymore. Currently in the middle of moving as well so pretty busy.

What would maybe help if you guys could figure out from which version on this problem started. You can install a specific version using:

npm install -g homebridge-homewizard@X.X.X

Where x.x.x is the version obviously, if you can figure out which version caused the issues i might be able to find out what's going on if i find some time.

Martinvdm commented 6 years ago

It look likes that without a ASUN650 it works better. I filtered out the ASUN650. This is seen as Shutter in Homebridge an look likes is hanging always at the percentage xx ' loading'.

ronzelver commented 6 years ago

Martin, did you remove the ASUN device from the Homewizard configuration to test this?

Martinvdm commented 6 years ago

No, No i filtered it through the config file of homebridge

ronzelver commented 6 years ago

OK thanks, I filtered my two ASUN and Somfy window shutters out and now my Homebridge works for almost 24 hours without restarts :-) I think some basic (default) initialization of these devices could fix this erroneous behavior.

ronzelver commented 6 years ago

And it's back again, I have to restart Homebridge once or twice a day because none of the Homewizard devices are responding, the logs show only "[HomeWizard] Refresh..." every minute. All other plugins (Foscam, Nefit Easy) are still responding normally.

ijzen006 commented 6 years ago

Hi Raymond, I have the same issue starting with version 0.0.56. no issues with version 0.0.55.

JeeAre70 commented 6 years ago

Same issue here. Have got 3 somfy devices included in the config as well an ASUN. My config seems to be quite stable, although usually i don't get it to run a full 24 hours. When it stops responding i find the same status in the homebridge log file about retrieving current window covering. I have made the configuration quite "stable" by limiting the update retrieval from homewizard to only 60 minutes. At the same time I have configured an IP switch on the HW to update homekit automatically on any scheduled task that is performed on the homewizard. In that way HW and HK stay quite in sync. Would love this bug to be fixed.

jphorn commented 6 years ago

At the same time I have configured an IP switch on the HW to update homekit automatically on any scheduled task that is performed on the homewizard. In that way HW and HK stay quite in sync.

Could you elaborate on this @JeeAre70? What steps did you follow?

JeeAre70 commented 6 years ago

Hi,

Its really simple. Create an IP switch in HW. Create an On http://IP http://ip/ of HB:PORT OF HB Create an Off http://IP http://ip/ of HB:PORT OF HB

Once you have created the IP switch include it in any automated task or action that you want HB to be notified about. For instance when a door sensor is open activate the Ping Homekit switch as I have called my IP switch for this.

Good luck.

Regards Joost

On 26 Apr 2018, at 20:47, Jean-Paul Horn notifications@github.com wrote:

At the same time I have configured an IP switch on the HW to update homekit automatically on any scheduled task that is performed on the homewizard. In that way HW and HK stay quite in sync.

Could you elaborate on this @JeeAre70 https://github.com/JeeAre70? What steps did you follow?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rthewhite/homebridge-homewizard/issues/64#issuecomment-384750521, or mute the thread https://github.com/notifications/unsubscribe-auth/Ah0tnYyH3WTbaWz8KYhaVnt41SRnWDKOks5tshYngaJpZM4O5RvF.

jphorn commented 6 years ago

Just to be certain: the IP switch in Homewizard is just a simple HTTP GET for http://<homebridge_ip>:port/ right? Or do I need to execute a HTTP POST command with certain command in the body?

homewizard IP switch

JeeAre70 commented 6 years ago

No just straightforward.

simple HTTP GET for http://:port

Gr. Joost

Joost@Rosken.org

Op 26 apr. 2018 om 23:08 heeft Jean-Paul Horn notifications@github.com het volgende geschreven:

Just to be certain: the IP switch in Homewizard is just a simple HTTP GET for http://:port/ right? Or do I need to execute a HTTP POST command with certain command in the body?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

jphorn commented 6 years ago

Cool. That's what I have. Thanks again (dankjewel!)

Darko2 commented 6 years ago

Maybe try adjusting the config.json. By default it should have a pushserver parameter, where also the refresh interval is setup.

try add

"pushServer": {"period": 10}

See if that works for you. It solved the responsiveness problem for me.

Hulliee commented 6 years ago

I went back to version 0.50 homebridge-homewizard. I've been running now for days, weeks