GithubHelp home page GithubHelp logo

HubPro PLM Connection about home-controller HOT 7 CLOSED

rasod avatar rasod commented on August 11, 2024
HubPro PLM Connection

from home-controller.

Comments (7)

siburny avatar siburny commented on August 11, 2024

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.

rasod avatar rasod commented on August 11, 2024

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.

siburny avatar siburny commented on August 11, 2024

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.

rasod avatar rasod commented on August 11, 2024

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.

siburny avatar siburny commented on August 11, 2024

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.

rasod avatar rasod commented on August 11, 2024

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.

siburny avatar siburny commented on August 11, 2024

That IS confusing; need to check it. But I am glad you figured it out.

from home-controller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.