Vero 4k vcgencmd missing

Hi, I was trying to solve an overheating issue and found that:

osmc@osmc:~$ vcgencmd measure_temp
bash: vcgencmd: command not found

also:

osmc@osmc:~$ ls -lah /opt/vc/bin/
ls: cannot access ‘/opt/vc/bin/’: No such file or directory

vsgencmd is nowhere to be found
Can somebody, please, advise how to get it? And why it is missing?

vcgencmd is a command only for the raspberry pi, it’s not available for the Vero devices.

Try this on Vero.

watch cat /sys/class/thermal/thermal_zone0/temp

Thank you!
Could you, by any chance, advise how this could be implemented in a python script?

The above is a shell command. You don’t need Python for this.

Yes, i know. Wanted to use a python script to mail me in case of overheating.
I found this script, but it uses vcgencmd and would be nice if it can be adapted for vero 4k.

Plug the following line into the python script, replacing the vcgencmd command.

Keep in mind that the temperatures in that script will want adjusting.
The Vero will also already shut itself down if the temperature is too high.

Yes, I thought high 75 degrees and critical over 95.
The unit was doing over 95 until I registered it and removed the screensaver.
Now it is idling at 52 degrees.
I just wanted to add an additional layer of security so I don’t start a fire inadvertently.
Unfortunately I am a stranger to python and cannot figure out how to adapt this script for vero.
A helping hand would be appreciated.

As @sam_nazarko wrote that safety is already build in. The device will reduce clock above 100c and shutdown at 120c

Thanks dillthedog! Seems to work, as I tried it with the first part of the script in a command prompt:
# coding=utf-8
import os
import smtplib
from email.mime.text import MIMEText

    critical = False
    high = 70
    too_high = 89

    # At First we have to get the current CPU-Temperature with this defined function
    def getCPUtemperature():
        res = os.popen('cat /sys/class/thermal/thermal_zone0/temp').readline()
        return(res.replace("temp=","").replace("'C\n",""))

    # Now we convert our value into a float number
    temp = float(getCPUtemperature())

print temp/1000

It spits out the temperature.
Now I have to debug the sendmail part as it doesn’t work for some reason.

Ok, thanks everybody for the help!

I have adapted the script and below is the working version if someone would like to use it.

# coding=utf-8
import os
import smtplib
from email.mime.text import MIMEText

critical = False
high = 70
too_high = 89

# At First we have to get the current CPU-Temperature with this defined function
def getCPUtemperature():
   res = os.popen('cat /sys/class/thermal/thermal_zone0/temp').readline()
   return(res.replace("temp=","").replace("'C\n",""))

# Now we convert our value into a float number
temp = float(getCPUtemperature())/1000

# Check if the temperature is above 70°C
if (temp > high):
   if temp > too_high:
       critical = True
       subject = "Critical warning! The temperature is: {,} shutting down!!".format(temp)
       body = "Critical warning! The actual temperature is: {} \n\n Shutting down the pi!".format(temp)
   else:
       subject = "Warning! The temperature is: {} ".format(temp)
       body = "Warning! The actual temperature is: {} ".format(temp)

   # Enter your smtp Server-Connection
   server = smtplib.SMTP('smtp.gmail.com', 25) # if your using gmail: smtp.gmail.com
   server.ehlo()
   server.starttls()
   server.ehlo
   # Login
   server.login("yourmail@gmail.com", "yourpass")
   
 
   msg = MIMEText(body)
    msg['Subject'] = subject
    msg['From'] = "Root@whateva.com"
    msg['To'] = "receivingmail@gmail.com"

    # Finally send the mail
    server.sendmail("receivingmail@gmail.com", "receivingmail@gmail.com", msg.as_string())
    server.quit()
    
    # Critical, shut down the pi
    if critical:
        os.popen('sudo halt')

# Don't print anything otherwise. 
# Cron will send you an email for any command that returns "any" output (so you would get another  email)
# else:
#   print "Everything is working fine!"

Now, I have no python knowledge, so I suppose inefficient techniques and useless parts might be present, but the script works, measures temperature and sends mails / stops the unit above the given thresholds.

A cron job to run it each N minutes is a way to use it once in place.