Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix/error on command parsing #28

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

maxill1
Copy link
Contributor

@maxill1 maxill1 commented Mar 22, 2019

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).

normen and others added 26 commits March 5, 2018 22:01
Squashed commit of the following:

commit afd3f98
Author: Pim van Gennip <[email protected]>
Date:   Sat Dec 9 22:04:17 2017 +0100

    Proper result parsing of h: command

commit 1ff8bb1
Author: Pim van Gennip <[email protected]>
Date:   Sat Dec 9 16:00:51 2017 +0100

    Updated hello command

commit 1ca0f7c
Author: Pim van Gennip <[email protected]>
Date:   Sat Dec 2 00:01:37 2017 +0100

    Added sayHello to update duty cycle

commit c1b14fe
Author: Pim van Gennip <[email protected]>
Date:   Tue Nov 7 10:45:14 2017 +0100

    Meta info serial changed to serial_number

commit adbe863
Author: Pim van Gennip <[email protected]>
Date:   Tue Nov 7 10:34:10 2017 +0100

    Added serial and firmware version to Cube metaInfo

commit 1c3f64f
Author: Pim van Gennip <[email protected]>
Date:   Fri Nov 3 16:59:56 2017 +0100

    Only send continuous blocks, and make room_id hex

commit c01c5a5
Author: Pim van Gennip <[email protected]>
Date:   Fri Oct 27 10:19:18 2017 +0200

    Cleaned up log entries

commit 62e4661
Author: Pim van Gennip <[email protected]>
Date:   Fri Oct 27 10:16:14 2017 +0200

    Cleaned up code

commit 39adc1a
Author: Pim van Gennip <[email protected]>
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 <[email protected]>
Date:   Mon Oct 23 16:20:48 2017 +0200

    Prevent Node from crashing upon cube timeout error

commit 3493d88
Author: Pim van Gennip <[email protected]>
Date:   Sun Oct 22 23:15:43 2017 +0200

    Created working schedule setting

commit 87722f1
Author: Pim van Gennip <[email protected]>
Date:   Thu Oct 19 23:11:26 2017 +0200

    Working schedule

commit 7374b81
Author: Pim van Gennip <[email protected]>
Date:   Thu Oct 19 22:10:08 2017 +0200

    Bugfix

commit 1184eac
Author: Pim van Gennip <[email protected]>
Date:   Thu Oct 19 22:06:32 2017 +0200

    Added setSchedule

commit 1ec3276
Author: Pim van Gennip <[email protected]>
Date:   Fri Oct 13 14:47:17 2017 +0200

    Added day program
Squashed commit of the following:

commit 51b8003
Author: Luca Mazzilli <[email protected]>
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
* Remove console debug output
- Different way of reading wall thermostat
- add more callbacks
- fix serial number name
- parity with original maxcube files
- fixes Buffer error in newer node.js versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants