md
Remote Logging of the Orange Pi Zero Core Temperature
2019-03-12
<-Remote Logging and Email Notification --
<-Syslog Server on Raspbian and Remote Logging of TASMOTA Messages

Perhaps undeservedly, the Orange Pi Zero has the reputation of running hot. I wanted to use the Domoticz data logging facilities to record the core temperature of the single board computer which is on all the time running HA-Bridge. And while setting that up, I decided that I should also log any errors occurring during the execution of the script that updates the temperature data on a regular basis and look into sending some sort of notification if the Orange Pi Zero seems to be getting too hot.

Table of contents

  1. Reading the CPU Temperature
  2. Improving the Script
  3. Logging Errors to syslog
  4. Notification Using Domoticz
  5. Notification with DzVents in Domoticz
  6. Temperature Alert in Domoticz
  7. Back to Python
  8. Conclusion

Reading the CPU Temperature toc

The first step is to create a virtual temperature sensor in Domoticz. It is not complicated at all and I have covered this in detail before: Installing a Temperature Sensor.... Just remember to select a temperature-only sensor, Temperature, and not a temperature and humidity sensor, Temp+Hum, as explained in step 2 of To add a virtual sensor.

Here is a simple Python 3 script that reads the CPU temperature from the sys/class thermal zone file and sends it to Domoticz using a properly JSON formatted HTTP request. This is a slightly modified version of the script used to read and report the CPU temperature of the Raspberry Pi, updated to run with version 3 of Python.

#!/usr/bin/python3 # for python 3.x, at least on Armbian ##!/usr/bin/python # for python 2.7, at least on Armbian # coding: utf-8 # Domoticz parameters cpu_temp_idx = 18 url_json = "http://192.168.0.22:8080/json.htm?type=command&param=udevice&idx={}&nvalue=0&svalue={}" # Console output parameter verbose = 0 # 0 quiet, 1 to print out information to the console from urllib.request import urlopen # with python 3.x #from urllib2 import urlopen # with python 2.7 # read and report cpu temperature cputemp = int(open('/sys/class/thermal/thermal_zone0/temp').read()) / 1000.0 cpuTemp = "{0:0.1f}".format(cputemp) if verbose: print('Température du processeur: {}° C'.format(cpuTemp)) # Make JSON formated HTTP query for Domoticz cmd = url_json.format(cpu_temp_idx, cpuTemp) if verbose: print('Requête vers Domoticz: {}'.format(cmd)) hf = urlopen(cmd) if verbose: print('Réponse: {}'.format(hf.read().decode('utf-8'))) hf.close()

Here is the downloadable version of the script: opiz_temps.py.

If you want to use Python 2.7, then change the top "shebang" line to #!/usr/bin/python. Also because of changes to urllib, replace urllib.request with urllib2 in the import urlopen line. It is also possible to write from urllib import urlopen but the original urlopen in the original urllib module does not have a timeout parameter that will be used later.

If you want a version of the script that works with both versions of Python then import and use the sys module to test for the version of Python executing the script and import urlopen from the appropriate module.

import sys if sys.version_info[0] == 3: from urllib.request import urlopen else: from urllib2 import urlopen

Thank you to a reader who wishes to remain anonymous for providing this useful snippet.

To complete the setup, the script should be placed in a specific directory, made executable and be executed regularly by the cron daemon. Here is one way of going about this. I am assuming there is a bin directory in your home directory.

zero@opi:~$ wget https://sigmdel.ca/michel/ha/opi/dndl/opiz_temps.py -O bin/temps.py zero@opi:~$ nano bin/temps.py

Then edit the script, setting the proper Domoticiz index number of the virtual temperature sensor and the IP address of its web sever at the start of the script file. You may want to change the messages shown on the console if verbose is defined as greater than 0. After that save the changes and continue.

zero@opi:~$ chmod +x bin/temps.py zero@opi:~$ crontab -e

Add a line in the schedule of tasks so that the script is executed every five minutes.

... # m h dom mon dow command ... */5 * * * * /home/zero/bin/temps.py

Of course, zero must be replaced by the correct user name, and by the same token, the full path to temps.py should be corrected if it was not copied to the bin directory. It should not be necessary to reload or restart cron. But if you want to be safe, here is one way of doing it.

