NorthernMan54 / homebridge-alexa

Expose your homebridge controlled devices to Amazon Alexa.
https://www.homebridge.ca
453 stars 69 forks source link

Home App displays "no response" after a couples of hours #7

Closed safzal closed 7 years ago

safzal commented 7 years ago

I am having trouble with my homebridge I have recently install the homebridge-alexa,

one everything is setup after couple or hours HomeKit app shows no response but at the same time, Alexa is able to run the commands.

I check the homebridge which is running fine.

I have restarted homebridge and iPhone as well but no luck anyone has any idea?

NorthernMan54 commented 7 years ago

That is odd, is your phone losing connection to the network?

Also does restarting fix the issue?

Sent from my iPad

On May 12, 2017, at 9:32 PM, Sabi notifications@github.com wrote:

I am having trouble with my homebridge I have recently install the homebridge-alexa,

one everything is setup after couple or hours HomeKit app shows no response but at the same time, Alexa is able to run the commands.

I check the homebridge which is running fine.

I have restarted homebridge and iPhone as well but no luck anyone has any idea?

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

safzal commented 7 years ago

No, I am using iPhone 6+ and no network lost issue. I have Apple Tv 4Gen which is connected with homebridge (i have been using it from outside). I have restarted many time my iPhone, this is not my iPhone. it same one all the apple devices no response shows as well my iPads.

I have removed the homebridge and remove it from iPhone and deleted the /home/pi/.homebridge/persist/ and reinstall the homebridge again it. which did the same after few hours only apple device stop working but Alexa is still able to work and homebridge has no error.

Any idea where should I look to solve this issue.

NorthernMan54 commented 7 years ago

Can you restart in debug mode and share the log? I.e.

DEBUG=* homebridge

Tks

Ps this is very verbose

Sent from my iPad

On May 13, 2017, at 6:29 AM, Sabi notifications@github.com wrote:

No, I am using iPhone 6+ and no network lost issue. I have Apple Tv 4Gen which is connected with homebridge (i have been using it from outside). I have restarted many time my iPhone, this is not my iPhone. it same one all the apple devices no response shows as well my iPads.

I have removed the homebridge and remove it from iPhone and deleted the /home/pi/.homebridge/persist/ and reinstall the homebridge again it. which did the same after few hours only apple device stop working but Alexa is still able to work and homebridge has no error.

Any idea where should I look to solve this issue.

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

safzal commented 7 years ago

yea, [5/13/2017, 1:13:25 PM] Loading 4 accessories... [5/13/2017, 1:13:25 PM] [TV] Initializing SonyBraviaTV accessory... [5/13/2017, 1:13:25 PM] [Xbox] Initializing Xbox accessory... [5/13/2017, 1:13:25 PM] [TV Light] Initializing MagicHome accessory... [5/13/2017, 1:13:25 PM] [Ceiling Light] Initializing MagicHome accessory... ssdp not running +0ms Receiver socket listening 0.0.0.0:9761 ssdp binding to port 1900 for ssdp discovery +40ms ssdp server listening 0.0.0.0:1900 192.168.0.8 +15ms [5/13/2017, 1:13:28 PM] Software version for Living Room Thermostat is: 5.6.1-4 [5/13/2017, 1:13:28 PM] Current temperature for Living Room Thermostat is: 22 C [5/13/2017, 1:13:28 PM] Current humidity for Living Room Thermostat is: 50% [5/13/2017, 1:13:28 PM] Target temperature for Living Room Thermostat is: 19 C [5/13/2017, 1:13:28 PM] Target heating for Living Room Thermostat is: Heating [5/13/2017, 1:13:28 PM] Away for Living Room Thermostat is: 0 [5/13/2017, 1:13:28 PM] Initializing platform accessory 'Living Room Thermostat'... Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐     
│ 013-45-154 │     
└────────────┘     

EventedHTTPServer Server listening on port 51826 +3s [5/13/2017, 1:13:28 PM] Homebridge is running on port 51826.

This all is coming on the start

safzal commented 7 years ago

here when I say commands to Alexa, "Alexa Tv Off" she is able to do it. but is the Apple device all the device no response.

