<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Nikolay,<div><br></div><div>In general, all the car module needs to do is put the correct data into the car_* global variables (defined in ovms.h). From there, SMS commands are implemented in net_sms.* and smartphone app comms are implemented in net_msg.* - the vehicle module itself doesn't need to do anything. For example, if you store the state-of-charge percentage in car_SOC, then an SMS STAT command will return it, and the battery gauge on a connected smartphone App will show it.</div><div><br></div><div>You only need to override / add SMS or MSG commands if you want to do something vehicle-specific. The default net_sms and net_msg modules will do the standard stuff all for you.</div><div><br></div><div>Assuming that you are doing the above (e.g. writing state of charge to car_SOC), to get this on the smartphone all you need to do is configure the car module for GPRS and SERVER, then get the app running on your smartphone. You can follow the instructions in the Tesla Roadster User Guide to do this.</div><div><br></div><div>Regarding notifications, those are initiated by the vehicle module, using net_req_notification() and one of the NET_NOTIFY_* notification types (defined in net.h). The framework will issue the notification - you just need to set the bit to request it.</div><div><br></div><div>Regards, Mark.</div><div><br><div><div>On 6 Jan, 2013, at 10:04 PM, Nikolay Shishkov wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>Thanks to Michael, Mark and google the code now works. </div><div>I am fetching SOC, pack current, pack voltage, and pack average temperature. </div><div>So w<span style="background-color: transparent;">hat next?</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;">The current code is based on the Twizy, I have changed the implementation of the Debug command and am getting correct values... but I would like to have the STATE command work too, and I will implement a custom one too (based on the Twizy code) so it will report what I want it to report. There is for example no range.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif;
background-color: transparent; font-style: normal;">How to go about with integrating server and android/iphone app?</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;">In the simplest form I would like to have at least SOC, Temperature, Pack voltage, Pack current, a some kind of text or bit map for state (like charged, charging enabled, plugged, waiting temp) there are some more states, some additional parameters like PWM signal for charge power, and eventual errors and warnings - there is a warning "please charge to full soon" for example. These can also be bits or text.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;">From the Twizy code I can see how to handle this for the sms commands, and I see some ways of generating
semicolon separated message to the server... but would that mean that the message will be later understood/presented by the apps? </div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;">I would also like to have the SOC notifications - low SOC, charge finished, charge stopped - I can also fix this the Twizy way.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;">Very exciting!</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;">Thanks,</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;">Nikolay</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif;
background-color: transparent; font-style: normal;"><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br> </div> </div> </div></div>_______________________________________________<br>OvmsDev mailing list<br><a href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>http://lists.teslaclub.hk/mailman/listinfo/ovmsdev<br></blockquote></div><br></div></body></html>