zero@opi:~$ sudo systemctl restart cron

Within 5 minutes, the temperature sensor in Domoticz should be displaying the CPU temperature as well as the time the value was read.

This script has been working very well since June 2017 on the Raspberry Pi and it has worked on the Orange Pi Zero for a few days as can be seen from the Domoticz temperature chart.

Domoticz temperature log

The obvious dips are easily explained. Very late on the 3rd of March, the Orange Pi Zero was shutdown for a while as I moved it to a new location. On March 5th, I replaced a dimmer with a "smart dimmer" and turned the power off twice in the process.

To be frank, this is probably well enough as it is and I see no reason why the script would not work in the future. Nevertheless, I decided to try "improving" it and in the process gain more experience with Python which I obviously need.

Improving the Script toc

What could go wrong with that first script? Here is a list of things that I can envision.

The last problem can be mitigated to a certain extent. A timeout value can be inserted into the call to urlopen. If the request is not handled within that interval, an exception will be raised. This is also what happens if the IP address is wrong or if the Domoticz web server is down. When such an exception occurs, it would be useful to report the situation. And exactly the same thing should be done for the other errors. As I would typically do in a Pascal program in this situation, I added an exception handler.

#!/usr/bin/python3 # for python 3.x, at least on Armbian ##!/usr/bin/python # for python 2.7, at least on Armbian # coding: utf-8 # Domoticz parameters cpu_temp_idx = 18 url_json = "http://192.168.0.22:8080/json.htm?type=command&param=udevice&idx={}&nvalue=0&svalue={}" # Console output parameter verbose = 1 # 0 quiet, 1 prints out information to the console from urllib.request import urlopen # with python 3.x #from urllib2 import urlopen # with python 2.7 # Read cpu temperature cputemp = int(open('/sys/class/thermal/thermal_zone0/temp').read()) / 1000.0 cpuTemp = "{0:0.1f}".format(cputemp) if verbose: print('Température du processeur: {}° C'.format(cpuTemp)) # Make JSON formated HTTP query for Domoticz cmd = url_json.format(cpu_temp_idx, cpuTemp) if verbose: print('Requête vers Domoticz: {}'.format(cmd)) try: # Send the request with a 10 second timeout hf = urlopen(cmd, timeout=10) if verbose: print('Réponse: {}'.format(hf.read().decode('utf-8'))) hf.close() except Exception as e: if verbose: print('Exception: {}'.format(e))

Here is the downloadable version of the script: opiz_temps2.py.

It may be necessary to modify the interval before a timeout occurs. The usual delay between sending the HTTP request and getting a response from Domoticz on my network was about 5 seconds. Doubling that time seemed like a reasonable timeout delay.

Catching all exceptions in this manner is considered bad form, but I hope to justify this later on. As it is, the exception handler does not do much. It swallows the exception and does nothing unless console messages have been turned on by setting verbose to a value other than 0. In that case it just writes the exception to the console. I assume that this translates to printing error messages to stdout instead of stderr.

There is an obvious problem. All error messages will be lost even if verbose=1 because in actual use, the script will be run as a background task without being connected to a console. The obvious solution is to use the system log.

Logging Errors to syslog toc

To send messages to the system log, I opted for the syslog Python module, but some might prefer a pure Python library, in which case see logging.handles.

