hsakoh / switchbot-mqtt

SwitchBot MQTT Home Assistant add-on
MIT License
45 stars 1 forks source link

switchbot-mqtt doesn't create entities #51

Open DirkHagedorn opened 1 week ago

DirkHagedorn commented 1 week ago

I've set up everything as explained in the documentation and switchbot-mqtt finds my devices (lock pro and keypad) but it doesn't create the entities. What am I missing?

Screenshot 2024-10-22 130359

Services are running:

Screenshot 2024-10-22 130542

Last protocol lines:

12:17:50 trce: SwitchBotMqttApp.Logics.SwitchBotApiClient[0] Send POST,webhook/updateWebhook,{"action":"updateWebhook","config":{"url":"https://fbd1-109-250-221-74.ngrok-free.app/webhook","enable":false}} 12:17:51 trce: SwitchBotMqttApp.Logics.SwitchBotApiClient[0] Response POST,https://api.switch-bot.com/v1.1/webhook/updateWebhook,{"statusCode":100,"body":{},"message":"success"} 12:17:51 trce: SwitchBotMqttApp.Logics.SwitchBotApiClient[0] Send POST,webhook/deleteWebhook,{"action":"deleteWebhook","url":"https://fbd1-109-250-221-74.ngrok-free.app/webhook"} 12:17:51 trce: SwitchBotMqttApp.Logics.SwitchBotApiClient[0] Response POST,https://api.switch-bot.com/v1.1/webhook/deleteWebhook,{"statusCode":100,"body":{},"message":"success"} 12:17:51 info: SwitchBotMqttApp.Services.WebhookService[0] stopped 12:17:53 info: Microsoft.Hosting.Lifetime[14] Now listening on: http://[::]:8098 12:17:53 info: Microsoft.Hosting.Lifetime[14] Now listening on: http://[::]:8099 12:17:53 dbug: SwitchBotMqttApp.Services.AutomatedHostedService[0] Application has started - will start services 12:17:53 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down. 12:17:53 info: Microsoft.Hosting.Lifetime[0] Hosting environment: Production 12:17:53 info: Microsoft.Hosting.Lifetime[0] Content root path: /app 12:17:53 info: SwitchBotMqttApp.Logics.DeviceConfigurationManager[0] device configuration file found. 2,0 12:17:53 trce: SwitchBotMqttApp.Logics.SwitchBotApiClient[0] Send GET,devices/EC0E535F4E56/status,(null) 12:17:53 trce: SwitchBotMqttApp.Logics.SwitchBotApiClient[0] Response GET,https://api.switch-bot.com/v1.1/devices/EC0E535F4E56/status,{"statusCode":100,"body":{"deviceId":"EC0E535F4E56","deviceType":"Keypad Touch","hubDeviceId":"C68F8C2A7A9B"},"message":"success"} 12:17:53 trce: SwitchBotMqttApp.Logics.SwitchBotApiClient[0] Send GET,devices,(null) 12:17:54 trce: SwitchBotMqttApp.Logics.SwitchBotApiClient[0] Response GET,https://api.switch-bot.com/v1.1/devices,{"statusCode":100,"body":{"deviceList":[{"deviceId":"C68F8C2A7A9B","deviceName":"Hub Mini","deviceType":"Hub Mini2","enableCloudService":true,"hubDeviceId":"000000000000"},{"deviceId":"EC0E535F4E56","deviceName":"Keypad","deviceType":"Keypad Touch","enableCloudService":true,"hubDeviceId":"C68F8C2A7A9B","lockDeviceId":"EDE8350B9912","keyList":[{"id":11,"name":"Code Dirk 1","type":"permanent","status":"normal","createTime":1727436697000,"password":"t9VEvBKVA56vbx5oY9jIPg==","iv":"7a1c1c005c5ff58167de00c19e52b2e5"},{"id":12,"name":"Code Miri 1","type":"permanent","status":"normal","createTime":1727529266000,"password":"CCX8oz8EpjW5PH2Q5wb2YA==","iv":"7a1c1c005c5ff58167de00c19e52b2e5"}]},{"deviceId":"EDE8350B9912","deviceName":"Wohnungstür","deviceType":"Smart Lock Pro","enableCloudService":true,"hubDeviceId":"C68F8C2A7A9B","group":false,"master":true,"lockDevicesIds":[]}],"infraredRemoteList":[]},"message":"success"} 12:17:54 trce: SwitchBotMqttApp.Logics.SwitchBotApiClient[0] Send GET,devices/EDE8350B9912/status,(null) 12:17:55 trce: SwitchBotMqttApp.Logics.SwitchBotApiClient[0] Response GET,https://api.switch-bot.com/v1.1/devices/EDE8350B9912/status,{"statusCode":100,"body":{"deviceId":"EDE8350B9912","deviceType":"Smart Lock Pro","hubDeviceId":"C68F8C2A7A9B","lockState":"latchBoltLocked","doorState":"closed","calibrate":true,"version":"V2.3","battery":100},"message":"success"} 12:17:55 trce: SwitchBotMqttApp.Logics.SwitchBotApiClient[0] Send GET,scenes,(null) 12:17:55 trce: SwitchBotMqttApp.Logics.SwitchBotApiClient[0] Response GET,https://api.switch-bot.com/v1.1/scenes,{"statusCode":100,"body":[],"message":"success"} 12:17:55 info: SwitchBotMqttApp.Services.MqttCoreService[0] started 12:17:55 info: SwitchBotMqttApp.Services.PollingService[0] started 12:17:55 info: FluffySpoon.Ngrok.NgrokProcess[0] Starting Ngrok process 12:17:55 info: FluffySpoon.Ngrok.NgrokApiClient[0] Creating tunnel SwitchBotMqttApp 12:17:55 info: FluffySpoon.Ngrok.NgrokApiClient[0] Creating tunnel SwitchBotMqttApp 12:17:55 info: FluffySpoon.Ngrok.NgrokApiClient[0] Tunnel FluffySpoon.Ngrok.Models.TunnelResponse created 12:17:55 trce: SwitchBotMqttApp.Logics.SwitchBotApiClient[0] Send POST,webhook/queryWebhook,{"action":"queryUrl"} 12:17:56 trce: SwitchBotMqttApp.Logics.SwitchBotApiClient[0] Response POST,https://api.switch-bot.com/v1.1/webhook/queryWebhook,{"statusCode":190,"body":{},"message":""} 12:17:56 trce: SwitchBotMqttApp.Logics.SwitchBotApiClient[0] Send POST,webhook/setupWebhook,{"action":"setupWebhook","url":"https://16e7-109-250-221-74.ngrok-free.app/webhook","deviceList":"ALL"} 12:17:56 trce: SwitchBotMqttApp.Logics.SwitchBotApiClient[0] Response POST,https://api.switch-bot.com/v1.1/webhook/setupWebhook,{"statusCode":100,"body":{},"message":"success"} 12:17:56 info: SwitchBotMqttApp.Services.WebhookService[0] start listen https://16e7-109-250-221-74.ngrok-free.app/webhook 12:18:04 info: SwitchBotMqttApp.Logics.DeviceConfigurationManager[0] device configuration file found. 2,0 12:18:52 info: SwitchBotMqttApp.Logics.DeviceConfigurationManager[0] device configuration file found. 2,0 13:06:24 info: SwitchBotMqttApp.Logics.DeviceConfigurationManager[0] device configuration file found. 2,0

Any idea?

Many thanks, Dirk

hsakoh commented 1 week ago
DirkHagedorn commented 1 week ago

I am so sorry that I probably haven't waited long enough and bothered you with this issue.

After, let it be an hour or two, I can now see all the new devices and entities.

Many thanks for the great work and this excellent enhancemant to my smart home.

Dirk