[Ovmsdev] Scripting - missing integrations
Mark Webb-Johnson
mark at webb-johnson.net
Wed Oct 23 10:06:23 HKT 2019
It seems we have OvmsNotify.Raise() already.
I am implementing OvmsEvents and OvmsConfig now.
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.
Regards, Mark
> On 8 Oct 2019, at 4:25 PM, Michael Balzer <dexter at expeedo.de> wrote:
>
> Also missing:
> OvmsEvent (raise)
> OvmsNotify (raise)
> …these would be especially valuable for communication between module and web plugins as well as MQTT listeners.
>
> We also need an HTTP/HTTPS client accessable from scripts. Our OvmsHttp implementation needs to be replaced by the IDF HTTPS client.
>
> Simple file I/O for scripts would also be valuable (e.g. scripts writing custom data logs to SD).
>
> 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.
>
> Regards,
> Michael
>
>
> Am 08.10.19 um 09:45 schrieb Mark Webb-Johnson:
>>
>> Michael’s work has brought up an issue that we seem to be missing some javascript integrations.
>>
>> We have:
>>
>> OvmsCommand
>> OvmsLocation
>> OvmsMetrics
>> OvmsVehicle
>> PubSub (to ovms events)
>>
>> Obvious ones missing are:
>>
>> OvmsConfig
>> OvmsWebServer
>>
>> 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?
>>
>> 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.
>>
>> Regards, Mark.
>>
>>
>>
>> _______________________________________________
>> OvmsDev mailing list
>> OvmsDev at lists.openvehicles.com <mailto:OvmsDev at lists.openvehicles.com>
>> http://lists.openvehicles.com/mailman/listinfo/ovmsdev <http://lists.openvehicles.com/mailman/listinfo/ovmsdev>
>
>
> --
> Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
> Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20191023/cce707a3/attachment.htm>
More information about the OvmsDev
mailing list