Plugin: LuaView

All I did was change the scene code in LuaView and openLuup definitely did a restart. I’m on an older version of openLuup, v18.2.26, 2018.01.30. Can I replicate it? Not today. If I can get it to do it again, I’ll post here.

Good work, very handy!

I noticed that 8 bit chars are lost (ie char code 224, 208, etc, very common in non-English languages).

Can you please take a look? Thanks!

[quote=“therealdb, post:22, topic:199700”]Good work, very handy!

I noticed that 8 bit chars are lost (ie char code 224, 208, etc, very common in non-English languages).

Can you please take a look? Thanks![/quote]
Are you referring to scene names?

Nope, to code. It’s not uncommon to have alerts or comments localized for us non-English speaking users. Thanks.

OK. And UI7 or ALTUI?

UI7. Thanks.

Hi @rigpapa

Thanks for posting this, are there any plans to add syntax checking/colours to the lua code to helps with any code creation/editing ?

It already does under AltUI. However; not sure if it supports UI7. I get this with UI7:

Error executing function LuaViewALTUI.doSceneLua(): ace is not defined

[quote=“a-lurker, post:28, topic:199700”]It already does under AltUI. However; not sure if it supports UI7. I get this with UI7:

Error executing function LuaViewALTUI.doSceneLua(): ace is not defined

same issue here on UI7 , I think it is that the ALTUI detection is made by testing the presence of the ATLUI device but then, when you use both UI7 and ALTUI it does not work. it would be better to try to write a single JS file and dynamically testing if we are inside ALTUI or not. for instance
typeof(MultiBox) == “object” on ALTUI and == “undefined” on UI7

[quote=“a-lurker, post:28, topic:199700”]It already does under AltUI. However; not sure if it supports UI7. I get this with UI7:

Error executing function LuaViewALTUI.doSceneLua(): ace is not defined

Are you running ALTUI on UI7/Vera (as opposed to openLuup)?

[quote=“amg0, post:29, topic:199700”]same issue here on UI7 , I think it is that the ALTUI detection is made by testing the presence of the ATLUI device but then, when you use both UI7 and ALTUI it does not work. it would be better to try to write a single JS file and dynamically testing if we are inside ALTUI or not. for instance
typeof(MultiBox) == “object” on ALTUI and == “undefined” on UI7[/quote]

If a-lurker is running ALTUI on UI7, it would appear it has been correctly detected, as the LuaViewALTUI module is only defined when ALTUI is detected, and the error is coming from within that.

I’m really confused.

Are you running ALTUI on UI7/Vera (as opposed to openLuup)?

I run AltUI on two Veras and also on one openLuup device. At any one time, I may have both UI7 & AltUI running at the simultaneously, on one or more Veras. Using LuaView Ver 1.2 in all cases. If close all the AltUI browser pages and reload the UI7 page - I still see the error.

[quote=“a-lurker, post:31, topic:199700”]

Are you running ALTUI on UI7/Vera (as opposed to openLuup)?

I run AltUI on two Veras and also on one openLuup device. At any one time, I may have both UI7 & AltUI running at the simultaneously, on one or more Veras. Using LuaView Ver 1.2 in all cases. If close all the AltUI browser pages and reload the UI7 page - I still see the error.[/quote]

OK. I get you now. Stay tuned.

OK. An updated version (1.3RC) of LuaView is now available in the AltAppStore for beta testing as a stable release candidate. This should improve operation for users of ALTUI on Vera (as opposed to ALTUI on openLuup).

This version is now available as 1.3 in the AltAppStore, and has been submitted to the Vera Plugin Marketplace for approval. To clarify, it unifies the code for UI7 and ALTUI, and makes the decision on whether or not to use the ACE editor for presentation based on whether it’s available, not which platform is assumed to be running.

Version 1.4 is now available in the AltAppStore, and has been submitted to the Vera Plugin Marketplace for approval.

This version loads the ACE editor package if it is not loaded, which makes it possible to have a syntax-highlighting editor on UI7 (previously only available under AltUI).

[quote=“rigpapa, post:35, topic:199700”]Version 1.4 is now available in the AltAppStore, and has been submitted to the Vera Plugin Marketplace for approval.

This version loads the ACE editor package if it is not loaded, which makes it possible to have a syntax-highlighting editor on UI7 (previously only available under AltUI).[/quote]

living on the bleeding edge here, i went on gitgub and downloaded the update from there. for some reason it does not show the code anymore…

Browser?

sorry, meant to update my post, but wife called me to dinner. On the mac, it works on firefox and safari, but not on chrome.

Odd, because I mostly use Chrome, Windows though. It even works in Chrome on my Android phone. Not sure what the hard-flush/reload key combo is for Chrome on Mac, but you might try that. Also, make sure your Chrome is fully up to date. Unfortunately, I don’t have Mac, so I can’t test there or provide much guidance on keyboard shortcuts. If the flush doesn’t help, would you mind opening a developer window (again, I can’t be much help on Mac, but on Windows that’s either F12 or right-click anywhere in the pane and choose “Inspect”), make sure the console is showing (on Windows, escape key toggles the console drawer), and then drop into LuaView and choose the “Lua” tab and see if it logs any nice red errors we can ponder.

Hi Rigpapa,
below are the screenshots of the error (couldn’t figure out how to copy from the console).

FWIW, Command-Shift-R is hard reload. Option-Command-J is console.

Best Home Automation shopping experience. Shop at getvera!

© 2021 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules