Plugin: DeusExMachinaII (Deus Ex Machina for UI7 and beyond)

I have installed the app and get errors when trying to run it. When I click “turn ON” it says command failed"
Also keeps saying “initializing” as screen shot attached.

Tried to uninstall and reinstall. Get this message:

Have you pressed ‘Exit’?

C

You also need to do a full hard reset of the browser any time you install a plugin, remove a plugin, add/delete/rename/re-room a device, etc. And take it slowly. Let each step finish and let the unit settle down before jumping to next thing.

Chrome/Win: CTRL+F5
Firefox/Win: SHIFT+F5
Mac: CMD+SHIFT+R

HI,

Just installed V2.8 on my RPi openluup/altui, as i’m trying to move some work off my Vera Plus.

I’m running V2.8 on my vera, and it works perfect. but on ny openluup/altui it always only “Initializing…”

I’m trying to controll wall switches, run by the Vera (z-wave) and Philiphs HUE, run by ALTHUE on the openluup/altUI.

Data from the console log.

2019-04-29 21:41:16.779 luup_log:56: DeusExMachinaII STARTUP!
2019-04-29 21:41:16.818 luup_log:56: DeusExMachinaII: starting plugin version “2.8” device 56
2019-04-29 21:41:16.819 luup.variable_set:: 56.urn:toggledbits-com:serviceId:DeusExMachinaII1.Message was: Initializing… now: Initializing… #hooks:0
2019-04-29 21:41:16.820 luup.call_action:: 3.urn:upnp-org:serviceId:altui1.RegisterPlugin
2019-04-29 21:41:16.841 openLuup.context_switch:: ERROR: ./L_DeusExMachinaII1.lua:704: attempt to compare string with number
2019-04-29 21:41:16.842 openLuup.scheduler:: job aborted : ./L_DeusExMachinaII1.lua:704: attempt to compare string with number

Any clue what the error might be ?

I have tried for a few day now, so reboot/hard refresh have been done more then a few times :slight_smile:

(Trying to get it running from sunset to 23:09) but when setting to activate manual, I can get it to “nitializing…” considering if reactor with “sunset to 23:09” is the quick’n’dirty fix. but like to have the plugin work directly :smiley:

Traveling at the moment. I’ve got a laptop with openLuup with me. When I can get some time, I’ll take a look.

OK. Try just setting the DEMII device’s “Version” variable to 20300 and reloading Luup.

Hi,

Just created the value with http://MYIP:3480/data_request?id=variableset&DeviceNum=56&serviceId=urn:toggledbits-com:serviceId:DeusExMachinaII1&Variable=Version&Value=20300

and now it looks like it works… (Well will have to wait until sunset to be sure :slight_smile: )
(DEMII does write waiting for sunset in the status)

Can this be a bug that the variable is not created on new install ?

