Giter Site home page Giter Site logo

Comments (11)

bvarner avatar bvarner commented on April 29, 2024 1

oh good lord, the tty is the wrong baud rate.

from infinitude.

bvarner avatar bvarner commented on April 29, 2024

I'm having the same issue here on a raspberrypi, following the instructions in the wiki....

Any traction?

It took me several hours to get a max485 wired up in a slave mode on the pi's UART.
I've been able to run the readraw.py from the brybus repo, but I don't trust it's output, and I can't really see what's going on in the modbus registers. 😒

from infinitude.

nebulous avatar nebulous commented on April 29, 2024

There are multiple things which could be wrong in this scenario, here are a couple things to try:

  1. the serial device hasn't been properly reset/initialized. ThePlanβ„’ is to patch Infinitude to aggressively reset on startup, but it doesn't yet do so. Infinitude comes with a utility to dump parsed frame data from a serial device called cardump in the contrib directory. Running it against your serial device will reset the device appropriately and in @bvarner 's case, might be all that's required to log the rs485 network traffic
  2. It's possible that the installed version of Mojolicious is subtly incompatible with mine(obtainable with perl -MMojolicious\ 9999). I happen to be running version 6.65 presently without issue.

from infinitude.

bvarner avatar bvarner commented on April 29, 2024

@nebulous thanks for the response!

Output of the mojolicious command...
Mojolicious version 9999 required--this is only version 5.54.

Yikes!

Using cardump, here's a small log of what I'm sniffing.

Time	From	To	Type	Length	Hex Content
Looking for 214 byte frame in 226 byte buffer
Looking for 75 byte frame in 233 byte buffer
Looking for 238 byte frame in 248 byte buffer
Looking for 187 byte frame in 255 byte buffer
Looking for 159 byte frame in 262 byte buffer
Looking for 249 byte frame in 269 byte buffer
Looking for 64 byte frame in 276 byte buffer
Looking for 1 byte frame in 283 byte buffer
Looking for 32 byte frame in 290 byte buffer
Looking for 1 byte frame in 297 byte buffer
Looking for 15 byte frame in 304 byte buffer
*** Synced stream after 11 shifts ***
--------------WRITE to 40 ------------
Write to table 3, row 5
00 00 00 00 03 12 00 00 00 00 00 78 d1 6c 00
1483039970	20	40	0c	15	00 03 05 00 00 00 00 03 12 00 00 00 00 00 78
1483039970	40	20	06	1	00
--------------WRITE to 40 ------------
Write to table 4, row 3
01 01 01 00 cc 5b 00
1483039970	20	40	0c	7	00 04 03 01 01 01 00
1483039970	40	20	06	1	00
--------------WRITE to 40 ------------
Write to table 4, row 9
00 01 00 00 54 36 00
1483039970	20	40	0c	7	00 04 09 00 01 00 00
Looking for 85 byte frame in 267 byte buffer
Looking for 231 byte frame in 274 byte buffer
Looking for 255 byte frame in 278 byte buffer
Looking for 32 byte frame in 285 byte buffer
Looking for 1 byte frame in 292 byte buffer
Looking for 64 byte frame in 299 byte buffer
Looking for 1 byte frame in 306 byte buffer
Looking for 1 byte frame in 313 byte buffer
*** Synced stream after 8 shifts ***
1483039970	40	20	06	1	00
--------------WRITE to 40 ------------
Write to table 4, row 11
00 00 00 00 7c 36 00
1483039970	20	40	0c	7	00 04 0b 00 00 00 00
1483039970	40	20	06	1	00
--------------WRITE to 40 ------------
Write to table 3, row 7
01 00 00 00 6c 7c 00

Does this look about right? I'm not 100% sure I've got the AB lines on the right pins, but when they're reversed, I don't get any "decent" data off the tty.

from infinitude.

nebulous avatar nebulous commented on April 29, 2024

If cardump is syncing, then you can be rather certain that your AB wires are in their proper locations. I am a bit concerned that cardump needed to resync, however. The signal to your adaptor might be noisy. Make sure you are using decent wire (ideally the same wire used to connect the rest of your devices. Several people have had trouble getting a decent signal when using little jumper wires) and that connections are tight.

You may try running infinitude again with potentially better results now that cardump has reset your serial device.

from infinitude.

bvarner avatar bvarner commented on April 29, 2024

I've got everything jumpered right now on a prototype board. My signal is coming from a cat6e run from the AB terminals inside my air handler, and I'm using one of the twisted pairs. Honestly, I'm far more suspicious of the non TP bellwire the installers left in place between the thermostat and the air handler.

Question: Does infinitude ever write to the bus, or only 'snoop' in read mode?

from infinitude.

bvarner avatar bvarner commented on April 29, 2024

Hah. I had my system in 'checkout' mode.

When I reran cardump, things came right up, and I haven't seen any resync issues.

from infinitude.

bvarner avatar bvarner commented on April 29, 2024

ANNNND it works.

cardump did the trick! πŸ‘

from infinitude.

bvarner avatar bvarner commented on April 29, 2024

I'm still getting some 404's though, specifically when the front-end is asking for systems, status, notifications, energy, etc.

from infinitude.

nebulous avatar nebulous commented on April 29, 2024

neither cardump or infinitude write to the bus presently. I haven't had time to invest in that particular rabbit hole yet. There is some promising work by @acd called Infinitive which attempts to emulate a SAM (https://www.github.com/acd/Infinitive).

from infinitude.

bvarner avatar bvarner commented on April 29, 2024

This is so strange.

After a reboot, things were broken again, and cardump is now refusing to sync. I even soldered things up into a bonified protoboard and tried that out.

eventually, while hot-connecting things --- with jumpers! -- things start to work. So strange.

from infinitude.

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.