Closed Slaktmaskin closed 1 year ago
Looks like your RPi are too far away from the Plejd device(s) you have installed in your home. Could you verify that the RPi are able to reach them over BLE?
I moved the WPH-01 right next to the bluetooth device. Got some other error message. Gave up and now I'm trying to get the WPH-01 to work via the Plejd Gateway and HomeKit :P
Just for your info: Plejd's own integration with HomeKit does not (at least yet) support WPH-01 or any inputs on any Plejd devices. Plejd only support output actions from HomeKit.
Man, that kinda sucks. I'll try with with hassio-plejd some more.
I've tried to put the WPH-01 right next to Raspberry Pi 4, running Home Assistant 2023.8.1.
Still seems to be looping the bluetooth connection;
2023-08-24 16:21:51 INF [device-comm] Bluetooth reconnecting...
2023-08-24 16:21:53 ERR [plejd-ble] Discovery timeout elapsed, no devices found. Starting reconnect loop...
2023-08-24 16:21:53 INF [plejd-ble] Starting reconnect loop...
2023-08-24 16:21:56 INF [plejd-ble] Reconnecting BLE...
2023-08-24 16:21:56 INF [plejd-ble] init()
2023-08-24 16:22:01 ERR [plejd-ble] Failed to start discovery. Operation already in progress
DBusError: Operation already in progress
at _methodReturnHandlers.
I've user SSH and followed:
Get root console access, run "bluetoothctl" => "power off" => "power on" => "exit" => restart addon.
Any ideas? :)
It's that your only device? I'm not sure if only battery powered devices will work.
Look at the discussion at https://github.com/icanos/hassio-plejd/discussions/146
Hi!
I bought and installed a DIM-02. Plejd is recognizing is. I can control it with WPH-01.
Seems to still be looping:
2023-08-25 13:01:11 INF [device-comm] Bluetooth reconnecting...
2023-08-25 13:01:13 ERR [plejd-ble] Discovery timeout elapsed, no devices found. Starting reconnect loop...
2023-08-25 13:01:13 DBG [plejd-ble] Starting reconnect loop due to Discovery timeout elapsed
2023-08-25 13:01:13 INF [plejd-ble] Starting reconnect loop...
2023-08-25 13:01:13 DBG [plejd-ble] Reconnect already in progress. Skipping this call.
2023-08-25 13:01:16 INF [plejd-ble] Reconnecting BLE...
2023-08-25 13:01:16 INF [plejd-ble] init()
2023-08-25 13:01:16 DBG [plejd-ble] Found BLE interface 'org.bluez.Adapter1' at /org/bluez/hci0
2023-08-25 13:01:21 DBG [plejd-ble] Found Plejd service on /org/bluez/hci0/dev_D3_64_F9_0A_2B_82
2023-08-25 13:01:21 DBG [plejd-ble] initDiscoveredPlejdDevice(). Got /org/bluez/hci0/dev_D3_64_F9_0A_2B_82 device
2023-08-25 13:01:21 DBG [plejd-ble] Inspecting /org/bluez/hci0/dev_D3_64_F9_0A_2B_82
2023-08-25 13:01:21 ERR [plejd-ble] Failed to start discovery. Operation already in progress
DBusError: Operation already in progress
at _methodReturnHandlers.
I left it be for some while and it suddenly just worked 😁
I'm trying out an automation with these triggers:
What kind of more types can I use with the WPH-01? I tried button_long_press but it didn't seem to make any difference. Would be fantastic if I could cram more functions into these four buttons 😁
Great you got it working. And yes, the startup can require a couple of retries and then suddenly start working.
Regarding what buttons - enable debug or verbose logging of the addon and see in the addon log what is picked up. I think there are a couple of threads where we try to figure out what we can send to HA, but if you miss anything, please add information about what the addon picks up!
If I remember correctly from the main issue discussing this, you need to set each button to control something in the Plejd app, otherwise nothing will be broadcasted over BLE and nothing will be picked up by the addon.
Edit: The above may not be true for wireless buttons - maybe they always broadcast 😄
This is great!
I think his is the only log entry from the Plejd addon that is of interest:
2023-08-25 17:22:50 VRB [plejd-ble] A button (eg. WPH-01, WRT-01) 0 at BLE address 13 was pressed. Unique Id is F32067D3AC3B_I_0
It doesn't seem to make any difference if I hold the button for a long time or just push it fast.
Thanks alot for your help! This kind of unintentionally solved a really old issue I have been thinking about. I have two old dumb floor lamps that I've wanted to dim with HA. When you told me that WPH-01 doesn't work as stand alone I got myself a DIM-02 and connected the lamps. Works like a charm in HA.
Just need to figure out more what I can do with WPH-01 :)
Nice! Did you find the other issues thread regarding button presses? I'm reasonably sure some combination of settings in the Plejd app will broadcast different presses. Potentially short/long/double, not 100% sure. They may need to have different functions set in the Plejd app though.
The thread discussing different presses is here. https://github.com/icanos/hassio-plejd/issues/172 Closing this one as resolved.
Hi!
First time trying to get Hassio-Plejd to work. Bought myself a Plejd WPH-01. I've installed Hassio-Plejd and Mosquitto broker. I've tried to connect to MQTT with MQTT Explorer and it works.
The Plejd log:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 00-banner.sh: executing...
Add-on: Plejd Adds support for the Swedish home automation devices from Plejd.
Add-on version: 0.10.0 You are running the latest version of this add-on. parse error: Expected string key before ':' at line 1, column 4 [15:27:58] ERROR: Unknown HTTP error occured System: (aarch64 / raspberrypi4-64) Home Assistant Core: 2023.8.3 Home Assistant Supervisor: 2023.08.1
Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.
[cont-init.d] 00-banner.sh: exited 0. [cont-init.d] 01-log-level.sh: executing... [cont-init.d] 01-log-level.sh: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. [15:28:00] INFO: Starting the Plejd service... [15:28:00] INFO: Verified permissions on startup script [15:28:00] INFO: Executing startup script [15:28:00] INFO: Running add-on Config: { site: 'Hem', username: '---scrubbed---', password: '---scrubbed---', mqttBroker: 'mqtt://192.168.1.240', mqttUsername: 'mqtt-api-user', mqttPassword: '---scrubbed---', includeRoomsAsLights: false, preferCachedApiResponse: false, updatePlejdClock: false, logLevel: 'debug', connectionTimeout: 2, writeQueueWaitTime: 400 } 2023-08-23 15:28:01 DBG [plejd-main] Log level set to debug Starting Plejd addon and reading configuration... 2023-08-23 15:28:01 DBG [plejd-main] Log level set to debug 2023-08-23 15:28:01 INF [plejd-main] Plejd add-on, version 0.10.0 2023-08-23 15:28:01 INF [device-comm] Starting Plejd communication handler. 2023-08-23 15:28:01 INF [plejd-ble] Starting Plejd BLE Handler, resetting all device states. 2023-08-23 15:28:01 INF [plejd-main] Main Plejd addon init()... 2023-08-23 15:28:01 INF [plejd-api] init() 2023-08-23 15:28:01 INF [plejd-api] Getting cached api response from disk 2023-08-23 15:28:01 DBG [plejd-api] Prefer cache? false 2023-08-23 15:28:01 DBG [plejd-api] Cache exists? Yes, created 2023-08-23T13:26:14.612Z 2023-08-23 15:28:01 INF [plejd-api] login() 2023-08-23 15:28:01 INF [plejd-api] logging into Hem 2023-08-23 15:28:01 DBG [plejd-api] sending POST to https://cloud.plejd.com/parse/login 2023-08-23 15:28:01 INF [plejd-api] got session token response 2023-08-23 15:28:01 INF [plejd-api] Get all Plejd sites for account... 2023-08-23 15:28:01 DBG [plejd-api] sending POST to https://cloud.plejd.com/parse/functions/getSiteList 2023-08-23 15:28:02 INF [plejd-api] Got site list response with 3: Hem, , 2023-08-23 15:28:02 INF [plejd-api] Site found matching configuration name Hem 2023-08-23 15:28:02 INF [plejd-api] Get site details for c8a666ea-9222-4ede-8a3a-baeebe91e5ff... 2023-08-23 15:28:02 DBG [plejd-api] sending POST to https://cloud.plejd.com/parse/functions/getSiteById 2023-08-23 15:28:02 INF [plejd-api] got site details response 2023-08-23 15:28:02 INF [plejd-api] Site details for site id c8a666ea-9222-4ede-8a3a-baeebe91e5ff found 2023-08-23 15:28:02 INF [plejd-api] Saving cached copy 2023-08-23 15:28:02 INF [plejd-api] Getting devices from site details response... 2023-08-23 15:28:02 INF [plejd-api] No Plejd gateway found on site 2023-08-23 15:28:02 INF [plejd-mqtt] Initializing MQTT connection for Plejd addon 2023-08-23 15:28:02 INF [plejd-ble] init() 2023-08-23 15:28:02 DBG [plejd-ble] Found BLE interface 'org.bluez.Adapter1' at /org/bluez/hci1 2023-08-23 15:28:02 INF [plejd-mqtt] Connected to MQTT. 2023-08-23 15:28:03 INF [plejd-mqtt] Sending discovery for 0 Plejd output devices 2023-08-23 15:28:03 INF [plejd-mqtt] Sending discovery for 4 Plejd input devices 2023-08-23 15:28:03 DBG [plejd-mqtt] Sending discovery for Säng 2023-08-23 15:28:03 INF [plejd-mqtt] Discovered WPH-01 (device_automation) named Säng (11 : F32067D3AC3B_I_1). 2023-08-23 15:28:03 DBG [plejd-mqtt] Sending discovery for Säng 2023-08-23 15:28:03 INF [plejd-mqtt] Discovered WPH-01 (device_automation) named Säng (11 : F32067D3AC3B_I_2). 2023-08-23 15:28:03 DBG [plejd-mqtt] Sending discovery for Säng 2023-08-23 15:28:03 INF [plejd-mqtt] Discovered WPH-01 (device_automation) named Säng (11 : F32067D3AC3B_I_3). 2023-08-23 15:28:03 DBG [plejd-mqtt] Sending discovery for Säng 2023-08-23 15:28:03 INF [plejd-mqtt] Discovered WPH-01 (device_automation) named Säng (11 : F32067D3AC3B_I_0). 2023-08-23 15:28:03 INF [plejd-mqtt] Sending discovery for 0 Plejd scene devices 2023-08-23 15:28:08 INF [plejd-ble] BLE init done, waiting for devices. 2023-08-23 15:28:08 INF [plejd-main] Main init done 2023-08-23 15:28:08 INF [plejd-main] main() finished 2023-08-23 15:28:08 DBG [plejd-ble] Found Plejd service on /org/bluez/hci1/dev_E2_D5_E9_70_06_B3 2023-08-23 15:28:08 DBG [plejd-ble] initDiscoveredPlejdDevice(). Got /org/bluez/hci1/dev_E2_D5_E9_70_06_B3 device 2023-08-23 15:28:08 DBG [plejd-ble] Inspecting /org/bluez/hci1/dev_E2_D5_E9_70_06_B3 2023-08-23 15:28:08 WRN [plejd-ble] Device registry does not contain device with serial E2D5E97006B3 2023-08-23 15:28:10 ERR [plejd-ble] Discovery timeout elapsed, no devices found. Starting reconnect loop... 2023-08-23 15:28:10 DBG [plejd-ble] Starting reconnect loop due to Discovery timeout elapsed 2023-08-23 15:28:10 INF [plejd-ble] Starting reconnect loop... 2023-08-23 15:28:10 INF [device-comm] Bluetooth reconnecting... 2023-08-23 15:28:15 INF [plejd-ble] Reconnecting BLE... 2023-08-23 15:28:15 INF [plejd-ble] init() 2023-08-23 15:28:15 DBG [plejd-ble] Found BLE interface 'org.bluez.Adapter1' at /org/bluez/hci1 2023-08-23 15:28:20 ERR [plejd-ble] Failed to start discovery. Operation already in progress DBusError: Operation already in progress at _methodReturnHandlers. (/plejd/node_modules/dbus-next/lib/bus.js:343:27)
at handleMessage (/plejd/node_modules/dbus-next/lib/bus.js:101:11)
at EventEmitter. (/plejd/node_modules/dbus-next/lib/bus.js:151:9)
at EventEmitter.emit (events.js:314:20)
at /plejd/node_modules/dbus-next/lib/connection.js:116:14
at Socket. (/plejd/nodemodules/dbus-next/lib/message.js:63:9)
at Socket.emit (events.js:314:20)
at emitReadable (_stream_readable.js:557:12)
at processTicksAndRejections (internal/process/task_queues.js:83:21)
2023-08-23 15:28:20 INF [plejd-ble] If you continue to get "operation already in progress" error, you can try power cycling the bluetooth adapter. Get root console access, run "bluetoothctl" => "power off" => "power on" => "exit" => restart addon.
2023-08-23 15:28:20 WRN [plejd-ble] Failed reconnecting. Failed to start discovery. Make sure no other add-on is currently scanning.
Error: Failed to start discovery. Make sure no other add-on is currently scanning.
at PlejBLEHandler._startGetPlejdDevice (/plejd/PlejdBLEHandler.js:438:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
2023-08-23 15:28:20 INF [device-comm] Bluetooth reconnecting...
2023-08-23 15:28:22 ERR [plejd-ble] Discovery timeout elapsed, no devices found. Starting reconnect loop...
2023-08-23 15:28:22 DBG [plejd-ble] Starting reconnect loop due to Discovery timeout elapsed
2023-08-23 15:28:22 INF [plejd-ble] Starting reconnect loop...
2023-08-23 15:28:22 DBG [plejd-ble] Reconnect already in progress. Skipping this call.
2023-08-23 15:28:25 INF [plejd-ble] Reconnecting BLE...
2023-08-23 15:28:25 INF [plejd-ble] init()
2023-08-23 15:28:25 DBG [plejd-ble] Found BLE interface 'org.bluez.Adapter1' at /org/bluez/hci1
2023-08-23 15:28:30 ERR [plejd-ble] Failed to start discovery. Operation already in progress
DBusError: Operation already in progress
at _methodReturnHandlers. (/plejd/node_modules/dbus-next/lib/bus.js:343:27)
at handleMessage (/plejd/node_modules/dbus-next/lib/bus.js:101:11)
at EventEmitter. (/plejd/node_modules/dbus-next/lib/bus.js:151:9)
at EventEmitter.emit (events.js:314:20)
at /plejd/node_modules/dbus-next/lib/connection.js:116:14
at Socket. (/plejd/nodemodules/dbus-next/lib/message.js:63:9)
at Socket.emit (events.js:314:20)
at emitReadable (_stream_readable.js:557:12)
at processTicksAndRejections (internal/process/task_queues.js:83:21)
2023-08-23 15:28:30 INF [plejd-ble] If you continue to get "operation already in progress" error, you can try power cycling the bluetooth adapter. Get root console access, run "bluetoothctl" => "power off" => "power on" => "exit" => restart addon.
2023-08-23 15:28:30 WRN [plejd-ble] Failed reconnecting. Failed to start discovery. Make sure no other add-on is currently scanning.
Error: Failed to start discovery. Make sure no other add-on is currently scanning.
at PlejBLEHandler._startGetPlejdDevice (/plejd/PlejdBLEHandler.js:438:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
2023-08-23 15:28:30 INF [device-comm] Bluetooth reconnecting...
2023-08-23 15:28:32 ERR [plejd-ble] Discovery timeout elapsed, no devices found. Starting reconnect loop...
2023-08-23 15:28:32 DBG [plejd-ble] Starting reconnect loop due to Discovery timeout elapsed
2023-08-23 15:28:32 INF [plejd-ble] Starting reconnect loop...
2023-08-23 15:28:32 DBG [plejd-ble] Reconnect already in progress. Skipping this call.
2023-08-23 15:28:35 INF [plejd-ble] Reconnecting BLE...
2023-08-23 15:28:35 INF [plejd-ble] init()
2023-08-23 15:28:35 DBG [plejd-ble] Found BLE interface 'org.bluez.Adapter1' at /org/bluez/hci1
2023-08-23 15:28:40 ERR [plejd-ble] Failed to start discovery. Operation already in progress
DBusError: Operation already in progress
at _methodReturnHandlers. (/plejd/node_modules/dbus-next/lib/bus.js:343:27)
at handleMessage (/plejd/node_modules/dbus-next/lib/bus.js:101:11)
at EventEmitter. (/plejd/node_modules/dbus-next/lib/bus.js:151:9)
at EventEmitter.emit (events.js:314:20)
at /plejd/node_modules/dbus-next/lib/connection.js:116:14
at Socket. (/plejd/nodemodules/dbus-next/lib/message.js:63:9)
at Socket.emit (events.js:314:20)
at emitReadable (_stream_readable.js:557:12)
at processTicksAndRejections (internal/process/task_queues.js:83:21)
2023-08-23 15:28:40 INF [plejd-ble] If you continue to get "operation already in progress" error, you can try power cycling the bluetooth adapter. Get root console access, run "bluetoothctl" => "power off" => "power on" => "exit" => restart addon.
2023-08-23 15:28:40 WRN [plejd-ble] Failed reconnecting. Failed to start discovery. Make sure no other add-on is currently scanning.
Error: Failed to start discovery. Make sure no other add-on is currently scanning.
at PlejBLEHandler._startGetPlejdDevice (/plejd/PlejdBLEHandler.js:438:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
2023-08-23 15:28:40 INF [device-comm] Bluetooth reconnecting...
2023-08-23 15:28:42 ERR [plejd-ble] Discovery timeout elapsed, no devices found. Starting reconnect loop...
2023-08-23 15:28:42 DBG [plejd-ble] Starting reconnect loop due to Discovery timeout elapsed
2023-08-23 15:28:42 INF [plejd-ble] Starting reconnect loop...
2023-08-23 15:28:42 DBG [plejd-ble] Reconnect already in progress. Skipping this call.
2023-08-23 15:28:45 INF [plejd-ble] Reconnecting BLE...
2023-08-23 15:28:45 INF [plejd-ble] init()
2023-08-23 15:28:45 DBG [plejd-ble] Found BLE interface 'org.bluez.Adapter1' at /org/bluez/hci1
2023-08-23 15:28:51 ERR [plejd-ble] Failed to start discovery. Operation already in progress
DBusError: Operation already in progress
at _methodReturnHandlers. (/plejd/node_modules/dbus-next/lib/bus.js:343:27)
at handleMessage (/plejd/node_modules/dbus-next/lib/bus.js:101:11)
at EventEmitter. (/plejd/node_modules/dbus-next/lib/bus.js:151:9)
at EventEmitter.emit (events.js:314:20)
at /plejd/node_modules/dbus-next/lib/connection.js:116:14
at Socket. (/plejd/nodemodules/dbus-next/lib/message.js:63:9)
at Socket.emit (events.js:314:20)
at emitReadable (_stream_readable.js:557:12)
at processTicksAndRejections (internal/process/task_queues.js:83:21)
2023-08-23 15:28:51 INF [plejd-ble] If you continue to get "operation already in progress" error, you can try power cycling the bluetooth adapter. Get root console access, run "bluetoothctl" => "power off" => "power on" => "exit" => restart addon.
2023-08-23 15:28:51 WRN [plejd-ble] Failed reconnecting. Failed to start discovery. Make sure no other add-on is currently scanning.
Error: Failed to start discovery. Make sure no other add-on is currently scanning.
at PlejBLEHandler._startGetPlejdDevice (/plejd/PlejdBLEHandler.js:438:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
2023-08-23 15:28:51 INF [device-comm] Bluetooth reconnecting...
When trying to reload configuration after adding:
mqtt: broker: mqtt://192.168.1.240 username: password: discovery: true discovery: homeassistant birth_message: topic: 'hass/status' payload: 'online' will_message: topic: 'hass/status' payload: 'offline'
to configuration.yaml:
Cannot quick reload all YAML configurations because the configuration is not valid: Invalid config for [mqtt]: The 'birth_message' option near /config/configuration.yaml:25 has been removed, please remove it from your configuration @ data['mqtt'][0]. Got None. (See /config/configuration.yaml, line 25).