Comments (7)
What about err
? is it defined?
I personally don't have any experience with BB. This page suggests to use /dev/ttyO4
: does it exist on your board?
from home-controller.
err is there to catch any errors produced by the hub commands, both return null.
I found that same page, tty04 links to S4 that's why used it. Since I got the "Connected!" response I assumed that the port was already enabled. Found another (newer) page on how to enable the port. Will try that too.
from home-controller.
So it looks like it's an issue with configuring BB rather than with this library.
I will close the issue, but please do leave a comment if you solve this problem.
from home-controller.
I managed to enable the port, I can can see data on the port, however home-controller can't seem to communicate with the modem.
home-controller:insteon connecting /dev/ttyS4 +0ms
home-controller:insteon connected +204ms
Connected!
Init
home-controller:insteon Send: {"command":{"raw":"0260","type":"60"},"deferred":{"promise":{}},"timeout":5000} +95ms
home-controller:insteon insteon.links - id: null +39ms
home-controller:insteon Already running a command - queuing command: {"raw":"0269","type":"69"} +6ms
home-controller:insteon Rcvd: ff +100ms
home-controller:insteon checkStatus - buffer: ff +6ms
home-controller:insteon checkStatus - status: {"command":{"raw":"0260","type":"60"},"deferred":{"promise":{}},"timeout":5000} +3ms
home-controller:insteon parsing - insufficient data to continue - 2 +3ms
home-controller:insteon sendCommandTimout - status: {"command":{"raw":"0260","type":"60"},"deferred":{"promise":{}},"timeout":5000} +5s
home-controller:insteon Resend: {"command":{"raw":"0260","type":"60"},"deferred":{"promise":{}},"timeout":5000} +4ms
home-controller:insteon Rcvd: ff +20ms
home-controller:insteon checkStatus - buffer: ffff +3ms
home-controller:insteon checkStatus - status: {"command":{"raw":"0260","type":"60"},"deferred":{"promise":{}},"timeout":5000} +3ms
home-controller:insteon parsing - insufficient data to continue - 4 +2ms
home-controller:insteon sendCommandTimout - status: {"command":{"raw":"0260","type":"60"},"deferred":{"promise":{}},"timeout":5000} +5s
home-controller:insteon Send: {"command":{"raw":"0269","type":"69"},"deferred":{"promise":{}},"timeout":5000} +14ms
Hub Info: undefined
home-controller:insteon Rcvd: ff +36ms
home-controller:insteon checkStatus - buffer: ffffff +4ms
home-controller:insteon checkStatus - status: {"command":{"raw":"0269","type":"69"},"deferred":{"promise":{}},"timeout":5000} +2ms
home-controller:insteon parsing - message skipped +9ms
home-controller:insteon checkStatus - buffer: ff +6ms
home-controller:insteon checkStatus - status: {"command":{"raw":"0269","type":"69"},"deferred":{"promise":{}},"timeout":5000} +2ms
home-controller:insteon parsing - insufficient data to continue - 2 +3ms
home-controller:insteon sendCommandTimout - status: {"command":{"raw":"0269","type":"69"},"deferred":{"promise":{}},"timeout":5000} +5s
home-controller:insteon Resend: {"command":{"raw":"0269","type":"69"},"deferred":{"promise":{}},"timeout":5000} +23ms
home-controller:insteon Rcvd: ff +26ms
home-controller:insteon checkStatus - buffer: ffff +2ms
home-controller:insteon checkStatus - status: {"command":{"raw":"0269","type":"69"},"deferred":{"promise":{}},"timeout":5000} +2ms
home-controller:insteon parsing - insufficient data to continue - 4 +2ms
home-controller:insteon sendCommandTimout - status: {"command":{"raw":"0269","type":"69"},"deferred":{"promise":{}},"timeout":5000} +5s
Links:
home-controller:insteon Rcvd: d9fc +22s
home-controller:insteon checkStatus - buffer: ffffd9fc +2ms
home-controller:insteon checkStatus - status: undefined +2ms
home-controller:insteon parsing - message skipped +4ms
home-controller:insteon checkStatus - buffer: d9fc +5ms
home-controller:insteon checkStatus - status: undefined +3ms
home-controller:insteon parsing - insufficient data to continue - 4 +2ms
home-controller:insteon Rcvd: d9f9 +265ms
home-controller:insteon checkStatus - buffer: d9fcd9f9 +2ms
home-controller:insteon checkStatus - status: undefined +3ms
home-controller:insteon parsing - message skipped +2ms
home-controller:insteon checkStatus - buffer: d9f9 +5ms
home-controller:insteon checkStatus - status: undefined +17ms
home-controller:insteon parsing - insufficient data to continue - 4 +2ms
home-controller:insteon Rcvd: 0849123857 +19s
home-controller:insteon checkStatus - buffer: d9f90849123857 +3ms
home-controller:insteon checkStatus - status: undefined +2ms
home-controller:insteon parsing - message skipped +3ms
home-controller:insteon checkStatus - buffer: 0849123857 +4ms
home-controller:insteon checkStatus - status: undefined +2ms
home-controller:insteon parsing - message skipped +3ms
home-controller:insteon checkStatus - buffer: 123857 +3ms
home-controller:insteon checkStatus - status: undefined +2ms
home-controller:insteon parsing - message skipped +2ms
home-controller:insteon checkStatus - buffer: 57 +3ms
home-controller:insteon checkStatus - status: undefined +2ms
home-controller:insteon parsing - insufficient data to continue - 2 +2ms
home-controller:insteon Rcvd: 08 +206ms
home-controller:insteon checkStatus - buffer: 5708 +2ms
home-controller:insteon checkStatus - status: undefined +2ms
home-controller:insteon parsing - insufficient data to continue - 4 +2ms
home-controller:insteon Rcvd: f77d088c +4ms
home-controller:insteon checkStatus - buffer: 5708f77d088c +2ms
home-controller:insteon checkStatus - status: undefined +3ms
home-controller:insteon parsing - message skipped +2ms
home-controller:insteon checkStatus - buffer: f77d088c +4ms
home-controller:insteon checkStatus - status: undefined +2ms
home-controller:insteon parsing - message skipped +3ms
home-controller:insteon checkStatus - buffer: 088c +3ms
home-controller:insteon checkStatus - status: undefined +2ms
home-controller:insteon parsing - insufficient data to continue - 4 +2ms
home-controller:insteon Rcvd: 08 +4s
home-controller:insteon checkStatus - buffer: 088c08 +2ms
home-controller:insteon checkStatus - status: undefined +2ms
home-controller:insteon parsing - message skipped +2ms
home-controller:insteon checkStatus - buffer: 08 +4ms
home-controller:insteon checkStatus - status: undefined +3ms
home-controller:insteon parsing - insufficient data to continue - 2 +2ms
home-controller:insteon Rcvd: 49323b47ff +3ms
home-controller:insteon checkStatus - buffer: 0849323b47ff +2ms
home-controller:insteon checkStatus - status: undefined +2ms
home-controller:insteon parsing - message skipped +2ms
home-controller:insteon checkStatus - buffer: 323b47ff +8ms
home-controller:insteon checkStatus - status: undefined +2ms
home-controller:insteon parsing - message skipped +3ms
home-controller:insteon checkStatus - buffer: 47ff +3ms
home-controller:insteon checkStatus - status: undefined +2ms
home-controller:insteon parsing - insufficient data to continue - 4 +2ms
home-controller:insteon Rcvd: 280449 +378ms
home-controller:insteon checkStatus - buffer: 47ff280449 +3ms
home-controller:insteon checkStatus - status: undefined +2ms
home-controller:insteon parsing - message skipped +2ms
home-controller:insteon checkStatus - buffer: 280449 +4ms
home-controller:insteon checkStatus - status: undefined +2ms
home-controller:insteon parsing - message skipped +3ms
home-controller:insteon Rcvd: 1dfbfd +3ms
home-controller:insteon checkStatus - buffer: 491dfbfd +2ms
home-controller:insteon checkStatus - status: undefined +2ms
home-controller:insteon parsing - message skipped +2ms
home-controller:insteon checkStatus - buffer: fbfd +4ms
home-controller:insteon checkStatus - status: undefined +3ms
home-controller:insteon parsing - insufficient data to continue - 4 +2ms
home-controller:insteon checkStatus - buffer: fbfd +2ms
home-controller:insteon checkStatus - status: undefined +2ms
home-controller:insteon parsing - insufficient data to continue - 4 +2ms`
from home-controller.
If we parse that output and just keep the lines that indicate incoming data:
home-controller:insteon Rcvd: ff +100ms
home-controller:insteon Rcvd: ff +20ms
home-controller:insteon Rcvd: ff +36ms
home-controller:insteon Rcvd: ff +26ms
home-controller:insteon Rcvd: d9fc +22s
home-controller:insteon Rcvd: d9f9 +265ms
home-controller:insteon Rcvd: 0849123857 +19s
home-controller:insteon Rcvd: 08 +206ms
home-controller:insteon Rcvd: f77d088c +4ms
home-controller:insteon Rcvd: 08 +4s
home-controller:insteon Rcvd: 49323b47ff +3ms
home-controller:insteon Rcvd: 280449 +378ms
home-controller:insteon Rcvd: 1dfbfd +3ms
which translates into this output:
ffffffffd9fcd9f9084912385708f77d088c0849323b47ff2804491dfbfd
This output doesn't contain any valid messages (message starts with 02
).
I suspect maybe you used a wrong baudRate. Try changing to something like that:
hub.serial('/dev/ttyS4', {baudRate: 57600}, function(){
console.log('Connected!');
init();
});
from home-controller.
Ok the magic number is 19200.
Which is confusing cause I thought that was the default if you don't specify one when creating the connection?
from home-controller.
That IS confusing; need to check it. But I am glad you figured it out.
from home-controller.
Related Issues (20)
- Correct status object not returned by directCommand() HOT 6
- powerlinc-modem connect uand usage HOT 2
- Question HOT 2
- Lighting Event Emitter question HOT 9
- Linked device events HOT 8
- Listening for pairing button on a controllable outlet
- Dual-Outlet Control? HOT 14
- 'Insufficient data to continue' with 2242 Hub HOT 7
- Wonderful implementation ... of course could be better
- Listening for events
- Add "beep" function HOT 1
- PLM NAKs not respected HOT 4
- Confused about link() HOT 3
- Factory Reset / Delete All Links command HOT 8
- Cannot link devices with ID that begins with a zero HOT 2
- Publish 0.9 To NPM HOT 3
- Light level response inconsistent HOT 4
- Scene dim/brighten commands are switched HOT 3
- How can i set a scenes schedule (onTime/offTime)? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from home-controller.