#!/usr/bin/python3 # for python 3.x, at least on Armbian ##!/usr/bin/python # for python 2.7, at least on Armbian # coding: utf-8 from syslog import * from urllib.request import urlopen # with python 3.x #from urllib2 import urlopen # with python 2.7 # Domoticz parameters tempSensorIdx = 18 domoticzUrl = "http://192.168.0.22:8080/json.htm?type=command&param=udevice&idx={}&nvalue=0&svalue={}" domoticzTimeout = 10 # Console output parameter verbose = 1 # 0 quiet, 1 to echo syslog messages to the console # Syslog parameters alertTemp = 63.0 # if the core temperature exceeds alertTemp then # a LOG_ALERT message is send to syslog loglevel = LOG_ERR # priority level for messages sent to syslog # Routine to send messages to syslog and echo it to the console def log(level, msg): if (verbose) and (level <= loglevel): print(msg) syslog(level, msg) # Setup syslog openlog(ident='opi') setlogmask(LOG_UPTO(loglevel)) # Read cpu temperature cputemp = int(open('/sys/class/thermal/thermal_zone0/temp').read()) / 1e3 cpuTemp = "{0:0.1f}".format(cputemp) # Send an alert if the cpu is too hot, otherwise send a debug message if cputemp > alertTemp: llevel = LOG_ALERT else: llevel = LOG_DEBUG log(llevel, 'Température du processeur: {}° C'.format(cpuTemp)) # URL to send to Domoticz url = domoticzUrl.format(tempSensorIdx, cpuTemp) log(LOG_DEBUG, 'Requête vers Domoticz: {}'.format(url)) try: # Send the request with a 10 second timeout hf = urlopen(cmd, timeout=DomoticzTimeout) # get Domoticz' response and broadcast it response = hf.read().decode('utf-8') if ('"ERR"') in response: llevel = LOG_ERR else: llevel = LOG_DEBUG log(llevel, 'Réponse de Domoticz: {}'.format(response)) hf.close() except Exception as e: log(LOG_ERR, 'Exception: {}'.format(e))

Here is the downloadable version of the script: opiz_temps3.py.

The openlog() function call is not necessary. What the ident option does is to assign a specific program name for log messages that will be sent by the script instead of using the default name. I explained the interest of assigning such a name in a previous post: Remote Logging and Email Notification. System log messages are sent along with a severity level. There are 8 levels, defined as follows in the Python module, starting with the highest severity.

LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, LOG_DEBUG.

The setlogmask(LOG_UPTO(LOG_ERR)) means that only messages with a severity level equal to LOG_ERR or higher (i.e. LOG_EMERG, LOG_ALERT, LOG_CRIT or LOG_ERR) will be actually be sent. One would want to write LOG_DOWNTO(LOG_ERR), but UPTO does make sense because the values assigned to the symbols actually start at 0 for LOG_EMERG and increase up to 7 for LOG_EMERG. By default, all messages are sent.

Advantage has been taken of the different severity levels that are available. Some of the information shown on the console when verbose was set is now sent to syslog with the lowest severity level, LOG_DEBUG, to help in debugging the script. And when the temperature of the CPU exceeds the specified threshold, alertTemp, then a message with severity LOG_ALERT is sent to syslog.

Note how sending logging messages and displaying them on the console has been centralized in a single function: log. This makes for cleaner code.

To test out the logging function, set the loglevel to LOG_DEBUG in the script, open a second session on the Orange Pi Zero to display the content of the user log as new messages are received, and then execute the script.

In a second session zero@opi:~ $ sudo tail -f /var/log/user.log
In the first session zero@opi:~/bin$ ./opi_temps3.py cpu temp: 54.3 Domoticz url: http://192.168.0.22:8080/json.htm?type=command&param=udevice&idx=81&nvalue=0&svalue=54.3 Domoticz response: { "status" : "OK", "title" : "Update Device" }
In the second session Mar 6 19:25:02 localhost opi: cpu temp: 54.3 Mar 6 19:25:02 localhost opi: Domoticz url: http://192.168.0.22:8080/json.htm?type=command&param=udevice&idx=81&nvalue=0&svalue=54.3 Mar 6 19:25:02 localhost opi: Domoticz response: {#012 "status" : "OK",#012 "title" : "Update Device"#012}

Restore the loglevel to LOG_ERR and mangle the Domoticz temperature sensor idx or the IP address to see the results when running the script. Try lowering the value of alertTemp also.

Notification Using Domoticz toc

To be honest, I am not a big reader of log files, even if they should be centralized as I have done (again see: Remote Logging and Email Notification). Nor do I look at the Domoticz web interface on a regular basis. On the other hand, the latter provides a very simple mechanism to send a notification when the temperature reaches a certain level. Click on the Notifications button on the virtual temperature sensor in the Domoticz web interface. Below is a part of the page that will appear as a consequence.

Notifications page in Domoticz

The conditions for sending out a notification have already been entered: When: set to Greater or Equal and Value: set to 63° C. Whenever the CPU temperature goes beyond the set threshold (which is independent of the one used in the Python script reading and reporting the Orange Pi Zero core temperature), notification is sent to all the enabled notification systems. The notification will be sent once when the threshold temperature has been crossed. By default it will not be sent again (for a long while at least) even if the Orange Pi Zero continues to update the temperature. If you want to receive a notification each time the temperature is updated and remains too hot, slide the Ignore interval option to the right until it goes green. If you want a different notification than what Domoticz will send, enter the desired message in the Custom Message field. Once the options have been entered, click on the Add button at the bottom.

