stop workflow in race condition

Without changing anything on my setup I found I could not load AltUI on my openluup pi.
Looking into this there seems to be a race condition in workflow 151

2019-01-09 19:21:07.156 luup_log:3: ALTUI: Wkflow - Workflow: 0-151, Valid Transition found:is_low_, Active State:no_sun=>low_altitude 2019-01-09 19:21:07.160 luup.variable_set:: 3.urn:upnp-org:serviceId:altui1.Timers was: [{"expireson":1547059142,"callback":"workflowTimerCB","data":"3#15#9e5f08a2-57ef-4877-aa4a-8179b666b7f1#1a1a947e-7b... now: [{"expireson":1547059142,"callback":"workflowTimerCB","data":"3#15#9e5f08a2-57ef-4877-aa4a-8179b666b7f1#1a1a947e-7b... #hooks:0 2019-01-09 19:21:07.163 luup.variable_set:: 3.urn:upnp-org:serviceId:altui1.WorkflowsActiveState was: {"0-135":"44024446-4329-4a4b-bca4-67c2ba4be490","0-120":"109f8d63-060b-4fbc-9361-493bd827b791","0-31":"7e6a4afa-c55... now: {"0-135":"44024446-4329-4a4b-bca4-67c2ba4be490","0-120":"109f8d63-060b-4fbc-9361-493bd827b791","0-31":"7e6a4afa-c55... #hooks:0 2019-01-09 19:21:07.171 luup.variable_set:: 3.urn:upnp-org:serviceId:altui1.WorkflowsVariableBag was: {"0-135":{"altitude_twilight":-5},"0-71":[],"0-148":[],"0-117":{"no_sun":50,"open_low":55,"high":70,"azimuth_min":1... now: {"0-135":{"altitude_twilight":-5},"0-71":[],"0-148":[],"0-117":{"no_sun":50,"open_low":55,"high":70,"azimuth_min":1... #hooks:0 2019-01-09 19:21:07.214 luup_log:3: ALTUI: Wkflow - Workflow: 0-151, Valid Transition found:wrong_azimut__, Active State:low_altitude=>no_sun 2019-01-09 19:21:07.217 luup.variable_set:: 3.urn:upnp-org:serviceId:altui1.Timers was: [{"expireson":1547059142,"callback":"workflowTimerCB","data":"3#15#9e5f08a2-57ef-4877-aa4a-8179b666b7f1#1a1a947e-7b... now: [{"expireson":1547059142,"callback":"workflowTimerCB","data":"3#15#9e5f08a2-57ef-4877-aa4a-8179b666b7f1#1a1a947e-7b... #hooks:0 2019-01-09 19:21:07.221 luup.variable_set:: 3.urn:upnp-org:serviceId:altui1.WorkflowsActiveState was: {"0-135":"44024446-4329-4a4b-bca4-67c2ba4be490","0-120":"109f8d63-060b-4fbc-9361-493bd827b791","0-31":"7e6a4afa-c55... now: {"0-135":"44024446-4329-4a4b-bca4-67c2ba4be490","0-120":"109f8d63-060b-4fbc-9361-493bd827b791","0-31":"7e6a4afa-c55... #hooks:0 2019-01-09 19:21:07.228 luup.variable_set:: 3.urn:upnp-org:serviceId:altui1.WorkflowsVariableBag was: {"0-135":{"altitude_twilight":-5},"0-71":[],"0-148":[],"0-117":{"no_sun":50,"open_low":55,"high":70,"azimuth_min":1... now: {"0-135":{"altitude_twilight":-5},"0-71":[],"0-148":[],"0-117":{"no_sun":50,"open_low":55,"high":70,"azimuth_min":1... #hooks:0
this goes on forever.
As the gui is not responding anymore, is there a way to disable workflow mode from the command line on my pi?
Any pointer is highly appreciated!

[quote=“pls90, post:1, topic:200403”]Without changing anything on my setup I found I could not load AltUI on my openluup pi.
Looking into this there seems to be a race condition in workflow 151

2019-01-09 19:21:07.156 luup_log:3: ALTUI: Wkflow - Workflow: 0-151, Valid Transition found:is_low_, Active State:no_sun=>low_altitude 2019-01-09 19:21:07.160 luup.variable_set:: 3.urn:upnp-org:serviceId:altui1.Timers was: [{"expireson":1547059142,"callback":"workflowTimerCB","data":"3#15#9e5f08a2-57ef-4877-aa4a-8179b666b7f1#1a1a947e-7b... now: [{"expireson":1547059142,"callback":"workflowTimerCB","data":"3#15#9e5f08a2-57ef-4877-aa4a-8179b666b7f1#1a1a947e-7b... #hooks:0 2019-01-09 19:21:07.163 luup.variable_set:: 3.urn:upnp-org:serviceId:altui1.WorkflowsActiveState was: {"0-135":"44024446-4329-4a4b-bca4-67c2ba4be490","0-120":"109f8d63-060b-4fbc-9361-493bd827b791","0-31":"7e6a4afa-c55... now: {"0-135":"44024446-4329-4a4b-bca4-67c2ba4be490","0-120":"109f8d63-060b-4fbc-9361-493bd827b791","0-31":"7e6a4afa-c55... #hooks:0 2019-01-09 19:21:07.171 luup.variable_set:: 3.urn:upnp-org:serviceId:altui1.WorkflowsVariableBag was: {"0-135":{"altitude_twilight":-5},"0-71":[],"0-148":[],"0-117":{"no_sun":50,"open_low":55,"high":70,"azimuth_min":1... now: {"0-135":{"altitude_twilight":-5},"0-71":[],"0-148":[],"0-117":{"no_sun":50,"open_low":55,"high":70,"azimuth_min":1... #hooks:0 2019-01-09 19:21:07.214 luup_log:3: ALTUI: Wkflow - Workflow: 0-151, Valid Transition found:wrong_azimut__, Active State:low_altitude=>no_sun 2019-01-09 19:21:07.217 luup.variable_set:: 3.urn:upnp-org:serviceId:altui1.Timers was: [{"expireson":1547059142,"callback":"workflowTimerCB","data":"3#15#9e5f08a2-57ef-4877-aa4a-8179b666b7f1#1a1a947e-7b... now: [{"expireson":1547059142,"callback":"workflowTimerCB","data":"3#15#9e5f08a2-57ef-4877-aa4a-8179b666b7f1#1a1a947e-7b... #hooks:0 2019-01-09 19:21:07.221 luup.variable_set:: 3.urn:upnp-org:serviceId:altui1.WorkflowsActiveState was: {"0-135":"44024446-4329-4a4b-bca4-67c2ba4be490","0-120":"109f8d63-060b-4fbc-9361-493bd827b791","0-31":"7e6a4afa-c55... now: {"0-135":"44024446-4329-4a4b-bca4-67c2ba4be490","0-120":"109f8d63-060b-4fbc-9361-493bd827b791","0-31":"7e6a4afa-c55... #hooks:0 2019-01-09 19:21:07.228 luup.variable_set:: 3.urn:upnp-org:serviceId:altui1.WorkflowsVariableBag was: {"0-135":{"altitude_twilight":-5},"0-71":[],"0-148":[],"0-117":{"no_sun":50,"open_low":55,"high":70,"azimuth_min":1... now: {"0-135":{"altitude_twilight":-5},"0-71":[],"0-148":[],"0-117":{"no_sun":50,"open_low":55,"high":70,"azimuth_min":1... #hooks:0
this goes on forever.
As the gui is not responding anymore, is there a way to disable workflow mode from the command line on my pi?
Any pointer is highly appreciated![/quote]

you need to debug the workflow
to disable workflows all together you need to set the variable"EnableWorkflows" of ALTUI device to 0, there must be a way to do this in openluup from the cmd line but not sure how.

I was lucky, the conditions stopped to fire and I was able to deactivate the workflow.
@amg0 would it be possible to find a way to detect race conditions and then automatically deactivate the rouge workflow? Would be a very useful feature.

Gesendet von meinem SM-G930F mit Tapatalk

The system should still be able to respond to HTTP requests, so the [tt]&id=setvariable[/tt] request should have been able to accomplish this.

Not needed now, though…

Hello - looking for advice on how to set the variable “EnableWorkflows” via cmd line if possible? Also on openLuup

Can you not just stop openLuup, open user_data.json in vi or nano, find the variable, and edit it? openLuup seems to keep user_data.json in “pretty” format, so it’s straightforward to edit its contents.

Great thanks - did the trick.