Track shipping transit data through the Strait of Hormuz - a critical chokepoint for global oil supply.
bash
# Run the monitor
python ~/.openclaw/workspace/skills/hormuz-strait-monitor/scripts/hormuz_monitor.py
# With notification channel
python ~/.openclaw/workspace/skills/hormuz-strait-monitor/scripts/hormuz_monitor.py --channel wecom
# Debug mode (keep browser visible)
python ~/.openclaw/workspace/skills/hormuz-strait-monitor/scripts/hormuz_monitor.py --debug
SourceFieldFormatExamplehormuzstraitmonitor.comTransits (24h)Number of ships6 shipsDay NormalDaily average60/dayDaily ThroughputDWT (Deadweight Tonnage)500K DWTAvg ThroughputAverage DWT10.3Mshipxy.comNon-Iranian VesselsCount from vessel list4 vessels
SourceURLData Collectedhormuzstraitmonitor.comhttps://hormuzstraitmonitor.com/Transits (24h), Daily Throughput, Day Normal, Avg Throughputshipxy.comhttps://www.shipxy.com/special/hormuzNon-Iranian vessels exiting strait in 12h
Both sites require JavaScript rendering - static HTTP fetch will not work.
Alert triggers when any condition is met:
ConditionThresholdMeaningTransits Recovery>= 10 vesselsAbsolute recovery thresholdTransits Recovery>= 20% of day normalRelative recovery thresholdThroughput Recovery>= 20% of avgOil flow returningNon-Iranian Vessels>= 10 exiting in 12hWestern/Asian shipping activity
Data is appended to CSV: ~/.openclaw/workspace/memory/hormuz-transit-data.csv
Columns:
timestamp - Collection timetransits_24h - Vessels transited in last 24hdaily_throughput - Current daily oil flowday_normal - Normal daily transit countavg_throughput - Average daily throughputnon_iranian_vessels - Non-Iranian vessels exiting in 12halerts - Alert messages (if any)See references/config.json for threshold customization.
To enable notifications:
references/config.json"channel": "wecom" or other supported channel--channel flag at runtimeRequired:
/usr/bin/google-chrome)Install dependencies:
bash
pip install selenium webdriver-manager
Chrome version: This skill uses Chrome 147+ (headless mode).
Chrome not found:
text
ERROR: Chrome binary not found at /usr/bin/google-chrome
Solution: Install Google Chrome or update binary path in script.
Selenium not installed:
text
ERROR: selenium and webdriver-manager not installed
Solution: pip install selenium webdriver-manager
Data not parsed:
~/.openclaw/workspace/memory/hormuzstraitmonitor_debug.png--debug to see browser contentTimeout errors:
To monitor regularly, add to heartbeat or cron:
Heartbeat (HEARTBEAT.md):
markdown
- Check Hormuz Strait transit data (every 4h)
Cron job:
bash
# Every 4 hours
openclaw cron add --schedule "0 */4 * * *" --name hormuz-monitor \
--payload '{"kind": "agentTurn", "message": "Run Hormuz Strait monitor skill"}'