While there are numerous notification systems, I only have experience with email notification. It requires that the Email Setup: be correctly filled out. It can be found in the Email tab displayed after clicking on Setup top menu bar and then on the Settings menu choice. Presumably, other notification systems can be enabled on the Notifications tab in a similar manner.

Email Setup page in Domoticz

Click on the Test button to send a message to the specified destination and once everything works, do not forget to press on the  Apply Settings  button.

The email notification will not be sent unless both the Enabled and the Send Email Notification Alerts options are enabled. That is a bit of a problem for me because I prefer to disable email notification unless the house will be empty for more than a couple of hours.

The default notification message sent by Domoticz is terse but to the point:

    HA-Bridge Temperature is 72.0 degrees [>= 63.0 degrees]

Both the subject and body of the email will be the same. That will also be true if you entered a custom message.

Notification with DzVents in Domoticz toc

Up to now, I have not looked at the events model used in Domoticz except for writing a couple of scripts long ago to handle some legacy hardware. It was pleasing to find it that DzVents version 2.4 included in version 4.9700 of Domoticz made it very easy to send an email message formated as I wanted.

--[[ Simple Email Alert on Opiz Core Temperature > 63 ( dzVents >= 2.4.0 ) ]]-- return { on = { devices = {18} --OPiZ temperature sensor, use idx instead of name that can be changed }, execute = function(domoticz, sensor) if (sensor.temperature > 63) then domoticz.email('CPU Temperature Alert', 'The Orange Pi Zero core temperature,'..sensor.temperature..'° C, is too high', 'your_email_address') end end }

Here is the downloadable version of the script: opiztemp.lua.

I saved the script as ~/domoticz/scripts/dzVents/scripts/opiztemp.lua where, as usual, ~/ denotes the default user's home directory on the Raspberry Pi hosting the home automation server. The script file could have any name as long as it ends with the .lua extension. The email account has to be correctly defined in the Domoticz Setup/Settings/Email tab as shown above. Alert emails will be sent even if the Send Email Notification Alerts option is not enabled. However, email must be enabled in Email Setup.

If you wanted the alert message pushed to all notification engines enabled in the Domoticz Setup/Settings/Notifications tab then replace the domoticz.email... line with

domoticz.notify('Alert', alert.text..'° C', domoticz.PRIORITY_HIGH)

In that case, if Send Email Notification  is enabled then an email will be sent to the address given i the To: field of the Email tab. Actually that is the default behaviour, it depends on the inclusion of email in the list of Active Systems along with other notifications systems to use in the sensor Notifications definition.

This is a very simple-minded script and it will work. But an alert message will be sent every five minutes as long as the Orange Pi Zero is running too hot. It looks like it would be simple in the "new" DzVents to save the time at which the alert is sent out and to skip sending messages until a decent interval has elapsed. I leave that for a future exercise if I find it necessary.

Temperature Alert in Domoticz toc

Domoticz Temperature Sensor - red Domoticz provides alert sensors as another way of signalling that the CPU is running too hot. Alert sensors are meant to imitate road hazard warning signs and their colour can be adjusted to correspond to the severity of the problem. A red alert sensor will stand out especially if it is placed on the dashboard which is first displayed when the standard Domoticz web page is opened.

An alert sensor is a virtual device which is easy to create in Domoticz is simple enough. Follow the instructions found in a previous post selecting Alert for the virtual device type. A virtual alert should now appear in the Utility tab.

Alert sensor - grey

If that tab is not visible, go to the bottom of the Setup/Setting/System page and enable the Utility tab and then press the  Apply Settings  button at the top of the page.

The alert sensor has a text which can be modified and it can be one of five colours which should be related to the severity of the alert.

colournvalueDomoticz object constant
grey0dz.ALERTLEVEL_GREY
green1dz.ALERTLEVEL_GREEN
yellow2dz.ALERTLEVEL_YELLOW
orange3dz.ALERTLEVEL_ORANGE
red4dz.ALERTLEVEL_RED

