<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Unlike a standard indexed message (such as VIN, for example) where the messages come in #1, #2, #3, etc, these BMS messages come in seemingly at random. For example, here is a capture from cold wakeup:<div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472541.536441 1R11 6F2 0e ff ff ff ff ff ff ff</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472541.636967 1R11 6F2 0f ff ff ff ff ff ff ff</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472541.837607 1R11 6F2 11 ff ff ff ff ff ff ff</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472542.136658 1R11 6F2 14 ff ff ff ff ff ff ff</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472542.236201 1R11 6F2 15 ff ff ff ff ff ff ff</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472542.537060 1R11 6F2 18 e7 c8 45 c2 8c 7c 23</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472543.274424 1R11 6F2 1f f0 08 3a 92 8f f0 23</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472543.472967 1R11 6F2 01 90 34 24 4d 49 53 d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472543.973617 1R11 6F2 06 93 f4 24 4d 49 4f d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472544.173053 1R11 6F2 08 91 b4 24 1d 49 43 d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472544.671201 1R11 6F2 0d 97 b4 25 dd 48 3f d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472545.173202 1R11 6F2 12 93 34 25 4d 49 4f d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472545.685309 1R11 6F2 17 94 b4 24 2d 49 53 d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472545.973614 1R11 6F2 1a 99 48 2e e2 89 c0 22</span></font></div></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">…</span></font></div><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472606.575697 1R11 6F2 18 f0 08 48 42 8d a4 23</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472607.075726 1R11 6F2 1d a7 48 2a d2 8a 90 22</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472607.284635 1R11 6F2 1f f7 c8 3b 02 90 0c 24</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472607.374752 1R11 6F2 00 8d f4 23 fd 48 3b d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472608.078353 1R11 6F2 07 93 74 25 1d 49 3f d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472608.373934 1R11 6F2 0a 92 34 24 2d 49 53 d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472608.875669 1R11 6F2 0f 93 f4 24 4d 49 4f d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472609.375819 1R11 6F2 14 96 b4 25 7d 49 57 d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472609.875780 1R11 6F2 19 b0 c8 35 92 89 1c 23</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472610.175548 1R11 6F2 1c d5 c8 33 72 89 9c 22</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472610.375530 1R11 6F2 1e a4 48 2c c2 8c 00 23</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472649.542261 1R11 6F2 1a 00 20 00 08 00 02 80</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472649.648029 1R11 6F2 1b 00 20 00 08 00 02 80</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472649.850761 1R11 6F2 1d 00 20 00 08 00 02 80</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472650.141807 1R11 6F2 00 ff ff ff ff ff ff ff</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472650.441905 1R11 6F2 03 ff ff ff ff ff ff ff</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472650.642106 1R11 6F2 05 bd 33 4b cd 4c 1b cf</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472651.178823 1R11 6F2 0a 92 74 24 3d 49 5b d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472651.386026 1R11 6F2 0c 97 f4 25 7d 49 5f d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472651.885083 1R11 6F2 11 96 b4 25 3d 49 57 d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472652.178292 1R11 6F2 14 97 b4 25 6d 49 5b d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472652.386909 1R11 6F2 16 95 b4 25 6d 49 4f d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472652.678470 1R11 6F2 19 ab 88 34 42 89 08 23</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472652.977144 1R11 6F2 1c cf 08 32 22 89 88 22</span></font></div></div></blockquote><div class=""><br class=""></div><div class="">You can see the time difference between the first set of ‘ff ff ff’ and second set is quite large. 109 seconds.</div><div class=""><br class=""></div><div class="">Looking at just a couple of specific messages:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472545.973614 1R11 6F2 1a 99 48 2e e2 89 c0 22</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472549.173160 1R11 6F2 1a 9a 88 2e f2 89 c4 22</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472561.979447 1R11 6F2 1a 9c 08 2f 12 8a c8 22</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472571.576261 1R11 6F2 1a 9b c8 2e 12 8a cc 22</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472574.775537 1R11 6F2 1a 9c 08 2f 02 8a c8 22</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472593.975024 1R11 6F2 1a 9c 48 2f 02 8a cc 22</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472600.375601 1R11 6F2 1a 9c 08 2f 02 8a cc 22</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472649.542261 1R11 6F2 1a 00 20 00 08 00 02 80</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472542.136658 1R11 6F2 14 ff ff ff ff ff ff ff</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472561.373928 1R11 6F2 14 97 f4 25 7d 49 5b d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472564.573971 1R11 6F2 14 97 f4 25 8d 49 67 d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472583.774481 1R11 6F2 14 94 b4 25 7d 49 5f d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472586.973971 1R11 6F2 14 96 b4 25 7d 49 5f d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472609.375819 1R11 6F2 14 96 b4 25 7d 49 57 d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472652.178292 1R11 6F2 14 97 b4 25 6d 49 5b d2</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472661.785441 1R11 6F2 14 96 b4 25 6d 49 5f d2</span></font></div></blockquote><div class=""><div><br class=""></div><div>It seems that voltage temperature readings (such as 1a) go negative-maximum as the module goes to sleep, and voltage readings go maximum as the module wakes up.</div><div><br class=""></div><div>But in some case, completely random:</div><div><br class=""></div></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div><div><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472568.973842 1R11 6F2 00 8e f4 23 1d 49 3f d2</span></font></div><div><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472604.182418 1R11 6F2 00 8e b4 23 fd 48 3b d2</span></font></div><div><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472607.374752 1R11 6F2 00 8d f4 23 fd 48 3b d2</span></font></div><div><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472650.141807 1R11 6F2 00 ff ff ff ff ff ff ff</span></font></div><div><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472656.594506 1R11 6F2 00 8d f4 23 ed 48 3f d2</span></font></div><div><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">1542472666.183604 1R11 6F2 00 8e b4 23 ed 48 3b d2</span></font></div></div></div></blockquote><div class=""><div><br class=""></div><div>Similarly for the spurious readings.</div><div><br class=""></div><div>It seems that the individual BMS modules are reporting these values directly onto the bus, with no centralised control. But given the arrangement of 4x14bit readings per message, that doesn’t really make sense (particularly for voltage, with 6 readings per module).</div><div><br class=""></div><div>It is quite simple to remove these out of range readings, and I could also simply discard all others in the same group. But, I suspect identifying the slightly out of range readings will be harder. I’ll try the group disable first, and see if that improves it…</div><div><br class=""></div><div>Regards, Mark.</div><div><br class=""><blockquote type="cite" class=""><div class="">On 18 Nov 2018, at 1:38 AM, Michael Balzer <<a href="mailto:dexter@expeedo.de" class="">dexter@expeedo.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
  
  <div text="#000000" bgcolor="#FFFFFF" class="">
    Mark,<br class="">
    <br class="">
    filtering single readings or brick groups that way will not work,
    you need to discard the complete current series of readings and do a
    restart.<br class="">
    <br class="">
    If you don't, the omitted cell will complete the series on the next
    run, leading to an inconsistent series.<br class="">
    <br class="">
    That may be the source of those spurious big differences…?<br class="">
    <br class="">
    Regards,<br class="">
    Michael<br class="">
    <br class="">
    <br class="">
    <div class="moz-cite-prefix">Am 17.11.18 um 18:03 schrieb Mark
      Webb-Johnson:<br class="">
    </div>
    <blockquote type="cite" cite="mid:79F17765-DD19-4AAC-B0C5-3B6E6DC65762@webb-johnson.net" class="">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
      There are some strange high and low values (-100C for
      temperatures, and +5V for voltages) - seemingly when the car wakes
      up or goes to sleep.
      <div class=""><br class="">
      </div>
      <div class="">I have added some functions in vehicle.{h, cpp} to
        provide automatic sanity checking (based on limits provided by
        the vehicle).</div>
      <div class=""><br class="">
      </div>
      <div class="">On the Model S, that is now better, but still giving
        issues:</div>
      <div class=""><br class="">
      </div>
      <blockquote style="margin: 0 0 0 40px; border: none; padding:
        0px;" class="">
        <div class="">
          <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">OVMS# bms alerts</span></font></div>
          <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">Voltage: SD=5mV
                !77:+16mV !78:-59mV !80:+19mV</span></font></div>
          <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">Temperature: SD=0.7C
                ?1:+0.6C ?2:+1.2C ?3:+0.3C !4:+0.5C ?6:+0.2C !7:-0.5C
                ?9:-0.5C ?11:-0.4C ?13:-0.8C ?14:-0.4C !15:-0.5C
                !19:-0.5C ?20:-0.3C ?21:-0.3C ?22:-0.3C ?23:-0.2C
                ?24:-0.4C ?25:-0.3C ?29:+0.7C ?30:+0.6C ?31:+0.8C
                ?32:+0.9C</span></font></div>
        </div>
      </blockquote>
      <div class="">
        <div class=""><br class="">
        </div>
        <div class="">I think the temperature variances are correct and normal. I
          see some big differences in voltage min/max on some cells that
          look like spurious readings. Not sure how to address that - it
          is going to be hard to discard these readings. For example,
          see attached.</div>
        <div class=""><br class="">
        </div>
        <div class="">Regards, Mark</div>
        <div class=""><br class="">
        </div>
        <div class=""><span id="cid:part1.921828A3.28A4BAE0@expeedo.de"><PastedGraphic-5.png></span></div>
        <div class=""><br class="">
        </div>
        <div class="">
          <blockquote type="cite" class="">
            <div class="">On 17 Nov 2018, at 11:41 PM, Michael Balzer
              <<a href="mailto:dexter@expeedo.de" class="" moz-do-not-send="true">dexter@expeedo.de</a>> wrote:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <meta http-equiv="Content-Type" content="text/html;
                charset=UTF-8" class="">
              <div text="#000000" bgcolor="#FFFFFF" class=""> Obviously
                not working for you. Cells that exceeded the alert
                threshold deviation from average get marked with "!",
                and "?" = warn threshold exceeded.<br class="">
                <br class="">
                So at some point, many cells exceeded 200% stddev --
                obviously not in the established overall situation. Is
                there maybe some init phase with unstable / incomplete
                readings that needs to be skipped on the Model S?<br class="">
                <br class="">
                If so, a "bms reset" should clean the alerts up. Can you
                try that?<br class="">
                <br class="">
                Regards,<br class="">
                Michael<br class="">
                <br class="">
                <br class="">
                <div class="moz-cite-prefix">Am 17.11.18 um 16:01
                  schrieb Mark Webb-Johnson:<br class="">
                </div>
                <blockquote type="cite" cite="mid:5D4473BD-7CA1-472B-B3A4-A7244DDDC521@webb-johnson.net" class="">
                  <meta http-equiv="Content-Type" content="text/html;
                    charset=UTF-8" class="">
                  Not really sure how to interpret this. I get:
                  <div class=""><br class="">
                  </div>
                  <blockquote style="margin: 0 0 0 40px; border: none;
                    padding:
 0px;" class="">
                    <div class="">
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">OVMS# bms
                            alerts</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">Voltage:
                            SD=7mV !1:-7mV !2:-4mV !3:-4mV !4:-5mV
                            !5:-5mV !6:-6mV !7:-1mV !8:+2mV !9:+0mV
                            !10:+0mV !11:+0mV !12:-2mV ?13:+0mV !14:+4mV
                            !15:+2mV !16:+2mV !17:+0mV !18:+0mV !19:-3mV
                            !20:+0mV !21:-1mV ?22:+0mV !23:-2mV !24:-2mV
                            !26:+2mV !27:+1mV !28:+2mV ?29:+0mV !30:+0mV
                            !31:-2mV ?33:+0mV !35:-1mV !36:-2mV ?37:-5mV
                            !38:-3mV !39:-2mV !40:-2mV !41:-4mV !42:-6mV
                            !43:-3mV !44:+0mV !45:-1mV !46:-1mV !47:-1mV
                            !48:-1mV !49:+6mV !50:+7mV !51:+6mV !52:+8mV
                            !53:+7mV !54:+6mV !55:+1mV !56:+4mV !57:+1mV
                            !58:+4mV !59:+0mV !60:+0mV !61:+3mV !62:+5mV
                            !63:+4mV !64:+4mV !65:+2mV !66:+3mV !67:-1mV
                            !68:+2mV !69:+1mV !70:+1mV !71:-1mV !72:-1mV
                            !74:+2mV !76:+1mV ?77:+0mV !78:-1mV !79:+1mV
                            !80:+3mV !81:+1mV !82:+2mV !83:+2mV !84:+1mV
                            !85:-3mV !86:+2mV !87:-1mV !88:-1mV !89:-3mV
                            !90:-2mV !91:-2mV !92:-1mV !93:-2mV !94:-2mV
                            !95:-3mV !96:-4mV</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">Temperature:
                            SD=0.6C ?1:+0.5C ?2:+1.0C ?3:+0.3C ?4:+0.3C
                            ?5:-0.2C ?7:-0.3C ?9:-0.2C !10:-0.2C
                            ?12:-0.4C ?13:-0.3C ?14:-0.4C ?15:-0.5C
                            ?16:-0.3C ?17:+0.8C !18:-0.3C ?19:-0.1C
                            ?20:-0.3C ?21:-0.1C !22:-0.4C !24:-0.5C
                            ?25:-0.3C ?26:-0.4C ?28:-0.3C ?29:+0.7C
                            ?30:+0.3C ?31:+0.9C ?32:+0.5C</span></font></div>
                    </div>
                    <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class=""><br class="">
                        </span></font></div>
                    <div class="">
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">OVMS#
                            metrics list v.b.c</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.c.temp
                                                         