2019-04-30 19:26:40.125 luup_log:56: DeusExMachinaII STARTUP!
2019-04-30 19:26:40.167 luup_log:56: DeusExMachinaII: starting plugin version “2.8” device 56
2019-04-30 19:26:40.168 luup.variable_set:: 56.urn:toggledbits-com:serviceId:DeusExMachinaII1.Message was: Initializing… now: Initializing… #hooks:0
2019-04-30 19:26:40.169 luup.call_action:: 3.urn:upnp-org:serviceId:altui1.RegisterPlugin
2019-04-30 19:26:40.171 luup.variable_set:: 56.urn:toggledbits-com:serviceId:DeusExMachinaII1.MaxTargetsOn was: EMPTY now: 0 #hooks:0
2019-04-30 19:26:40.172 luup.variable_set:: 56.urn:upnp-org:serviceId:SwitchPower1.Target was: 0 now: 0 #hooks:0
2019-04-30 19:26:40.173 luup.variable_set:: 56.urn:upnp-org:serviceId:SwitchPower1.Status was: 0 now: 0 #hooks:0
2019-04-30 19:26:40.174 luup.variable_set:: 56.urn:toggledbits-com:serviceId:DeusExMachinaII1.StartTime was: EMPTY now: #hooks:0
2019-04-30 19:26:40.175 luup.variable_set:: 56.urn:toggledbits-com:serviceId:DeusExMachinaII1.LeaveLightsOn was: EMPTY now: 0 #hooks:0
2019-04-30 19:26:40.176 luup.variable_set:: 56.urn:toggledbits-com:serviceId:DeusExMachinaII1.Active was: 0 now: 0 #hooks:0
2019-04-30 19:26:40.177 luup.variable_set:: 56.urn:toggledbits-com:serviceId:DeusExMachinaII1.AutoTiming was: 1 now: 1 #hooks:0
2019-04-30 19:26:40.178 luup.variable_set:: 56.urn:toggledbits-com:serviceId:DeusExMachinaII1.LastHouseMode was: 2 now: 1 #hooks:0
2019-04-30 19:26:40.179 luup.variable_set:: 56.urn:toggledbits-com:serviceId:DeusExMachinaII1.NextStep was: 1556572121 now: 0 #hooks:0
2019-04-30 19:26:40.180 luup.variable_set:: 56.urn:toggledbits-com:serviceId:DeusExMachinaII1.Version was: 20300 now: 20800 #hooks:0
2019-04-30 19:26:40.181 luup.variable_watch:: callback=deusWatch, watching=56.urn:toggledbits-com:serviceId:DeusExMachinaII1.State
2019-04-30 19:26:40.182 luup.set_failure:: status = 0
2019-04-30 19:26:40.183 luup.variable_set:: 56.urn:micasaverde-com:serviceId:HaDevice1.CommFailure was: 0 now: 0 #hooks:0
2019-04-30 19:26:40.184 luup.variable_set:: 56.urn:micasaverde-com:serviceId:HaDevice1.CommFailureTime was: EMPTY now: 0 #hooks:0
2019-04-30 19:26:40.185 openLuup.scheduler:: [56] DeusExMachinaII device startup completed: status=true, msg=OK, name=DeusExMachinaII
2019-04-30 19:26:40.185 luup_log:3: ALTUI: UPNPregisterPlugin(3,urn:schemas-toggledbits-com:device:DeusExMachinaII:1,J_DeusExMachinaII1_ALTUI.js,DeusExMachina_ALTUI.DeviceDraw,)

Almost, it’s a bit more complex than that, but easily fixed. I have some other work pending release on it, so look for 2.9 next week.

sounds perfect.

FYI, here is the other variable I have, just so you can see if any other vars is missing:

This is now fixed in the 2.9 stable release version on Github.

This new version also contains a complete rethink of house mode handling. I’ve imported Reactor’s house mode detection approach into DEMII, so performance with respect to house mode changes should be on par with Reactor. It is not necessary to have Reactor or the House Modes Plugin installed.

I also did a complete review and comb-through of the start/stop logic, and incorporated the task scheduler that I use in Reactor into DEMII as well to handle the three major threads of execution DEMII uses more cleanly.

Finally, this version also has a new MinTargetsOn state variable (default 1) which controls the minimum number of lights that should be on during cycling (no lights are turned off until the minimum is reached, and once reached, it will never go below minimum until cycling ends).

Because of the extent of changes, I am holding off a full release, but I invite you to install this stable release (link above). For openLuup/ALTUI, enter “stable” in the Plugins tab version field for DEMII and hit the update icon button. For Vera, click the green “Clone or download” button and choose “Download ZIP” to get the files. Then unzip the file, and drag all of the unzipped files into the Apps > Develop apps > Luup files uploader. Reload Luup and hard-refresh your browser.

1 Like

Hi, Sorry for reporting back any sooner, but I have not had a option to let DEMII do its work until yesterday, and when I came back today, 2 lights where left “on”, but I have the option “Stop Action: Turn controlled light off”

How did Deus stop, was it by time of day (night), or house mode, or was it stopped manually/externally by deactivating or disabling?

it was stopped by time in the night, and I arrived home next morning.
It runs on sunset and housemode

OK. And are those lights used by any other plugins or scenes?

No, they are only used by Deus.

Do they have dimming values or on-time limits associated with them?

Yes 1 set has dimming the other does not
time limits, yes, one 30 min, the other 999 min

Super helpful. OK. Pull the latest stable branch version and install it.

Done, might not get a night out within the next 2 weeks, but I hope/guess you found the bug…

Love the Apps you make… :slight_smile: