Hotfix/error on command parsing#28
Open
maxill1 wants to merge 26 commits intoivesdebruycker:masterfrom
Open
Conversation
Squashed commit of the following: commit afd3f98 Author: Pim van Gennip <pim@iconize.nl> Date: Sat Dec 9 22:04:17 2017 +0100 Proper result parsing of h: command commit 1ff8bb1 Author: Pim van Gennip <pim@iconize.nl> Date: Sat Dec 9 16:00:51 2017 +0100 Updated hello command commit 1ca0f7c Author: Pim van Gennip <pim@iconize.nl> Date: Sat Dec 2 00:01:37 2017 +0100 Added sayHello to update duty cycle commit c1b14fe Author: Pim van Gennip <pim@iconize.nl> Date: Tue Nov 7 10:45:14 2017 +0100 Meta info serial changed to serial_number commit adbe863 Author: Pim van Gennip <pim@iconize.nl> Date: Tue Nov 7 10:34:10 2017 +0100 Added serial and firmware version to Cube metaInfo commit 1c3f64f Author: Pim van Gennip <pim@iconize.nl> Date: Fri Nov 3 16:59:56 2017 +0100 Only send continuous blocks, and make room_id hex commit c01c5a5 Author: Pim van Gennip <pim@iconize.nl> Date: Fri Oct 27 10:19:18 2017 +0200 Cleaned up log entries commit 62e4661 Author: Pim van Gennip <pim@iconize.nl> Date: Fri Oct 27 10:16:14 2017 +0200 Cleaned up code commit 39adc1a Author: Pim van Gennip <pim@iconize.nl> Date: Fri Oct 27 10:10:34 2017 +0200 Added battery_low and panel_locked to the standard deviceInfo commit 60f599c Author: Pim van Gennip <pim@iconize.nl> Date: Mon Oct 23 16:20:48 2017 +0200 Prevent Node from crashing upon cube timeout error commit 3493d88 Author: Pim van Gennip <pim@iconize.nl> Date: Sun Oct 22 23:15:43 2017 +0200 Created working schedule setting commit 87722f1 Author: Pim van Gennip <pim@iconize.nl> Date: Thu Oct 19 23:11:26 2017 +0200 Working schedule commit 7374b81 Author: Pim van Gennip <pim@iconize.nl> Date: Thu Oct 19 22:10:08 2017 +0200 Bugfix commit 1184eac Author: Pim van Gennip <pim@iconize.nl> Date: Thu Oct 19 22:06:32 2017 +0200 Added setSchedule commit 1ec3276 Author: Pim van Gennip <pim@iconize.nl> Date: Fri Oct 13 14:47:17 2017 +0200 Added day program
Squashed commit of the following: commit 51b8003 Author: Luca Mazzilli <setmaat@gmail.com> Date: Mon Oct 16 23:31:58 2017 +0200 fixed wall thermostat temp and setpoint ivesdebruycker/node-red-contrib-maxcube#15 used info in https://github.com/Bouni/max-cube-protocol/blob/master/L-Message.md#actual-temperature-wallmountedthermostat to decode correctly the wall thermostat "Actual temperature" (temp) and "Temperature" (setpoint)
Conflicts: maxcube-commandparser.js
- add more callbacks - fix serial number name - parity with original maxcube files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
this PR will allow the maxCubeLowLevel to emit an error on bad command parsing.
For example an empty or unconfigured cube (no valve, wall termostat or window contact) will get the following message on command M (metadata).
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type undefined
the trye catch also prevents the crash of the caller (node-red in my case).