Closed tagyoureit closed 8 years ago
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. If you uncomment line 271 (I think), you can see what's being read from the port.
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, Tag
Hey there. I'm on vacation right now and won't be back until Friday. I'll send you the model names of the converter and USB adapter then. That's great that you're making progress with more decoding. I seem to have less time for that stuff lately but the python code that Ioaded onto my raspberry pi has been very reliable. I'll send more details and check out your wiki when I get back.
Thanks, Mike
On Jul 24, 2016 10:28 PM, "tagyoureit" notifications@github.com wrote:
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 https://github.com/tagyoureit/nodejs-Pentair/wiki. Most recently, we uncovered how to read the circuit names from the broadcast messages.
thx, Tag
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/michaelusner/Home-Device-Controller/issues/1#issuecomment-234828666, or mute the thread https://github.com/notifications/unsubscribe-auth/AGHRl-sYpDa2v34tP2w9KcPJoFgbGPfFks5qZC1igaJpZM4IdseB .
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!