<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=""><div class=""><br class=""></div>It seems we have OvmsNotify.Raise() already.<div class=""><br class=""></div><div class="">I am implementing OvmsEvents and OvmsConfig now.</div><div class=""><br class=""></div><div class="">I will just keep config simple (no access to protected variables) for the moment. We can revisit this if/when we have a secure way of setting App permissions.</div><div class=""><br class=""></div><div class="">Regards, Mark<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 8 Oct 2019, at 4:25 PM, 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="">
<div class="moz-cite-prefix">Also missing:<br class="">
<ul class="">
<li class="">OvmsEvent (raise)<br class="">
</li>
<li class="">OvmsNotify (raise)<br class="">
</li>
</ul>
…these would be especially valuable for communication between
module and web plugins as well as MQTT listeners.<br class="">
<br class="">
We also need an HTTP/HTTPS client accessable from scripts. Our
OvmsHttp implementation needs to be replaced by the IDF HTTPS
client.<br class="">
<br class="">
Simple file I/O for scripts would also be valuable (e.g. scripts
writing custom data logs to SD).<br class="">
<br class="">
Script access to protected config values could be granted by a
general API key mechanism, as planned for the web API
(/api/execute). I.e. the script needs to use a valid API token to
access protected configs. An API token could include a set of
specific grants & denies, so we can extend that as needed to
also cover other potentially critical stuff like network &
file access. Similar to App permissions on Android / iOS.<br class="">
<br class="">
Regards,<br class="">
Michael<br class="">
<br class="">
<br class="">
Am 08.10.19 um 09:45 schrieb Mark Webb-Johnson:<br class="">
</div>
<blockquote type="cite" cite="mid:EDB9DCD3-8193-4730-B473-4D48CDB925FE@webb-johnson.net" class="">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" class="">
<div class=""><br class="">
</div>
Michael’s work has brought up an issue that we seem to be missing
some javascript integrations.
<div class=""><br class="">
</div>
<div class="">We have:</div>
<div class=""><br class="">
</div>
<div class="">
<ul class="MailOutline">
<li class="">OvmsCommand</li>
<li class="">OvmsLocation</li>
<li class="">OvmsMetrics</li>
<li class="">OvmsVehicle</li>
<li class="">PubSub (to ovms events)</li>
</ul>
</div>
<div class=""><br class="">
</div>
<div class="">Obvious ones missing are:</div>
<div class=""><br class="">
<div class="">
<ul class="MailOutline">
<li class="">OvmsConfig</li>
<li class="">OvmsWebServer</li>
</ul>
</div>
</div>
<div class=""><br class="">
</div>
<div class="">I can do OvmsConfig, but one question: Do we allow
scripts access to protected config values? I think not (as that
would void the entire protection system with a ’script eval
JSON.print(…)', but is a limitation). Comments?</div>
<div class=""><br class="">
</div>
<div class="">It would be interesting to see scripts extend the
OvmsWebServer, so urls could be mapped to scripts - but not sure
of the practical use of that vs plugins.</div>
<div class=""><br class="">
</div>
<div class="">Regards, Mark.</div>
<div class=""><br class="">
</div>
<br class="">
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br class="">
<br class="">
<pre class="moz-signature" cols="144">--
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
</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>