28.8652,29.4386,28.6334,28.6822,28.1942,28.5114,28.1454,28.4626,28.182,28.3406,28.3894,28.121,28.1088,28.1454,28.0112,28.182,28.9262,28.243,28.2674,28.2186,28.2918,28.0844,28.3528,28.0356,28.1454,28.1088,28.4626,28.2186,28.975,28.7554,29.0604,28.9384°C</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.c.temp.alert
                                                   
                            1,2,1,1,1,1,1,0,1,2,0,1,1,1,1,1,2,2,1,1,1,1,1,1,1,1,0,1,2,1,1,2</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.c.temp.dev.max
                                                 
0.52,1.03,0.31,0.26,-0.23,0.1,-0.29,-0.07,-0.25,-0.18,0.04,-0.44,-0.31,-0.39,-0.46,-0.34,0.76,-0.27,-0.15,-0.3,-0.13,-0.45,-0.08,-0.49,-0.28,-0.41,0.09,-0.28,0.73,0.34,0.92,0.52°C</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.c.temp.max
                                                     
28.8774,29.4386,28.6578,28.6822,28.1942,28.5236,28.1454,28.4626,28.182,28.3406,28.3894,28.121,28.1088,28.1454,28.0112,28.182,29.1092,28.243,28.2674,28.2186,28.2918,28.0844,28.3528,28.0356,28.1576,28.1088,28.4626,28.2186,29.0848,28.7554,29.2678,28.9384°C</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.c.temp.min
                                                     
