HighRes Bio Cellario Adapter Page#
This page has all the information specific to the HighRes Bio Cellario adapter.
Supported Cellario versions#
HighRes Bio Cellario 3.5, 4.0, and 4.1
Cellario Driver Installer#
No driver is needed for the Cellario adapter.
Cellario Adapter config.yaml
File#
log:
level: "DEBUG"
loggerLevels:
- logger: "tutorial"
level: "DEBUG"
artificial:
host: your-instance.artificial.com
lab: lab_1a2b3c-4d5e-6f7g-8h9i-123456abcdef
adapter:
name: cellarioTutorialAdapter
remoteConfig: False
allowAnySequenceId: True # Useful when running in a local dev container
plugin: # all resources this adapter can connect to
resource:
name: "MyCellario" # user friendly name, unique in the adapter
id: "cellario"
driver:
name: "cellario" # Driver name, this is a non-configurable string that needs to match the driver identity
url: "http://cellario.webaddress.com:8444" # URL of the hardware and driver
resource_simulation: false # Set to true to run simulation without hardware
driver_simulation: false # Set to true to run simulation without a driver
cert_file: ""
user_name: âtâ
user_password: âtâ
asset_sync:
devices: # device string names/prefix must match resource id above
"ACell 1.1": { rid: "92b68c16-440c-4806-87f0-ef5f0ebb5299" }
Fill in the correct URL for the Cellario device. (The IPv4 URL can be obtained on the device by running ipconfig in a command window.)
You may update the resource name above if you wish (any unique string will work).
Fill in the
user_name
andpassword
, if needed.If you wish to run in simulation without hardware or without a driver, change resource_simulation or driver_simulation to true, respectively.
Under asset_sync, match at least one of your devices to a Digital Twin asset ID. You can fill out the rest of the devices later. Consult the corresponding step in Hardware-Specific Adapter Setup for how to do this.
Update the artificial section to the correct host and lab. Consult the corresponding step in Hardware-Specific Adapter Setup for how to do this.
Cellario Adapter adapter/main/plugin.py
File#
from artificial.adapter_common import ActionModulePlugin, action_modules
from artificial.adapter_common.plugin import PluginContext, plugin_config
from artificial.cellario.actions import CellarioActions
from artificial.cellario.models import PluginConfig
from artificial.logging import get_logger
from artificial.resource_base.models import SyncConfig
logger = get_logger(__name__)
@action_modules(CellarioActions)
class AdapterPlugin(ActionModulePlugin):
cfg = plugin_config(PluginConfig)
async def setup(self, pctx: PluginContext) -> None:
sync_config = pctx.raw_config.to_dataclass(SyncConfig, 'adapter.asset_sync')
cellario_actions = await CellarioActions.create(pctx, self.cfg, sync_config)
self.add_module(cellario_actions)
self.add_webroute(cellario_actions.event_web_route)
await pctx.lab.health.add_monitor('Cellario', cellario_actions.check_health, 60, 30)
Cellario Adapter adapter/main/__main__.py
File#
Copy the following list of actors into the file in place of the example actors.
actors = [
ActorConfig(id='cellario', abilities={'cellario': 100}),
]
Cellario Adapter pyproject.toml
Dependencies#
Run uv add artificial-cellario-resource-library==0.0.53
to add the required packages to the [project]
section.
Your pyproject.toml
file should now include artificial-cellario-resource-library
in the project dependencies section:
[project]
dependencies = [
"artificial-cellario-resource-library==0.0.53"
]
Cellario Simple Connectivity Workflow#
This sample workflow will connect with Cellario, start the system, and then log a message in the UI upon successful completion.
A couple of notes: #. We recommend pausing or stopping Cellario to see the difference with the start action more visibly.
After copying this code into a file, remember to replace the lab_guid in the workflow heading with the one from your Lab (most easily found by opening the Lab in Artificial and looking in the browser address bar). Consult Adding and Running a Simple Connectivity Test Workflow for more info.
from artificial.workflows.decorators import workflow
from artificial.workflows.runtime import show_info
from stubs.stubs_actions import start_system
@workflow(
'Simple Cellario Connectivity Test Workflow',
'simple_cellario_connectivity_workflow',
'lab_4e4aa165-e5f0-4340-bbe7-477b3302dbb9',
interactive=True,
quick=True
)
async def simple_cellario_connectivity_workflow() -> None:
await start_system()
await show_info('Congratulations, you successfully ran your hardware!', 'Hardware Success')