[Ovmsdev] Script engine not working?

jaunius at gmx.com jaunius at gmx.com
Fri Nov 27 20:02:33 HKT 2020


Hi,

It looks like the PubSub.js is no longer working reliably. I have opened an issue:

https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/474

This means that my climate control plugin will not work until this is fixed.


Regards,
Jaunius

Sent using the GMX mail app

On 2020-08-01 at 12:58, Michael Balzer wrote:

> Correction: you may also run a script by an absolute path. If giving
> just a name (or relative path), script_run() looks for the file in the
> scripts directory.
> 
> 
> Am 01.08.20 um 11:45 schrieb Michael Balzer:
> > Soko,
> >
> > reading the source is always a good thing :-), but there's actually also
> > documentation on scripting:
> > https://docs.openvehicles.com/en/latest/userguide/scripting.html
> >
> > Scripts are run by their name, not path. So you would simply do…
> >
> > OVMS# script run vfstest
> > …or shorter…
> > OVMS# . vfstest
> >
> > Oops… having tried a command (non-javascript) script from the web
> > console just now: apparently there is a bug in the output processing,
> > that currently only works on the USB console. I'll have a look at that.
> > But command scripts really can only execute commands, you'll be using
> > javascript for almost everything except most basic tasks, and those work
> > remotely, via web & ssh.
> >
> > Regards,
> > Michael
> >
> >
> > Am 01.08.20 um 10:51 schrieb Soko:
> >> Hey guys,
> >>
> >> I've tried to use the script engine and created some files. But when I
> >> run the files nothing happens. No output at all. Here is my webc
> >> onsole trys:
> >>
> >> OVMS# vfs ls /store
> >> [DIR]     01-Jan-1980 00:00  ovms_config/
> >> [DIR]     01-Aug-2020 10:12  scripts/
> >> OVMS# vfs ls /store/scripts
> >>      35   01-Aug-2020 10:27  vfstest.bat
> >>      35   01-Aug-2020 10:29  vfstest.js
> >>      35   01-Aug-2020 10:29  vfstest
> >>      35   01-Aug-2020 10:31  vfstest.cm
> >>      35   01-Aug-2020 10:31  vfstest.cmd
> >>      35   01-Aug-2020 10:33  vfstest.py
> >> OVMS# vfs head /store/scripts/vfstest
> >> vfs ls /store
> >> vfs ls /store/scripts
> >> OVMS# script run /store/scripts/vfstest
> >>
> >> I would expect the output of the two first commands after running the
> >> script! What am I doing wrong here? I've also tried some different
> >> file extensions as you can see. I've also had a look into the source
> >> (static void script_ovms(...)) to find the special file extension that
> >> is needed. But apparently everything besides .js is handled as command
> >> script.
> >>
> >> Soko
> >>
> >> PS: I've created the files via the web editor. Do they need any
> >> special termination character after each line?
> >>
> >> _______________________________________________
> >> OvmsDev mailing list
> >> OvmsDev at lists.openvehicles.com
> >> 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
> 



More information about the OvmsDev mailing list