<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>it continues</div><div><br></div><div>Direct reading here: <a href="http://gm-volt.com/forum/showthread.php?12958-CAN-bus-reading-remote-viewing-of-charge-state&p=226884#post226884">http://gm-volt.com/forum/showthread.php?12958-CAN-bus-reading-remote-viewing-of-charge-state&p=226884#post226884</a></div><div>or main here: <a href="http://www.opel-ampera-forum.de/viewtopic.php?f=39&t=1147&start=60#p17254">http://www.opel-ampera-forum.de/viewtopic.php?f=39&t=1147&start=60#p17254</a></div><div><br></div><div>It seems that 5EC returns what you request in 7E4.</div><div>Not only Voltage and Current, also Outside Temp and HV-Batterie Temp or HV-Cooling Temp.</div><div>The Meaning of the values depends on the Request in 7E4.</div><div>----- It "could" be that 7EC is an answer from the bus too.</div><div><br></div><div>And i think that this is a "user generated" output. Generated only by the Gateway?</div><div><br></div><div>Here is a log when DashDaq starts:</div><div><br></div><div><div>34,152 7E0      8 02 01 00 00 00 00 00 00 </div><div>34,154 7E8      8 06 41 00 BE 7F B8 13 AA </div><div>34,180 7DF      8 02 01 00 00 00 00 00 00 </div><div>34,182 7E8      8 06 41 00 BE 7F B8 13 AA </div><div>34,185 7EB      8 06 41 00 80 40 00 01 AA </div><div>34,186 7EF      8 06 41 00 00 00 00 01 AA </div><div>34,187 7EC      8 06 41 00 80 00 00 01 AA </div><div>34,187 7E9      8 06 41 00 80 00 00 01 AA </div><div>34,188 7EA      8 06 41 00 80 00 00 01 AA </div><div>34,196 7ED      8 06 41 00 00 00 00 01 AA </div><div><br></div><div>34,528 7E0      8 02 AA 00 00 00 00 00 00 </div><div>34,533 5E8      8 00 00 00 00 00 00 00 00 </div><div>34,591 7E1      8 02 AA 00 00 00 00 00 00 </div><div>34,592 5E9      8 00 00 00 00 00 00 00 00 </div><div>34,656 7E2      8 02 AA 00 00 00 00 00 00 </div><div>34,660 5EA      8 00 00 00 00 00 00 00 00 </div><div>34,721 7E3      8 02 AA 00 00 00 00 00 00 </div><div>34,728 5EB      8 00 00 00 00 00 00 00 00 </div><div>34,787 7E4      8 02 AA 00 00 00 00 00 00 </div><div>34,804 5EC      8 00 00 00 00 00 00 00 00 </div><div>34,851 7E5      8 02 AA 00 00 00 00 00 00 </div><div>34,862 5ED      8 00 AA AA AA AA AA AA AA </div><div>34,916 7E7      8 02 AA 00 00 00 00 00 00 </div><div>34,928 5EF      8 00 00 00 00 00 00 00 00 </div><div><br></div><div>34,981 7E1      8 04 2C FE 28 E8 00 00 00 </div><div>34,984 7E9      8 02 6C FE AA AA AA AA AA </div><div>34,987 7E4      8 10 0C 2C FE 43 4F 43 69 </div><div>34,997 7EC      8 30 00 14 AA AA AA AA AA </div><div>34,998 7E4      8 21 43 68 80 1E 80 1F 00 </div><div>35,010 7EC      8 02 6C FE AA AA AA AA AA </div><div>35,014 101      8 FE 01 3E 00 00 00 00 00 </div><div>35,015 7E1      8 03 AA 04 FE 00 00 00 00 </div><div>35,018 5E9      8 FE 00 00 00 00 00 00 00 </div><div>35,045 5E9      8 FE 00 00 00 00 00 00 00 </div><div>35,058 7E4      8 03 AA 04 FE 00 00 00 00 </div><div>35,072 5E9      8 FE 00 00 00 00 00 00 00 </div><div>35,099 5E9      8 FE 00 00 00 00 00 00 00 </div><div>35,117 5EC      8 FE 34 48 6E 63 60 00 00 </div><div>35,126 5E9      8 FE 00 00 00 00 00 00 00 </div><div>35,154 5E9      8 FE 00 00 00 00 00 00 00 </div><div>35,171 5EC      8 FE 34 48 6E 63 60 00 00 </div><div>35,180 5E9      8 FE 00 00 00 00 00 00 00 </div><div>35,207 5E9      8 FE 00 00 00 00 00 00 00 </div><div>35,226 5EC      8 FE 34 48 6E 63 60 00 00 </div></div><div><br></div><div>It looks like that a 7Ex starts an output from 5E(x+8).  x is between 0 and 7</div><div>7E4 -> 5EC</div><div>---- 7Ex ( 8 < = x <= F) could be a "control" output from the gateway.</div><div><br></div><div><br></div><div><br></div><div>Info from RScott:</div><div><div class="content" style="margin: 0px; padding: 0px; text-align: left; color: rgb(51, 51, 51); font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); position: static; z-index: auto; "><div id="post_message_226884" class="nolinks" style="margin: 0px; padding: 0px; "><blockquote class="postcontent restore" style="margin: 0px; padding: 0px; word-wrap: break-word; ">I've got some at <a href="http://www.evtools.info/ChevyVoltOBD2CAN.html" target="_blank" style="text-decoration: none; color: rgb(65, 115, 148); ">http://www.evtools.info/ChevyVoltOBD2CAN.html</a>, but really need to update that page (I've found some more, but not ranges).<br><br>If the first byte in 0BC has bit 8 set (leftmost), the car is on; if bit 5 is set, the car is off.<br><br>For charging, I can only tell indirectly (e.g. by monitoring the battery SOC in 206, or the battery kW usage in 3e3 bytes 4-5).<br><br>Speed is in the first two bytes of 3E9, as MPH*100 (so hex of 0102 would be decimal 258, or a very slow 2.58MPH).<br><br>4C1 byte 5 has the outside temperature, in degrees Fahrenheit with an offset of 50 (so 0x76 or 118 decimal would be 68 degrees F).</blockquote></div></div></div><div><br></div><div>---------------------------------------</div><div><br></div><div>For 4C1 i can say this is correct. But in Germany it is °C. T =( (4C1 Byte 5) / 2 ) - 40</div><div>I checked it with my old Logs and the Temperature are right.</div><div><br></div><div><br></div><div>Bye</div><div>Michael</div><div><br></div><div> </div><div><br><div><div>Am 30.12.2012 um 07:23 schrieb Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net">mark@webb-johnson.net</a>>:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Michael,<div><br></div><div>OK. This looks like an extension to standard OBDII over CAN. See:</div><div><br></div><div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><a href="http://en.wikipedia.org/wiki/OBD-II_PIDs#CAN_.2811-bit.29_Bus_format">http://en.wikipedia.org/wiki/OBD-II_PIDs#CAN_.2811-bit.29_Bus_format</a></div><div><a href="http://mbed.org/cookbook/OBDII-Can-Bus">http://mbed.org/cookbook/OBDII-Can-Bus</a></div></blockquote></div><div><br></div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">send:  7E4      8 06 2C FE 43 69 43 68 00</div></blockquote><br></div><div>OBDII extension:</div><div><ul class="MailOutline"><li>06 is the number of bytes in the message</li><li>2C is a custom mode</li><li>FE 43 69 43 68 00 would normally be the OBDII PID code, but here we don't know as it is custom</li></ul></div><div><br></div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">send: 7E4      8 03 AA 04 FE 00 00 00 00</div></blockquote></div><div><br></div><div>Similarly, 03 is the length, AA 04 FE is the message.</div><div><br></div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">return: 7EC      8 02 6C FE AA AA AA AA AA</div></blockquote></div><div><br></div><div>02 is the length, 6C FE is the message. The rest is garbage.</div><div><br></div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">return: 5EC      8 FE 4A 6F 00 00 00 00 00 [repeat 160 times]</div></blockquote></div><div><br></div><div>I think this is just the raw message (not OBDII). It is completely different from an OBDII over CAN reply.</div><div><br></div><div>It is not unusual for the physical controller ID to be a fixed offset from the OBDII response ID. In standard OBDII over CAN, the offset is often 8. Here, we're seeing an offset of 0x0200.</div><div><br></div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Idea:</div><div>car is off. -> no data on can bus.</div><div>car is off and charging -> can bus wakes every ~30 MInutes up. You can see in my Logs.</div><div>When the can bus is awake (it gets valid SOC Data for example), the Module send the initialization sequence and then the demand sequence.</div><div>It can send the demand sequence every 10seconds until the the can bus go sleep.</div><div>When there are no valid values in 5EC (the rest is valid) (temperature is zero, we normally don't have -40°C), the module sends the initialization sequnece again.</div></div></blockquote></div><div><div><div><br></div><div>I think this is a fine approach.</div><div><br></div><div>For your convenience, I've added a hook function vehicle_fn_ticker10() to the vehicle layer. You can hook into that to get a callback once every 10 seconds.</div><div><br></div><div>I suggest you wrap this logic around a "if (sys_features[FEATURE_CANWRITE])" so that you only do this if canwrite is on. Don't write to the can bus unless it has been opened in active mode (otherwise the system will loop waiting for the bus to be writable, then watchdog timeout as it never does).</div><div><br></div><div>Other than that, the charging / not-charging state can be maintained in the way you suggest. You should also be able to detect charging is stopped (charging -> not-charging) and check the SOC% to decide whether to alert or not. I think "twizy" Michael does something similar, so you may want to see how he does it and do it the same way.</div><div><br></div><div>The temperature is a nice bonus. I wonder what other fun stuff is hiding :-)</div><div><br></div><div>Regards, Mark.</div><div><br></div><div>On 30 Dec, 2012, at 12:50 AM, <a href="mailto:mikeljo@me.com">mikeljo@me.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>Johannes find some interesting stuff:</div><div><br></div><div><div>send:  7E4      8 06 2C FE 43 69 43 68 00</div><div>return: 7EC      8 02 6C FE AA AA AA AA AA</div><div>Set Configuration to get Voltage and Current</div><div><br></div><div>send: 7E4      8 03 AA 04 FE 00 00 00 00</div><div>return: 5EC      8 FE 4A 6F 00 00 00 00 00 [repeat 160 times]</div><div><br></div><div>Byte 1 (4A) Current</div><div>Byte 2 (6F) Voltage</div><div>Calculation:</div><div>I = Byte 1 * 0.2 in Ampere</div><div>U = Byte 2 / 2 in Volt</div><div><br></div><div>And continue:</div><div><br></div><div>Sending this two sequenzes <span style="background-color: rgb(255, 255, 255); font-family: arial, sans-serif; font-size: 13px; white-space: nowrap; ">immediately </span></div><div>7E4      8 10 08 2C FE 43 69 43 68</div><div>7E4      8 21 80 1F 00 00 00 00 00</div><div><br></div><div>gives with this:</div><div>send:  7E4      8 03 AA 04 FE 00 00 00 00</div><div>return: 5EC      8 FE 4A 6F 64 00 00 00 00  [repeat 160 times]</div><div><br></div><div>Byte 1 and 2 same as before, and in Byte 3 Temperature in °C</div><div>T = (Byte 3 / 2 ) - 40</div><div>This is the Temp. in raw. in Byte 4 could be Temp filtered. Still searching the Sequence for this.</div><div><br></div><div><br></div><div>Strom: 0x4A * 0,2 = 14,8A</div><div>Spannung: 0x6F * 2 = 222V</div><div>Temperatur: (0x64 / 2) - 40 = 10°C</div><div><br></div><div>Current and Temperature are ok. I think the Voltage must have an Offset (8 or 9) too. Cause my Voltage is around 230V.</div><div><br></div><div>It seems that the config send only once (every x Minutes, or so) and the "give me data" ID (7E4 8 03 AA 04 FE 00 00 00 00) every time you want to get it.</div><div>Then you get ~160 times the requested Values in ID 5EC.</div><div><br></div></div><div>Idea:</div><div>car is off. -> no data on can bus.</div><div>car is off and charging -> can bus wakes every ~30 MInutes up. You can see in my Logs.</div><div>When the can bus is awake (it gets valid SOC Data for example), the Module send the initialization sequence and then the demand sequence.</div><div>It can send the demand sequence every 10seconds until the the can bus go sleep.</div><div>When there are no valid values in 5EC (the rest is valid) (temperature is zero, we normally don't have -40°C), the module sends the initialization sequnece again.</div><div><br></div><div>Bye</div><div>Michael J.</div><div><br></div><div><br><div><div>Am 28.12.2012 um 01:41 schrieb Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net">mark@webb-johnson.net</a>>:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div>Can he provide the logs from the moment the DashDAQ is connected? Perhaps 10 seconds without charging, then start the charge and continue to monitor for 1 minute.<div><br></div><div>It seems possible that this is enabled by turning on a monitoring mode, but unexpected. This sort of thing would normally just be transmitted as part of the normal message stream.</div><div><br></div><div>Regards, Mark</div><div><br><div><div>On 27 Dec, 2012, at 11:58 PM, <a href="mailto:mikeljo@me.com">mikeljo@me.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Am 27.12.2012 um 01:11 schrieb Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net">mark@webb-johnson.net</a>>:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">Now, on to the other messages (I spoke about yesterday in the other thread). I'll try to drum up some interest in the forums to see if anyone can help with the decodes. It would be good if you could do the same.</span></blockquote></div><br><div>And here some first results from tachy:</div><div><br></div><div><span style="color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); ">CANUSB mit DashDAQ kombiniert bringts! Ich habe soeben den Code für das Ladegerät (Ladestrom/Ladespannung) rausbekommen:</span><br style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); "><br style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); "><span style="color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); ">5EC Byte 3 Ladestrom Einheit 0.2 A (Bsp: 14.2 A = 47h)</span><br style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); "><span style="color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); ">5EC Byte 4 Ladespannung Einheit 2 V (Bsp: 222V = 6Fh)</span><br style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); "><br></div><div><br></div><div>He works with a DashDAQ and a CANUSB, both connected with a ODB2 Y-Cable.</div><div>So he find the Charging Current und Charging Voltage:</div><div><span style="color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); ">5EC Byte 3 Charge Current Unit 0.2 A (Example: 14.2 A = 47h)</span><br style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); "><span style="color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); ">5EC Byte 4 Charge Voltage Unit 2 V (Example: 222V = 6Fh)</span><br style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); "></div><div><br></div><div>Fast enough?</div><div><br></div><div>BUT!!! This IDs doesn't exist in my Logs. i Think the DasDaq send a Command to get this ID.</div><div><br></div><div><br></div><div>Bye</div><div>michael</div></div>_______________________________________________<br>OvmsDev mailing list<br><a href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br><a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br></blockquote></div><br></div></div>_______________________________________________<br>OvmsDev mailing list<br><a href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br><a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br></blockquote></div><br></div></div>_______________________________________________<br>OvmsDev mailing list<br><a href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br><a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br></blockquote></div><br></div></div>_______________________________________________<br>OvmsDev mailing list<br><a href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>http://lists.teslaclub.hk/mailman/listinfo/ovmsdev<br></blockquote></div><br></div></body></html>