Wednesday, January 31, 2024

error message for a new user with google sign-in

A new user for our CMS which uses google sign-in got an error message, "ourdomain has not completed the Google verification process ..."

Most probably this would have happened due to the number of users crossing 100.

We can have up to 100 "testers" in the "internal" mode which we were using till now.

"OAuth user cap

While publishing status is set to "Testing", only test users are able to access the app. Allowed user cap prior to app verification is 100, and is counted over the entire lifetime of the app. Learn more "


So now we need to apply and get google verification for the "sign in with google" on the CMS.

Starting the process, the relevant google project was "Login to CMS with Google" on the redacted account, 
https://console.cloud.google.com/iam-admin/settings?project=id-oftheproject
https://console.cloud.google.com/apis/credentials/consent?project=id-oftheproject
 
I clicked on publish, and after going through the 4-5 steps verifying the scopes etc, I see the following message:
 
The Trust and Safety team has received your form. They will reach out to you via your contact email if needed. The review process can take up to 4-6 weeks. Expect the first email from our Trust and Safety team within 3-5 days. Your last approved consent screen is still in use.

Monday, January 29, 2024

increasing file upload size in Wordpress

On one of our servers running Ubuntu 22.04, Wordpress reported upload size is set to 2 MB. Changed to 50M from 2M in the global php settings at
/etc/php*/8.1/apache2/php.ini - that has fixed the issue.

Sunday, January 28, 2024

email configuration changes on server - app password and <<< for mail command

With google phasing out support for "less secure apps", we had to use "App password" for one of our servers. On PB's terminal on Mac, Ctrl+D was mapped to something else, so we could not use the usual method of the mail command for testing where we end the body with Ctrl+D. Instead, tested by the three less-than symbol to send email, like

mail -s "<Subject>" recipient@something.com <<< "<Mail Body>"

Google phasing out password-based SMTP / POP3 / IMAP

We got an email with "[Action Required]", with a link to this blog post from google - https://workspaceupdates.googleblog.com/2023/09/winding-down-google-sync-and-less-secure-apps-support.html

We have used two different methods to deal with this - one solution using XOAuth, and one using App Passwords.

1. For some of our Moodle instances which used Google Workspace emails for outbound emails, we could use the in-built XOAuth support as explained here,

Admins can enable Gmail XOauth2 for outgoing and incoming mail

So I created two separate sets of credentials for one of the email ids, since the redirect url for each (one production and one development) server would be different as mentioned in the documentation linked from the tracker link above -

server.url/admin/oauth2callback.php

Setting up OAuth 2.0 - API Console Help (google.com)

2. For our internal server using ssmtp as mentioned in this earlier post, this procedure (or the use of PHPMailer which supports XOAuth) would not be suitable, since it does not have a public-facing website url.

(
ssmtp seems to be orphaned since 2019, 

msmtp doesn't seem to have oauth,

describes a python solution, but needs refresh, and needs a browser.

)

In passing, the email from google mentions that App Passwords are not going away - "Password-based access (with the exception of App Passwords) will no longer be supported" . We had earlier created App Passwords for use with We can create App Passwords if we enable 2FA. So, we enabled 2FA, created an App Password, and just replaced the password in our earlier ssmtp configuration file with the App Password (without spaces). And that works.

 

Saturday, January 27, 2024

Firebase notification and action taken

 Firebase sent us an email with the information given in this link about email enumeration protection,

https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection

So, enabled the protection for the VV app's projects, following the procedure given in the bottom part of the link above.

Friday, January 26, 2024

sendgrid error after changing settings

When a moodle server had its domain changed, the sendgrid account it used to send password reset emails was still using the old domain. When the "From" email id was changed, sendgrid gave an error,

550 The from address does not match a verified Sender Identity

Two different ways to verify:

Domain Authentication, which is their preferred way - by adding three CNAME records and one txt record - and

Single Sender Verification

Thursday, January 25, 2024

Merriam-Webster dictionary api and moodle plugin

This moodle plugin "Dictionary" requires a one-time free registration to the Merriam-Webster api at https://dictionaryapi.com/ - they currently provide 1000 free lookups per day per key, and 2 free keys per registration. The plugin uses one key for dictionary, one for thesaurus.

Tuesday, January 23, 2024

spam via Moodle support form, and ways to prevent it

For the first time, I got some spam apparently sent via one of our Moodle servers. This forum thread describes the issue and the solution - 

Moodle in English: How to remove link to Contact site support to avoid SPAM | Moodle.org

Instead of commenting out, used the method mentioned lower down in the thread for Moodle 4.1 and above, by going to Site administration --> Server --> Support contact and changing the option to make it available only for logged-in users. Did the same thing for two of our production instances, too.

 

Friday, January 19, 2024

tech support options for Moodle

Copy-pasting from an email exchange - 

(Deleting the part about my availability)

Paid tech support by email/telephone - Nettigritty.com 
We have found that they usually respond within 3-4 hours.
But a caveat - they would only extend support for those services for which you have paid them. For example, if you have paid for web hosting, they will support you only in web hosting related issues. They may not be able to help you with open-ended questions or how-do-i-do-this-in-moodle type of questions, though, of course, you could ask them if they will do so.

Moodle tech support (paid) is available,
but I've not tried them.

Moodle documentation is available via 
and the forums,
Moodle in English: Forums | Moodle.org

Thursday, January 18, 2024

SheepIt render farm - benchmarks and mini-howto for rendering fluids/particle systems - Blender 3.0 to 3.6

As mentioned in my previous post, SheepIt render farm is a free render farm for Blender Cycles and Eevee engines, based on mutual co-operation - we connect our machines to the render farm to earn points, and can get our projects rendered in double-quick time in return. 

Their FAQ page lists answers to most questions one may have about the service. I've uploaded an example of a project which includes the baked cache for particle systems, on Github, here. As mentioned in their FAQ, the steps to do this are:
1. Make all paths relative - in Blender, choose 
File --> External Data --> Make All Paths Relative

2. If you need to render a baked fluid/particle system, zip the blender file and the cache directory, ensuring that the cache directory is also set as a relative path. In my case, I had set the cache directory to be inside the project directory to simplify matters. In the project above, this is located in the Physics tab of the Smoke Domain object as seen in the screenshot below. As you can see, the current directory is indicated by a leading double-slash - //.

3. One point to note is that choosing File --> Save As and saving the project to another directory, and then copying the cache directory there, does not work (as in Blender 3.2 on Windows.) This is probably because the file paths get mangled? Anyway, if you want to break up the project into multiple renders due to the bake files being too large, copy-paste the project outside Blender instead, don't use File --> Save As. 

4. There is a script available on the Forums for splitting the project, in case you want to automate the process. Or, like I did, you can just choose to bake all, and then copy only the .vdb files in the data subfolder of the cache for a limited number of frames. For the zoomed out view, for frames after 275, this was something like 30-50 frames per project. And choose to render only those frames. Then create a fresh zip file for the next set of frames. And so on.

Here are some project statistics, for the zoomed in project render, which was taking around 3 minutes per frame on my machine:

Summary

  • Storage used: 971.8 MB
  • Cumulated time of render: 9h01m
  • Points spent: 5,767 points
  • Real duration of render: 1h23m
  • On reference per frame rendertime: 0m51s
On my machine, the 600 frames would have taken 30 hours to render, and even on the Studio Mac it would have taken 5-6 hours, but SheepIt finished it in less than 90 minutes due to the power of distributed processing. 

So, nowadays I leave the sheepit client running whenever I switch on my machine, to accumulate points. A borrowed CPU from VV fitted with the GTX1050 Ti card which I purchased for my research also helps at the office. The 1050 Ti card is only 4% the speed of the standard GPU, but since most of the projects specify GPU, it usually gets some project to render, as against the i5-1235U laptop CPU, which often goes many minutes with "No jobs to render".

Statistics of the three client machines:

CPUIntel(R) Core(TM) i7 CPU M 620 @ 2.67GHz x4
RAM allowed1.3 GB
RAM available3.9 GB
Max render time per frame
Power CPU6 %

Schedulervery_slow_computer

-------------------------------------------------------------------------------------------------------------------------

CPUIntel(R) Core(TM) i5-4430 CPU @ 3.00GHz x4
RAM allowed4.8 GB
RAM available8.3 GB
Max render time per frame
GPUGeForce GTX 1050 Ti
VRAM4.3 GB
Compute deviceCPU, GPU
Power CPU34 %
Power GPU4 %
SchedulerDefault

-------------------------------------------------------------------------------------------------------------------------

CPU12th Gen Intel(R) Core(TM) i5-1235U x12
RAM allowed2.9 GB
RAM available8.1 GB
Max render time per frame1h
Power CPU72 %
SchedulerDefault
 

And finally, here's a youtube video of the rendered output. This is a "Fulldome" video, meant for projection in a planetarium. (Since this is my first effort, the launch needs more work to look more realistic - currently the motion of the rocket looks a bit cartoonish.)




Blender VSE - Video Sequence Editor - and image sequences

A quick note to myself - when importing image sequences into Blender VSE, we must ensure that the files are sorted by name in the file open dialog box (or in whatever order we want them to be) before selecting the relevant images, and then importing. Or else, some jumbled order will result in the imported sequence.

Wednesday, January 17, 2024

Blender render - hard-code metadata like frame number in output

For stamping rocket launch frame number, this page

says - Go to render tab, Enable Stamp, and choose the metadata you need.
 
That appears to be for Blender 2.78, which would have been the current version in May 2017.
 
In current version of blender, 3.2, the option is called Burn into image.
Font size 12 px by default, which would be extremely small for a 4K frame.  
 


Thursday, January 11, 2024

interesting device to "do your app busy-work for you"

Interesting device, heard about it via theverge because it sold out its first 10k run within 24 hours of launch - https://www.rabbit.tech/keynote  

Its USP seems to be that it can save you from having to tap through many clicks on apps using routines which can be launched by the push-to-talk device. If it really delivers on the promises given in the talk in the link above, it might become the "next big thing."

Tuesday, January 09, 2024

blender rendering notes - part 2 - and SheepIt render farm

  1.  As noted in the previous post, time-remapping to make the animation slower does not work well with particle systems, probably because baking is not done for fractional frames. A similar issue is discussed here.

  2. A gotcha for me was that the keyframes for the rocket animation were not visible in the timeline, but some other keyframes, like the camera field of view animation which I had added, were visible.


    So, dragging these keyframes to newer locations further along the timeline was not enough - I had to go to graph editor, and make sure the filters had "Show hidden"

    and then the keyframes (after 1000 frames) were visible.


  3. More notes and links to tutorial video timestamps below, 

Need to tweak both 
Smoke Domain physics tab and 
Emitter (circle) physics tab

Also maybe wind speed
(I did not change these, so now the rocket exhaust is almost twice as violent as in the previous version.)

Emitter
Density 5
Fuel 2

Initial velocity -12

Smoke domain settings - 
resolution divisions to 128 to reset smoke domain

In replay, can see rendered view smoke
Bake all is in Smoke Domain physics tab.

Can go to shading node editor -> World and add a background, default is white

Nishita sky texture, elevation 3 degrees for dusk look

Sun rotation 62 to light up rocket by sun

Adding HDRI and adjusting

(Before the final render, I made the sky darker with 
Shader view -> World -> HSV dialled Value to 0.5 )

Shift click on to-be parent, Ctrl P to make it parent.