28.853,29.3654,28.6212,28.5724,28.1332,28.3894,28.1088,28.2796,28.1332,28.1698,28.3894,27.9136,28.0966,27.9624,27.9014,28.0112,28.9262,28.0844,28.2674,28.0478,28.2796,27.9014,28.3406,27.8648,28.121,27.938,28.426,28.0722,28.975,28.609,29.0604,28.8042°C</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.c.voltage
                                                     
 4.13794,4.14099,4.14099,4.14099,4.14007,4.13915,4.14465,4.1477,4.14586,4.14556,4.14465,4.14373,4.14556,4.14922,4.14739,4.14709,4.14586,4.14586,4.14251,4.14556,4.14434,4.14495,4.14373,4.14342,4.14586,4.148,4.14586,4.14709,4.14526,4.14526,4.14342,4.14556,4.14526,4.14556,4.14434,4.14342,4.14038,4.14251,4.14282,4.14312,4.14099,4.13946,4.14251,4.14586,4.14434,4.14465,4.14465,4.14434,4.15197,4.15318,4.15166,4.1541,4.15318,4.15166,4.14709,4.14922,4.14709,4.14861,4.14617,4.14586,4.148,4.15074,4.14983,4.15044,4.1477,4.148,4.14465,4.148,4.14678,4.14647,4.14403,4.14403,4.14556,4.148,4.14586,4.14647,4.14465,4.14526,4.14617,4.148,4.14617,4.14647,4.14739,4.14678,4.14251,4.14709,4.14373,4.14434,4.14282,4.14373,4.14312,4.14465,4.14282,4.14312,4.14282,4.1419V</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.c.voltage.alert
                                               
 2,1,1,1,1,1,2,1,2,2,2,2,1,1,1,2,2,2,1,2,2,1,1,1,0,1,2,2,1,2,1,0,1,0,2,2,1,1,1,1,1,1,1,2,2,2,2,2,1,2,1,2,2,1,2,1,2,1,2,2,1,1,1,1,1,1,2,1,2,2,2,2,0,1,0,2,1,2,2,1,2,2,2,2,1,2,2,2,1,1,1,2,1,1,1,1</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.c.voltage.dev.max
                                             
 -0.0082,-0.00487,-0.00498,-0.00508,-0.00583,-0.00674,-0.00139,0.00257,0.00096,0.00086,-0.00096,-0.00221,-0.00061,0.004,0.00275,0.00217,0.00096,0.00077,-0.0034,0.00081,-0.0017,-0.00091,-0.00234,-0.00304,0.00068,0.00288,0.00124,0.0022,-0.00052,-0.00078,-0.0024,0.00095,-0.00103,-0.00061,-0.00179,-0.00224,-0.00546,-0.00335,-0.0032,-0.00271,-0.00506,-0.00644,-0.0036,0.00087,-0.00129,-0.00168,-0.00139,-0.00132,0.00648,0.00824,0.00648,0.00883,0.0081,0.00641,0.00161,0.00443,0.00222,0.00401,0.00096,0.00095,0.00342,0.00597,0.00469,0.00505,0.00318,0.00315,-0.00127,0.00291,0.00132,0.00197,-0.0024,-0.00168,-0.00072,0.00275,0.00069,0.00184,-0.00096,-0.0012,0.00125,0.0032,0.00166,0.00203,0.00291,0.00153,-0.00355,0.00214,-0.00225,-0.00171,-0.003,-0.00249,-0.00292,-0.00152,-0.00295,-0.00296,-0.00311,-0.00432V</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.c.voltage.max
                                                 
 4.13794,4.14129,4.14099,4.14099,4.14007,4.13915,4.14465,4.1477,4.14586,4.14586,4.14556,4.14403,4.14556,4.14922,4.1477,4.14709,4.14586,4.14586,4.14251,4.14586,4.14434,4.14495,4.14373,4.14342,4.14586,4.148,4.14617,4.14709,4.14556,4.14526,4.14342,4.14586,4.14526,4.14556,4.14434,4.14373,4.14099,4.14282,4.14282,4.14312,4.14099,4.13946,4.14282,4.14617,4.14465,4.14465,4.14465,4.14434,4.15197,4.15349,4.15197,4.1541,4.15318,4.15166,4.14709,4.14922,4.14709,4.14861,4.14617,4.14647,4.14861,4.15105,4.15014,4.15044,4.1483,4.1483,4.14465,4.148,4.14678,4.14709,4.14403,4.14403,4.14556,4.148,4.14586,4.14709,4.14526,4.14526,4.14647,4.148,4.14709,4.14739,4.1483,4.14678,4.14282,4.14709,4.14403,4.14434,4.14312,4.14373,4.14312,4.14465,4.14312,4.14312,4.14312,4.1419V</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.c.voltage.min
                                                 
 4.13123,4.13427,4.13397,4.13397,4.13336,4.13214,4.13732,4.14038,4.13915,4.13885,4.13794,4.13641,4.13824,4.14159,4.14068,4.14007,4.13855,4.13824,4.1355,4.13885,4.13702,4.13794,4.13611,4.1358,4.13855,4.14099,4.13915,4.14007,4.13794,4.13794,4.13641,4.13855,4.13794,4.13824,4.13702,4.13641,4.13367,4.1358,4.1355,4.1358,4.13397,4.13275,4.13488,4.13855,4.13702,4.13702,4.13702,4.13732,4.14342,4.14586,4.14403,4.14617,4.14526,4.14403,4.13824,4.14159,4.13946,4.14038,4.13824,4.13824,4.14099,4.14342,4.14251,4.14251,4.14068,4.14038,4.13732,4.14099,4.13946,4.13976,4.13671,4.13671,4.13794,4.14038,4.13824,4.13946,4.13763,4.13763,4.13885,4.14038,4.13915,4.13946,4.14068,4.13885,4.1355,4.14007,4.13671,4.13732,4.13611,4.13641,4.13641,4.13732,4.13611,4.13641,4.13611,4.13458V</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.cac</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.consumption
                                                     0Wh/km</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.coulomb.recd</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.coulomb.used</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.current</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class=""><br class="">
                          </span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">OVMS#
                            metrics list v.b.p</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.p.level.avg</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.p.level.max</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.p.level.min</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.p.level.stddev</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.p.temp.avg
                                                      28.43°C</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.p.temp.max
                                                      29.4508°C</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.p.temp.min
                                                      28.0234°C</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.p.temp.stddev
                                                   0.36°C</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.p.temp.stddev.max
                                               0.65°C</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.p.voltage.avg
                                                   4.14669V</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.p.voltage.max
                                                   4.15532V</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.p.voltage.min
                                                   4.13855V</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.p.voltage.stddev
                                                0.00669V</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.p.voltage.stddev.max
                                            0.00717V</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">v.b.power</span></font></div>
                    </div>
                  </blockquote>
                  <div class="">
                    <div class=""><br class="">
                    </div>
                    <div class="">And a bunch of push notifications
                      every time I connect the App, like this:</div>
                    <div class=""><br class="">
                    </div>
                  </div>
                  <blockquote style="margin: 0 0 0 40px; border: none;
                    padding:
 0px;" class="">
                    <div class="">
                      <div class=""><img apple-inline="yes" id="ABBF2CCE-13B5-411E-BAF9-0536E98CF4B3" src="cid:00797011-10FE-4089-9EE7-0D42071C1BCA" class="" moz-do-not-send="true"></div>
                    </div>
                  </blockquote>
                  <div class="">
                    <div class=""><br class="">
                    </div>
                    <div class="">Regards, Mark</div>
                    <div class=""><br class="">
                      <blockquote type="cite" class="">
                        <div class="">On 17 Nov 2018, at 10:51 PM,
                          Michael Balzer <<a href="mailto:dexter@expeedo.de" class="" moz-do-not-send="true">dexter@expeedo.de</a>>
                          wrote:</div>
                        <br class="Apple-interchange-newline">
                        <div class="">
                          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
                          <div text="#000000" bgcolor="#FFFFFF" class="">
                            First implementation of general cell
                            deviation checking and alerts is pushed.<br class="">
                            <br class="">
                            <tt class="">    Vehicle BMS: cell
                              deviations & alerts</tt><tt class=""><br class="">
                            </tt><tt class="">    </tt><tt class=""><br class="">
                            </tt><tt class="">    Renamed metrics:</tt><tt class=""><br class="">
                            </tt><tt class="">    - v.b.c.level.* →
                              v.b.p.level.* (for consistency)</tt><tt class=""><br class="">
                            </tt><tt class="">    </tt><tt class=""><br class="">
                            </tt><tt class="">    New metrics:</tt><tt class=""><br class="">
                            </tt><tt class="">    -
                              v.b.c.(voltage,temp).(dev.max,alert)</tt><tt class=""><br class="">
                            </tt><tt class="">    -
                              v.b.p.(voltage,temp).(min,max,avg,stddev,stddev.max)</tt><tt class=""><br class="">
                            </tt><tt class="">    </tt><tt class=""><br class="">
                            </tt><tt class="">    New configs:</tt><tt class=""><br class="">
                            </tt><tt class="">    - vehicle
                              [bms.dev.voltage.warn] -- threshold [V]</tt><tt class=""><br class="">
                            </tt><tt class="">    - vehicle
                              [bms.dev.voltage.alert] -- threshold [V]</tt><tt class=""><br class="">
                            </tt><tt class="">    - vehicle
                              [bms.dev.temp.warn] -- threshold [°C]</tt><tt class=""><br class="">
                            </tt><tt class="">    - vehicle
                              [bms.dev.temp.alert] -- threshold [°C]</tt><tt class=""><br class="">
                            </tt><tt class="">    …all optional,
                              default: warn at 120% stddev, alert at
                              200% stddev</tt><tt class=""><br class="">
                            </tt><tt class="">    </tt><tt class=""><br class="">
                            </tt><tt class="">    New commands:</tt><tt class=""><br class="">
                            </tt><tt class="">    - bms alerts → show
                              cells with warn/alert levels</tt><tt class=""><br class="">
                            </tt><br class="">
                            <br class="">
                            I changed the config scheme hoping a manual
                            configuration normally isn't necessary with
                            this automatic adaption to the standard
                            deviation.<br class="">
                            <br class="">
                            Please check and report if that idea works.
                            If it doesn't, please report the deviations
                            and necessary threshold levels on your
                            batteries.<br class="">
                            <br class="">
                            I also omitted the overall stddev alerts for
                            now, I don't think those really are
                            necessary, haven't had a single trigger on
                            the Twizy for this.<br class="">
                            <br class="">
                            Integration into the web chart page and
                            historical data updates are still todo.<br class="">
                            <br class="">
                            Migration for the Twizy battery monitor to
                            the generalized scheme is in progress.<br class="">
                            <br class="">
                            Regards,<br class="">
                            Michael<br class="">
                            <br class="">
                            <br class="">
                            <div class="moz-cite-prefix">Am 17.11.18 um
                              11:53 schrieb Mark Webb-Johnson:<br class="">
                            </div>
                            <blockquote type="cite" cite="mid:1844F7C2-3572-4F1F-B16E-2F66A8CECD28@webb-johnson.net" class="">
                              <meta http-equiv="content-type" content="text/html; charset=UTF-8" class="">
                              <div dir="ltr" class="">Short video
                                showing Model S charging;</div>
                              <div dir="ltr" class=""><br class="">
                              </div>
                              <div dir="ltr" class=""><a href="https://youtu.be/Q4vMPSwBFAo" moz-do-not-send="true" class="">https://youtu.be/Q4vMPSwBFAo</a></div>
                              <div dir="ltr" class=""><br class="">
                                On 17 Nov 2018, at 6:13 PM, Mark
                                Webb-Johnson <<a href="mailto:mark@webb-johnson.net" moz-do-not-send="true" class="">mark@webb-johnson.net</a>>
                                wrote:<br class="">
                                <br class="">
                              </div>
                              <blockquote type="cite" class="">
                                <div dir="ltr" class="">
                                  <meta http-equiv="content-type" content="text/html; charset=UTF-8" class="">
                                  <div dir="ltr" class="">Ok. Will do.</div>
                                  <div dir="ltr" class=""><br class="">
                                  </div>
                                  <div dir="ltr" class="">Now you remind
                                    me, bms looks good on iPhone:</div>
                                  <div dir="ltr" class=""><br class="">
                                  </div>
                                  <div dir="ltr" class=""><image1.jpeg></div>
                                  <div dir="ltr" class=""><br class="">
                                    On 17 Nov 2018, at 6:08 PM, Michael
                                    Balzer <<a href="mailto:dexter@expeedo.de" moz-do-not-send="true" class="">dexter@expeedo.de</a>>
                                    wrote:<br class="">
                                    <br class="">
                                  </div>
                                  <blockquote type="cite" class="">
                                    <div dir="ltr" class="">
                                      <meta http-equiv="Content-Type" content="text/html;
                                        charset=UTF-8" class="">
                                      Yes, you can add a new menu to
                                      PageMenu_t like that. I suggest
                                      introducing a general tools menu
                                      instead of a specific one, i.e.
                                      "PageMenu_Tools".<br class="">
                                      <br class="">
                                      To still fit the menu on one line
                                      in tablet mode (width down to 768
                                      px) I suggest moving the Shell
                                      into the tools menu then.<br class="">
                                      <br class="">
                                      Go ahead, I'm not working on the
                                      web framework at the moment.<br class="">
                                      <br class="">
                                      Regards,<br class="">
                                      Michael<br class="">
                                      <br class="">
                                      <br class="">
                                      <div class="moz-cite-prefix">Am
                                        17.11.18 um 10:48 schrieb Mark
                                        Webb-Johnson:<br class="">
                                      </div>
                                      <blockquote type="cite" cite="mid:E46F474B-C515-454C-B011-7916A84BBA87@webb-johnson.net" class="">
                                        <meta http-equiv="Content-Type" content="text/html;
                                          charset=UTF-8" class="">
                                        Twizy code overrides the virtual
                                        short name function, so won’t
                                        suffer the issue.
                                        <div class=""><br class="">
                                        </div>
                                        <div class="">I think it is a
                                          bug in vehicle factory (as
                                          modifying the vehicle type is
                                          reasonable), so fixed it
                                          there. Returning NULL is
                                          problematic. It would be so
                                          much easier for everything to
                                          return std::string, but
                                          concern is memory consumption
                                          and overhead.</div>
                                        <div class=""><br class="">
                                        </div>
                                        <div class="">I’d like to start
                                          converting RE TOOLS to just
                                          use the web server. First step
                                          is to work out how to add a
                                          menu onto the web server. It
                                          seems that the PageMenu_t is a
                                          fixed enum list (and similarly
                                          hard-coded in the
                                          web_framework.</div>
                                        <div class=""><br class="">
                                        </div>
                                        <blockquote style="margin: 0 0 0
                                          40px;
 border: none;

                                          padding:
 0px;" class="">
                                          <div class="">Do I just add a
                                            ‘CAN bus’ menu there, by
                                            adding it to PageMenu_t, and
                                            supporting it where the
                                            other top level menus are?
                                            Or do you have any other
                                            suggestions/plans for this?</div>
                                          <div class=""><br class="">
                                          </div>
                                          <div class="">I don’t want to
                                            step on anything you are
                                            working on here.</div>
                                        </blockquote>
                                        <div class="">
                                          <div class=""><br class="">
                                          </div>
                                          <div class="">The second stage
                                            will be to add displays
                                            under that, but I think that
                                            is fairly straight forward.
                                            I will mostly be displaying
                                            tables, and sending those
                                            over the web socket would be
                                            good.</div>
                                          <div class=""><br class="">
                                          </div>
                                          <div class="">Regards, Mark</div>
                                          <div class=""><br class="">
                                            <blockquote type="cite" class="">
                                              <div class="">On 17 Nov
                                                2018, at 5:37 PM,
                                                Michael Balzer <<a href="mailto:dexter@expeedo.de" class="" moz-do-not-send="true">dexter@expeedo.de</a>>
                                                wrote:</div>
                                              <br class="Apple-interchange-newline">
                                              <div class="">
                                                <meta http-equiv="Content-Type" content="text/html;
                                                  charset=UTF-8" class="">
                                                <div text="#000000" bgcolor="#FFFFFF" class=""> Mark,<br class="">
                                                  <br class="">
                                                  nice, thanks.<br class="">
                                                  <br class="">
                                                  The short name is used
                                                  for the menu label.
                                                  It's meant to fall
                                                  back to the long name
                                                  (and seems to do so in
                                                  your screenshot), so
                                                  should not be null.
                                                  But I admit I haven't
                                                  tested it on a vehicle
                                                  without a short name.<br class="">
                                                  <br class="">
                                                  Btw, I'm currently
                                                  working on the
                                                  deviations and alerts.<br class="">
                                                  <br class="">
                                                  Regards,<br class="">
                                                  Michael<br class="">
                                                  <br class="">
                                                  <br class="">
                                                  <div class="moz-cite-prefix">Am
                                                    17.11.18 um 10:08
                                                    schrieb Mark
                                                    Webb-Johnson:<br class="">
                                                  </div>
                                                  <blockquote type="cite" cite="mid:096E607E-ADE6-4780-BB70-C8E5B8A7AC2D@webb-johnson.net" class="">
                                                    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
                                                    Michael,
                                                    <div class=""><br class="">
                                                    </div>
                                                    <div class="">Looks
                                                      good. It seems
                                                      that you did
                                                      everything
                                                      necessary for the
                                                      Model S already in
                                                      your
                                                      commit 2a84d861403f48142d6adcc16ad7a20cd458e427:</div>
                                                    <div class=""><br class="">
                                                    </div>
                                                    <blockquote style="margin: 0 0
                                                      0
 40px;

                                                      border:
                                                      none;


                                                      padding:

                                                      0px;" class="">
                                                      <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:
                                                          14px;" class="">#include
“ovms_webserver.h"</span></font></div>
                                                      <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:
                                                          14px;" class=""><br class="">
                                                          </span></font></div>
                                                      <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:
                                                          14px;" class="">OvmsVehicleTeslaModelS::OvmsVehicleTeslaModelS()</span></font></div>
                                                      <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:
                                                          14px;" class="">MyWebServer.RegisterPage("/bms/cellmon",
                                                          "BMS cell
                                                          monitor",
                                                          OvmsWebServer::HandleBmsCellMonitor,
PageMenu_Vehicle, PageAuth_Cookie);</span></font></div>
                                                      <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:
                                                          14px;" class=""><br class="">
                                                          </span></font></div>
                                                      <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:
                                                          14px;" class="">OvmsVehicleTeslaModelS::~OvmsVehicleTeslaModelS()</span></font></div>
                                                      <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:
                                                          14px;" class="">MyWebServer.DeregisterPage("/bms/cellmon");</span></font></div>
                                                    </blockquote>
                                                    <div class=""><br class="">
                                                    </div>
                                                    <div class="">From
                                                      my devbench,
                                                      replaying a CAN
                                                      CRTD log file, I
                                                      get this output:<br class="">
                                                      <div class=""><br class="">
                                                      </div>
                                                      <div class=""><span id="cid:part1.478CBE5C.50A27CA9@expeedo.de" class=""><PastedGraphic-2.png></span></div>
                                                      <div class=""><br class="">
                                                      </div>
                                                      <div class="">The
                                                        animation is
                                                        very nice.</div>
                                                      <div class=""><br class="">
                                                      </div>
                                                      <div class="">I
                                                        am, however,
                                                        getting crashes,
                                                        as follows:</div>
                                                    </div>
                                                    <div class="">
                                                      <div class=""><br class="">
                                                      </div>
                                                    </div>
                                                    <blockquote style="margin: 0 0
                                                      0
 40px;

                                                      border:
                                                      none;


                                                      padding:

                                                      0px;" class="">
                                                      <div class="">
                                                        <div class="">
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">#
                                                          xtensa-esp32-elf-addr2line
                                                          -pfiaC -e
                                                          3.1.011-25-g2a84d86.ovms3.elf
                                                          0x400935d3
                                                          0x4009372b
                                                          0x400db90c
                                                          0x4012c0f7
                                                          0x4012d0e1
                                                          0x4012d1e0
                                                          0x4012ebc1
                                                          0x4012ecbd
                                                          0x400f8b65
                                                          0x400f912d
                                                          0x400fa27c
                                                          0x400fa29a
                                                          0x400f8b65
                                                          0x400fa3e3
                                                          0x400fa7ad
                                                          0x400faa77
                                                          0x400f767e
                                                          0x400ee40a
                                                          0x400ee459</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x400935d3:
                                                          invoke_abort
                                                          at
                                                          /home/openvehicles/build/esp-idf/components/esp32/panic.c:670</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x4009372b:
                                                          abort at
