meatpiHQ / wican-fw

GNU General Public License v3.0
309 stars 65 forks source link

SoC Dacia Spring #104

Open howie90 opened 7 months ago

howie90 commented 7 months ago

I'm sorry to have to bother you again. I hope the following explanations are reasonably understandable, I had to use a translator for a view parts. I followed this guide, but I'm really struggling with it. It starts with the fact that I don't understand the output in MQTT Explorer. The value of "RX" changed several times a second while I was looking at the SoC sensor in Car Scanner. Is this behavior normal or is it a problem?

https://github.com/meatpiHQ/wican-fw/assets/58990127/78085c55-857a-4c5f-9ef0-892ae0716ee5

Once (but really only once, after that never again) I received the following values:

{"bus":"0","type":"tx","ts":27099,"frame":[{"id":1947,"dlc":8,"rtr":false,"extd":false,"data":[3,34,144,2,170,170,170,170]}]}

{"bus":"0","type":"rx","ts":33484,"frame":[{"id":1979,"dlc":8,"rtr":false,"extd":false,"data":[5,98,144,2,17,39,170,170]}]}

In my understanding the value is calculated as follows: ((B4x256)+B5)/100 --> ((17x256)+39)/100 = 43,91 % --> that's at least the SoC Car Scanner has indicated.

What should the filter look like in this case? I tried the following one:

CAN ID = 1979 PID = 144 Start Bit = 0 --> How do I recognize the values for Start Bit and Bit Length? Bit Length = 1 Expression = ((B4*256)+B5)/100 Cycle ms = 1000

Unfortunately, I did not get a correct answer either in the automation in Home Assistant (see step 5 in your instructions) or via Node-Red. The result always shows me the content of "TX" --> {"bus":"0","type":"tx","ts":27099,"frame":[{"id":1947,"dlc":8,"rtr":false,"extd":false,"data":[3,34,144,2,170,170,170,170]}]}

One last question: As long as the WiCAN is connected in the car, strange error messages are displayed in the board computer every time the driver's door is opened. Where does this come from, is it normal?

meatpiHQ commented 7 months ago

@howie90

The value of "RX" changed several times a second while I was looking at the SoC sensor in Car Scanner. Is this behavior normal or is it a problem?

Is the CAN bus always broadcasting frames, or only responds to PID request? You can simply monitor the bus when you're not using carscanner app.

CAN ID = 1979 PID = 144 Start Bit = 0 --> How do I recognize the values for Start Bit and Bit Length? Bit Length = 1 Expression = ((B4*256)+B5)/100 Cycle ms = 1000

Your filter looks good. You can ignore the "Start Bit" and "Bit Length" if you're using Bx to reference byte. These values are only relevant in case you're using V in the expression.

Unfortunately, I did not get a correct answer either in the automation in Home Assistant (see step 5 in your instructions) or via Node-Red. The result always shows me the content of "TX" --> {"bus":"0","type":"tx","ts":27099,"frame":[{"id":1947,"dlc":8,"rtr":false,"extd":false,"data":[3,34,144,2,170,170,170,170]}]}

Did you disable the "MQTT ELM327" logging?

One last question: As long as the WiCAN is connected in the car, strange error messages are displayed in the board computer every time the driver's door is opened. Where does this come from, is it normal?

That's very unusual. WiCAN doesn't interact with the bus on it's own unless you send something over TCP or mqtt. I assume you have setup the CAN bitrate correctly ? Not set as auto?

howie90 commented 7 months ago

I think it only responds to PID requests, cause without using Car Scanner, MQTT Explorer only shows 7 messages after 30 seconds instead of hundreds and non of the messages are "RX", only "TX".

image

Yes, "MQTT ELM327" logging is disabled.

I even bought Car Scanner Pro (iOS) but nothing changed.

howie90 commented 7 months ago

I forgot to mention, CAN Bitrate is set to 500K

meatpiHQ commented 7 months ago

@howie90 so whenever you're logging with carscanner, you see 1 tx frame and 8 Rx frames and one of these Rx frames contains the SoC?