@sweebee thanks for merging, I have seen your update on github. Just a little question, is this also automatically pushed to npm? Do I have to delete and reinstall mysensors plugin? Thank you very much for your effort with the ethernet gateway!!!
-
Mysensors WiFi Gateway
-
@Anduril I need to update npm manually, I have access to the npm of pimatic-mysensors, but I don’t know how it works haha, never worked with NPM.
-
@Anduril said in Mysensors WiFi Gateway:
Maybe @mwittig can help as he did the last updates…
Yes, I am happy to do this. @sweebee give me shout in case
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
just for completeness I updated the README to include setup of the ethernet driver. Maybe you can have a look at before updating to npm. This way it can find it’s way to the official plugin page (as I think that’s parsed from npm)…
-
published pimatic-mysensors@0.9.0 which also contains a few more PR merges and fixtures
- https://github.com/DheerajKhajuria/pimatic-mysensors/issues/91
- https://github.com/DheerajKhajuria/pimatic-mysensors/issues/88 - fixed by PR Fixing when you have multiple shutters - https://github.com/DheerajKhajuria/pimatic-mysensors/pull/89
- fixed schema for MySensorsMulti’s type property as part of the attributes item (raised “Illegal unit” exception if type not set explicitly
- PR Addition of IR (receiver) sensor - https://github.com/DheerajKhajuria/pimatic-mysensors/pull/82
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
Dear all mysensors and pimatic experts, are there any news about “native” Support of a wifi Gateway? I did some tests with the Plugin and an mysensors wifi Gateway. Sometimes it worked, i got some Temperature / Distance values transmitted into pimatic, but After a little while, the data was Not updated anymore…
Thank you very much in advance
Steff -
Hi @HarrySteff,
WIFI gateway is working correctly, but reconnect does not. So if your gateway disconnects (gateway reset, wifi-disconnect,…) you have to restart pimatic to reestablish connection.
-
Hi @Anduril,
thank you very much for your Information! -
from @andrudil to @sweebee
WIFI gateway is working correctly, but reconnect does not. So if your gateway disconnects (gateway reset, wifi-disconnect,…) you have to restart pimatic to reestablish connection.can this be fixed? that would improve stability much!
-
@felix-haverkamp yes I know, when I added it my coffee script skills were limited. Maybe I can take a look again and fix it, got some more experience now.
-
that would be great!
-
@Felix-Haverkamp @Anduril I pushed a new version. Unfortunately my ws5100 doesn’t work anymore so I tried to do it without. It keeps retrying every 10s, but I don’t know if everything still works after a reconnect.
-
i am sorry, i cant see that the reconnect is working. is there any log output?
-
@felix-haverkamp no it doesn’t output anything if it reconnects.
-
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