/home/openvehicles/build/esp-idf/components/esp32/panic.c:670</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x400db90c:
__cxx_fatal_exception_message at
/home/openvehicles/build/esp-idf/components/cxx/cxx_exception_stubs.cpp:19</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x4012c0f7:
                                                          void
                                                          std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char>
                                                          >::_M_construct<char
const*>(char const*, char const*,
std::forward_iterator_tag) at
/home/openvehicles/build/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/bits/basic_string.tcc:216</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class=""> (inlined
                                                          by) void
                                                          std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char>
                                                          >::_M_construct_aux<char
const*>(char const*, char const*, std::__false_type) at
/home/openvehicles/build/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/bits/basic_string.h:195</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class=""> (inlined
                                                          by) void
                                                          std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char>
                                                          >::_M_construct<char
const*>(char const*, char const*) at
/home/openvehicles/build/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/bits/basic_string.h:214</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class=""> (inlined
                                                          by)
                                                          std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char>
                                                          >::basic_string(char
                                                          const*,
                                                          std::allocator<char>
                                                          const&) at
/home/openvehicles/build/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/bits/basic_string.h:457</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x4012d0e1:
OvmsWebServer::CreateMenu[abi:cxx11](PageContext&) at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/components/ovms_webserver/src/web_framework.cpp:393</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x4012d1e0:
OvmsWebServer::HandleRoot(PageEntry&, PageContext&) at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/components/ovms_webserver/src/web_framework.cpp:510</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x4012ebc1:
PageEntry::Serve(PageContext&) at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/components/ovms_webserver/src/ovms_webserver.cpp:558</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x4012ecbd:
OvmsWebServer::EventHandler(mg_connection*, int, void*) at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/components/ovms_webserver/src/ovms_webserver.cpp:558</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x400f8b65:
                                                          mg_call at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:1701</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x400f912d:
mg_http_call_endpoint_handler at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:1701</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x400fa27c:
mg_http_handler2 at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:1701</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x400fa29a:
mg_http_handler at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:1701</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x400f8b65:
                                                          mg_call at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:1701</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x400fa3e3:
                                                          mg_recv_common
                                                          at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:1701</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x400fa7ad:
mg_if_recv_tcp_cb at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:1701</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class=""> (inlined
                                                          by)
                                                          mg_handle_tcp_read
                                                          at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:3723</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class=""> (inlined
                                                          by)
                                                          mg_mgr_handle_conn
                                                          at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:3844</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x400faa77:
mg_socket_if_poll at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:1701</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x400f767e:
                                                          mg_mgr_poll at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:1701</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x400ee40a:
OvmsNetManager::MongooseTask() at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/main/ovms_netmanager.cpp:560</span></font></div>
                                                          <div class=""><font class="" face="Andale

                                                          Mono"><span style="font-size:

                                                          14px;" class="">0x400ee459:
MongooseRawTask(void*) at
/home/openvehicles/build/Open-Vehicle-Monitoring-System-3.1/vehicle/OVMS.V3/main/ovms_netmanager.cpp:545</span></font></div>
                                                        </div>
                                                      </div>
                                                    </blockquote>
                                                    <div class="">
                                                      <div class=""><br class="">
                                                      </div>
                                                      <div class="">On
                                                        my development
                                                        bench module I
                                                        get this crash 1
                                                        in 4 times or
                                                        so. On my real
                                                        car, 100% of the
                                                        time.</div>
                                                      <div class=""><br class="">
                                                      </div>
                                                      <div class="">That
                                                        code path leads
into MyVehicleFactory.ActiveVehicleShortName(). Those should all be
                                                        ‘const char*’,
                                                        but it is
                                                        possible for
                                                        NULL to be
                                                        returned. I will
                                                        look into it in
                                                        more detail.</div>
                                                      <div class=""><br class="">
                                                      </div>
                                                      <div class="">Regards,
                                                        Mark.</div>
                                                      <div class=""><br class="">
                                                      </div>
                                                      <div class="">
                                                        <blockquote type="cite" class="">
                                                          <div class="">On
                                                          17 Nov 2018,
                                                          at 7:35 AM,
                                                          Michael Balzer
                                                          <<a href="mailto:dexter@expeedo.de" class="" moz-do-not-send="true">dexter@expeedo.de</a>>
                                                          wrote:</div>
                                                          <br class="Apple-interchange-newline">
                                                          <div class="">
                                                          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
                                                          <div text="#000000" bgcolor="#FFFFFF" class=""> Mark, Tamás,<br class="">
                                                          <br class="">
                                                          I haven't had
                                                          the time yet
                                                          to take care
                                                          of the stddev
                                                          port, but I've
                                                          just added the
                                                          generalized
                                                          web UI.<br class="">
                                                          <br class="">
                                                          Please see git
                                                          log for
                                                          details and
                                                          send some
                                                          screenshots.<br class="">
                                                          <br class="">
                                                          Regards,<br class="">
                                                          Michael<br class="">
                                                          <br class="">
                                                          <br class="">
                                                          <div class="moz-cite-prefix">Am
                                                          11.11.18 um
                                                          16:47 schrieb
                                                          Mark
                                                          Webb-Johnson:<br class="">
                                                          </div>
                                                          <blockquote type="cite" cite="mid:C4AAA14F-A53C-47E7-AB38-DC5437F14037@webb-johnson.net" class="">
                                                          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
                                                          OK. I spent
                                                          some time on
                                                          this today,
                                                          and sent in a
                                                          first draft
                                                          (as a bunch of
                                                          extensions to
                                                          vehicle.{h,
                                                          cpp}). I
                                                          migrated the
                                                          Tesla Model S
                                                          code to use
                                                          it, and
                                                          support came
                                                          down to just a
                                                          few simple
                                                          lines of code.
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">For
                                                          the moment, I
                                                          dropped the
                                                          idea of
                                                          ‘readingsperrow’,
                                                          as I think
                                                          that is Tesla
                                                          Model S
                                                          specific, and
                                                          not really
                                                          necessary.
                                                          Purely
                                                          presentational.</div>
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">c++
                                                          std::bitset is
                                                          fixed size, so
                                                          that doesn’t
                                                          work for us.
                                                          The
                                                          std::vector<bool>
                                                          seems a
                                                          workable
                                                          alternative,
                                                          but I am not
                                                          really happy
                                                          with using
                                                          std::find as a
                                                          way of looking
                                                          to see if we
                                                          have
                                                          everything. It
                                                          works as it
                                                          is, but is not
                                                          very optimal.
                                                          It seems there
                                                          should be a
                                                          better way of
                                                          doing that. I
                                                          think it is a
                                                          pretty key
                                                          feature, given
                                                          the broadcast
                                                          nature of the
                                                          buses, to help
                                                          the vehicle
                                                          module know
                                                          when it has a
                                                          set of data
                                                          ready to
                                                          commit to
                                                          metrics, so
                                                          will need to
                                                          think about
                                                          this some
                                                          more.</div>
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">I
                                                          also
                                                          implemented
                                                          min and max,
                                                          for voltages
                                                          and
                                                          temperatures.
                                                          They went in
                                                          cleanly.
                                                          Haven’t
                                                          tackled stddev
                                                          yet (or the
                                                          watchers/alerts,
                                                          overall
                                                          aggregates,
                                                          etc). There is
                                                          a very basic
                                                          ‘bms status’
                                                          command
                                                          implemented.</div>
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">Let
                                                          me know what
                                                          you think of
                                                          it.</div>
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">Regards,
                                                          Mark</div>
                                                          <div class=""><br class="">
                                                          <div class="">
                                                          <blockquote type="cite" class="">
                                                          <div class="">On
                                                          11 Nov 2018,
                                                          at 5:11 PM,
                                                          Michael Balzer
                                                          <<a href="mailto:dexter@expeedo.de" class="" moz-do-not-send="true">dexter@expeedo.de</a>>
                                                          wrote:</div>
                                                          <br class="Apple-interchange-newline">
                                                          <div class="">
                                                          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
                                                          <div text="#000000" bgcolor="#FFFFFF" class=""> Mark,<br class="">
                                                          <br class="">
                                                          yes, .min
                                                          & .max are
                                                          the minimum
                                                          and maximum
                                                          readings seen
                                                          since last
                                                          battery
                                                          monitor reset.
                                                          The reset
                                                          should be
                                                          available as…<br class="">
                                                          <ul class="">
                                                          <li class="">OvmsVehicle::ResetCellStats();</li>
                                                          <li class="">Command:
                                                          "vehicle bms
                                                          reset" …or
                                                          just "bms
                                                          reset" as we
                                                          also have
                                                          other vehicle
                                                          commands on
                                                          the root
                                                          level?<br class="">
                                                          </li>
                                                          </ul>
                                                          On the Twizy I
                                                          do an auto
                                                          reset each
                                                          time the
                                                          vehicle is
                                                          turned on and
                                                          each time a
                                                          charge starts,
                                                          but that
                                                          behaviour
                                                          should be
                                                          controllable
                                                          by the vehicle
                                                          / user.<br class="">
                                                          <br class="">
                                                          <br class="">
                                                          There's
                                                          additionally
                                                          the overall {
                                                          .stddev, .avg
                                                          } on voltages
                                                          and
                                                          temperatures
                                                          of the pack.
                                                          These and the
                                                          cell level
                                                          statistics can
                                                          be calculated
                                                          by the
                                                          framework, so
                                                          the vehicle
                                                          simply needs
                                                          to provide the
                                                          readings. The
                                                          framework
                                                          needs to
                                                          provide a way
                                                          to reset the
                                                          readings
                                                          completion
                                                          bitset, i.e.<br class="">
                                                          <ul class="">
                                                          <li class="">OvmsVehicle::RestartCellVoltages();</li>
                                                          <li class="">OvmsVehicle::RestartCellTemperatures();</li>
                                                          </ul>
                                                          …as sometimes
                                                          readings get
                                                          lost, and
                                                          adding new to
                                                          the previous
                                                          readings may
                                                          lead to an
                                                          inconsistent
                                                          view leading
                                                          to wrong
                                                          standard
                                                          deviation.<br class="">
                                                          <br class="">
                                                          <br class="">
                                                          Speaking of
                                                          standard
                                                          deviation, the
                                                          framework
                                                          should also
                                                          provide
                                                          warnings and
                                                          alerts flags.
                                                          On the Twizy
                                                          it does so by
                                                          checking
                                                          deviation
                                                          thresholds,
                                                          and there's a
                                                          general stddev
                                                          warn &
                                                          alert
                                                          threshold to
                                                          detect overall
                                                          condition and
                                                          two alert
                                                          thresholds on
                                                          the cell
                                                          level, one for
                                                          normal stddev
                                                          and one for
                                                          stddev alert
                                                          mode. Warning
                                                          flags on the
                                                          cell level are
                                                          set when the
                                                          cell deviation
                                                          is above
                                                          stddev. On the
                                                          Twizy these
                                                          thresholds are
                                                          currently
                                                          fixed to…<br class="">
                                                          <blockquote class=""><tt class="">//
                                                          Battery
                                                          cell/cmod
                                                          deviation
                                                          alert
                                                          thresholds:</tt><br class="">
                                                          <tt class="">#define
BATT_DEV_TEMP_ALERT         3       // = 3 °C</tt><br class="">
                                                          <tt class="">#define
BATT_DEV_VOLT_ALERT         6       // = 30 mV</tt><br class="">
                                                          <br class="">
                                                          <tt class="">//
                                                          ...thresholds
                                                          for overall
                                                          stddev:</tt><br class="">
                                                          <tt class="">#define
BATT_STDDEV_TEMP_WATCH      2       // = 2 °C</tt><br class="">
                                                          <tt class="">#define
BATT_STDDEV_TEMP_ALERT      3       // = 3 °C</tt><br class="">
                                                          <tt class="">#define
BATT_STDDEV_VOLT_WATCH      3       // = 15 mV</tt><br class="">
                                                          <tt class="">#define
BATT_STDDEV_VOLT_ALERT      5       // = 25 mV</tt><br class="">
                                                          </blockquote>
                                                          …these are
                                                          good defaults
                                                          for the Twizy
                                                          43 Ah pouch
                                                          cells, but may
                                                          be too low for
                                                          an 18650 pack,
                                                          and will
                                                          especially not
                                                          fit cheap LFP
                                                          type cells. So
                                                          these should
                                                          be
                                                          configurable,
                                                          i.e.<br class="">
                                                          <ul class="">
                                                          <li class="">vehicle
bms.dev.temp.alert [°C]</li>
                                                          <li class="">vehicle
bms.dev.voltage.alert [V]</li>
                                                          <li class="">vehicle
bms.stddev.temp.watch [°C]</li>
                                                          <li class="">vehicle
bms.stddev.temp.alert [°C]</li>
                                                          <li class="">vehicle
bms.stddev.voltage.watch [V]</li>
                                                          <li class="">vehicle
bms.stddev.voltage.alert [V]</li>
                                                          </ul>
                                                          I can
                                                          generalize the
                                                          Twizy code for
                                                          all of this.<br class="">
                                                          <br class="">
                                                          <br class="">
                                                          The Twizy
                                                          battery
                                                          monitoring
                                                          command set
                                                          is:<br class="">
                                                          <blockquote class=""><tt class="">OVMS#
                                                          xrt batt ?</tt><br class="">
                                                          <tt class="">data-cell           
                                                          Output cell
                                                          record</tt><br class="">
                                                          <tt class="">data-pack           
                                                          Output pack
                                                          record</tt><br class="">
                                                          <tt class="">reset               
                                                          Reset alerts
                                                          & watches</tt><br class="">
                                                          <tt class="">status              
                                                          Status report</tt><br class="">
                                                          <tt class="">tdev                
                                                          Show
                                                          temperature
                                                          deviations</tt><br class="">
                                                          <tt class="">temp                
                                                          Show
                                                          temperatures</tt><br class="">
                                                          <tt class="">vdev                
                                                          Show voltage
                                                          deviations</tt><br class="">
                                                          <tt class="">volt                
                                                          Show voltages</tt><br class="">
                                                          </blockquote>
                                                          The "data"
                                                          commands
                                                          provide the
                                                          server
                                                          historical
                                                          records
                                                          output. The
                                                          other commands
                                                          originate from
                                                          the V2 and
                                                          have been
                                                          designed to
                                                          keep the
                                                          output within
                                                          the SMS msg
                                                          size limit.<br class="">
                                                          <br class="">
                                                          "status" gives
                                                          an operative
                                                          overview of
                                                          the standard
                                                          and max
                                                          deviation
                                                          levels of
                                                          cells with
                                                          warning or
                                                          alert status.
                                                          "volt",
                                                          "vdev", "temp"
                                                          and "tdev"
                                                          show all
                                                          cells.<br class="">
                                                          <br class="">
                                                          The Twizy
                                                          generates a
                                                          battery alert
                                                          notification
                                                          from the
                                                          "status"
                                                          output
                                                          whenever some
                                                          cell alert
                                                          flag is set.<br class="">
                                                          <br class="">
                                                          <br class="">
                                                          The Twizy
                                                          server records
                                                          also originate
                                                          from the V2
                                                          limits, and
                                                          can now better
                                                          be changed to
                                                          vectors. I've
                                                          just finished
                                                          a virtual
                                                          dynamometer on
                                                          the Twizy,
                                                          sending a
                                                          vector metric
                                                          to the server
                                                          is just a
                                                          matter of…<br class="">
                                                          <blockquote class=""><tt class="">std::string
                                                          msg =
                                                          "RT-ENG-MotTrqDrv,0,86400,";</tt><br class="">
                                                          <tt class="">msg.append(m_mon.m_mot_torque_drv->AsString());</tt><br class="">
                                                          <tt class="">MyNotify.NotifyString("data",
                                                          "xrt.pwr.mon",
                                                          msg.c_str());</tt><br class="">
                                                          </blockquote>
                                                          Neat.<br class="">
                                                          <br class="">
                                                          The Twizy
                                                          sends server
                                                          records once
                                                          per minute
                                                          during
                                                          drive/charge.
                                                          The server
                                                          update
                                                          frequency
                                                          should become
                                                          tunable as
                                                          well, as that
                                                          would be a lot
                                                          of additional
                                                          data volume on
                                                          large packs.<br class="">
                                                          <br class="">
                                                          <br class="">
                                                          The Twizy
                                                          layout may be
                                                          either…<br class="">
                                                          <ul class="MailOutline">
                                                          <li class="">14
                                                          cell groups in
                                                          the pack</li>
                                                          <li class="">2
                                                          cell groups in
                                                          each module</li>
                                                          <li class="">7
                                                          modules in the
                                                          pack</li>
                                                          <li class="">Each
                                                          cell group has
                                                          1 voltage
                                                          measurement
                                                          (so, 14
                                                          individual
                                                          voltage
                                                          measurements)</li>
                                                          <li class="">Each
                                                          module has 1
                                                          temperature
                                                          measurements
                                                          (so, 7
                                                          individual
                                                          temperature
                                                          measurements)</li>
                                                          <li class="">That
                                                          means:</li>
                                                          <ul class="">
                                                          <li class="">OvmsVehicle::SetCellArrangementVoltage(14,
                                                          2,  7)</li>
                                                          <li class="">OvmsVehicle::SetCellArrangementTemperature(7,
                                                          1, 7)</li>
                                                          </ul>
                                                          </ul><p class="">…for
                                                          the original
                                                          battery, or
                                                          for an LFP
                                                          type
                                                          replacement…</p>
                                                          <ul class="MailOutline">
                                                          <li class="">16
                                                          cell groups in
                                                          the pack</li>
                                                          <li class="">16
                                                          cell groups in
                                                          each module</li>
                                                          <li class="">1
                                                          module in the
                                                          pack</li>
                                                          <li class="">Each
                                                          cell group has
                                                          1 voltage
                                                          measurement
                                                          (so, 16
                                                          individual
                                                          voltage
                                                          measurements)</li>
                                                          <li class="">Each
                                                          module has 3
                                                          temperature
                                                          measurements
                                                          (so, 3
                                                          individual
                                                          temperature
                                                          measurements)</li>
                                                          <li class="">That
                                                          means:</li>
                                                          <ul class="">
                                                          <li class="">OvmsVehicle::SetCellArrangementVoltage(16,
                                                          16,  8)</li>
                                                          <li class="">OvmsVehicle::SetCellArrangementTemperature(3,
                                                          3, 3)</li>
                                                          </ul>
                                                          </ul>
                                                          <br class="">
                                                          Regards,<br class="">
                                                          Michael<br class="">
                                                          <br class="">
                                                          <br class="">
                                                          <div class="moz-cite-prefix">Am
                                                          11.11.18 um
                                                          08:10 schrieb
                                                          Mark
                                                          Webb-Johnson:<br class="">
                                                          </div>
                                                          <blockquote type="cite" cite="mid:88AF6B7B-37D7-4698-97CD-43B6E481DBF0@webb-johnson.net" class="">
                                                          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
                                                          Looking at the
                                                          discussion
                                                          with Michael
                                                          back in May,
                                                          we came to
                                                          some
                                                          conclusions
                                                          for this. I
                                                          was happy back
                                                          then with
                                                          using ‘cell’
                                                          rather than
                                                          ‘module’ as
                                                          the naming,
                                                          because (a) we
                                                          are talking
                                                          about
                                                          cell/brick/module
                                                          level here,
                                                          not pack, and
                                                          (b) it is
                                                          shorter. It
                                                          seems that the
                                                          twizy has:
                                                          <div class=""><br class="">
                                                          </div>
                                                          <blockquote style="margin:

                                                          0

                                                          0


                                                          0


                                                          40px;


border:


none;

 padding:


 0px;" class="">
                                                          <div class=""><tt style="background-color:

 rgb(255,
 255,
 255);" class="">xrt.b.cell.01.volt.act                  
                                                          3.995V</tt><tt style="background-color:

 rgb(255,
 255,
 255);" class=""><br class="">
                                                          </tt><tt style="background-color:




rgb(255,

255,


 255);" class="">xrt.b.cell.01.volt.max                  
                                                          4.12V</tt><tt style="background-color:

 rgb(255,
 255,
 255);" class=""><br class="">
                                                          </tt><tt style="background-color:




rgb(255,

255,


 255);" class="">xrt.b.cell.01.volt.maxdev               
                                                          0.01V</tt><tt style="background-color:

 rgb(255,
 255,
 255);" class=""><br class="">
                                                          </tt><tt style="background-color:




rgb(255,

255,


 255);" class="">xrt.b.cell.01.volt.min                  
                                                          3.795V</tt><tt style="background-color:

 rgb(255,
 255,
 255);" class=""><br class="">
                                                          </tt></div>
                                                          <div class=""><tt style="background-color:

 rgb(255,
 255,
 255);" class="">...</tt></div>
                                                          <div class=""><tt style="background-color:

 rgb(255,
 255,
 255);" class="">xrt.b.cell.cnt                          
                                                          14</tt></div>
                                                          <div class=""><tt style="background-color:

 rgb(255,
 255,
 255);" class="">...</tt></div>
                                                          <div class=""><tt style="background-color:

 rgb(255,
 255,
 255);" class=""><tt class="">xrt.b.cmod.01.temp.act                  
                                                          17°C</tt><tt class=""><br class="">
                                                          </tt><tt class="">xrt.b.cmod.01.temp.max                  
                                                          23°C</tt><tt class=""><br class="">
                                                          </tt><tt class="">xrt.b.cmod.01.temp.maxdev               
                                                          1°C</tt><tt class=""><br class="">
                                                          </tt><tt class="">xrt.b.cmod.01.temp.min                  
                                                          16°C</tt></tt></div>
                                                          <div class=""><tt style="background-color:

 rgb(255,
 255,
 255);" class=""><tt class="">...</tt></tt></div>
                                                          <div class=""><tt style="background-color:

 rgb(255,
 255,
 255);" class=""><tt class="">xrt.b.cmod.cnt                          
                                                          7</tt></tt></div>
                                                          <div class=""><tt style="background-color:

 rgb(255,
 255,
 255);" class=""><tt class="">...</tt></tt></div>
                                                          <div class=""><tt style="background-color:

 rgb(255,
 255,
 255);" class=""><tt class=""><tt class="">xrt.b.pack.1.temp.alerts</tt><tt class=""><br class="">
                                                          </tt><tt class="">xrt.b.pack.1.temp.max                   
                                                          23°C</tt><tt class=""><br class="">
                                                          </tt><tt class="">xrt.b.pack.1.temp.min                   
                                                          16°C</tt><tt class=""><br class="">
                                                          </tt><tt class="">xrt.b.pack.1.temp.stddev.max            
                                                          1°C</tt><tt class=""><br class="">
                                                          </tt><tt class="">xrt.b.pack.1.temp.watches</tt><tt class=""><br class="">
                                                          </tt><tt class="">xrt.b.pack.1.volt.alerts</tt><tt class=""><br class="">
                                                          </tt><tt class="">xrt.b.pack.1.volt.max                   
                                                          57.6V</tt><tt class=""><br class="">
                                                          </tt><tt class="">xrt.b.pack.1.volt.min                   
                                                          52.8V</tt><tt class=""><br class="">
                                                          </tt><tt class="">xrt.b.pack.1.volt.stddev.max            
                                                          0.005V</tt><tt class=""><br class="">
                                                          </tt><tt class="">xrt.b.pack.1.volt.watches               
