Thank you. Found my bug!


On 9/11/2024 1:44 AM, Michael Balzer via OvmsDev wrote:
See https://docs.openvehicles.com/en/latest/userguide/scripting.html#global-context

…although that's not as clear as it should be.

"print to the system console as an informational message" actually means it's sent to the system log.

The log line has level "info" and since refactoring the Duktape modules, the tag is "ovms-duk-util". Example:
2024-09-09 17:46:13.170 CEST I (511230380) ovms-duk-util: [lib/tasmotasp.js:73:processResult] TasmotaSP getPowerState: power=off

See DukOvmsPrint() for the implementation.

Regards,
Michael


Am 11.09.24 um 01:36 schrieb solterra--- via OvmsDev:

I'm currently working on a script that utilizes PubSub, but I'm running into an issue where the background function doesn't seem to display any output in the shell. I'm following the example from the website:

var myTicker = function(msg, data) { print("Event: " + msg + "\n"); }; PubSub.subscribe("ticker.10", myTicker);

For some reason, I can't get the myTicker function to output anything when triggered. It seems like the print statements aren't being executed as expected.

Has anyone encountered this before, or does anyone have suggestions on what might be causing this issue?

Thanks in advance!


-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26

_______________________________________________
OvmsDev mailing list
OvmsDev@lists.openvehicles.com
http://lists.openvehicles.com/mailman/listinfo/ovmsdev