<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Jack,<div><br></div><div>The issue is that the SMS/PUSH notification is sent up to a second (or maybe much later if the network is not currently connected) later.</div><div><br></div><div>I did find another possible code path that causes these alerts to be raised - if someone telephones the module! This was an old "feature" in there to save on SMS charges - you could just telephone the module (the module would hangup the call on the first ring, so there would be no charge) to get a status SMS message. It is possible that 'someone' telephoned my module by mistake (and tried several times as all they got was a hangup). Doh!</div><div><br></div><div>Anyway, I disabled the 'telephone the module' feature, and added the safety code to the firmware, as it does no harm, and made 1.2.0-rc6. It is in my car now.</div><div><br></div><div>Regards, Mark.<br><div><br><div><div>On 23 Feb, 2012, at 3:55 AM, Jack West wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div bgcolor="#FFFFFF"><div>If I'm understanding what your saying:</div><div>Looking at can.c</div><div><br></div><div>case 0x95:</div><div> if((car_chargestate < 0x15) && // old state was not stopped (including "done")</div><div> (can_databuffer[1] >= 0x15) &&. // new state is stopped</div><div> (can_databuffer[2] != 0x03)). // not by request</div><div><br></div><div>This causes changes from done to stopped to be reported. Then the next message comes through and changes back to done before the report is completed</div><div><br></div><div>Maybe we should remove "done" from the first test? In other words, don't report changes from done to stopped.</div><div><br></div><div>if (((car_chargestate < 0x15) &&(car_chargestate != 0x04)) && // old state not stopped or done</div><div> (can_databuffer[1].....</div><div><br></div><div>Jack</div><div><br><br>On Feb 22, 2012, at 3:29 AM, Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net">mark@webb-johnson.net</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div><div><br></div><div>Guys,</div><div><br></div><div>I just got these notifications this afternoon:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><font class="Apple-style-span" face="'Andale Mono'" size="1">2012-02-22 16:25:30.157145 +0800 info main: #9 C EV915 rx msg P AStandard - Charging Done^MIdeal Range: 298 Km SOC: 96%</font></div><div><font class="Apple-style-span" face="'Andale Mono'" size="1">2012-02-22 16:25:48.572604 +0800 info main: #9 C EV915 rx msg P AStandard - Charging Done^MIdeal Range: 298 Km SOC: 96%</font></div><div><font class="Apple-style-span" face="'Andale Mono'" size="1">2012-02-22 16:26:02.984595 +0800 info main: #9 C EV915 rx msg P AStandard - Charging Done^MIdeal Range: 298 Km SOC: 96%</font></div><div><font class="Apple-style-span" face="'Andale Mono'" size="1">2012-02-22 16:26:12.055064 +0800 info main: #9 C EV915 rx msg P AStandard - Charging Done^MIdeal Range: 298 Km SOC: 96%</font></div><div><font class="Apple-style-span" face="'Andale Mono'" size="1">2012-02-22 16:26:48.951721 +0800 info main: #9 C EV915 rx msg P AStandard - Charging Done^MIdeal Range: 298 Km SOC: 96%</font></div></div></blockquote><div><br></div><div>Not good.</div><div><br></div><div>The only way that is happening is if the charge state of the car is flipping between done and stopped. The problem is that the reported states around the time of the problem are:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><font class="Apple-style-span" face="'Andale Mono'" size="1">2012-02-22 16:15:03.765201 +0800 info main: #9 C EV915 rx msg S 96,K,-1,127,done,standard,298,262,70,65535,100,3,9,4,0</font></div><div><font class="Apple-style-span" face="'Andale Mono'" size="1">2012-02-22 16:25:02.540923 +0800 info main: #9 C EV915 rx msg S 96,K,-1,127,done,standard,298,262,70,65535,100,3,9,4,0</font></div><div><font class="Apple-style-span" face="'Andale Mono'" size="1">2012-02-22 16:35:09.175980 +0800 info main: #9 C EV915 rx msg S 96,K,-1,127,done,standard,298,262,70,65535,100,3,9,4,0</font></div><div><font class="Apple-style-span" face="'Andale Mono'" size="1">2012-02-22 16:45:30.941930 +0800 info main: #9 C EV915 rx msg S 96,K,-1,127,done,standard,298,262,70,65535,100,3,9,4,0</font></div></div></blockquote><div><br></div><div>And, as the notification said 'Charging done', it is clear that between the alert being requested and raised (a split second), the charge state flipped from stopped to done.</div><div><br></div><div>The car has been sitting idle for a couple of days, without being driven, but has been plugged in continuously during this time.</div><div><br></div><div>I'm guessing that sometimes we get spurious messages on the can bus, perhaps when the car wakes up once a day to check its charge state, and that is causing the problem.</div><div><br></div><div>I looked through the logs for the past few days, for any similar alerts from other users, but can't find any. I did have one report of a user getting three or four sms messages in a row, a month or so ago, but suspected at the time the charging point was having problems and restarting the charging.</div><div><br></div><div>I don't think this is easy to solve. Trying to catch with a can log is going to be next to impossible.</div><div><br></div><div>One workaround I can think of is in net.c in the handling of net_msg_notify and net_sms_notify - add checks there that (((car_chargestate >= 0x15) || (car_chargestate == 0x0d))&&(car_chargesubstate != 0x03)) - in other words the conditions that we should be alerting on. This would have the affect of filtering out these spurious alerts.</div><div><br></div><div>Thoughts?</div><div><br></div><div>Mark.</div><div><br></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>OvmsDev mailing list</span><br><span><a href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a></span><br><span><a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a></span><br></div></blockquote></div></blockquote></div><br></div></div></body></html>