1,2,4,5,6,7,11,12,14</tt><tt class=""><br class="">
                                                          </tt><tt class="">xrt.b.pack.cnt                          
                                                          1</tt></tt></tt></div>
                                                          <div class=""><tt style="background-color:

 rgb(255,
 255,
 255);" class=""><tt class=""><tt class="">...<br class="">
                                                          </tt><tt class="">xrt.b.soc.max                           
                                                          100%</tt><tt class=""><br class="">
                                                          </tt><tt class="">xrt.b.soc.min                           
                                                          69.78%</tt></tt></tt></div>
                                                          </blockquote>
                                                          <div class="">
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">Trying
                                                          to come up
                                                          with a
                                                          standard
                                                          representation
                                                          for this (so
                                                          everyone can
                                                          use a shared
                                                          library, and
                                                          share output
                                                          displays),
                                                          that works
                                                          across all
                                                          vehicles...
                                                          Assuming we
                                                          have
                                                          one-dimensional
                                                          arrays for
                                                          different
                                                          types of
                                                          measurement
                                                          (for voltage,
                                                          temperature,
                                                          etc),
                                                          measurements
                                                          are taken at
                                                          the group of
                                                          cells level
                                                          (with perhaps
                                                          different
                                                          groupings for
                                                          different
                                                          readings), and
aggregations/limits being automatically calculated, I think this has:</div>
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">
                                                          <ol class="MailOutline">
                                                          <li class="">v.b.c.voltage<br class="">
                                                          <br class="">
Vector<float> metric type array of voltage measurements<br class="">
                                                          <br class="">
                                                          </li>
                                                          <li class="">v.b.c.temp<br class="">
                                                          <br class="">
Vector<float> metric type array of temperature measurements<br class="">
                                                          <br class="">
                                                          </li>
                                                          <li class="">Aggregations
                                                          / limits<br class="">
                                                          <br class="">
                                                          We could have
v.b.c.voltage.min, v.b.c.voltage.max, v.b.c.voltage.maxdev,
                                                          v.b.c.temp.min,
v.b.c.temp.max, and v.b.c.temp.maxdev if we wanted to store these.
                                                          Presumably
                                                          they could be
                                                          automatically
                                                          calculated? I
                                                          am guessing
                                                          ‘min’ is the
                                                          minimal value
                                                          seen, and
                                                          ‘max’ the
                                                          maximum?<br class="">
                                                          <br class="">
                                                          </li>
                                                          <li class="">Setting
                                                          as a batch<br class="">
                                                          <br class="">
                                                          The way I’ve
                                                          implemented
                                                          the Model S is
                                                          to keep a
                                                          bitmap of
                                                          values set.
                                                          For example,
                                                          say we have 32
                                                          cell voltage
                                                          measurements.
                                                          Every time we
                                                          set a voltage
                                                          measurement,
                                                          we set the
                                                          appropriate
                                                          bit. When the
                                                          bitmap is
                                                          full, zero the
                                                          bitmap, then
                                                          set the metric
                                                          in bulk
                                                          (setting the
                                                          entire
                                                          vector). That
                                                          seems to work
                                                          well for Model
                                                          S at least.
                                                          The
                                                          aggregations/limits
                                                          would be
                                                          calculated
                                                          (and set) when
                                                          the batch is
                                                          ready. I
                                                          suggest
                                                          something
                                                          like:<br class="">
                                                          <br class="">
                                                          </li>
                                                          <ul class="">
                                                          <li class="">OvmsVehicle::SetCellVoltage(int
                                                          index, float
                                                          value);</li>
                                                          <li class="">OvmsVehicle::SetCellTemperature(int
                                                          index, float
                                                          value);<br class="">
                                                          <br class="">
                                                          </li>
                                                          </ul>
                                                          <li class="">Arrangement<br class="">
                                                          <br class="">
                                                          My thinking is
                                                          that the count
                                                          of
                                                          measurements
                                                          available can
                                                          be defined
                                                          when the
                                                          module
                                                          initialises.
                                                          We can also
                                                          simply count
                                                          the size of
                                                          the vectors,
                                                          to know that.
                                                          The issue is
                                                          the
                                                          cell/brick/module/pack
                                                          arrangement;
                                                          How many
                                                          voltage or
                                                          temperature
                                                          measurements
                                                          per module,
                                                          how many
                                                          modules in the
                                                          pack, etc. I
                                                          think we need
                                                          to tell the
                                                          system (a) the
                                                          number of
                                                          readings
                                                          expected, (b)
                                                          the number of
                                                          readings per
                                                          module, and
                                                          (c) a hint to
                                                          say how many
                                                          readings to
                                                          show per row.
                                                          I suggest
                                                          something
                                                          like:<br class="">
                                                          <br class="">
                                                          </li>
                                                          <ul class="">
                                                          <li class="">OvmsVehicle::SetCellArrangementVoltage(int
                                                          readings, int
readingspermodule, int readingsperrow)</li>
                                                          <li class="">OvmsVehicle::SetCellArrangementTemperature(int
                                                          readings, int
readingspermodule, int readingsperrow)<br class="">
                                                          <br class="">
                                                          </li>
                                                          </ul>
                                                          <li class="">Commands<br class="">
                                                          <br class="">
                                                          Once the above
                                                          is defined we
                                                          can have a
                                                          ‘vehicle bms
                                                          status’
                                                          command to
                                                          show the
                                                          status (like
                                                          the Tesla
                                                          Model S one
                                                          shown here,
                                                          albeit more
                                                          polished):</li>
                                                          </ol>
                                                          </div>
                                                          <div class=""><br class="">
                                                          </div>
                                                          </div>
                                                          <blockquote style="margin:

                                                          0

                                                          0


                                                          0


                                                          40px;


border:


none;

 padding:


 0px;" class="">
                                                          <div class="">
                                                          <div class="">
                                                          <div class=""> <font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">
                                                           -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 1 |
                                                          3.981 V |
                                                          3.981 V |
                                                          3.981 V | 29.5
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">   |
                                                          3.981 V |
                                                          3.981 V |
                                                          3.981 V | 30.3
                                                          C Max</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
 -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 2 |
                                                          3.981 V |
                                                          3.981 V |
                                                          3.982 V | 29.4
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">   |
                                                          3.981 V |
                                                          3.981 V |
                                                          3.981 V | 29.8
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
 -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 3 |
                                                          3.982 V |
                                                          3.982 V |
                                                          3.981 V | 29.1
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">   |
                                                          3.981 V |
                                                          3.981 V |
                                                          3.982 V | 29.7
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
 -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 4 |
                                                          3.982 V |
                                                          3.982 V |
                                                          3.982 V | 28.9
                                                          C Min</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">   |
                                                          3.981 V |
                                                          3.982 V |
                                                          3.982 V | 29.7
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
 -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 5 |
                                                          3.982 V |
                                                          3.982 V |
                                                          3.982 V | 29.0
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">   |
                                                          3.982 V |
                                                          3.981 V |
                                                          3.981 V | 29.6
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
 -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 6 |
                                                          3.982 V |
                                                          3.982 V |
                                                          3.982 V | 29.3
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">   |
                                                          3.982 V |
                                                          3.982 V |
                                                          3.982 V | 29.6
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
 -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 7 |
                                                          3.981 V |
                                                          3.981 V |
                                                          3.981 V | 29.0
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">   |
                                                          3.981 V |
                                                          3.981 V |
                                                          3.981 V | 29.6
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
 -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 8 |
                                                          3.982 V |
                                                          3.983 V |
                                                          3.982 V | 29.2
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">   |
                                                          3.983 V |
                                                          3.982 V |
                                                          3.982 V | 29.9
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
 -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 9 |
                                                          3.982 V |
                                                          3.982 V |
                                                          3.981 V | 30.0
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">   |
                                                          3.982 V |
                                                          3.981 V |
                                                          3.981 V | 29.7
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
 -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">10 |
                                                          3.979 V |
                                                          3.980 V |
                                                          3.979 V | 29.1
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">   |
                                                          3.980 V |
                                                          3.979 V |
                                                          3.979 V | 29.8
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
 -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">11 |
                                                          3.980 V |
                                                          3.981 V |
                                                          3.981 V | 29.1
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">   |
                                                          3.981 V |
                                                          3.981 V |
                                                          3.981 V | 29.4
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
 -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">12 |
                                                          3.981 V |
                                                          3.982 V |
                                                          3.981 V | 29.1
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">   |
                                                          3.981 V |
                                                          3.981 V |
                                                          3.982 V | 29.3
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
 -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">13 |
                                                          3.982 V |
                                                          3.983 V |
                                                          3.982 V | 28.9
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">   |
                                                          3.982 V |
                                                          3.982 V |
                                                          3.982 V | 29.4
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
 -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">14 |
                                                          3.981 V |
                                                          3.982 V |
                                                          3.982 V | 29.3
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">   |
                                                          3.982 V |
                                                          3.982 V |
                                                          3.982 V | 29.5
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
 -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">15 |
                                                          3.981 V |
                                                          3.982 V |
                                                          3.981 V | 29.6
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">   |
                                                          3.982 V |
                                                          3.981 V |
                                                          3.981 V | 29.9
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
 -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">16 |
                                                          3.982 V |
                                                          3.982 V |
                                                          3.982 V | 29.5
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class="">   |
                                                          3.982 V |
                                                          3.981 V |
                                                          3.981 V | 29.8
                                                          C</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
 -------------------------------</span></font></div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 
                                                           Tmin: 28.9
                                                           Tmax: 30.3
                                                           Vmax: 3.983
                                                           Vmin: 3.979
                                                           Vmax-Vmin:
                                                          0.003  Vtot:
                                                          382.23</span></font></div>
                                                          </div>
                                                          </div>
                                                          <div class=""><font class="" face="Andale


                                                          Mono"><span style="font-size:



                                                          14px;" class=""><br class="">
                                                          </span></font></div>
                                                          <div class="">Another
                                                          variant of
                                                          this display
                                                          would be:</div>
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">
                                                          <div class=""> <font class="" face="Andale



                                                          Mono"><span style="font-size:



                                                          14px;" class="">  -------------------------------</span></font><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">-------------------------------</span><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">--------------------</span></div>
                                                          <div class=""><font class="" face="Andale



                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 1 |
                                                          3.981 V |
                                                          3.981 V |
                                                          3.981 V | </span></font><span style="font-family:

 "Andale


                                                          Mono";



font-size:

                                                          14px;" class="">3.981
                                                          V | 3.981 V |
                                                          3.981 V </span><font class="" face="Andale




                                                          Mono"><span style="font-size:



                                                          14px;" class="">|
                                                          29.5 C. </span></font><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">30.3
                                                          C Max |</span></div>
                                                          <div class=""> <font class="" face="Andale



                                                          Mono"><span style="font-size:



                                                          14px;" class="">  -------------------------------</span></font><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">-------------------------------</span><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">--------------------</span></div>
                                                          <div class=""><font class="" face="Andale



                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 2 |
                                                          3.981 V |
                                                          3.981 V |
                                                          3.982 V | </span></font><span style="font-family:

 "Andale


                                                          Mono";



font-size:

                                                          14px;" class="">3.981
                                                          V | 3.981 V |
                                                          3.981 V | </span><font class="" face="Andale




                                                          Mono"><span style="font-size:



                                                          14px;" class="">29.4
                                                          C  </span></font><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">29.8
                                                          C     |</span></div>
                                                          <div class=""> <font class="" face="Andale



                                                          Mono"><span style="font-size:



                                                          14px;" class="">  -------------------------------</span></font><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">-------------------------------</span><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">--------------------</span></div>
                                                          <div class=""><span style="font-size:

 14px;



                                                          font-family:



"Andale


                                                          Mono";" class=""> 3 |
                                                          3.982 V |
                                                          3.982 V |
                                                          3.981 V | </span><span style="font-family:
 "Andale



                                                          Mono";



font-size:

                                                          14px;" class="">3.981
                                                          V | 3.981 V |
                                                          3.982 V | </span><span style="font-size:
 14px;



                                                          font-family:



"Andale



                                                          Mono";" class="">29.1
                                                          C  </span><span style="font-family:

"Andale


                                                          Mono";




font-size:




 14px;" class="">29.7 C     |</span></div>
                                                          <div class=""> <font class="" face="Andale



                                                          Mono"><span style="font-size:



                                                          14px;" class="">  -------------------------------</span></font><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">-------------------------------</span><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">--------------------</span></div>
                                                          <div class=""><span style="font-size:

 14px;



                                                          font-family:



"Andale


                                                          Mono";" class=""> 4 |
                                                          3.982 V |
                                                          3.982 V |
                                                          3.982 V | </span><span style="font-family:
 "Andale



                                                          Mono";



font-size:

                                                          14px;" class="">3.981
                                                          V | 3.982 V |
                                                          3.982 V | </span><span style="font-size:
 14px;



                                                          font-family:



"Andale



                                                          Mono";" class="">28.9
                                                          C Min  </span><span style="font-family:

 "Andale




                                                          Mono";




font-size:

                                                          14px;" class="">29.7
                                                          C |</span></div>
                                                          <div class=""> <font class="" face="Andale



                                                          Mono"><span style="font-size:



                                                          14px;" class="">  -------------------------------</span></font><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">-------------------------------</span><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">--------------------</span></div>
                                                          <div class=""><font class="" face="Andale



                                                          Mono"><span style="font-size:



                                                          14px;" class=""> 5 |
                                                          3.982 V |
                                                          3.982 V |
                                                          3.982 V | </span></font><span style="font-family:

 "Andale


                                                          Mono";



font-size:

                                                          14px;" class="">3.982
                                                          V | 3.981 V |
                                                          3.981 V | </span><font class="" face="Andale



                                                          Mono"><span style="font-size:




                                                          14px;" class="">29.0
                                                          C  </span></font><span style="font-family:
 "Andale



                                                          Mono";



font-size:

                                                          14px;" class="">29.6
                                                          C     |</span></div>
                                                          <div class=""> <font class="" face="Andale



                                                          Mono"><span style="font-size:



                                                          14px;" class="">  -------------------------------</span></font><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">-------------------------------</span><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">--------------------</span></div>
                                                          <div class="">...</div>
                                                          <div class=""> <font class="" face="Andale



                                                          Mono"><span style="font-size:



                                                          14px;" class="">  -------------------------------</span></font><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">-------------------------------</span><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">--------------------</span></div>
                                                          <div class=""><font class="" face="Andale



                                                          Mono"><span style="font-size:



                                                          14px;" class="">16 |
                                                          3.982 V |
                                                          3.982 V |
                                                          3.982 V | </span></font><span style="font-family:

 "Andale


                                                          Mono";



font-size:

                                                          14px;" class="">3.982
                                                          V | 3.981 V |
                                                          3.981 V | </span><font class="" face="Andale




                                                          Mono"><span style="font-size:



                                                          14px;" class="">29.5
                                                          C  </span></font><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">29.8
                                                          C.    |</span></div>
                                                          <div class=""> <font class="" face="Andale



                                                          Mono"><span style="font-size:



                                                          14px;" class="">  -------------------------------</span></font><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">-------------------------------</span><span style="font-family:
 "Andale



                                                          Mono";



font-size:




                                                          14px;" class="">--------------------</span></div>
                                                          <div class=""><span style="font-size:

 14px;



                                                          font-family:



"Andale


                                                          Mono";" class=""> 
                                                           Tmin: 28.9
                                                           Tmax: 30.3
                                                           Vmax: 3.983
                                                           Vmin: 3.979
                                                           Vmax-Vmin:
                                                          0.003  Vtot:
                                                          382.23</span></div>
                                                          </div>
                                                          <div class=""><span style="font-size:

 14px;



                                                          font-family:



"Andale


                                                          Mono";" class=""><br class="">
                                                          </span></div>
                                                          <div class="">(The
                                                          vehicle itself
                                                          having the
                                                          control via
                                                          the
SetCellArrangement methods)</div>
                                                          </blockquote>
                                                          <div class="">
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">To
                                                          provide a
                                                          baseline usage
                                                          case, the
                                                          Tesla Model S
                                                          has:</div>
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">
                                                          <ul class="MailOutline">
                                                          <li class="">96
                                                          bricks in the
                                                          pack</li>
                                                          <li class="">6
                                                          bricks in each
                                                          module</li>
                                                          <li class="">16
                                                          modules in the
                                                          pack</li>
                                                          <li class="">Each
                                                          brick has one
                                                          voltage
                                                          measurement
                                                          (so, 96
                                                          individual
                                                          voltage
                                                          measurements)</li>
                                                          <li class="">Each
                                                          module has two
                                                          temperature
                                                          measurements
                                                          (so, 32
                                                          individual
                                                          temperature
                                                          measurements)</li>
                                                          <li class="">That
                                                          means:</li>
                                                          <ul class="">
                                                          <li class="">OvmsVehicle::SetCellArrangementVoltage(96,
                                                          6, 3)</li>
                                                          <li class="">OvmsVehicle::SetCellArrangementTemperature(32,
                                                          2, 1)</li>
                                                          </ul>
                                                          </ul>
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">Tesla
                                                          Model X seems
                                                          identical to
                                                          Model S.</div>
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">I
                                                          am still
                                                          working on
                                                          reverse
                                                          engineering
                                                          the Tesla
                                                          Roadster, but
                                                          it seems to
                                                          have:</div>
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">
                                                          <ul class="MailOutline">
                                                          <li class="">99
                                                          bricks in the
                                                          pack</li>
                                                          <li class="">9
                                                          bricks in each
                                                          module (aka
                                                          sheet)</li>
                                                          <li class="">11
                                                          modules in the
                                                          pack</li>
                                                          <li class="">Each
                                                          brick has one
                                                          voltage
                                                          measurement
                                                          (so, 11*9 = 99
                                                          individual
                                                          voltage
                                                          measurements)</li>
                                                          <li class="">Each
                                                          module has
                                                          four
                                                          temperature
                                                          measurements
                                                          (so, 11*4 = 44
                                                          individual
                                                          temperature
                                                          measurements)</li>
                                                          <li class="">That
                                                          means:</li>
                                                          <ul class="">
                                                          <li class="">OvmsVehicle::SetCellArrangementVoltage(99,
                                                          9, 9)</li>
                                                          <li class="">OvmsVehicle::SetCellArrangementTemperature(44,
                                                          4, 4)</li>
                                                          </ul>
                                                          </ul>
                                                          </div>
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">For
                                                          other cars
                                                          that support
                                                          cell-level
                                                          measurements,
                                                          do they fit
                                                          this
                                                          representation?
                                                          If so, can we
                                                          fill in the
                                                          following for
                                                          each car, to
                                                          see how it
                                                          fits in?</div>
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">
                                                          <ul class="MailOutline">
                                                          <li class="">XX
                                                          cell groups in
                                                          the pack</li>
                                                          <li class="">XX
                                                          cell groups in
                                                          each module</li>
                                                          <li class="">XX
                                                          modules in the
                                                          pack</li>
                                                          <li class="">Each
                                                          cell group has
                                                          one voltage
                                                          measurement
                                                          (so, XX
                                                          individual
                                                          voltage
                                                          measurements)</li>
                                                          <li class="">Each
                                                          module has
                                                          four
                                                          temperature
                                                          measurements
                                                          (so, XX
                                                          individual
                                                          temperature
                                                          measurements)</li>
                                                          <li class="">That
                                                          means:</li>
                                                          <ul class="">
                                                          <li class="">OvmsVehicle::SetCellArrangementVoltage(N,
                                                          Y,  Z)</li>
                                                          <li class="">OvmsVehicle::SetCellArrangementTemperature(N,
                                                          Y, Z)</li>
                                                          </ul>
                                                          </ul>
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">If
                                                          they don’t
                                                          fit, what
                                                          changes are
                                                          needed to make
                                                          it work?</div>
                                                          <div class=""><br class="">
                                                          </div>
                                                          <div class="">Regards,
                                                          Mark.</div>
                                                          </div>
                                                          <div class=""><br class="">
                                                          <blockquote type="cite" class="">
                                                          <div class="">On
                                                          11 Nov 2018,
                                                          at 12:16 AM,
                                                          Mark
                                                          Webb-Johnson
                                                          <<a href="mailto:mark@webb-johnson.net" class="" moz-do-not-send="true">mark@webb-johnson.net</a>>
                                                          wrote:</div>
                                                          <br class="Apple-interchange-newline">
                                                          <div class="">
                                                          <div class="">I
                                                          originally
                                                          thought
                                                          ‘brick’, or
                                                          ‘module’
                                                          rather than
                                                          ‘cell’, but
                                                          happy with
                                                          either. These
                                                          are readings
                                                          for groups of
                                                          cells, rather
                                                          than whole
                                                          pack.<br class="">
                                                          <br class="">
                                                          Tesla Model S
                                                          is 16 modules.
                                                          6 voltage
                                                          readings, and
                                                          2
                                                          temperatures,
                                                          per module.<br class="">
                                                          <br class="">
                                                          What is Kia
                                                          Soul
                                                          arrangement?<br class="">
                                                          <br class="">
                                                          Regards, Mark<br class="">
                                                          <br class="">
                                                          <blockquote type="cite" class="">On 10
                                                          Nov 2018, at
                                                          11:26 PM,
                                                          Henrik Scheel
                                                          <<a href="mailto:henrik.scheel@spjeldager.dk" class="" moz-do-not-send="true">henrik.scheel@spjeldager.dk</a>>
                                                          wrote:<br class="">
                                                          <br class="">
                                                          Hi Mark.<br class="">
                                                          <br class="">
                                                          Good idea with
                                                          a generic
                                                          array type
                                                          metric, and
                                                          standard
                                                          metrics for
                                                          common EV
                                                          features!<br class="">
                                                          <br class="">
                                                          Just a quick
                                                          note:<br class="">
                                                          The Kia Soul
                                                          EV vehicle
                                                          module will be
                                                          able to
                                                          utilize these
                                                          metric-arrays.
                                                          However, on
                                                          the Soul, the
                                                          voltages are
                                                          for each
                                                          physical pair
                                                          of cells
                                                          connected in
                                                          parallel, and
                                                          the
                                                          temperatures
                                                          are for 6
                                                          battery
                                                          modules, and
                                                          for the
                                                          battery
                                                          cooling air
                                                          inlet. <br class="">
                                                          <br class="">
                                                          So, for the
                                                          Kia Soul EV,
                                                          the name
                                                          “v.b.cell.temp”
                                                          would be
                                                          misleading, as
                                                          each measured
                                                          module
                                                          temperature is
                                                          representing
                                                          the state for
                                                          16 pairs of
                                                          cells.<br class="">
                                                          <br class="">
                                                          Aside from
                                                          that, I am all
                                                          for mapping
                                                          the values in
                                                          these new
                                                          standardized
                                                          metric types.
                                                          Currently, the
                                                          temperature
                                                          average is
                                                          calculated and
                                                          mapped to a
                                                          metric, and
                                                          the 96 cell
                                                          voltages are
                                                          unmapped for
                                                          Kia Soul EV.<br class="">
                                                          <br class="">
                                                          Best regards,<br class="">
                                                          Henrik<br class="">
                                                          -- <br class="">
                                                          <br class="">
                                                          Venlig hilsen
                                                          / best regards
                                                          <br class="">
                                                          Henrik R.
                                                          Scheel<br class="">
                                                          <br class="">
                                                          Spjeldager
                                                          Consult ApS<br class="">
                                                          Spjeldager 9 <br class="">
                                                          DK-2630
                                                          Taastrup <br class="">
                                                          CVR: 34491399
                                                          <br class="">
                                                          T: +45 2720
                                                          9828 <br class="">
                                                          <a href="http://www.spjeldager.dk/" class="" moz-do-not-send="true">http://www.spjeldager.dk/</a><br class="">
                                                          <br class="">
                                                          <blockquote type="cite" class="">Den
                                                          10. nov. 2018
                                                          kl. 15.34
                                                          skrev <a class="moz-txt-link-abbreviated" href="mailto:ovmsdev-request@lists.openvehicles.com" moz-do-not-send="true">ovmsdev-request@lists.openvehicles.com</a>:<br class="">
                                                          <br class="">
                                                          Send OvmsDev
                                                          mailing list
                                                          submissions to<br class="">
                                                            <a class="moz-txt-link-abbreviated" href="mailto:ovmsdev@lists.openvehicles.com" moz-do-not-send="true">ovmsdev@lists.openvehicles.com</a><br class="">
                                                          <br class="">
                                                          To subscribe
                                                          or unsubscribe
                                                          via the World
                                                          Wide Web,
                                                          visit<br class="">
                                                            <a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br class="">
                                                          or, via email,
                                                          send a message
                                                          with subject
                                                          or body 'help'
                                                          to<br class="">
                                                            <a class="moz-txt-link-abbreviated" href="mailto:ovmsdev-request@lists.openvehicles.com" moz-do-not-send="true">ovmsdev-request@lists.openvehicles.com</a><br class="">
                                                          <br class="">
                                                          You can reach
                                                          the person
                                                          managing the
                                                          list at<br class="">
                                                            <a class="moz-txt-link-abbreviated" href="mailto:ovmsdev-owner@lists.openvehicles.com" moz-do-not-send="true">ovmsdev-owner@lists.openvehicles.com</a><br class="">
                                                          <br class="">
                                                          When replying,
                                                          please edit
                                                          your Subject
                                                          line so it is
                                                          more specific<br class="">
                                                          than "Re:
                                                          Contents of
                                                          OvmsDev
                                                          digest..."<br class="">
                                                          <br class="">
                                                          <br class="">
                                                          Today's
                                                          Topics:<br class="">
                                                          <br class="">
                                                          1. Re: Custom
                                                          metrics (Mark
                                                          Webb-Johnson)<br class="">
                                                          <br class="">
                                                          <br class="">
