@folotoy/folotoy-openclaw-plugin 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/src/config.ts +1 -1
- package/src/index.ts +1 -0
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -31,7 +31,7 @@ export type FlatChannelConfig = {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export const DEFAULT_API_URL = 'https://api.folotoy.cn'
|
|
34
|
-
export const DEFAULT_MQTT_HOST = process.env.FOLOTOY_MQTT_HOST ?? '
|
|
34
|
+
export const DEFAULT_MQTT_HOST = process.env.FOLOTOY_MQTT_HOST ?? 'f.qrc92.cn'
|
|
35
35
|
export const DEFAULT_MQTT_PORT = 1883
|
|
36
36
|
|
|
37
37
|
export function flatToPluginConfig(flat: FlatChannelConfig): PluginConfig {
|
package/src/index.ts
CHANGED
|
@@ -81,6 +81,7 @@ const folotoyChannel: ChannelPlugin<FlatChannelConfig> = {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
const mqttConfig = flatToPluginConfig(account)
|
|
84
|
+
log?.info?.(`Connecting to MQTT broker ${mqttConfig.mqtt.host}:${mqttConfig.mqtt.port}...`)
|
|
84
85
|
const credentials = await resolveCredentials(mqttConfig)
|
|
85
86
|
const client = await createMqttClient(mqttConfig, credentials)
|
|
86
87
|
const inboundTopic = buildInboundTopic(credentials.toy_sn)
|