

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# IoT SiteWise 發佈者
<a name="iotsitewise-publisher-component"></a>

IoT SiteWise 發佈者元件 (`aws.iot.SiteWiseEdgePublisher`) 可讓 AWS IoT SiteWise 閘道將資料從邊緣匯出至 AWS 雲端。

如需 AWS IoT SiteWise 閘道的詳細資訊，請參閱*AWS IoT SiteWise 《 使用者指南*》中的[AWS IoT SiteWise 在邊緣使用](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/gateways-ggv2.html) 。

**Topics**
+ [版本](#iotsitewise-publisher-component-versions)
+ [Type](#iotsitewise-publisher-component-type)
+ [作業系統](#iotsitewise-publisher-component-os-support)
+ [要求](#iotsitewise-publisher-component-requirements)
+ [相依性](#iotsitewise-publisher-component-dependencies)
+ [Configuration](#iotsitewise-publisher-component-configuration)
+ [輸入資料](#iotsitewise-publisher-component-input-data)
+ [本機日誌檔案](#iotsitewise-publisher-component-log-file)
+ [故障診斷和偵錯](#iotsitewise-publisher-component-debug)
+ [授權](#iotsitewise-publisher-component-licenses)
+ [變更記錄](#iotsitewise-publisher-component-changelog)
+ [另請參閱](#iotsitewise-publisher-component-see-also)

## 版本
<a name="iotsitewise-publisher-component-versions"></a>

此元件具有下列版本：
+ 4.1.x
+ 4.0.x
+ 3.2.x
+ 3.1.x 版本
+ 3.0.x
+ 2.4.x 版本
+ 2.3.x 版本
+ 2.2.x 版本
+ 2.1.x
+ 2.0.x

## Type
<a name="iotsitewise-publisher-component-type"></a>

<a name="public-component-type-generic"></a>此<a name="public-component-type-generic-phrase"></a>元件是一般元件 (`aws.greengrass.generic`)。[Greengrass 核](greengrass-nucleus-component.md)會執行元件的生命週期指令碼。

<a name="public-component-type-more-information"></a>如需詳細資訊，請參閱[元件類型](develop-greengrass-components.md#component-types)。

## 作業系統
<a name="iotsitewise-publisher-component-os-support"></a>

此元件可以安裝在執行下列作業系統的核心裝置上：
+ Linux
+ Windows

## 要求
<a name="iotsitewise-publisher-component-requirements"></a>

此元件有下列需求：
+ Greengrass 核心裝置必須在下列其中一個平台上執行：
  + os：Ubuntu 18.04 或更新版本

    架構：x86\$164 (AMD64) 或 ARMv8 (Aarch64)
  + os：Red Hat Enterprise Linux (RHEL) 8

    架構：x86\$164 (AMD64) 或 ARMv8 (Aarch64)
  + os：Amazon Linux 2

    架構：x86\$164 (AMD64) 或 ARMv8 (Aarch64)
  + os：Debian 11

    架構：x86\$164 (AMD64) 或 ARMv8 (Aarch64)
  + os：Windows Server 2019 或更新版本

    架構：x86\$164 (AMD64)
+ Greengrass 核心裝置必須連線至網際網路。
+ Greengrass 核心裝置必須獲得授權才能執行 `iotsitewise:BatchPutAssetPropertyValue`動作。如需詳細資訊，請參閱[授權核心裝置以與服務互動 AWS](https://docs.aws.amazon.com/greengrass/v2/developerguide/device-service-role.html)。  
**Example 許可政策**  

------
#### [ JSON ]

****  

  ```
  {
      "Version":"2012-10-17",		 	 	 
      "Statement": [
          {
              "Effect": "Allow",
              "Action": "iotsitewise:BatchPutAssetPropertyValue",
              "Resource": "*"
          }
      ]
  }
  ```

------

### 端點和連接埠
<a name="iotsitewise-publisher-component-endpoints"></a>

除了基本操作所需的端點和連接埠之外，此元件還必須能夠對下列端點和連接埠執行傳出請求。如需詳細資訊，請參閱[允許透過代理或防火牆的裝置流量](allow-device-traffic.md)。


| Endpoint | 站點 | 必要 | Description | 
| --- | --- | --- | --- | 
|  `data.iotsitewise.region.amazonaws.com`  | 443 | 是 |  將資料發佈至 AWS IoT SiteWise。  | 

## 相依性
<a name="iotsitewise-publisher-component-dependencies"></a>

當您部署元件時， AWS IoT Greengrass 也會部署其相依性的相容版本。這表示您必須符合元件及其所有相依性的要求，才能成功部署元件。本節列出此元件[發行版本的](#iotsitewise-publisher-component-changelog)相依性，以及為每個相依性定義元件版本的語意版本限制。您也可以在 [AWS IoT Greengrass 主控台](https://console.aws.amazon.com//greengrass)中檢視每個版本元件的相依性。在元件詳細資訊頁面上，尋找**相依性**清單。

下表列出此元件 2.0.x 至 2.2.x 版的相依性。


| 相依性 | 相容版本 | 相依性類型 | 
| --- | --- | --- | 
| [Greengrass 核](greengrass-nucleus-component.md) | >=2.3.0<3.0.0 | 硬式 | 
| [串流管理員](stream-manager-component.md) | >=2.0.10<3.0.0 | 硬式 | 

如需元件相依性的詳細資訊，請參閱[元件配方參考](component-recipe-reference.md#recipe-reference-component-dependencies)。

## Configuration
<a name="iotsitewise-publisher-component-configuration"></a>

此元件沒有任何組態參數。

您可以使用 AWS IoT SiteWise 主控台或 API 來設定 IoT SiteWise 發佈者元件。如需詳細資訊，請參閱*AWS IoT SiteWise 《 使用者指南*》中的[步驟 3：設定發佈者 - 選用](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-gateway-ggv2.html#configure-publisher)。

## 輸入資料
<a name="iotsitewise-publisher-component-input-data"></a>



此元件會從 AWS IoT Greengrass 串流管理員讀取`PutAssetPropertyValueEntry`訊息。如需詳細資訊，請參閱 *AWS IoT SiteWise API 參考*中的 [PutAssetPropertyValueEntry](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_PutAssetPropertyValueEntry.html)。

## 本機日誌檔案
<a name="iotsitewise-publisher-component-log-file"></a>

此元件使用以下日誌檔案。

------
#### [ Linux ]

```
/greengrass/v2/logs/aws.iot.SiteWiseEdgePublisher.log
```

------
#### [ Windows ]

```
C:\greengrass\v2\logs\aws.iot.SiteWiseEdgePublisher.log
```

------

**檢視此元件的日誌**
+ 在核心裝置上執行下列命令，以即時檢視此元件的日誌檔案。將 `/greengrass/v2`或 *C：\$1greengrass\$1v2* 取代為 AWS IoT Greengrass 根資料夾的路徑。

------
#### [ Linux ]

  ```
  sudo tail -f /greengrass/v2/logs/aws.iot.SiteWiseEdgePublisher.log
  ```

------
#### [ Windows (PowerShell) ]

  ```
  Get-Content C:\greengrass\v2\logs\aws.iot.SiteWiseEdgePublisher.log -Tail 10 -Wait
  ```

------

## 故障診斷和偵錯
<a name="iotsitewise-publisher-component-debug"></a>

此元件包含新的事件日誌，協助客戶識別和修正問題。日誌檔案與本機日誌檔案分開，位於下列位置。將 `/greengrass/v2`或 *C：\$1greengrass\$1v2* 取代為 AWS IoT Greengrass 根資料夾的路徑。

------
#### [ Linux ]

```
/greengrass/v2/work/aws.iot.SiteWiseEdgePublisher/logs/IotSiteWisePublisherEvents.log
```

------
#### [ Windows ]

```
C:\greengrass\v2\work\aws.iot.SiteWiseEdgePublisher\logs\IotSiteWisePublisherEvents.log
```

------

此日誌包含詳細資訊和故障診斷指示。故障診斷資訊與診斷一起提供，並描述如何修正問題，有時還包含進一步資訊的連結。診斷資訊包括下列項目：
+ 嚴重性等級
+ 時間戳記
+ 其他事件特定資訊

**Example 範例日誌**  

```
accountBeingThrottled:
  Summary: Data upload speed slowed due to quota limits
  Level: WARN
  Timestamp: '2023-06-09T21:30:24.654Z'
  Description: The IoT SiteWise Publisher is limited to the "Rate of data points ingested"
    quota for a customers account. See the associated documentation and associated
    metric for the number of requests that were limited for more information. Note
    that this may be temporary and not require any change, although if the issue continues
    you may need to request an increase for the mentioned quota.
  FurtherInformation:
  - https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html
  - https://docs.aws.amazon.com/iot-sitewise/latest/userguide/troubleshooting-gateway.html#gateway-issue-data-streams
  AssociatedMetrics:
  - Name: TotalErrorCount
    Description: The total number of errors of this type that occurred.
    Value: 327724.0
  AssociatedData:
  - Name: AggregatePropertyAliases
    Description: The aggregated property aliases of the throttled data.
    FileLocation: /greengrass/v2/work/aws.iot.SiteWiseEdgePublisher/./logs/data/AggregatePropertyAliases_1686346224654.log
```

## 授權
<a name="iotsitewise-publisher-component-licenses"></a>

<a name="component-core-software-license"></a>此元件根據 [Greengrass 核心軟體授權合約](https://greengrass-release-license.s3.us-west-2.amazonaws.com/greengrass-license-v1.pdf)發行。

## 變更記錄
<a name="iotsitewise-publisher-component-changelog"></a>

下表說明每個版本元件的變更。


|  **版本**  |  **變更**  | 
| --- | --- | 
| 4.1.4 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
| 4.1.3 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
| 4.1.2 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
| 4.1.1 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
| 4.1.0 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  4.0.3  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  4.0.2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  4.0.1  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  4.0.0  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  3.2.0  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  3.1.4  |   3.1.4 版已於 2025 年 2 月 20 日終止。此版本的改善功能可在此元件的較新版本中使用。  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  3.1.3  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  3.1.2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  3.1.1  |   3.1.1 版已於 2024 年 3 月 12 日終止。此版本的改善功能可在此元件的較新版本中使用。  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  3.1.0  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  3.0.0  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  2.4.1  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  2.4.0  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  2.3.3  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  2.3.2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  2.3.1  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  2.2.3  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  2.2.2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  2.2.1  |   此版本不支援 HTTP 代理組態。2.2.2 版和更新版本重新推出此功能的支援。  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  2.2.0  |   此版本不支援 HTTP 代理組態。2.2.2 版和更新版本重新推出此功能的支援。  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  2.1.4  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  2.1.3  |   此版本不再提供，但美國東部 （俄亥俄）、加拿大 （中部） 和 AWS GovCloud （美國東部） 區域除外。此元件版本需要執行 Java 版本 11 或更高版本。此版本的改善功能可在此元件的較新版本中使用。  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  2.1.2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  2.1.1  |  錯誤修正和改善。  | 
|  2.1.0  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/greengrass/v2/developerguide/iotsitewise-publisher-component.html)  | 
|  2.0.2  |  錯誤修正和改善。  | 
|  2.0.1  |  初始版本。  | 

## 另請參閱
<a name="iotsitewise-publisher-component-see-also"></a>
+ *AWS IoT SiteWise 《 使用者指南*》中的[什麼是 AWS IoT SiteWise？](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/what-is-sitewise.html)。