-
Notifications
You must be signed in to change notification settings - Fork 2
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
Serial port issues? #1
Comments
This looks to be a node-serialport issue. I opened a case @ node-serialport, but if you have any input it would be appreciated. |
At first glance, the hex dump does look correct and I see the 0xa5 packet header byte. logger.info(strData) That might help with further debugging. |
Thanks... I have made a lot of progress. I think Winston(?) may have been converting the buffer object -> undefined. If you follow my link, I was also helped on the other thread. Looking forward to publishing the module soon. Thanks for sharing your code! It's very impressive. |
Thank you, you're too kind. :) It was my first venture into node.js. I'm using the Python code on a Rasberry PI to do the same thing. It's easier to wrap my mind around than node's event model. |
Hi Michael, quick question - what RS485 serial adapter/cable are you using? Did you have any issues writing back to the bus? I'm stumped on why I can read from, but can't write to, the bus. Not sure if it is my system, cable or code. I looked at your code and mine is very similar. If you can post any (full) test code in either Node or Python that I can try, maybe that would be helpful. Also, I've made a ton of headway (with help) decoding the broadcast messages. Check out my wiki. Most recently, we uncovered how to read the circuit names from the broadcast messages. thx, |
Hey there. I'm on vacation right now and won't be back until Friday. I'll Thanks, On Jul 24, 2016 10:28 PM, "tagyoureit" notifications@github.com wrote:
|
Hi Michael,
This isn't really an issue with your code, but not sure how to contact you so hope you can help!
I'm trying to use your pool_controller.js as a basis for my own plug-in for the homebridge project. I have a USB->RS485 cable which is at /dev/ttyUSB0. This in on a RasPi3.
I stripped out everything I didn't need just to see if I could get a stream of the serial data. I uncommented the line 271(logger.info(strData)) and the following is my output. It doesn't quite look right. I was expecting to see Hex, and more constant string lengths. Below is a cut/paste of my log. Would you be able to help point me in the right direction? I've tried a number of things (too much detail to list here).
If I just try to do a raw dump of the buffer I get gibberish like � � � � � � � � _ _ � � � � � � � � � M � � � w
I know the USB->RS485 is wired correctly because I can see the correct HEX from the command line:
Thanks in advance!
The text was updated successfully, but these errors were encountered: