Super simple video call system for a senior

Share here your ideas for new projects
Post Reply
User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Super simple video call system for a senior

Post by mctom »

Hi,

Christmas is coming and I thought of an idea for a gift.
My grandpa lives alone and is 95. Long story short, that would be awesome if he had an ability to video call people.
He doesn't have a computer and surely would be defeated by any concept of learning how to use one.

He has a basic TV with HDMI input, and a modem from a cable operator that is ready to serve internet.
An SBC would have to land behind TV, a camera right over the screen.

Two questions:
Is anyone aware of any senior-friendly software to make video calls?
Has anyone seen a remote controller with just a few buttons, like arrows and "OK"?

I would love to make that as simple as it can possibly get. I am even considering a custom made controller with buttons for each contact, and scripting a way to establish video calls.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

Has anyone seen a remote controller with just a few buttons, like arrows and "OK"?
Like this? https://www.hardkernel.com/shop/ir-remote-controller/

I'd go with android, and have it boot directly to your favourite calling app. This can be done either with tasker, or recently with /odm/etc/init.d scripts that run on boot. Inside the script you could generate tap events at x, y to press whatever you want on screen.
Inside the app you define the contacts and he could use the remote to select one.

The problem would be to teach him to switch inputs, and also, to receive calls.
These users thanked the author mad_ady for the post:
mctom (Tue Nov 16, 2021 3:32 am)

L67GS
Posts: 713
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Location: Great Lakes Region, U.S.A
Has thanked: 212 times
Been thanked: 93 times
Contact:

Re: Super simple video call system for a senior

Post by L67GS »

Those PS Eye cams I got are dirt cheap, and pretty nice. Finding them can be tricky though, I got a couple off mercari.

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

Thanks.

Yeah, never thought of Android, I have virtually no experience tinkering with it. I was hoping for something as simple as a plugin for mpv or something. :)
What you propose could work, especially tapping on x,y coordinates and such, but I'd have to ensure somehow that the app has always the same layout.

I was also thinking about switching inputs, but I think his TV manages that automatically. He is able to watch TV and play DVDs. The concept is familiar to him, as he switches inputs on audio amp to play TV audio, radio or vinyl records.
Nevertheless, for calls I have a hope that dpms trickery could make the TV switch to the desired input automatically once it detects a signal on it. Reverting back to TV decoder might be tricky, but he manages that somehow after watching DVD.
Not to mention how many times I had to do urgent 50km trips to turn off mute or something similar. ;)
L67GS wrote:
Tue Nov 16, 2021 2:54 am
Those PS Eye cams I got are dirt cheap, and pretty nice. Finding them can be tricky though, I got a couple off mercari.
Could you show me which cam do you mean? I see plenty locally, but they come in all sorts of shapes.
https://allegro.pl/listing?string=ps%20eye&price_to=100
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

If the app can handle arrows/keyboard you can inject those too.

Android adds robustness because of readonly rootfs.

For remote assistance here's what I did for my much younger but technically lacking in-laws:
1. Set up openvpn at home (I recommend pivpn). Make sure to make long-lasting certificates (10 years)
2. Installed openvpn client on android and used the 'tap shortcut on screen + sleep' to start it on boot. It connects to my concentrator on boot.
3. When needed, I run scrcpy and connect to android over adb over vpn, so I have a vnc of some sort. Plus adb push.

To switch inputs you might use CEC from cli, though I'm not sure how/if it works from Android. See libcec.

L67GS
Posts: 713
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Location: Great Lakes Region, U.S.A
Has thanked: 212 times
Been thanked: 93 times
Contact:

Re: Super simple video call system for a senior

Post by L67GS »

mctom wrote:
Tue Nov 16, 2021 3:41 am

Could you show me which cam do you mean? I see plenty locally, but they come in all sorts of shapes.
https://allegro.pl/listing?string=ps%20eye&price_to=100
I got these, they have a decent camera and a beamforming microphone array. They worked out of the box in Linux, not sure about android.
DSCN1620.JPG.jpg
DSCN1620.JPG.jpg (348.7 KiB) Viewed 837 times

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

Thank you both, this is all very helpful.

I am honestly worried about learning curve of Android backend, especially in terms of time. But it does sound like the best option for a few reasons.

As a family we have no video conferencing tool of choice, so I may pick any. I stumbled upon jitsi yesterday, that my friend strongly suggests due to his Stallman induced paranoia.
It is open source and has API and all, so maybe..?

I also gave it a thought and answering video calls is not a must. After all, TV and audio amp may be as well off, and he shouldn't be worried someone's gonna spy on him :D

About the remote control proposed above, I think he might already have one similar to this, for TV decoder box. He already has 5 remotes for all that AV stuff and mix them up sometimes. I can't blame him, I'm getting lost in them too. And adding more may cause interference with other devices at some point.
So probably I'll end up making a custom one, wired to GPIOs. He'd have to get up, press a button close to TV set and that's it.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

Yes, I looked into jitsy a while ago... It will take time to set up, open network ports, secure, train others, etc. Cloud beats it easily if you don't mind being a product...

With regard to gpio buttons and Android - look up joerg's work.

I suggested Android because the video calling apps won't cause headaches, but everything else will. If you use linux, it will be the other way around!

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

OK I ordered a camera from pawn shop for <$10 shipping included. I'll try some experiments with XU4 as I have it lying around, but for the ttarget application I'll buy something passively cooled.

The TV is an older one, I think it may be "HD ready", so 1366 x 768. So virtually any SBC would handle smooth playback on it, I think.
Now I wonder if it has HDMI inputs at all. If not, I guess buying an Android TV might make more sense in the end.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

It likely has VGA and you can use a HDMI to VGA adapter. Make sure to get one with audio out as well. But you'll need some speakers.

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

Okay, I got some intel.

The TV is from around 2014, Thomson 32HZ5233. It does have two HDMI inputs that are currently not used, one labeled "ARC", another "MHL".
There are also USB ports: One marked 2.0 and another "HUB", whatever that means. It is known it may play multimedia from USB drives, but nothing more.

So, I guess the baseline solution is an SBC with Messenger. For now I'll do experiments on XU4.
It could be acceptable to make it answer all incoming video calls, for simplicity and possible improvements later on. I didn't find such function in Messenger, that would be asking for exploits indeed.

I was thinking Linux would be easier to maintain as I could ssh to it if something went wrong, but I think the local ISP probably doesn't offer global IP or forwards ports on demand. I could try asking for it, but wouldn't count on it.
So, probably Android TV may be just as good in terms of maintenance.

The Internet link is offered to senior citizens for $6/mo, 20Mb down and 2Mb up - should be enough for video calls?
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

To auto-answer calls, when the app doesn't support it, might be doable if you're scanning logcat. The app might say something relevant on incoming calls, and you could inject a tap at x,y.

Remote management can be done over openvpn (with your odroid as client). It works even if your ISP doesn't give you a static ip, or even if (heaven forbid!) your ISP does carrier-grade NAT.

You don't need ssh, but you can use adb and scrcpy which can do most things.

20/2 is enough for video conferencing (assuming wired connection).
These users thanked the author mad_ady for the post:
mctom (Mon Nov 22, 2021 5:23 am)

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

Okay then, I'll do proper tinkering with this idea next week.
One more question though: WHICH Android? :)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

IMHO AndroidTV is more limited than standard Android in terms of what apps it can run. I you only want to run one app at all times, I'd go with voodik's standard Android, the latest version for your board.

For xu4 I'm not sure how to force run scripts on boot. May be duable in one of the scripts in /odm
These users thanked the author mad_ady for the post:
mctom (Mon Nov 22, 2021 5:08 pm)

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

Okay in the meantime I got my $8 PS Eye. I think it's borked. Or I'm so obscene it censors me out.

Picture is focused at objects about 1 inch from the lens, works great as a microscope, but not much more.

PulseAudio detects 4 microphones. Is this going to be useful in any way for this project?

Code: Select all

[mctom@Tomusiomat ~]$ lsusb | grep Sony
Bus 001 Device 007: ID 1415:2000 Nam Tai E&E Products Ltd. or OmniVision Technologies, Inc. Sony Playstation Eye
2021-11-22-190556_1821x937_scrot.png
2021-11-22-190556_1821x937_scrot.png (4.03 MiB) Viewed 714 times
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

I googled around and apparently these cameras go out of focus after removing IR filter, that some people do for whatever reason.
As described here.

I think this is the case - this camera can be literally blinded with IR remote, where the same beam is barely noticeable on a phone camera.
Guess I'll simply have to return it.
2021-11-22-211721_1275x965_scrot.png
2021-11-22-211721_1275x965_scrot.png (2.61 MiB) Viewed 711 times
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

L67GS
Posts: 713
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Location: Great Lakes Region, U.S.A
Has thanked: 212 times
Been thanked: 93 times
Contact:

Re: Super simple video call system for a senior

Post by L67GS »

Odd, both of mine were fine, but I didn't remove the IR filters before testing.

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

Why return it? You now have an 8$ IR camera!

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

L67GS wrote:
Tue Nov 23, 2021 6:46 am
Odd, both of mine were fine, but I didn't remove the IR filters before testing.
Yeah, that's how this whole country works. Some hobbyist have probably removed the IR filter for some cool project, realized it's broken now and sold it to pawn shop instead of throwing away. :roll:
Never mind, I'll ask for return and get another one.
mad_ady wrote:
Tue Nov 23, 2021 3:54 pm
Why return it? You now have an 8$ IR camera!
If it wasn't utterly out of focus I could probably sell it as such. Recently I sold RasPi IR camera for $4 :lol:
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

Did they throw the Hubble Space telescope away when it was out of focus? No! They fixed it! What's your excuse? :P
These users thanked the author mad_ady for the post:
L67GS (Wed Nov 24, 2021 6:13 am)

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

They did throw the Hubble Telescope away quite literally when it was brand new :D

My excuse is: according to my projects spreadsheet I've got 11 going on or planned. ;)

Sure enough I could add some spacers to refocus it manually, or try fitting an alternative IR filter. On a second thought, I probably will, as I'm not going to pay for shipping it back to a seller (for another $4), and the seller probably won't pay for shipping either, so it will stay here no matter what.

Thankfully the disputes on Allegro work pretty much the same as on Aliexpress - it's really hard to lose it.
These users thanked the author mctom for the post:
odroid (Tue Nov 23, 2021 5:02 pm)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

L67GS
Posts: 713
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Location: Great Lakes Region, U.S.A
Has thanked: 212 times
Been thanked: 93 times
Contact:

Re: Super simple video call system for a senior

Post by L67GS »

Gee, I wish you lived in the states, I could send you the camera module from Candice's.
These users thanked the author L67GS for the post:
mctom (Wed Nov 24, 2021 7:06 am)

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

Thanks, that's very nice of you.
Surprisingly, the seller wanted that damaged PS Eye back and paid for postage. Makes no damn sense economically but who cares.
I already ordered another one, this time from a guy that accepts free returns. That should be my habit.

In the meantime, I did some reading on the mic array in PS Eye. That's quite a simple concept and yet the audio samples I've heard were really impressive.
Is there a way to incorporate that into this project? Can Android mix all 4 mics together?
If my understanding is correct, that should emphasize sound coming from the front of the camera only, which is perfect for this purpose. And probably the simplest to achieve.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

L67GS
Posts: 713
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Location: Great Lakes Region, U.S.A
Has thanked: 212 times
Been thanked: 93 times
Contact:

Re: Super simple video call system for a senior

Post by L67GS »

mctom wrote:
Wed Nov 24, 2021 7:22 am
Is there a way to incorporate that into this project? Can Android mix all 4 mics together?
If my understanding is correct, that should emphasize sound coming from the front of the camera only, which is perfect for this purpose. And probably the simplest to achieve.
There's a LOT of talk in this thread, maybe someof it would give some clues how to incorporate it into Android

viewtopic.php?f=55&t=41188&p=318632&hil ... ng#p318632
These users thanked the author L67GS for the post:
mctom (Tue Nov 30, 2021 7:11 am)

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

Okay, I set up voodik's Android on an SD card. Later I read it's not recommended and stuff, but I figure this SBC is meant to have a single purpose, so perhaps it's not that important.

I gave up on Messenger, I realized it's gonna be too much of a hassle to create an account without valid phone number and e-mail address.

I tested Jitsi and it's super cool. No accounts needed! Both parties enter the same room name et voila, it just works.
This should be easy enough to set up automatically on startup. I didn't research the topic yet, but even if nobody figured that out, I think this can be done by injecting keystrokes, taps or whatever.

I think the most sensible option is to make an external switch to turn XU4 on and off, if Grandpa feels like chatting or not. Of course, that would involve a graceful shutdown. That one's on me. ;)

A major bummer is that camera doesn't work.
I ordered another PS EYE thing that is in focus this time, but Android doesn't feel like supporting it.
The mic works fine (or at least one of them, dunno), but nothing more.

I think the PS EYE camera needs a special kernel module to work, as it is not a "standard" USB Video Class camera. After all people spent some time figuring out how to support it back in a day.
So I guess it's time to return it and find something else :D I may try to salvage one from an old laptop instead.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

A standard, cheap uvc camera should do. One HD, that looks ok in poor lightning should be preferred.

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

Yeah, it doesn't matter much at this stage, I just need a camera that is suitable for tests.
I made a Jitsi call from Xu4 to my phone and it looked okay, except it was one way call.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

I set up Ubuntu on a separate SD just to compare Jitsi performance. If it worked more or less the same, why bother with this awkward Android thing.

Alas, I'm too dumb to build Jitsi. It's not in Ubuntu repos, I followed their manual and gave up after 1 hour of installing more and more java nonsense and ultimately failing to build.
I'll have to try again with fresher mind.

Also, if it worked on Linux, I could use that PS3 Eye thing after all, and use the quad mic for filtering out background noise (and most importantly, echo).

The reason why I focused on Jitsi, however, is this:
https://github.com/jitsi/jitsi-meet/blo ... ig.js#L449

There seems to be a debug option that joins a "random room" at startup. If my understanding is correct, that may as well be the only room specified.
Even if not, hacking a source code sounds like a more stable approach than emulating taps on a screen.

Edit: To make stuff even more rigged on Ubuntu, I'll give Matchbox WM a try.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

If you're going with jitsi, stick to ubuntu.
If you're using x11 with a DE, use wmctrl (or xdotool) to maximize the window (and inject keystrokes/mouse events as needed)
These users thanked the author mad_ady for the post:
mctom (Tue Nov 30, 2021 7:26 pm)

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

I've spent some 6 hours in total trying to build jitsi-meet on ubuntu, and eventually I got a clever idea how to do it. Just take the PKGBUILD recipe from AUR and follow that.
In the process I had to do a hack enabling java/node/jre thing to use more than some internal memory limit. What a load of bloat, I cannot comprehend it.

And in the end I realized this is not what I wanted. This is a Jitsi server meant to run on nginx, not a desktop client :oops:

So I picked up jitsi-meet-electron instead and wrestle with this thing.

I'm almost there. AUR guys have made a patch removing hardcoded x64 configuration, because they also offer arm64 recipe.
Nevertheless electron-builder fails at some point, because it downloads x86 tool for one of its tasks. It is an issue reported (and ignored) on github.
But it produced AppImage right before my girlfriend came yelling it's friday night and that's enough of that goofy hacking for you, mister! And handed me a glass of polish mead and a bowl of snacks.

Once I get this to work, I'll have to dive into that Java nonsense and make jitsi client join the specified room on startup. I'd rather do that than a degree on jitsi API.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

Okay, do we have a JavaScript hacker in the house?

I dug into Jitsi Meet Electron code and identified some relevant elements, but the syntax makes no sense to me really and I don't know how to proceed.

Generally, I have Jitsi Meet Electron packed into AppImage and found a way to repeat the packaging process.
Ideally, I'd like to launch it with an argument which is a room name to be joined automatically on startup.
If this is too complicated, a hardcoded room name would be good enough.

All I know so far is:
Here a "conference" object is being created, and the constructor argument contains server name and room name (I'm okay with default server).
I assume this is what does all the magic of joining a conference room.

I think I could place it somewhere in main.js to get the desired result, but no idea where. :? And if it's gonna work in a different context.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

I'd try the folllowing:
- find out where this.state.url is read from. Most likely from a persistent cookie, or config file. If you join a random room, is it preserved if you restart? In that case, just hide the menu/button to create s new meeting.

- if poking in main.js, start with line 307

- try loading the "app" in a browser you control so that you can start developer tools (F12) and add a breakpoint (click on a js line number) where you're curious. When execution hits the breakpoint, execution atops and you can inspect objects, variables and even see the stack trace how you got there.

- 5 days left. No pressure!
These users thanked the author mad_ady for the post:
mctom (Mon Dec 20, 2021 8:04 pm)

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

Thanks!

I have already determined it stores some data in config files in /home/ directory. The format is not entirely straightforward, some sort of database bloat I think.
I cannot run Jitsi in web browser (index.html is rendered as empty space, and I can't find any other entry point). However there is "inspect element" in Electron itself, but the code is garbled and doesn't look like the original source at all.

Yes, that would be very convenient to find a way of running this code without repackaging it all the time, and to be able to debug it on the fly.

And thank you for pointing out line 307 - yep, that makes sense. :D

For now I think I have a hardware issue to address first - XU4 shuts down on its own after a while. The difference is I access it through ssh today, perhaps lightdm decides to shut down the whole thing if nobody's logging in.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

If it shuts down after 20 minutes, then yes, it's lightdm's fault. You can force it to login as a user though, automatically.

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

mad_ady wrote:
Mon Dec 20, 2021 9:07 pm
If it shuts down after 20 minutes, then yes, it's lightdm's fault. You can force it to login as a user though, automatically.
It actually went to sleep instead, I could wake it up with XU4 push button and continue SSH session. Not a problem at all.

Anyway, it turned out Jitsi HAS the functionality that I want after all! 8-)

Check this out.

So I started the appimage with:

Code: Select all

./jitsi-meet.AppImage jitsi-meet://KonfaTestowa
And it works exactly like I wanted! :D

Okay, now to put all the pieces together I'll need to:
- Log in automatically to i3
- Start Jitsi after i3 is loaded,
- make a board with a button and LED to turn XU4 on and off, and show status
( I may skip LED as the camera has its own LED which will effectively serve the same purpose).

Not sure how to do the autologin thing but should be easy enough to figure it out on my own (Do I even need a greeter for that?).
The i3 part is easy, I work with Sway / I3 all the time.
I selected i3 because I'm familiar with it, it tiles everything automatically, and is very lightweight on its own.

Meanwhile I reattached a passive heatsink because temperatures reached some 85 degrees under a load - a tad bit too much if you ask me.
I removed C289 (a capacitor that acts as a dummy component to support heatsink), as my heatsink wedged on it. Instead I placed a thermal pad larger than heatsink itself to ensure electrical isolation.
The temperature was still high, so I cut a hole in thermal pad revealing SoC, and applied thermal paste instead.
Now it's idling at 45 degrees and reached 69 under stress -c 8. That's alright and it's silent.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

Glad to see you didn't have to reinvent the wheel.
So - the client is always connected in a room? Meaning camera/mic are open all the time?

One more suggestion - keep lightdm and add a cronjob to restart it daily at a convenient hour. That should keep runaway memory leaks in check.

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

Okay, got it. It boots, logs in as an unprivileged user, starts i3, and that starts jitsi in a predefined room with a super secret name.
Conversely, pushing a button on xu4 shuts down everything.
It works! :D

I reinstalled the image because I damaged networkmanager at some point and didn't bother fixing it.
It has no greeter, instead a systemd rule (?) that logs in a predefined user on tty1.
The user has a .bash_profile that runs startx if it is tty1.
.xinitrc runs i3.
i3 config for that user runs AppImage from its own home directory.

Yes, once XU4 is on, it should be connected to a room at all times. Red and blue LEDs on a camera should be a sufficient reminder to turn this thing off when not in use.
On a second thought, perhaps a 2-3h watchdog could shut down the unit if he forgets to do it himself. Can cron handle that?

Now my main concern is heat. XU4 draws some 10-11W constantly during the call, a large heatsink won't do for extended periods. The original fan will be too noisy.
Surprisingly, that's more power than stress -c 8 draws, so temperature goes over 80 degrees. Not perfect, given the device will be hidden in a rather warm environment behind the TV.
I'll experiment with lower resolution (I'm testing the setup on 2K screen and not HD Ready target display).
Underclocking probably won't help, but maybe?
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

Underclocking definitely helps with the heat! Try this https://github.com/mad-ady/odroid-cpu-control and see how low you can go. Tip - leave the little cores at 1.5. Lower the big cores to 1.2 or even 0.8. Try a non-performance governor.

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

OK, I'll try that tomorrow. I'm worried this will not help because these cores ARE in use for whatever is going on on them, so I may have performance issues in return.
Only one way to find out..
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

Thanks for this tool, very convenient indeed.

I have performed some tests, measured power consumption with SP3 in three different states:
- When being the only person in the room (fullscreen preview of my own camera)
- When another client joined the room (my cell phone), held horizontally and vertically.

Why? Because I noticed there is a difference in power consumption. I suspect the reason is Jitsi renders some fancy blurry background on the sides of vertical picture. I noticed it becomes laggy at low CPU speeds, but didn't pay much attention to it.

Anyway, here's my power consumption table:
2021-12-21-115139_1325x705_scrot.png
2021-12-21-115139_1325x705_scrot.png (95.15 KiB) Viewed 288 times
12.5W was my starting point and XU4 was experiencing PAIN, even squeaked a little in agony. This is more power than it draws under stress -c 8. More power is utilized on USB camera, LAN and possibly GPU (?).

The "HDMI off" column is where I turned on my configured box and did the measurements without watching visual output. Then I plugged monitor in and it didn't work (no signal) so I assumed the box booted unaware of the existence of the monitor (by the way I'll have to address this issue, as it may be turned on with a TV set to some other input).

Output resolution seems to have some impact on power consumption, but it's inconsistent.

Anyway, even clocked down to 600MHz it worked just fine... Maybe video got a tad bit laggy, but that's okay for online conferencing. IF I measured fps I'd probably see the difference, otherwise I cannot tell.

I set up the persistent configuration of 1GHz on A15 cores et voila.
I left the conference on for 20 minutes or so, the temperature is 67 and power consumption at around 5,8W.
I would consider replacing XU4 with something less dissipative to begin with, but I don't see any second hand Odroid available in my urban area right now. And MC1 Solo won't do. ;)
Hopefully 70 degrees is acceptable for Exynos. I think so!

