<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="">I’ve also committed (in client/ovms_v3shell.pl) a small demonstration command line client written in perl:<div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><font face="Andale Mono" style="font-size: 14px;" class=""># ./ovms_v3shell.pl --username MYUSER --id MYCAR --server <a href="http://api.openvehicles.com" class="">api.openvehicles.com</a> --password TOPSECRET</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">Connecting to <a href="http://api.openvehicles.com:1883/MYUSER" class="">api.openvehicles.com:1883/MYUSER</a></font><font face="Andale Mono" class=""><span style="font-size: 14px;" class="">…</span></font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class=""><br class=""></font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">OVMS# metric list m.</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">m.freeram 4219244</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">m.hardware OVMS WIFI BLE BT cores=2 rev=ESP32/1</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">m.monotonic 50197Sec</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">m.net.mdm.iccid 8944500BEEFDEADBEEF</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">m.net.mdm.model 35316B11SIM5360E</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">m.net.provider CSL Hologram</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">m.net.sq -95dBm</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">m.net.type modem</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">m.serial 30:ae:de:ad:be:ef</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">m.tasks 16</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">m.time.utc</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">m.version 3.1.008-51-g960e1c3/ota_0/edge (build idf v3.1-dev-1583-g0fb2019 Jul 11 2018 00:00:34)</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">v.m.rpm</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">v.m.temp</font></div><div class=""><span style="font-size: 14px; font-family: "Andale Mono";" class=""><br class=""></span></div><div class=""><span style="font-size: 14px; font-family: "Andale Mono";" class="">OVMS# module memory</span></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">Free 8-bit 140088/282736, 32-bit 7304/23560, SPIRAM 4068736/4194252</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">--Task-- Total DRAM D/IRAM IRAM SPIRAM +/- DRAM D/IRAM IRAM SPIRAM</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">main* 8704 0 0 8696 +8704 +0 +0 +8696</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">OVMS NetMan* 0 0 0 64 +0 +0 +0 +64</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">no task* 5376 0 0 0 +5376 +0 +0 +0</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">esp_timer 23884 0 644 44600 +23884 +0 +644 +44600</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">OVMS Events 67676 0 0 24000 +67676 +0 +0 +24000</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">ipc0 7776 0 0 0 +7776 +0 +0 +0</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">ipc1 12 0 0 0 +12 +0 +0 +0</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">Tmr Svc 88 0 0 0 +88 +0 +0 +0</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">tiT 700 0 0 5948 +700 +0 +0 +5948</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">OVMS SIMCOM 0 0 0 3888 +0 +0 +0 +3888</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">wifi 9496 0 0 2828 +9496 +0 +0 +2828</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">OVMS Vehicle 0 0 0 32 +0 +0 +0 +32</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">OVMS Console 0 0 0 20 +0 +0 +0 +20</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">mdns 104 0 0 4 +104 +0 +0 +4</font></div><div class=""><font face="Andale Mono" style="font-size: 14px;" class="">OVMS NetMan 12584 0 15488 3472 +12584 +0 +15488 +3472</font></div></blockquote><div class=""><div><br class=""></div><div>That sends commands to the car over MQTT (so works over cellular as well as wifi networks).</div><div><br class=""></div><div>Regards, Mark.</div><div><br class=""></div><div>P.S. It is pretty rudimentary at the moment, and doesn’t catch errors that well, but is a good starting point. It does follow the OVMS v3 protocol conventions, and handles last will and testament, etc, correctly.</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 16 Jul 2018, at 12:47 PM, Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Drupal authentication is done, and working against mosquitto now on the live <a href="http://api.openvehicles.com/" class="">api.openvehicles.com</a> site. Plain text MQTT only at the moment (I still need to get mosquitto and OVMS module firmware supporting SSL).<div class=""><br class=""></div><div class="">To configure OVMS v3 to use Server V3 protocol:</div><div class=""><br class=""></div><div class=""><ol class="MailOutline"><li class="">config set:<br class=""></li><ul class=""><li class="">vehicle id <vehicleid></li><li class="">server.v3 server <a href="http://api.openvehicles.com/" class="">api.openvehicles.com</a></li><li class="">server.v3 port 1883</li><li class="">server.v3 user <<a href="http://openvehicles.com/" class="">openvehicles.com</a> username></li><li class="">password server.v3 <<a href="http://openvehicles.com/" class="">openvehicles.com</a> password><br class=""><br class=""></li></ul><li class="">server v3 start<br class=""><br class=""></li><li class="">Can also 'config set auto server.v3 yes’ to auto-start at boot</li></ol></div><div class=""><br class=""></div><div class="">If you have an MQTT client, you can connect to the same server to query the metrics, issue commands, etc. The default topic hierarchy is ovms/<username>/<vehicleid>.</div><div class=""><br class=""></div><div class="">I think we are close now. Just need SSL support. And then Apps…</div><div class=""><br class=""></div><div class="">Feedback appreciated.</div><div class=""><br class=""></div><div class="">Regards, Mark.<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 10 Jul 2018, at 2:42 PM, Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I’ve just pushed the support for notifications in OVMS Server v3.<div class=""><br class=""></div><div class="">With that, the server v3 is functionally complete (at least on the car side). We can:</div><div class=""><br class=""></div><div class=""><ol class="MailOutline"><li class="">Connect/disconnect</li><li class="">Handle lists of apps connecting/disconnecting</li><li class="">Send metrics</li><li class="">Send events</li><li class="">Send notifications (including info, error, alert, and historical data)</li><li class="">Receive commands, run them, and return the results</li></ol></div><div class=""><br class=""></div><div class="">I’m still struggling against drupal authentication at the server side; once that is done we can open this up to wider testing.</div><div class=""><br class=""></div><div class="">Overall, I’m pretty happy with it. We need SSL/TLS support, but at least functionally now it works and is complete.</div><div class=""><br class=""></div><div class="">Regards, Mark<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 6 Jul 2018, at 4:16 PM, Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><div class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class="">I suppose the following topic names:<br class="">metrics: <prefix>/metric/#<br class="">events: <prefix>/event/#<br class="">notifications: <prefix>/notify/#<br class="">config: <prefix>/config/#<br class="">logs: <prefix>/log/<tag><br class="">active: <prefix>/client/<clientid>/active<br class="">requests: <prefix>/client/<clientid>/request/#<br class="">commands: <prefix>/client/<clientid>/command/<command id><br class="">cmd responses: <prefix>/client/<clientid>/response/<command id></blockquote><br class=""></div><div class="">All ok. I am fine with this, and looks clean. I will make the changes today, as I want to get this into some cars asap so we can get a feel for how it behaves.</div></div></div></blockquote></div></div></div></blockquote><div class=""><br class=""></div></div>Ok. Now implemented, and tested:<div class=""><br class=""></div><div class=""><ul class="MailOutline"><li class=""><prefix>/metric/#</li><li class=""><prefix>/client/<clientid>/active</li><li class=""><prefix>/client/<clientid>/command/<command id></li><li class=""><prefix>/client/<clientid>/response/<command id><br class=""></li></ul></div><div class=""><br class=""></div><div class="">I don’t think config, logs, and requests are critical or urgent. So, I will try to finish events tonight (as that is relatively simple). Notifications over the weekend (more tricky, especially for historical data). It can go in my car with tonight’s nightly ota, for real world testing.</div><div class=""><br class=""></div><div class="">I’m still trying to get the authentication working for drupal vs mosquitto. Once that is done, I can open up <a href="http://api.openvehicles.com/" class="">api.openvehicles.com</a> MQTT for public use. If I can’t get it done within the next couple of days, I’ll try another broker (lua scripting, anyone?).</div><div class=""><br class=""></div><div class="">P.S. Commands over MQTT are pretty cool:</div><div class=""><br class=""></div><div class=""><span id="cid:CA3D58EE-C261-4309-962C-C02E4CE321F9" class=""><PastedGraphic-2.tiff></span></div><div class=""><span id="cid:22C730C2-2361-486F-9047-9B0D583F09AA" class=""><PastedGraphic-3.tiff></span></div><div class=""><br class=""></div><div class="">Regards, Mark.</div></div>_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.openvehicles.com" class="">OvmsDev@lists.openvehicles.com</a><br class=""><a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br class=""></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.openvehicles.com" class="">OvmsDev@lists.openvehicles.com</a><br class=""><a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br class=""></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.openvehicles.com" class="">OvmsDev@lists.openvehicles.com</a><br class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev<br class=""></div></blockquote></div><br class=""></div></body></html>