In dzVents Lua scripts, replace dz. by the actual name given to the domoticz object. It is not too complicated to modify the above Lua script to update the alert sensor when the temperature sensor is itself updated

--[[ Update OPiZ Alert and send email notification when too hot ( dzVents >= 2.4.0 ) Using device idx numbers instead of devices names which can be easily changed idx = 18 = 'OPiZ' the temperature sensor idx = 32 = 'OPiZ Alert' the alert sensor ]]-- return { active = true, on = { devices = {18}, }, logging = { level = domoticz.LOG_ERR, -- .LOG_DEBUG to see DEBUG messages, .LOG_ERR otherwise marker = "MD(cputemp)" }, execute = function(dz, sensor) local THRESHOLD = 63 local alevel dz.log('Start execute with sensor.temperature: '..sensor.temperature, dz.LOG_DEBUG) if (sensor.temperature > THRESHOLD) then dz.log('Alert RED, sending email', dz.LOG_DEBUG) dz.email('CPU Temperature Alert', 'The Orange Pi Zero core temperature,'..sensor.temperature..'° C, is too high', 'destination@email.address') alevel = dz.ALERTLEVEL_RED elseif (sensor.temperature > 0.9*THRESHOLD) then alevel = dz.ALERTLEVEL_ORANGE elseif (sensor.temperature > 0.8*THRESHOLD) then alevel = dz.ALERTLEVEL_YELLOW else alevel = dz.ALERTLEVEL_GREEN end dz.log('Setting Alert level to '..alevel, dz.LOG_DEBUG) dz.devices(32).updateAlertSensor(alevel, 'OPiZ core temperature: '..sensor.temperature..'° C.') end }

Here is the downloadable version of the script: cputemp.lua.

Back to Python toc

My initial approach was not to use the Domoticz notification system but to do everything in Python on the Orange Pi Zero and only update sensors in the home automation system. For the sake of completeness, here is the script.

