Lucid dreaming, enable/disable via tasker.


#1

Is there any way to enable disable lucid dreaming via tasker using intents?

Thanks.


#2

Hi, we don’t support changing any settings from outside the app, so lucid dreaming cannot be controlled as well.
What is your use case?


#3

I’d like to start sleep tracking each night via tasker but first get tasker to roll a dice to decide whether or not to enable lucid dreaming, so I have a random lucid dreaming night 2 or 3 times a week. Also it would be nice to be able to enable lucid dreaming for a certain period of the night.

I’m using a mi band 2 for tracking and I’ve rigged up a quick Bluetooth Neopixel lamp using an Arduino for my lucid cue.

Thanks.


#4

Seems I was wrong here - you can actually access our preferences via content provider.
The URI is content://com.urbandroid.sleep.preference/preferences
The preferences themselves are:
lucid_enabled: (true,false)
lucid_enabled2: (true,false)
lucid_loop: (1,2,3)
lucid_vibrate: (true, false)
lucid_volume: (1-100)
(set both lucid_enabled and lucid_enabled2 to true or false)


#5

Great, I’ll try it tonight. Thanks again.


#6

Let me know if you get it working via Tasker! I’ll be really interested in your recipe!


#7

I had a play with it last night, didn’t have much luck with the intents but I did figure out a way to do what I wanted via tasker.

I set lucid dreaming alert in sleep as android to silent, this still sends the rem event to tasker (I think?). My cue is now controlled from tasker eg the lamp and audio cue (bonus the audio cue can be quite a bit louder).

For the period I want lucid cues on; I made 2 tasker alarms which just set a global variable flag to 1 on start alarm and zero on the stop alarm. That global is then used as an if conditional for the audio and visual cue in the rem alert task.

To add the random night option I just added a dice roll to the first alarm, e.g.
Variable Randomize Name %dice Min 1, Max 10.
%dice is then used as an if condition to set the global flag e.g. if %dice > 6 set flag to 1.

I think this is working but I need to test for a few nights.


#8

That’s some smart thinking! Big thanks.