@felix-haverkamp no it doesn’t output anything if it reconnects.
-
Mysensors WiFi Gateway
-
what is the condition for reconnect?
have this in log. maybe you can catch that and try to reconnect:
error [pimatic-mysensors]: { [Error: connect EHOSTUNREACH 10.0.0.23:5003]
code: ‘EHOSTUNREACH’,
errno: ‘EHOSTUNREACH’,
syscall: ‘connect’,
address: ‘10.0.0.23’,
port: 5003,
__trace: ‘Error: From connect\n at Socket.connect (/home/pi/pimatic-app/node_modules/pimatic/startup.coffee:55:29)\n at Socket.connect (net.js:883:28)\n at new Hyperion (/home/pi/pimatic-app/node_modules/pimatic-led-light/node_modules/hyperion-client/lib/Hyperion.js:23:14)\n at HyperionLedLight.connectToHyperion (/home/pi/pimatic-app/node_modules/pimatic-led-light/devices/hyperion.coffee:88:21)\n at HyperionLedLight.connectToHyperion (/home/pi/pimatic-app/node_modules/pimatic-led-light/devices/hyperion.coffee:1:1)\n at HyperionLedLight.sendColor (/home/pi/pimatic-app/node_modules/pimatic-led-light/devices/hyperion.coffee:78:12)\n at HyperionLedLight.sendColor (/home/pi/pimatic-app/node_modules/pimatic-led-light/devices/hyperion.coffee:1:1)\n at HyperionLedLight.turnOn (/home/pi/pimatic-app/node_modules/pimatic-led-light/devices/hyperion.coffee:41:8)\n at new HyperionLedLight (/home/pi/pimatic-app/node_modules/pimatic-led-light/devices/hyperion.coffee:25:23)\n at Object.framework.deviceManager.registerDeviceClass.createCallback (/home/pi/pimatic-app/node_modules/pimatic-led-light/pimatic-led-light.coffee:50:44)\n at DeviceManager._loadDevice (/home/pi/pimatic-app/node_modules/pimatic/lib/devices.coffee:1475:26)\n at /home/pi/pimatic-app/node_modules/pimatic/lib/devices.coffee:1504:16\n at tryCatcher (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/util.js:16:23)\n at Promise._settlePromiseFromHandler (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:512:31)\n at Promise._settlePromise (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:569:18)\n at Promise._settlePromise0 (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:614:10)\n at Promise._settlePromises (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:693:18)\n at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:133:16)\n at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:143:10)\n at Immediate.Async.drainQueues [as _onImmediate] (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:17:14)\n at processImmediate [as _immediateCallback] (timers.js:383:17)’ } -
@felix-haverkamp when the board emits an error it will automatically reconnect in 10s
-
I think the reconnect isnt working correct. Everytime i disconnect my wifi gateway i have a different error message from mysensors, but the error message holds error for different modules (connectToHyperion from LED-Light Plugin). This time i have this error for weather plugin ?!?:
error [pimatic-mysensors]: { [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read', __trace: 'Error: From connect\n at Socket.connect (/home/pi/pimatic-app/node_modules/pimatic/startup.coffee:55:29)\n at Agent.exports.connect.exports.createConnection (net.js:68:26)\n at Agent.createSocket (_http_agent.js:180:16)\n at Agent.addRequest (_http_agent.js:149:23)\n at new ClientRequest (_http_client.js:142:16)\n at Object.exports.request (http.js:31:10)\n at Object.exports.get (http.js:35:21)\n at getWeather (/home/pi/pimatic-app/node_modules/pimatic-openweather/node_modules/openweathermap/openweather.js:135:17)\n at Object.exports.daily (/home/pi/pimatic-app/node_modules/pimatic-openweather/node_modules/openweathermap/openweather.js:90:12)\n at Object.tryCatcher (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/util.js:16:23)\n at Object.ret [as dailyAsync] (eval at <anonymous> (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promisify.js:1:0), <anonymous>:13:39)\n at Object.requestPromise.PromiseRetryer.run.promise (/home/pi/pimatic-app/node_modules/pimatic-openweather/openweather.coffee:310:22)\n at null.PromiseObject.create.$run (/home/pi/pimatic-app/node_modules/pimatic-openweather/node_modules/promise-retryer/index.js:25:12)\n at Function.run (/home/pi/pimatic-app/node_modules/pimatic-openweather/node_modules/promise-retryer/node_modules/promise-object/index.js:78:11)\n at OpenWeatherForecastDevice.requestForecast (/home/pi/pimatic-app/node_modules/pimatic-openweather/openweather.coffee:306:40)\n at null._onTimeout (/home/pi/pimatic-app/node_modules/pimatic-openweather/openweather.coffee:1:1)\n at Timer.listOnTimeout (timers.js:92:15)' }
EDIT: @Felix-Haverkamp I have edited your post to mark the command snippet as code. If the normal HTML format is used straight quotes will be replaced with curly quotes and, thus, pasting the snippet to a command shell will cause errors in most cases. Please see the following topic on the matter for future posts. Thanks!
https://forum.pimatic.org/topic/1179/how-to-post-code-snippets-and-alike-on-the-forum
-
@felix-haverkamp said in Mysensors WiFi Gateway:
This time i have this error for weather plugin ?!?
This is due to the connection pooling in node.js. It sometimes leads to wrong stack traces.
@developer My recommendation is to either instantiate a private Agent instance or, to turn off connection pooling
agent: false
. See https://nodejs.org/dist/latest-v4.x/docs/api/http.html#http_class_http_agent"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
Still no good connection to mysensors. Currently my wifi node is accessable via telnet command, but no state change in pimatic gui.
@sweebee can you please have a look to get this stable working?
i offer me as tester -
switched to mysensors mqtt gateway and everything is working fine, till now!
I think the connection with usb/ethernet directly to mysensors gateway is to instable to use.