#!/usr/bin/python3 # coding: utf-8 from syslog import * import smtplib, ssl from email.mime.text import MIMEText from urllib.request import urlopen from urllib.parse import quote_plus ################################# ### <user defined parameters> ### alertTemp = 63 # Hot cpu core temperature threshold domoticzUrl = '' # Domoticz server address such as 'http://192.168.0.22:8080' tempSensorIdx = 0 # Domoticz idx of temperature sensor, if 0 only logs temperature tempAlertIdx = 0 # Domoticz idx of alert sensor, if 0 then ignored thermalZone = 0 # Read temp in /sys/class/thermal/thermal_zone{thermalZone}/temp domoticzTimeout = 10 # timeout in seconds on http requests to Domoticz logIdent = '' # syslog programname, if empty then default program name used loglevel = LOG_ERR # log messages of tht urgency or above will be sent to syslog logAlertLevel = LOG_ALERT # Use LOG_ALERT to send the temperature alert to syslog alertTitle = 'Surchauffe HA-Bridge' alertMsg = 'La température de l\'Orange Pi Zero est de {}° C ce qui dépasse le niveau d\'alarme de {}°C' emailTarget = 'your.destination@email.com' emailSender = 'your@email.address' smtpServer = 'your.smtp.server' smtpPort = 465 smtpUser = emailSender smtpPwd = 'your_smpt_password' verbose = 1 # = 0 nothing sent to console # = 1 log messages up to loglevel are echoed to console # = 2 all log messages are sent to the console # If loglevel= LOG_DEBUG this is the same as # verbose = 1 ### </user defined parameters> ### ################################## # Json formatted Domoticz http query for setting a temperature sensor value domoticzQuery = '/json.htm?type=command&param=udevice&idx={}&nvalue={}&svalue={}' # Routine to send messages to syslog and echo it to the console def log(level, msg): if (verbose == 2) or (verbose and (level <= loglevel)): print(msg) syslog(level, msg) # Routine to send alert to log and send email notification def alert(title, message): log(LOG_DEBUG, 'Alert, title: \'{}\', message \'{}\''.format(title, message)) log(logAlertLevel, message) log(LOG_DEBUG, 'Sending email notification') # Create the message msg = MIMEText(message) msg['Subject'] = title msg['From'] = emailSender msg['To'] = emailTarget # Send it context = ssl.create_default_context() with smtplib.SMTP_SSL(smtpServer, smtpPort, context=context) as server: server.login(smtpUser, smtpPwd) server.sendmail(emailSender, emailTarget, msg.as_string()) log(LOG_DEBUG, 'Alert completed') # Routine to send HTTP request to Domoticz def sendQuery(query): url = domoticzUrl + query log(LOG_DEBUG, 'Domoticz url: {}'.format(url)) try: # send the request with a timeout hf = urlopen(url, timeout=domoticzTimeout) # get Domoticz' response and broadcast it response = hf.read().decode('utf-8') if ('"ERR"') in response: llevel = LOG_ERR else: llevel = LOG_DEBUG log(llevel, 'Domoticz response: {}'.format(response)) hf.close except Exception as e: log(LOG_ERR, 'Exception: {}'.format(e)) ## starting script! log(LOG_DEBUG, 'Starting {}, reading thermal_zone {}'.format(__file__, thermalZone)) if logIdent: openlog(ident=logIdent) log(LOG_DEBUG, 'openlog(ident={})'.format(logIdent)) setlogmask(LOG_UPTO(loglevel)) # Read cpu temperature cputemp = int(open('/sys/class/thermal/thermal_zone{}/temp'.format(thermalZone)).read()) / 1000.0 cpuTemp = "{0:0.1f}".format(cputemp) # Send the information message to syslog log(LOG_INFO, 'CPU temperature: {}° C'.format(cpuTemp)) # Send the alert message if necessary to syslog and email if cputemp > alertTemp: alert(alertTitle, alertMsg.format(cpuTemp, alertTemp)) if not domoticzUrl: log(LOG_DEBUG, 'No Domoticiz URL defined') else: # Send the temperature to Domoticz temperature sensor if idx given if tempSensorIdx <= 0: log(LOG_DEBUG, 'No Domoticiz temperature sensor idx defined') else: sendQuery(domoticzQuery.format(tempSensorIdx, 0, cpuTemp)) # Send the colour value and text to Domoticz alert sensor if idx given if tempAlertIdx <= 0: log(LOG_DEBUG, 'No Domoticiz temperature alert sensor idx defined') else: if cputemp > alertTemp: value = 4 # red elif cputemp > int(0.9*alertTemp): value = 3 # orange elif cputemp > int(0.8*alertTemp): value = 2 # yellow else: value = 1 # green sendQuery(domoticzQuery.format(tempAlertIdx, value, quote_plus('Température de l\'Orange Pi Zero temperature: {}° C'.format(cpuTemp))))

This only works in Python 3.x as it is, because of differences in the smtplib module. Here is the source code: cputemp.

Conclusion toc

While the above has shown only one way of using the Domoticz data logging capability, there are numerous methods to raise the alert when the temperature goes beyond a certain level. I have shown three.

  1. A syslog message with the appropriate priority level.
  2. An alert sensor in the Domoticz dashboard.
  3. Notification via email or another system.

The syslog message will normally be handled by the script that does the actual reading of the system temperature on the Orange Pi Zero. But it could be handled by a script running on the Domoticz, although I have not shown that. The email notification could be done by the rsyslog daemon on either machine in response to the alert message as shown in the previous post, it can be done by the same Python script that reads the system temperature on the Orange Pi Zero, or it can be done within Domoticz. In the latter case, the built-in notification system can be used or a dzVents script (or maybe a Python script) can be used to send the notification.

With all these possibilities, I have chosen the solution shown in the last section which means that the script responsible for reading the Orange Pi Zero core temperature also handles the details of deciding when an alert should be sent and what colour the Domoticz alert sensor should display. To me this makes sense because this is very much related to one device: the SOC on the board. And as outlined above, the Orange Pi Zero is not doing much work and yet with its four cores it is in principle much more powerful than the Raspberry Pi hosting the home automation system.

There are arguments for unloading as much work onto the Raspberry Pi as possible. Presumably, if the Orange Pi Zero is too hot, then it might not be the best strategy to have it take on the further responsibilities of sending an email and so on. Furthermore, email messages is just one way of notifying the user of a problem and this seems to be very much in the purview of a home automation system.

Perhaps time will tell which is the best approach.

<-Remote Logging and Email Notification --
<-Syslog Server on Raspbian and Remote Logging of TASMOTA Messages