EventedHTTPServer Server listening on port 51826 +3s [5/13/2017, 1:13:28 PM] Homebridge is running on port 51826. [5/13/2017, 1:14:17 PM] Current humidity for Living Room Thermostat is: 45% EventedHTTPServer [::ffff:192.168.0.17] New connection from client +3m EventedHTTPServer [::ffff:192.168.0.17] HTTP server listening on port 40711 +5ms EventedHTTPServer [::ffff:192.168.0.17] HTTP request: /api/HOwTU2nZSWsRr5oZljW1PWWY6VaHD6mRFIaWpGKC/lights/38/state +41ms HAPServer [A2:C9:D0:F8:C7:1D] HAP Request: PUT /api/HOwTU2nZSWsRr5oZljW1PWWY6VaHD6mRFIaWpGKC/lights/38/state +3ms hue hueDevices not cached {} 38 +19ms .... Accessory [HomeBridge] Processing characteristic set: [{"aid":38,"iid":9,"value":1}] +2ms Accessory [HomeBridge] Setting Characteristic "On" to value 1 +3ms [5/13/2017, 1:16:36 PM] [TV] Set value to true EventedHTTPServer [::ffff:192.168.0.17] HTTP Response is finished +229ms EventedHTTPServer [::ffff:192.168.0.17] HTTP request: /api/HOwTU2nZSWsRr5oZljW1PWWY6VaHD6mRFIaWpGKC/lights/38 +67ms HAPServer [A2:C9:D0:F8:C7:1D] HAP Request: GET /api/HOwTU2nZSWsRr5oZljW1PWWY6VaHD6mRFIaWpGKC/lights/38 +1ms Accessory [HomeBridge] Getting value for Characteristic "On" +4ms [5/13/2017, 1:16:36 PM] [TV] Getting whether Sony TV is on... [5/13/2017, 1:16:36 PM] [TV] TV status is active Accessory [HomeBridge] Got Characteristic "On" value: true +134ms hue light [ { aid: 38, iid: 9, value: true, status: 0 } ] +1ms EventedHTTPServer [::ffff:192.168.0.17] HTTP Response is finished +9ms EventedHTTPServer [::ffff:192.168.0.17] HTTP request: /api/HOwTU2nZSWsRr5oZljW1PWWY6VaHD6mRFIaWpGKC/lights/38/state +10s HAPServer [A2:C9:D0:F8:C7:1D] HAP Request: PUT /api/HOwTU2nZSWsRr5oZljW1PWWY6VaHD6mRFIaWpGKC/lights/38/state +1ms Accessory [HomeBridge] Processing characteristic set: [{"aid":38,"iid":9,"value":0}] +5ms Accessory [HomeBridge] Setting Characteristic "On" to value 0 +1ms [5/13/2017, 1:16:46 PM] [TV] Set value to false EventedHTTPServer [::ffff:192.168.0.17] HTTP Response is finished +257ms EventedHTTPServer [::ffff:192.168.0.17] HTTP request: /api/HOwTU2nZSWsRr5oZljW1PWWY6VaHD6mRFIaWpGKC/lights/38 +73ms HAPServer [A2:C9:D0:F8:C7:1D] HAP Request: GET /api/HOwTU2nZSWsRr5oZljW1PWWY6VaHD6mRFIaWpGKC/lights/38 +0ms Accessory [HomeBridge] Getting value for Characteristic "On" +2ms [5/13/2017, 1:16:46 PM] [TV] Getting whether Sony TV is on... [5/13/2017, 1:16:46 PM] [TV] TV status is active Accessory [HomeBridge] Got Characteristic "On" value: true +89ms hue light [ { aid: 38, iid: 9, value: true, status: 0 } ] +1ms EventedHTTPServer [::ffff:192.168.0.17] HTTP Response is finished +3ms

NorthernMan54 commented 7 years ago

Looking at this, I presume 192.168.0.17 is your alexa

In the debug output are their any communications with your iPhone or Apple TV

I'm thinking delete .homebridge/accessories and .homebridge/accessories and add again.

safzal commented 7 years ago

Yes, it is Alexa IP address,

Okey let try to delete the .homebridge/accessories and .homebridge/persist/ add try again and will let you know if it happen again

safzal commented 7 years ago

After a very long day working on this I found out. Using Alexa bridge it raspberry pi is losing the connection to the communication with other devices.

To fix this issue, I use command $: ip monitor (which helped to remove the no response when I click on the button and it starts working again).

Here are logs: 192.168.0.5 dev eth0 lladdr fc:f1:52:58:da:51 STALE 192.168.0.16 dev eth0 lladdr 80:be:05:88:d5:ae PROBE 192.168.0.16 dev eth0 lladdr 80:be:05:88:d5:ae REACHABLE ... Any idea why it is losing the connection I am using ethernet connection

NorthernMan54 commented 7 years ago

When running homebridge in debug mode, if there are no messages from the iPhone in the log when the Home goes no response, then the problem is network between the iPhone and your RPI.

On your iPhone, there is an app called Fing what can help troubleshoot on the iPhone side.

Also if your using a RPI 3, the wifi stack has a power save mode which causes lost connections occasionally. To resolve I added this to /etc/rc.local

sleep 10 iwconfig wlan0 power off

PS thanks for that ip monitor command, I had never seen that before

Sent from my iPad

On May 13, 2017, at 7:20 PM, Sabi notifications@github.com wrote:

After a very long day working on this I found out. Using Alexa bridge it raspberry pi is losing the connection to the communication with other devices.

To fix this issue, I use command $: ip monitor (which helped to remove the no response when I click on the button and it starts working again).

Here are logs: 192.168.0.5 dev eth0 lladdr fc:f1:52:58:da:51 STALE 192.168.0.16 dev eth0 lladdr 80:be:05:88:d5:ae PROBE 192.168.0.16 dev eth0 lladdr 80:be:05:88:d5:ae REACHABLE ... Also when I turn the light On using Alexa command I see on the home app the button goes and off. but when I turn it on using the HomeKit and tell Alexa to off it, it also update the home kit.

Here are logs: EventedHTTPServer [::ffff:192.168.0.7] Sending HTTP event '13.9' with data: {"characteristics":[{"aid":13,"iid":9,"value":0}]} +108ms EventedHTTPServer [::ffff:192.168.0.16] Sending HTTP event '13.9' with data: {"characteristics":[{"aid":13,"iid":9,"value":0}]} +2ms EventedHTTPServer [::ffff:192.168.0.17] HTTP Response is finished +2ms EventedHTTPServer [::ffff:192.168.0.17] HTTP request: /api/fAIXoVTmZhhQRhoIU8S3gNoZ5QCDDd1CjODo8MpD/lights/13 +90ms HAPServer [CC:22:3D:E3:CE:30] HAP Request: GET /api/fAIXoVTmZhhQRhoIU8S3gNoZ5QCDDd1CjODo8MpD/lights/13 +1ms Accessory [Homebridge] Getting value for Characteristic "On" +1ms Accessory [Homebridge] Got Characteristic "On" value: 0 +1ms hue light [ { aid: 13, iid: 9, value: 0, status: 0 } ] +0ms EventedHTTPServer [::ffff:192.168.0.17] HTTP Response is finished +2ms EventedHTTPServer [::ffff:192.168.0.17] HTTP request: /api/fAIXoVTmZhhQRhoIU8S3gNoZ5QCDDd1CjODo8MpD/lights/13/state +36s HAPServer [CC:22:3D:E3:CE:30] HAP Request: PUT /api/fAIXoVTmZhhQRhoIU8S3gNoZ5QCDDd1CjODo8MpD/lights/13/state +1ms Accessory [Homebridge] Processing characteristic set: [{"aid":13,"iid":9,"value":1}] +1ms Accessory [Homebridge] Setting Characteristic "On" to value 1 +0ms Sending message: 006,!R4D1FdP32| EventedHTTPServer [::ffff:192.168.0.7] Sending HTTP event '13.9' with data: {"characteristics":[{"aid":13,"iid":9,"value":1}]} +123ms EventedHTTPServer [::ffff:192.168.0.16] Sending HTTP event '13.9' with data: {"characteristics":[{"aid":13,"iid":9,"value":1}]} +3ms EventedHTTPServer [::ffff:192.168.0.17] HTTP Response is finished +2ms EventedHTTPServer [::ffff:192.168.0.17] HTTP request: /api/fAIXoVTmZhhQRhoIU8S3gNoZ5QCDDd1CjODo8MpD/lights/13 +111ms HAPServer [CC:22:3D:E3:CE:30] HAP Request: GET /api/fAIXoVTmZhhQRhoIU8S3gNoZ5QCDDd1CjODo8MpD/lights/13 +1ms Accessory [Homebridge] Getting value for Characteristic "On" +0ms Accessory [Homebridge] Got Characteristic "On" value: 0 +1ms hue light [ { aid: 13, iid: 9, value: 0, status: 0 } ] +0ms EventedHTTPServer [::ffff:192.168.0.7] Sending HTTP event '13.9' with data: {"characteristics":[{"aid":13,"iid":9,"value":0}]} +1ms EventedHTTPServer [::ffff:192.168.0.16] Sending HTTP event '13.9' with data: {"characteristics":[{"aid":13,"iid":9,"value":0}]} +1ms EventedHTTPServer [::ffff:192.168.0.17] HTTP Response is finished +1ms ^[c^[c EventedHTTPServer [::ffff:192.168.0.7] Sending HTTP event '42.11' with data: {"characteristics":[{"aid":42,"iid":11,"value":15}]} +2m EventedHTTPServer [::ffff:192.168.0.16] Sending HTTP event '42.11' with data: {"characteristics":[{"aid":42,"iid":11,"value":15}]} +2ms

Any idea why it is losing the connection I am using ethernet connection

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

safzal commented 7 years ago

Thank you for your help.

I have fixed this issue by rebuilding the Raspberry PI it seems it was an issue operation system on the Linux. odd issue. but ip monitor does help.

NorthernMan54 commented 7 years ago

Glad to hear you have resolved the issue. Good luck