BobRak / OpenHAB-Smartthings

53 stars 54 forks source link

Can't discover anything #95

Closed vixez closed 3 years ago

vixez commented 3 years ago

Hey, I followed the instructions, but nothing is being discovered in PaperUI. When I restart OpenHAB I see this

2020-09-02 16:55:15.094 [DEBUG] [iscovery.SmartthingsDiscoveryService] - Discovery background scanning job started
2020-09-02 16:55:15.121 [DEBUG] [s.internal.SmartthingsHandlerFactory] - SmartthingsHandlerFactory created BridgeHandler for smartthings:smartthings

But nothing else, nothing happens when I try to discover device.

In Smartthings I saw this

[HTTP Bridge device handler installed. Listening on 192.168.1.122 + : + 39500]

Which I think comes from the SmartApp or handler.

When change the OpenHabAppV2 SmartApp devices in the classic Smartthings app, I see lines like

Subscribing inputHandler to device "[Cabinet Mood Light, Chimney Mood Light, Corner Couch, TV Standing Light Left, TV Standing Light Right]" with attribute "color"

So I guess the SmartApp itself works?

I have no idea why discovery is not working.

BobRak commented 3 years ago

@vixez Hi Glenn:

There are three likely reasons for this.

1) Smartthings Device Configuration The IP and port specified in the Device configuration in Smartthings is not correct. This is the most likely cause. Here are the instructions for that. If you are using the PaperUI you will have to go to Configuration -> Things -> Smartthings hub and then edit the configuration.

2) Bridge configuration Are you sure the ip and port in your bridge configuration is correct. Here are the instructions for that.

3) Missing configuration in Smartthings I don't think this is an issue for you based on your description but if the above items don't help then check this. Here are the instructions for that

Also Make sure you have set the IP addresses discussed above as fixed in your router.

Plan B If none of this help then try to configure one of your devices manually by creating Things, Items and Site map files.

Plan C If none of these help try going thought the installation instructions again and make sure nothing was missed.

Please let me know the outcome

vixez commented 3 years ago

@BobRak Hey, Sorry for the late reply.

I checked the IP addresses and ports and those should be correct. I assigned fixed IP's for the Smartthings hub and the OpenHAB server so that should not be an issue.

For the bridge configuration, is that something that can be done in PaperUI? I'm quite new to OpenHAB, and havent directly edited files yet (wouldn't know where to start).

This is the hub entry in my router:

Screenshot 2020-09-06 at 20 25 02

And the OpenHAB server:

Screenshot 2020-09-06 at 20 25 30

(I only show the first part of the MAC in the screenshots)

This is my Smartthings device:

Screenshot 2020-09-06 at 20 25 41

This is what the configuration in PaperUI looks like

Screenshot 2020-09-06 at 20 25 50
BobRak commented 3 years ago

Glenn:

Your setup looks good to me. I restarted my openhab server to see what messages I got and they look pretty similar to yours. Especially when I remove the messages that come from the config files being loaded.

Try this:

  1. log onto the smartthings ide and select Live Logging from the menu bar at the top. https://graph.api.smartthings.com/
  2. Using PaperUI: Select inbox. Is it empty? If so nothing has been discovered, At the bottom click SEARCH FOR THINGS. Then select Smartthings
  3. Then look at your Live Logging output. Here is what mine looks like:

Server: Jetty(9.4.20.v20190813), status:200]' 81e2ad40-7821-4328-9171-c6f613efe3e5 12:09:39 PM: debug Discovery is returning FINAL JSON: {"path":"/smartthings/discovery","body":["{\"capability\": \"battery\", \"attribute\": \"battery\", \"name\": \"Garage Door\", \"id\": \"fe147198-9c03-4c88-bb1d-b46749bf2fad\" }","{\"capability\": \"colorControl\", \"attribute\": \"hue\", \"name\": \"Sengled Bulb\", \"id\": \"e5878a31-3d0a-44e0-b61b-9c5c34075239\" }","{\"capability\": \"colorControl\", \"attribute\": \"saturation\", \"name\": \"Sengled Bulb\", \"id\": \"e5878a31-3d0a-44e0-b61b-9c5c34075239\" }","{\"capability\": \"colorControl\", \"attribute\": \"color\", \"name\": \"Sengled Bulb\", \"id\": \"e5878a31-3d0a-44e0-b61b-9c5c34075239\" }","{\"capability\": \"colorTemperature\", \"attribute\": \"colorTemperature\", \"name\": \"Sengled Bulb\", \"id\": \"e5878a31-3d0a-44e0-b61b-9c5c34075239\" }","{\"capability\": \"contactSensor\", \"attribute\": \"contact\", \"name\": \"Garage Door\", \"id\": \"fe147198-9c03-4c88-bb1d-b46749bf2fad\" }","{\"capability\": \"outlet\", \"attribute\": \"switch\", \"name\": \"Christmas Tree Ligh...[TRUNCATED] 81e2ad40-7821-4328-9171-c6f613efe3e5 12:09:39 PM: debug Discovery returned data for 19 devices. 6ea8cd77-60be-4480-b6d1-1a36fc38ac69 12:09:39 PM: debug Sending '{"path":"/smartthings/discovery","body":["{\"capability\": \"battery\", \"attribute\": \"battery\", \"name\": \"Garage Door\", \"id\": \"fe147198-9c03-4c88-bb1d-b46749bf2fad\" }","{\"capability\": \"colorControl\", \"attribute\": \"hue\", \"name\": \"Sengled Bulb\", \"id\": \"e5878a31-3d0a-44e0-b61b-9c5c34075239\" }","{\"capability\": \"colorControl\", \"attribute\": \"saturation\", \"name\": \"Sengled Bulb\", \"id\": \"e5878a31-3d0a-44e0-b61b-9c5c34075239\" }","{\"capability\": \"colorControl\", \"attribute\": \"color\", \"name\": \"Sengled Bulb\", \"id\": \"e5878a31-3d0a-44e0-b61b-9c5c34075239\" }","{\"capability\": \"colorTemperature\", \"attribute\": \"colorTemperature\", \"name\": \"Sengled Bulb\", \"id\": \"e5878a31-3d0a-44e0-b61b-9c5c34075239\" }","{\"capability\": \"contactSensor\", \"attribute\": \"contact\", \"name\": \"Garage Door\", \"id\": \"fe147198-9c03-4c88-bb1d-b46749bf2fad\" }","{\"capability\": \"outlet\", \"attribute\": \"switch\", \"name\": \"Christmas Tree Lights\", \"id\": \"8eba18b3-4...[TRUNCATED] 6ea8cd77-60be-4480-b6d1-1a36fc38ac69 12:09:39 PM: debug Creating event with message: [path:discovery] 6ea8cd77-60be-4480-b6d1-1a36fc38ac69 12:09:39 PM: debug Msg '[index:87, mac:DCA63245BEB2, headers:[post /discovery http/1.1:null, content-length:20, accept-encoding:gzip, host:192.168.87.37:39500, user-agent:Jetty/9.4.20.v20190813, content-type:application/json], body:{"discovery": "yes"}, header:POST /discovery HTTP/1.1 Accept-Encoding: gzip User-Agent: Jetty/9.4.20.v20190813 Content-Type: application/json Host: 192.168.87.37:39500 Content-Length: 20, data:[discovery:yes], json:[discovery:yes]]'

Let me know what you find

vixez commented 3 years ago

Hello,

I also restarted OpenHab, there don't seem to be any relevant logs in Smartthings after following your steps.

cd97b545-5ff9-4979-a2e7-54dd673140b0 20:53:11: debug Refreshing [st rattr 0x9496 0x01 0x0006 0x0000, delay 2000, st rattr 0x9496 0x01 0x0008 0x0000, delay 2000, st rattr 0x9496 0x01 0x0300 0x0003, delay 2000, st rattr 0x9496 0x01 0x0300 0x0004, delay 2000]
cd97b545-5ff9-4979-a2e7-54dd673140b0 20:53:11: debug healthPoll()
cc2e85ee-c6a8-413a-a2a5-1bbc2c4bfecd 20:52:07: debug Refreshing [st rattr 0xA936 0x01 0x0006 0x0000, delay 2000, st rattr 0xA936 0x01 0x0008 0x0000, delay 2000, st rattr 0xA936 0x01 0x0300 0x0003, delay 2000, st rattr 0xA936 0x01 0x0300 0x0004, delay 2000]
cc2e85ee-c6a8-413a-a2a5-1bbc2c4bfecd 20:52:07: debug healthPoll()
 20:51:12: info Waiting on events...
 20:51:12: info For past logs for individual things go to the My Devices section, find the device and click on the Events link on the device information page.
 20:51:12: info This console provides live logging of your SmartThings.

In OpenHab events.log I see only this

2020-09-07 20:52:28.159 [hingStatusInfoChangedEvent] - 'smartthings:smartthings:68235b26' changed from UNINITIALIZED to INITIALIZING
2020-09-07 20:52:28.161 [hingStatusInfoChangedEvent] - 'smartthings:smartthings:68235b26' changed from INITIALIZING to ONLINE

If I press a button on for example my Ikea remote I can see some logs in Smartthings

62ba3c80-828a-4aca-9abd-66b7611c6c4c 20:58:53: debug Forwarding device event to openhabDevice: {"path":"/smartthings/state","body":{"deviceDisplayName":"Mood Lights Button left button","value":"pushed","capabilityAttribute":"button"}}
c1a642c0-44b4-4515-9ed8-52fcc2760375 20:58:53: debug Sending '{"path":"/smartthings/state","body":{"deviceDisplayName":"Mood Lights Button left button","value":"pushed","capabilityAttribute":"button"}}' to 192.168.1.119:8080 with mac: B4:2E:99:84:3D:4D
62ba3c80-828a-4aca-9abd-66b7611c6c4c 20:58:53: debug Forwarding device event to openhabDevice: {"path":"/smartthings/state","body":{"deviceDisplayName":"Mood Lights Button","value":"pushed","capabilityAttribute":"button"}}
c1a642c0-44b4-4515-9ed8-52fcc2760375 20:58:53: debug Sending '{"path":"/smartthings/state","body":{"deviceDisplayName":"Mood Lights Button","value":"pushed","capabilityAttribute":"button"}}' to 192.168.1.119:8080 with mac: B4:2E:99:84:3D:4D

I tested the Smartthings hub and the port seems correct as well

Port Scan has started…

Port Scanning host: 192.168.1.122

     Open TCP Port:     39500
Port Scan has completed…

I tried some more, maybe this null is an issue?

62ba3c80-828a-4aca-9abd-66b7611c6c4c 21:32:36: debug Subscribing to event handler null
62ba3c80-828a-4aca-9abd-66b7611c6c4c 21:32:36: debug Subscribing inputHandler to device "[Chimney Mood Light, Corner Couch, Cabinet Mood Light, Cabinet LED strip, TV Standing Light Left, TV Standing Light Right]" with attribute "color"
62ba3c80-828a-4aca-9abd-66b7611c6c4c 21:32:36: debug Subscribing inputHandler to device "[Chimney Mood Light, Corner Couch, Cabinet Mood Light, Cabinet LED strip, TV Standing Light Left, TV Standing Light Right]" with attribute "saturation"
62ba3c80-828a-4aca-9abd-66b7611c6c4c 21:32:36: debug Subscribing inputHandler to device "[Chimney Mood Light, Corner Couch, Cabinet Mood Light, Cabinet LED strip, TV Standing Light Left, TV Standing Light Right]" with attribute "hue"
62ba3c80-828a-4aca-9abd-66b7611c6c4c 21:32:36: debug Subscribing inputHandler to device "[Mood Lights Button, Mood Lights Button bottom button, Mood Lights Button left button, Mood Lights Button middle button, Mood Lights Button right button, Mood Lights Button top button]" with attribute "button"
62ba3c80-828a-4aca-9abd-66b7611c6c4c 21:32:36: debug Updated with settings: [button:[Mood Lights Button, Mood Lights Button bottom button, Mood Lights Button left button, Mood Lights Button middle button, Mood Lights Button right button, Mood Lights Button top button], colorControl:[Chimney Mood Light, Corner Couch, Cabinet Mood Light, Cabinet LED strip, TV Standing Light Left, TV Standing Light Right], openhabDevice:OpenHabDevice]
BobRak commented 3 years ago

Glenn:

I'm sorry I don't have anything else to suggest. The only thing I can suggest is to go through the setup instructions again and double check everything.

Bob

vixez commented 3 years ago

Okay, maybe it has something to do with the hub being v3. I see other people have issues not discovering anything as well, like here.

BobRak commented 3 years ago

Where do you have openhab running? Is it a pc, raspberry pi or something else?

I am using a PC and have setup tools that allow me to send a discovery message to the hub and look at the response. The programs I use are called PortListener and curl. If you want to try that out I can send you instructions. That way we can see if the hub is responding and what it is sending back. If you want to try please find and install those tools.

Bob

vixez commented 3 years ago

It's a Windows PC. I can help if you want, so you can send me the instructions.

We can also chat via Discord or so, might go faster than waiting for responses here.

BobRak commented 3 years ago

Try this before we do anything else:

Using the Smartthings IDE: Click on "My Device Handlers" Click on "OpenHabDeviceHandler" About line 102 you should see: return createEvent(name: 'message', value: new JsonOutput().toJson(msg.data), isStateChange: true) //return createEvent(name: 'message', value: new JsonOutput().toJson(msg.data)) Switch the comment on the two lines. I.e. put // at the from of the first line and remove the // from the second line.

Does this help? If not I'll send you instructions. I'm going to be away tomorrow for 5 days.

Bob

vixez commented 3 years ago

I changed the return, but still no change.

BobRak commented 3 years ago

How many devices do you have and what types are they? I only need the ones you've configured in the Smart things app on your phone.

vixez commented 3 years ago

I have Ikea Trafdri bulbs (3), the Ikea 5 button remote and WLED lights on an ESP board (2). And Im planning on adding Zigbee RGB light drivers and a ZigLight.

BobRak commented 3 years ago

can you send me a screen shot of this page: https://graph.api.smartthings.com/device/list

I'll send the instructions when I get home.

BobRak commented 3 years ago

A lot or your devices have an attribute of button. When you configured them in the smartthings hub did they come up with button? All of my devices that can be turned on/off have an attribute of switch.

vixez commented 3 years ago
Screenshot 2020-09-12 at 12 07 25

I only have one button, Smartthings recognized it automatically as the 5 button Ikea remote.

BobRak commented 3 years ago

Smartthings Curl Setup Instructions
Bob Raker
September 14, 2020

These instruction cover the setup of tools to be able to send requests to the Smartthings hub and view the results. This isn't as easy as it might seem because Smartthings immediately responds to every request with an http-204. The actual results are sent by Smartthings in a separate message. Therefore one program is needed to send requests and another tool is needed to listen for and display the results. These instructions use curl for sending requests and PortListener for recieving the response. These instructions are specific to Windows.

Step 1 - Download and install
Download and install PortListener from rjlsoftware click here
Download and install curl from here

Step 2 - Create a record of your machine network information
First record the configuration of your PC. Usings a command prompt run ipconfig -all
Record your values in the table below. The Physical Address is the mac in the table

Record the existing values in your Smartthings Device settings
Logon the the Smartthings IDE click here
Select My Devices
Select your openhab device which is probably called OpenHabDevice
Record the preferences below.

Network Parameters Device ------ ip ------ ------ port ------ ------ mac ------
Existing OpenHabDevice settings
Your PC
New OpenHabDevice settings
Smartthings Hub

Step 3 - Update the Smartthings OpenHabDevice to point to your PC
In the Smartthings IDE change the Preferences as follows:

Step 4 - Start the port listener

Step 5 - Send a discovery request to the Smartthings hub

In the PortListener window you should see the discovery results.

Here is output from my hub:

[
   "{\"capability\": \"airConditionerMode\", \"attribute\": \"airConditionerMode\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }",
   "{\"capability\": \"dryerMode\", \"attribute\": \"dryerMode\", \"name\": \"Simulated Dryer\", \"id\": \"31b90e1b-1ed2-4d09-aa16-b95fd9d96139\" }",
   "{\"capability\": \"dryerOperatingState\", \"attribute\": \"machineState\", \"name\": \"Simulated Dryer\", \"id\": \"31b90e1b-1ed2-4d09-aa16-b95fd9d96139\" }",
   "{\"capability\": \"dryerOperatingState\", \"attribute\": \"dryerJobState\", \"name\": \"Simulated Dryer\", \"id\": \"31b90e1b-1ed2-4d09-aa16-b95fd9d96139\" }",
   "{\"capability\": \"lock\", \"attribute\": \"lock\", \"name\": \"Simulated Lock\", \"id\": \"5fec2472-38f2-474e-971c-434e3b4d1488\" }",
   "{\"capability\": \"switch\", \"attribute\": \"switch\", \"name\": \"Master Bedroom Lights\", \"id\": \"746da922-0351-4c5c-bad9-a0e27a7b2487\" }",
   "{\"capability\": \"switch\", \"attribute\": \"switch\", \"name\": \"Guest Bedroom Light\", \"id\": \"1ac2d431-fbb7-4315-b68a-2c90dac8473d\" }",
   "{\"capability\": \"switch\", \"attribute\": \"switch\", \"name\": \"Living Room Light\", \"id\": \"c684d874-3885-4b93-9a95-afe7455f6c2a\" }",
   "{\"capability\": \"switch\", \"attribute\": \"switch\", \"name\": \"Office Light\", \"id\": \"5fc65f46-c0ef-4439-b57d-563e46fddfcc\" }",
   "{\"capability\": \"switch\", \"attribute\": \"switch\", \"name\": \"Simulated Dryer\", \"id\": \"31b90e1b-1ed2-4d09-aa16-b95fd9d96139\" }",
   "{\"capability\": \"switchLevel\", \"attribute\": \"level\", \"name\": \"Sengled Bulb\", \"id\": \"e5878a31-3d0a-44e0-b61b-9c5c34075239\" }",
   "{\"capability\": \"temperatureMeasurement\", \"attribute\": \"temperature\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }",
   "{\"capability\": \"temperatureMeasurement\", \"attribute\": \"temperature\", \"name\": \"Garage Door\", \"id\": \"fe147198-9c03-4c88-bb1d-b46749bf2fad\" }",
   "{\"capability\": \"thermostat\", \"attribute\": \"temperature\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }",
   "{\"capability\": \"thermostat\", \"attribute\": \"heatingSetpoint\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }",
   "{\"capability\": \"thermostat\", \"attribute\": \"coolingSetpoint\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }",
   "{\"capability\": \"thermostat\", \"attribute\": \"thermostatSetpoint\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }",
   "{\"capability\": \"thermostat\", \"attribute\": \"thermostatMode\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }",
   "{\"capability\": \"thermostat\", \"attribute\": \"thermostatFanMode\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }",
   "{\"capability\": \"thermostat\", \"attribute\": \"thermostatOperatingState\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }",
   "{\"capability\": \"thermostatCoolingSetpoint\", \"attribute\": \"coolingSetpoint\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }",
   "{\"capability\": \"thermostatFanMode\", \"attribute\": \"thermostatFanMode\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }",
   "{\"capability\": \"thermostatHeatingSetpoint\", \"attribute\": \"heatingSetpoint\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }",
   "{\"capability\": \"thermostatMode\", \"attribute\": \"thermostatMode\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }",
   "{\"capability\": \"thermostatOperatingState\", \"attribute\": \"thermostatOperatingState\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }"
]
BobRak commented 3 years ago

If the above works you can also send requests for state data and even change the state of devices. Here are some samples

--- Ask for state 
curl -H "Content-Type: application/json" -H "192.168.87.37:39500" -d "{"capabilityKey": "switch", "deviceDisplayName": "Simulated Dryer", "capabilityAttribute": "switch"  }" http://192.168.87.37:39500/state

--- Update state 
curl -H "Content-Type: application/json" -H "192.168.87.37:39500" -d "{"capabilityKey": "switch", "deviceDisplayName": "Simulated Dryer", "capabilityAttribute": "switch", "value": "on"  }" http://192.168.87.37:39500/update
vixez commented 3 years ago
Device IP Port Mac
Existing OpenHabDevice settings 192.168.1.119 8080 B4:2E:99:xx:xx:xx
Your PC 192.168.1.119 B4-2E-99-xx-xx-xx
New OpenHabDevice settings 192.168.1.119 8089 B4:2E:99:xx:xx:xx
Smartthings Hub 192.168.1.122 39500 28-6D-97-xx-xx-xx

Curl discovery request:

  POST /smartthings/discovery HTTP/1.1
  Accept: */*
  User-Agent: Linux UPnP/1.0 SmartThings
  HOST: 192.168.1.119:8089
  Content-Type: application/json
  Content-Length: 3167

  ["{\"capability\": \"button\", \"attribute\": \"button\", \"name\": \"Mood Lights Button\", \"id\": \"b2e9cb7f-55da-40d3-8071-7
  0050edbfde2\" }","{\"capability\": \"button\", \"attribute\": \"button\", \"name\": \"Mood Lights Button bottom button\", \"id\
  ": \"32bc7e9f-3e5f-4200-b67a-9f9f0d6d9717\" }","{\"capability\": \"button\", \"attribute\": \"button\", \"name\": \"Mood Lights
   Button left button\", \"id\": \"8af68823-0733-4644-a01f-633d29909a6d\" }","{\"capability\": \"button\", \"attribute\": \"butto
  n\", \"name\": \"Mood Lights Button middle button\", \"id\": \"cda40293-7e22-416a-8952-b892e555e6e7\" }","{\"capability\": \"bu
  tton\", \"attribute\": \"button\", \"name\": \"Mood Lights Button right button\", \"id\": \"967d93b3-0784-42eb-b2ff-38b4d908966
  4\" }","{\"capability\": \"button\", \"attribute\": \"button\", \"name\": \"Mood Lights Button top button\", \"id\": \"fb4b504b
  -9177-46c8-9297-e3afc6b84c72\" }","{\"capability\": \"colorControl\", \"attribute\": \"hue\", \"name\": \"Chimney Mood Light\",
   \"id\": \"cd97b545-5ff9-4979-a2e7-54dd673140b0\" }","{\"capability\": \"colorControl\", \"attribute\": \"hue\", \"name\": \"Co
  rner Couch\", \"id\": \"cc2e85ee-c6a8-413a-a2a5-1bbc2c4bfecd\" }","{\"capability\": \"colorControl\", \"attribute\": \"hue\", \
  "name\": \"Cabinet Mood Light\", \"id\": \"1fa44b42-2207-45a9-928c-486547254957\" }","{\"capability\": \"colorControl\", \"attr
  ibute\": \"hue\", \"name\": \"TV Standing Light Left\", \"id\": \"c20fea9a-f03e-4039-a5c6-f27fabfa2c60\" }","{\"capability\": \
  "colorControl\", \"attribute\": \"hue\", \"name\": \"TV Standing Light Right\", \"id\": \"cf952af2-d3e0-483f-ac46-29130ac3a80e\
  " }","{\"capability\": \"colorControl\", \"attribute\": \"saturation\", \"name\": \"Chimney Mood Light\", \"id\": \"cd97b545-5f
  f9-4979-a2e7-54dd673140b0\" }","{\"capability\": \"colorControl\", \"attribute\": \"saturation\", \"name\": \"Corner Couch\", \
  "id\": \"cc2e85ee-c6a8-413a-a2a5-1bbc2c4bfecd\" }","{\"capability\": \"colorControl\", \"attribute\": \"saturation\", \"name\":
   \"Cabinet Mood Light\", \"id\": \"1fa44b42-2207-45a9-928c-486547254957\" }","{\"capability\": \"colorControl\", \"attribute\":
   \"saturation\", \"name\": \"TV Standing Light Left\", \"id\": \"c20fea9a-f03e-4039-a5c6-f27fabfa2c60\" }","{\"capability\": \"
  colorControl\", \"attribute\": \"saturation\", \"name\": \"TV Standing Light Right\", \"id\": \"cf952af2-d3e0-483f-ac46-29130ac
  3a80e\" }","{\"capability\": \"colorControl\", \"attribute\": \"color\", \"name\": \"Chimney Mood Light\", \"id\": \"cd97b545-5
  ff9-4979-a2e7-54dd673140b0\" }","{\"capability\": \"colorControl\", \"attribute\": \"color\", \"name\": \"Corner Couch\", \"id\
  ": \"cc2e85ee-c6a8-413a-a2a5-1bbc2c4bfecd\" }","{\"capability\": \"colorControl\", \"attribute\": \"color\", \"name\": \"Cabine
  t Mood Light\", \"id\": \"1fa44b42-2207-45a9-928c-486547254957\" }","{\"capability\": \"colorControl\", \"attribute\": \"color\
  ", \"name\": \"TV Standing Light Left\", \"id\": \"c20fea9a-f03e-4039-a5c6-f27fabfa2c60\" }","{\"capability\": \"colorControl\"
  , \"attribute\": \"color\", \"name\": \"TV Standing Light Right\", \"id\": \"cf952af2-d3e0-483f-ac46-29130ac3a80e\" }"]
Client disconnected

I'm trying to use curl -H "Content-Type: application/json" -H "192.168.1.122:39500" -d "{"capabilityKey": "switch", "deviceDisplayName": "Chimney Mood Light", "capabilityAttribute": "switch" }" http://192.168.1.122:39500/state

But it returns with

curl: (6) Could not resolve host: Mood
curl: (3) [globbing] unmatched close brace/bracket in column 37
BobRak commented 3 years ago

I think your request should look like:

curl -H "Content-Type: application/json" -H "192.168.1.122:39500" -d "{\"capabilityKey\": \"switch\", \"deviceDisplayName\": \"Chimney Mood Light\", \"capabilityAttribute\": \"switch\" }" http://192.168.1.122:39500/state

Curl on cygwin is actually much easier because you can use single quotes and the request would look like:

curl -H "Content-Type: application/json" -H "192.168.1.122:39500" -d '{"capabilityKey": "switch", "deviceDisplayName": "Chimney Mood Light", "capabilityAttribute": "switch" }' http://192.168.1.122:39500/state

But that doesn't work on windows.

It looks like the hub is working as expected. So the problem must be with the installation on your openHAB server. I don't think you ever answered my question about what your service platform is.

Do you have other bindings that are working?

If you don't find any issues with openHAB you might try reinstalling.

vixez commented 3 years ago

Okay, that doesn't throw an error. However it seems it is not doing anything either. Maybe the switch capability doesn't work? In the discovery it says colorControl for that device or is switch a capability for all devices?

I'm running openHAB 2.5.7 (Release Build) on Windows 10.

I have Ikea Tradfri, WLED and Zigbee bindings. These all work fine.

BobRak commented 3 years ago

I can assure you that switch works. Interesting that you don't have any devices that support the switch capability.