----------------------------------------------------------------------<br class="">
                                                          <br class="">
                                                          Message: 1<br class="">
                                                          Date: Sat, 10
                                                          Nov 2018
                                                          22:34:46 +0800<br class="">
                                                          From: Mark
                                                          Webb-Johnson <a class="moz-txt-link-rfc2396E" href="mailto:mark@webb-johnson.net" moz-do-not-send="true"><mark@webb-johnson.net></a><br class="">
                                                          To: OVMS
                                                          Developers <a class="moz-txt-link-rfc2396E" href="mailto:ovmsdev@lists.openvehicles.com" moz-do-not-send="true"><ovmsdev@lists.openvehicles.com></a><br class="">
                                                          Subject: Re:
                                                          [Ovmsdev]
                                                          Custom metrics<br class="">
                                                          Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:1E30255B-5CC6-4EC4-BA9F-9CA41D156B11@webb-johnson.net" moz-do-not-send="true"><1E30255B-5CC6-4EC4-BA9F-9CA41D156B11@webb-johnson.net></a><br class="">
                                                          Content-Type:
                                                          text/plain;
                                                          charset="utf-8"<br class="">
                                                          <br class="">
                                                          I?ve added
                                                          UnregisterCommand()
                                                          methods to
                                                          ovms_command.{h,
                                                          cpp}. I?ve
                                                          also updated
                                                          the
                                                          vehicle_teslamodels
                                                          code to
                                                          UnregisterCommand
                                                          in the
                                                          destructor. I
                                                          think that is
                                                          cleaner. The
                                                          unregistering
                                                          of CAN buses
                                                          already seems
                                                          to be working
                                                          properly,
                                                          config
                                                          parameters
                                                          should persist
                                                          (even without
                                                          vehicle module
                                                          loaded). I am
                                                          still
                                                          considering
                                                          the situation
                                                          with metrics
                                                          (but tend to
                                                          think that
                                                          they should
                                                          disappear when
                                                          the vehicle
                                                          module is
                                                          unloaded).<br class="">
                                                          <br class="">
                                                          I?ve also
                                                          changed the
                                                          vehicle_teslamodels
                                                          code to use
                                                          single voltage
                                                          and temperate
                                                          metric arrays
                                                          (I think my
                                                          previous dual
                                                          voltage
                                                          temperature
                                                          arrangement
                                                          was
                                                          incorrect). I
                                                          think these
                                                          can now become
                                                          standard
                                                          metrics (one
                                                          for battery
                                                          voltage, and
                                                          another for
                                                          temperature).
                                                          How about
                                                          v.b.cell.voltage
                                                          and
                                                          v.b.cell.temp?
                                                          The
                                                          interpretation
                                                          of those
                                                          vectors (how
                                                          many modules
                                                          primarily -
                                                          with the
                                                          calculation of
                                                          voltages and
                                                          temperatures
                                                          per module
                                                          being
                                                          dependent on
                                                          the realtime
                                                          size of each
                                                          array) will
                                                          still be
                                                          vehicle
                                                          dependent, and
                                                          I guess the
                                                          vehicle module
                                                          can provide
                                                          hints to our
                                                          standard
                                                          component for
                                                          this. Perhaps
                                                          we can just
                                                          implement it
                                                          in vehicle.{h,
                                                          cpp}? I think
                                                          this standard
                                                          module can
                                                          deal with:<br class="">
                                                          <br class="">
                                                          An interface
                                                          for specific
                                                          vehicle module
                                                          to specify the
                                                          number of
                                                          modules,
                                                          number of
                                                          voltage
                                                          measurements,
                                                          and number of
                                                          temperature
                                                          measurements
                                                          available.<br class="">
                                                          Internal
                                                          storage of
                                                          cell voltages
                                                          and
                                                          temperatures.<br class="">
                                                          Tracking of
                                                          when all
                                                          voltages and
                                                          temperatures
                                                          have been set,
                                                          and these
                                                          should be
                                                          written to
                                                          metrics (as a
                                                          transaction).<br class="">
                                                          Standardised
                                                          command to
                                                          display on
                                                          terminal (like
                                                          ?xts bms?).<br class="">
                                                          Web interface
                                                          extensions
                                                          (including the
                                                          charting you
                                                          have, a
                                                          textual
                                                          display, etc).<br class="">
                                                          <br class="">
                                                          I can handle
                                                          all of the
                                                          above, except
                                                          the web
                                                          interface.
                                                          What do you
                                                          think? Can
                                                          these be
                                                          standardised?
                                                          Certainly for
                                                          Tesla Roadster
                                                          and Tesla
                                                          Model S they
                                                          appear to be
                                                          able to be
                                                          unified under
                                                          one standard
                                                          framework.<br class="">
                                                          <br class="">
                                                          Regards, Mark.<br class="">
                                                          <br class="">
                                                          <blockquote type="cite" class="">On 8
                                                          Nov 2018, at
                                                          6:49 AM,
                                                          Michael Balzer
                                                          <a class="moz-txt-link-rfc2396E" href="mailto:dexter@expeedo.de" moz-do-not-send="true"><dexter@expeedo.de></a>
                                                          wrote:<br class="">
                                                          <br class="">
                                                          Mark,<br class="">
                                                          <br class="">
                                                          1) yes, we're
                                                          approaching a
                                                          generic form
                                                          now. The chart
                                                          currently
                                                          displays
                                                          actual, min
                                                          & max
                                                          values from
                                                          the arrays,
                                                          and derives
                                                          the overall
                                                          average value.
                                                          It
                                                          automatically
                                                          adapts to the
                                                          number of
                                                          voltages and
                                                          temperatures
                                                          stored in the
                                                          arrays.<br class="">
                                                          <br class="">
                                                          It still
                                                          lacks:<br class="">
                                                          a) Displaying
                                                          max
                                                          deviations,
                                                          current
                                                          standard
                                                          deviation and
                                                          max standard
                                                          deviation
                                                          recorded.<br class="">
                                                          b) Displaying
                                                          cell/module
                                                          warn &
                                                          alert status.
                                                          These are
                                                          currently set
                                                          metrics on the
                                                          Twizy, could
                                                          better be
                                                          generalized as
                                                          arrays as
                                                          well, i.e.
                                                          0=normal,
                                                          1=warn,
                                                          2=alert.<br class="">
                                                          c) SOH /
                                                          capacity and
                                                          internal
                                                          resistance
                                                          should be
                                                          generally
                                                          available per
                                                          cell as well
                                                          (no data on
                                                          these yet on
                                                          the Twizy).<br class="">
                                                          <br class="">
                                                          And as this
                                                          will visually
                                                          overload the
                                                          chart it will
                                                          need some
                                                          buttons to
                                                          show/hide the
                                                          parts.<br class="">
                                                          <br class="">
                                                          A general
                                                          vehicle base
                                                          support for
                                                          these metrics
                                                          could
                                                          automatically
                                                          keep min &
                                                          max values,
                                                          calculate
                                                          deviations and
                                                          derive
                                                          warn/alert
                                                          status from
                                                          these. So
                                                          basically a
                                                          vehicle
                                                          adapter only
                                                          needs to
                                                          provide
                                                          voltages and
                                                          temperatures
                                                          (+ SOH and
                                                          internal
                                                          resistance as
                                                          available).
                                                          The reset
                                                          command then
                                                          can also
                                                          normally just
                                                          be a
                                                          generalized
                                                          version.<br class="">
                                                          <br class="">
                                                          2) I should
                                                          add some basic
                                                          documentation
                                                          on this to the
                                                          developer
                                                          manual
                                                          (lacking
                                                          time). For the
                                                          RE tools I've
                                                          got an API to
                                                          inject
                                                          arbitrary data
                                                          into the
                                                          websocket
                                                          stream on my
                                                          todo list, so
                                                          live updates
                                                          can be
                                                          transported
                                                          without
                                                          polling.<br class="">
                                                          <br class="">
                                                          4) Interesting
                                                          idea, similar
                                                          to a reverse
                                                          proxy. As the
                                                          channel will
                                                          be very slow
                                                          we will need
                                                          to reduce the
                                                          websocket
                                                          update
                                                          frequency,
                                                          make it
                                                          configurable
                                                          or maybe
                                                          auto-adapt to
                                                          the current
                                                          speed. Also,
                                                          the proxy
                                                          should cache
                                                          static assets
                                                          to speed up
                                                          first time
                                                          connects.<br class="">
                                                          <br class="">
                                                          The v2
                                                          protocol using
                                                          RC4 encryption
                                                          is a bad base
                                                          for this.
                                                          What's the
                                                          current
                                                          encryption on
                                                          v3/MQTT?<br class="">
                                                          <br class="">
                                                          Regards,<br class="">
                                                          Michael<br class="">
                                                          <br class="">
                                                          <br class="">
                                                          <blockquote type="cite" class="">Am
                                                          07.11.18 um
                                                          01:50 schrieb
                                                          Mark
                                                          Webb-Johnson:<br class="">
                                                          Some
                                                          questions/comments:<br class="">
                                                          <br class="">
                                                          I guess this
                                                          is fairly
                                                          generic.
                                                          Voltages and
                                                          temperatures,
                                                          with possibly
                                                          a different
                                                          number of
                                                          readings for
                                                          each. Model S
                                                          has two
                                                          temperatures,
                                                          but I guess we
                                                          can just treat
                                                          those as
                                                          interleaved.
                                                          Could it be
                                                          put into a
                                                          reusable
                                                          component? Or
                                                          could we have
                                                          standard
                                                          metrics for
                                                          this now
                                                          (battery
                                                          module
                                                          voltages and
                                                          temperatures)?
                                                          Maybe a single
                                                          component that
                                                          does all this
                                                          (functions to
                                                          set individual
                                                          voltages and
                                                          temperatures,
                                                          define the
                                                          layout for
                                                          display,
                                                          include web
                                                          interface for
                                                          chart and
                                                          table, etc)?<br class="">
                                                          <br class="">
                                                          I really need
                                                          to look at
                                                          integration of
                                                          extensions to
                                                          the web
                                                          interface. See
                                                          how that is
                                                          done. For my
                                                          work on DBC
                                                          and RE tools,
                                                          it seems
                                                          easiest to
                                                          just create a
                                                          web interface
                                                          (rather than
                                                          messing around
                                                          with command
                                                          line).<br class="">
                                                          <br class="">
                                                          Regarding the