Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Check the serial of a facility:
-Login with system/admin
-Execute:   cat  grep serial /opt/azeti/SiteController/config/SiteController.cfg | grep serial 

Do a security copy of the configuration before touching it:

...

vi /opt/azeti/SiteController/config/SiteController.cfg
Some vi commands: 
press <esc> to start any command
"i" for editing
Change what you want to change
<esc>:wq  To write and exit
<esc>:q!  To exit without saving anything
<esc>dd  To delete the line where you have the cursor
Restart Site Controller:
/opt/azeti/SiteController/run_SiteController.py restart

...

/opt/azeti/SiteController/run_SiteController.py start
Stop Site Controller:
/opt/azeti/SiteController/run_SiteController.py stop
Start a module of Site Controller:
EjEg: Modbus
/opt/azeti/SiteController/run_SiteController.py start  ModbusMaster.py
Stop a single module of Site Controller:
EjEg: Modbus
/opt/azeti/SiteController/run_SiteController.py stop  ModbusMaster.py

...

mosquitto_cfg_folder = /mnt/apps/etc/mosquitto
Please note: If you search for mosquitto (Command is: "find / -name mosquitto") it is displaying multiple occourences of mosquitto on the system. Since it is only searching for the string "mosquitto", it also displays stuff, that we do not care about. For example find is also displaying "/mnt/apps/mosquitto/sbin/mosquitto" - this is a executable of mosquitto. We only have to tell the SiteController, in which directory the mosquitto-stuff is placed. So instead of "/mnt/apps/mosquitto/sbin/mosquitto", we can tell the system to look under "/mnt/apps/mosquitto", because the SC automatically appends "/sbin/mosquitto" to find the executable. This is mentioned here, because it is one of the most frequent misconfigurations done by customers.

Read the log of a module live:

# tail -f /opt/azeti/SiteController/log/ModbusMaster.log
Modbus operations
CE-AD81-34N3-0.2/ 0-10V
modpoll_ex -p none -b 9600 -t 4 -a 8 -0 -r 16 -s 1  -c  12  /dev/ttyUSB1
Modbus fuel sensor
modpoll_ex -a 1 -b 9600 -d 8 -p none -s 1 -t 4 -0 -o 3 -1 -r 01  -c 10 10.0.0.211
CE_AU11_DC_Voltagemeter (RTU)
modpoll_ex -a 7 -b9600 -d 8 -p none -0 -r 16 -t 4 -s 1 -c 1 /dev/ttyUSB1
   



Modbus daemon configuration
COM1
COM2
/dev/ttyUSB1
/dev/ttyUSB0
daemon_id 0
daemon_id 1
Check for libraries:
PYTHONPATH=/mnt/data/azeti/SiteController/lib/lib/python2.7/site-packages /mnt/data/azeti/SiteController/src/test_lib_installed.py

...

$cat output.txt | grep PAUL (if the serial of the system is PAUL - modify accordingly!)
If it is not there: script to re-search

...

Error while starting mosquitto:
Starting mosquitto ...
Traceback (most recent call last):
  File "/opt/azeti/SiteController/run_SiteController.py", line 1540, in <module>
    exit_code = main(sys.argv)
  File "/opt/azeti/SiteController/run_SiteController.py", line 1499, in main
    start_mosquitto()
  File "/opt/azeti/SiteController/run_SiteController.py", line 1026, in start_mosquitto
    '-d'])
  File "/opt/azeti/SiteController/run_SiteController.py", line 707, in start_submodule
    LOGGER.exception('Exception while trying to run command "%s":' % cmd)
AttributeError: 'NoneType' object has no attribute 'exception'
This means: mosquitto could not start. Probably due to path to mosquitto. (See above Check mosquitto configuration)
Configuration of fuel tank parameters:

...

        "timestamp": "2016-03-18T00:20:22.877Z-0500"
    }
]
Mosquitto topics:

Note:

topics in communication to and from external cloud broker (currently cloud/#hd/#sys_msg/#events/# and imgdata/#) may be required to be prefixed with the organization short name to allow an organization based autorization scheme, like so: azeti/cloud/#.

topic
description
retained
qos
related modules
calibrated_result/<sensor_id>generated by certain modules but almost the RawResultDemuxyes  
cloud/<sys_id>/exec_action/<action_id>command from the cloud to execute the specified actionno Actuatormodules like ModbusD or snmpgetd
cloud/<sys_id>/jobsreception of jobs from the cloudno JobProcessor
command/persistord/   persistord
commandresult/persistord/   persistord
config/action/<action_id> yes Actuatormodules
config/completeThe complete configuration (sensors, devices,actions,rules) as XML (retrieve from SC (subscribe))yes ConfigProvider
config/complete_updateThe complete configuration (sensors, devices,actions,rules) as XML to the SiteController (publish to)yes ConfigProvider
config/device/<device_id> yes  
config/module/<module_name>/[complete|update] yes  
config/rule/<rule_id> yes AutomationController
config/sensor/<sensor_id> yes  
events/<sys_id>/<sensor_id>generated by certain modules but almost the CalibResultsEvaluator, sent to cloud and partially to ACno cloud, AutomationController
hd/<sys_id>uncompressed historical data sent to the cloud

no, internal

yes, external

0

1

HD2CloudExporter, cloudConnector

cloudConnector, cloud

hd/<sys_id>/application/gzip

events/<sys_id>/application/gzip

compressed historical data sent to the cloud

no, internal

yes, external

0

1

HD2CloudExporter, cloudConnector

cloudConnector, cloud

imgdata/<sys_id>/<device_id>Image data, combined with description in a tar (SC-258)no http_server, cloudConnector, data_store
jobs/access_list_updatesimple job, forwarded by the JobProcessorno JobProcessor, VS_access_control
jobs/dynamic_HD_subscriptionsimple job, forwarded by the JobProcessorno 

JobProcessor, HD2CloudExporter, data_store

jobs/remote_execsimple job, executes a preconfigured shell command on SiteControllerno JobProcessor
module/<module_name>/command

example: The topic module/modbusd/command with payload statsgets returned with

the topic module/modbusd/command/reply with statistics as payload

  cloudConnector, data_store, modbusd
module/<module_name>/last_published_timestamp   HD2CloudExporter
module/state/<module_name>A module sends the internal state, useful for a better organized system startyes InternalStates, run_SiteController, Watchdog
module/state/requestWatchdog requests the states of the modules, no payload. The modules answer via InternalStatesyes Watchdog, InternalStates
raw_result/<sensor_gateway_id>generated by data acquisition modules like ModbusDyes RawResultDemux
sc/configask Matthias   
sys_msg/<sys_id>class sys_msg is defined in result.py, destination of the message is the cloud.  jobs_updateConfig, result, cloud, actuatormodules, watchdog
vs_data/<sensor_id>

specific data for a virtual sensor (currenty used by the VS to hold data during a restart).

These data should be stored in a database (persistord/data_store) and re-published if not available

on mosquitto.

yes 

VS_access_control, VS_battery_details

 

persistord, (data_store)


Username/password test systems
system/admin
To reboot a Cisco-device:
#reboot
To stop a Cisco-device:
#halt