Screenshot of Dashboard headless mode

I think some of our tests use webdriver.io but I haven’t used it personally

Did you try to print it -> save as pdf?

Better question - why make it headless ? Sure do not have a screen attached but you can still have a desktop environment with VNC etc etc on it and remote into there when needed - or am i missing something ?

Craig

So if you have Telegram access etc you could have the PI open up a SSH tunnel or VPN etc based on receiving a command from the Telgram Bot

What is the underlying communication option to the remote site ?

Craig

Hi craigcurtin,

The problem is that it is in a remote area and I can only connect via LTE (4G). There is no chance to do a port forwarding. VPN and reverse SSH makes no sense because I need a "easy to check" method with the cell phone. That is the reason I use Telegram service.

AND... I want a short status report every day. This is easy to realize via Telegram.

@ moebius
how can I program a automatic pdf print of the dashboard?

Rather than running up an app to fetch the web page and screenshot it, perhaps keep firefox running all the time and just run a screenshot on that.

What is the use of a dashboard if no one can look at it? Why not have the pi build a report that can be sent?

@zenofmud: The dashboard is to generate a graphic of the sensor data over time, so it is easier for the user to see what happened the last week or day.
I can send data out (that is what I am doing no), but it would be more convenient when I would get a graphic to analyse the data.

@colin: How can I take a automatic screenshot of firefox when it runs in the background?

It won't be running in the background, it will be in the foreground. You just won't have a display plugged in.

@colin: How can I make a partial screenshot of the pi?

No idea, sorry. Google?

Do a full screenshot then post process it later? Either in the Pi or after transfer.

You have any idea how I can do a screenshot of the pi in general.
I came up with the headless idea, because some people already did this in NR but not of the dashboard.
AND it is used for automation and testing.

Did you try as I suggested? Google (or your favourite search engine) for
raspbian screenshot command line

@Colin YUP, i found the Scrot program. I till try with that program today.

@Colin I had to install a gui first because I am using the buster lite version.
I can use the scrot command to take a screenshot, so this is good.
BUT i tried a very simple exec node with a injector and I dont get a screenshot :roll_eyes:
The command is just "scrot /home/pi/test.png"
It works in the GUI (execute and Xterm) but not if I use it with node red :thinking:

Does scrot let you specify which X display you want to take a snapshot of?

Have a look at Zerotier - it essentially creates a Virtual VPN - there is very little communications overhead until you connect. You could then script the daily reports etc to come from a central site that then takea remote session, grabs data and screenshots etc from the remote PI

Personally i think it would be far easier for the sensor data you wish to visualise to be logged on the remote pi and then uploaded to a central location once a day and imported/visualised that way

Craig