Ctrl J to join the 3 cylinders of LVM3 - M4 to make a single object.

To pack blender file to make it portable,

File->External data->Automatically pack into .blend

Getting rid of unwanted assets:


Outliner -> orphan data

Also deleted grass etc.

GPU - make sure both CUDA and the device are selected!

For tile size, see
under Performance, Memory, Tile Size. Only for memory's sake, so we need not bother about tiling for our renders.

On a Mac at Studio, renders a frame in around 26 seconds with CPU and 18 seconds with GPU. So maybe 5 hours to render 1000 frames, as against a couple of days on my i5 machine without GPU.

Sheep-It distributed free rendering - leaving the machine on and connected for around 4 hours earned 1600 points. There are some caveats to using baked particle systems as mentioned in their FAQ (Does SheepIt support fluids?), need to zip the folder and make sure it is less than 750 MB, but non-particle renders should be do-able. With the 1600 points as noted, my project was halfway up the queue, and started rendering after a 5 minute or so wait. Or maybe the wait was shorter, just needed to go to the Projects page to see an update. 100 frames done on 5 minutes, which on my machine would have taken 5 hours or so. But the "shephering" server might have been busy, so the last frame was shown as "in progress" for a long time - 10 minutes or so. But since we get an email when the project is done, actually no need to sweat.

playing custom local video playlist from Kodi

The way to play local videos as a playlist seems to be, as per this forum thread

right-click or C in the Files view to get the context menu for a video file,
choose to queue it,
the file view automatically jumps to the next file in the folder,
right-click or C and choose to queue it and so on,
and when all the required files are added,
left arrow for the hidden menu, choose Go to Playlist,
then choose Save - it will now ask you for a filename for the playlist.

In order to play this playlist, from the home screen,
choose Videos (NOT Movies)
choose Playlists
highlight the desired playlist,
C for context menu, and choose Play.
Or press P to play after highlighting the desired playlist,
after which you have to press TAB for full-screen video without the menu.

List of keyboard shortcuts is at https://kodi.wiki/view/Keyboard_controls

Most of the options like audio device are in the Kodi Settings (gear icon on top of home screen.) LibreElec settings for system name, keyboard layout, etc.

Monday, January 01, 2024

problems with Sony player 4K playback on planetarium dome

We have a Sony HD player for playback of 1080p files - works well for XVID-encoded files. When we had issues with the Firestick for playback, we tried out the Sony UBP-X700 4K Ultra HD Blu-Ray Player even though it was very much more expensive - Rs. 30k compared to the Firestick 4K's Rs. 5k. But unfortunately, it did not work out.

Problems with the Fire TV stick 4K were:

  • Using the Amazon Firestick 4K for playout is extremely flaky - since the firestick keeps checking Amazon for updates and auto-updates, sometimes the show stops playing.  
  • Audio has to be taken from the projector's EP audio out, and has a lot of hiss. 

 Problems with the Sony were:

  • It was starting up in 4K 60 Hz which our projector did not support
  • It was changing modes when playing files with different resolutions and frame rates, causing delays and missed frames between files.

So we returned that, and are leaning towards playback using a Raspberry Pi 4.

The earlier models of R Pi, which we already have, do not support 4K. Raspberry Pi 5 has also come out now, which is slightly more expensive, but which we don't necessarily need.

Estimated prices:
Raspberry Pi 4  - Rs. 6,500
Power supply - Rs. 1,000
HDMI mini to HDMI adapter - Rs. 664

The following items may also be required, which we might buy later if required:
Keyboard - Rs 300
Mouse - Rs. 300
HDMI mini to HDMI adapter - Rs. 664
(we may need 2 of these)
USB sound card, high quality - Rs. 2,000
Case with cooling for R Pi - Rs. 2,000
Mini SD card - Rs. 600

 Edit: Raspberry Pi 4 running Kodi and a pre-owned external USB Lexicon Alpha audio interface is what we're using as of May 2024.