Closed lolodomo closed 3 months ago
I added few logs to see what happens:
14:01:26.851 [INFO ] [os.internal.api.rest.WebSocketManager] - Connecting Websocket uri wss://mafreebox.freebox.fr:443/api/v10/ws/event 14:01:26.921 [INFO ] [os.internal.api.rest.WebSocketManager] - Websocket connection establisehd 14:01:26.929 [INFO ] [os.internal.api.rest.WebSocketManager] - onWebSocketText message {"action":"register","msg":"unsupported event vm_state_changed","success":false,"error_code":"inval"} 14:01:26.937 [INFO ] [os.internal.api.rest.WebSocketManager] - Socket Closed: [1000] - reason null
Probably because my server does not support VM. I can see that VM_CHANGED is registered here: https://github.com/openhab/openhab-addons/blob/main/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/api/rest/WebSocketManager.java#L62
Works if I remove VM_CHANGED. What would be the proper way to detect if VM is supported or not ?
I will retry registering without VM_CHANGED in case the first registering fails
I added few logs to see what happens:
Probably because my server does not support VM. I can see that VM_CHANGED is registered here: https://github.com/openhab/openhab-addons/blob/main/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/api/rest/WebSocketManager.java#L62