Other minor tweaks:
- i3 does fullscreen on any new window titled "Jitsi Meet"
- Also added to rc.local: shutdown -h +150 :)

EDIT: I also tried "ondemand" governor but that didn't change anything.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

by the way I'll have to address this issue, as it may be turned on with a TV set to some other input
You should be able to turn off monitor hotplug detection (disable_hpd=true) and force a resolution in boot.ini in the first partition.

Are you running the Hardkernel ubuntu 20.04 image?

You may also want to:
- uninstall any screensaver package
- uninstall update-manager (prevent update popups)
- run /usr/bin/xset s off; /usr/bin/xset -dpms; /usr/bin/xset s noblank on login to prevent screen blanking when idle.

I love it when a plan comes together before the deadline.

70C is safe for XU4 and should keep it healthy for years.
These users thanked the author mad_ady for the post:
mctom (Tue Dec 21, 2021 9:23 pm)

User avatar
mctom
Posts: 1008
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 104 times
Been thanked: 123 times
Contact:

Re: Super simple video call system for a senior

Post by mctom »

Yes, XU4 in my extended test tops at 71 degrees - it may be a few degrees lower when I mount it on a TV cabinet wall. I believe this will improve convective air flow through the heatsink.

Yes, I use official UbuntuMinimal with i3, xorg and pulseaudio installed manually. I believe there are no screensaver packages present. I also removed automatic updates.
mad_ady wrote:
Tue Dec 21, 2021 8:53 pm
- run /usr/bin/xset s off; /usr/bin/xset -dpms; /usr/bin/xset s noblank on login to prevent screen blanking when idle.
The first two were already covered by .xsession example that I copied from i3 manpage, but I'll add xset s noblank. Thanks!
mad_ady wrote:
Tue Dec 21, 2021 8:53 pm
You should be able to turn off monitor hotplug detection (disable_hpd=true) and force a resolution in boot.ini in the first partition.
I'll do just that. I'm not 100% sure what is the resolution of target display and I'm pretty sure my monitor won't support it whatever that is.
But when I find it, how do I set the resolution? xrandr in .xsession would be enough?
What is the expected outcome of setting disable_hpd=true without selecting a resolution in boot.ini?

This is the extract of my boot.ini:

Code: Select all

ODROIDXU-UBOOT-CONFIG

setenv initrd_high "0xffffffff"
setenv fdt_high "0xffffffff"
setenv macaddr "00:1e:06:61:7a:39"
setenv vout "hdmi"
setenv HPD "true"
setenv cecenable "false"
setenv disable_vu7 "false"
setenv ddr_freq 825
setenv external_watchdog "false"
setenv external_watchdog_debounce "3"
shouldn't I simply change setenv HPD "true" to false?
mad_ady wrote:
Tue Dec 21, 2021 8:53 pm
I love it when a plan comes together before the deadline.
Eh, as far as I can tell my mom forgot to arrange an internet connection for grandpa, so there might be a small delay. :)

And about the hardware side of things, I'll have to make that push button and probably make a tiny circuit that extends the pulse. I noticed the button on XU4 must be pushed for 1s or more to work, and building a circuit for that might be simpler than explaining it to my family. ;)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

Yes, you should set HPD to false. In the C series the variable is reversed.

You can also force a resolution from there.

You should also set up some sort of remote management on the box. Simplest is to have it connect via openvpn to a server you control. Then you can ssh into it when needed.

User avatar
mad_ady
Posts: 10177
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 821 times
Contact:

Re: Super simple video call system for a senior

Post by mad_ady »

+ Add these to bootargs in boot.ini: fsck.mode=force fsck.repair=yes. Especially if you're running off an SD card. Will make boot a bit slower, but should make the board more resilient to power outages.

Post Reply

Return to “The Ideas”

Who is online

Users browsing this forum: No registered users and 2 guests