This repository was archived by the owner on Dec 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
This repository was archived by the owner on Dec 1, 2020. It is now read-only.
Failed sending event: Error: connect ECONNREFUSED [your-localIP]:39500 #3
Copy link
Copy link
Open
Description
Hello!
Took me a couple of hours to find this out, but I'm suggesting a change within the README.md.
Under: # Raspberry Pi setup
Section: ## Running the server on the background / after startup
You can add a command to your /etc/rc.local
sudo nano /etc/rc.local
and add the following content right before exit 0
exec 2> /tmp/rc.local.log # send stderr from rc.local to a log file
exec 1>&2 # send stdout to the same log file
set -x # tell sh to display commands before execution
node /home/pi/Apps/myqcontroller/server [your-localIP] &
[your-localIP] Issue with Log example
The [your-localIP] should be [your-STlocalIP].
I kept receiving an error message when the Raspberry Pi IP address [your-localIP] was used.
=== === === MyQ Controller === === ===
[22/07 14:15:30] Retrieved config for server: [your-localIP]:39500
[22/07 14:15:30] Config loaded
[22/07 14:19:02] Handling request for: /ping
[22/07 14:19:02] Getting ping... replying pong
[22/07 14:19:08] Handling request for: /init
[22/07 14:19:08] Received init request
[22/06 14:19:08] Initializing...
[22/06 14:19:08] Getting device list...
[22/07 14:19:09] Sending event to ST: Discovered device "Garage Door" <xxxxxx>
[22/07 14:19:09] Sending event to ST: Discovered device "Exterior Garage Door" <xxxx>
[22/07 14:19:09] Failed sending event: Error: connect ECONNREFUSED [your-localIP]:39500
[22/07 14:19:09] Error getting event request: Error: connect ECONNREFUSED [your-localIP]:39500
[22/07 14:19:09] Failed sending event: Error: connect ECONNREFUSED [your-localIP]:39500
[22/07 14:19:09] Error getting event request: Error: connect ECONNREFUSED [your-localIP]:39500
Changed from [your-localIP] to [your-STlocalIP] Example
After changing the IP address from the Raspberry Pi [your-localIP] to ST [your-STlocalIP], the communication started to function as expected.
=== === === MyQ Controller === === ===
[22/07 14:33:07] Retrieved config for server: [your-STlocalIP]:39500
[22/07 14:33:07] Config loaded
[22/07 14:33:08] Handling request for: /init
[22/07 14:33:08] Received init request
[22/06 14:33:08] Initializing...
[22/06 14:33:08] Getting device list...
[22/07 14:33:08] Sending event to ST: Discovered device "Garage Door" <xxxxx>
[22/07 14:33:08] Sending event to ST: Discovered device "Exterior Garage Door" <xxxxx>
[22/07 14:33:38] Handling request for: /ping
[22/07 14:33:38] Getting ping... replying pong
[22/07 14:33:41] Handling request for: /init
[22/07 14:33:41] Received init request
[22/06 14:33:41] Initializing...
[22/06 14:33:41] Getting device list...
[22/07 14:34:09] Sending event to ST: Device "Exterior Garage Door" <xxx> changed its "data-door" value from "closed" to "open"
[22/07 14:35:10] Sending event to ST: Device "Exterior Garage Door" <xxx> changed its "data-door" value from "open" to "unknown"
[22/07 14:35:12] Sending event to ST: Device "Exterior Garage Door" <xxx> changed its "data-door" value from "unknown" to "closed"
[22/07 14:35:40] Sending event to ST: Device "Exterior Garage Door" <xxx> changed its "data-door" value from "closed" to "unknown"
[22/07 14:36:02] Sending event to ST: Device "Exterior Garage Door" <xxx> changed its "data-door" value from "unknown" to "closed"
[22/07 14:36:31] Sending event to ST: Device "Exterior Garage Door" <xxx> changed its "data-door" value from "closed" to "open"
[22/07 14:37:21] Sending event to ST: Device "Exterior Garage Door" <xxx> changed its "data-door" value from "open" to "unknown"
[22/07 14:37:31] Sending event to ST: Device "Exterior Garage Door" <xxx> changed its "data-door" value from "unknown" to "closed"
I hope this information help others!
Metadata
Metadata
Assignees
Labels
No labels