Just installed the Alexa skill and tagged a couple of devices using the REST API. Alexa discovered the devices I added fine. If I say “Alexa. Office light on”, she replies with “OK” and I get this in the log:
2020-05-05 11:53:38.071 [ome.event.ItemCommandEvent] - Item 'OfficeBulb' received command ON
2020-05-05 11:53:38.081 [vent.ItemStateChangedEvent] - OfficeBulb changed from 0 to 100
Likewise if I say “Alexa. Set office light 10%” after switching it on through HABPanel I get:
2020-05-05 11:59:51.718 [vent.ItemStateChangedEvent] - OfficeBulb changed from 100 to 10
But the light doesn’t actually do anything. The device it sees in the items in paperui looks like this:
Kind of stuck here now as I don’t know where to look next. Any ideas?
Yes, and I think that’s where the answer lies. So, when I switch it on from HABPanel I get this in the log:
2020-05-05 13:34:33.713 [ome.event.ItemCommandEvent] - Item 'OfficeLight' received command ON
2020-05-05 13:34:33.717 [nt.ItemStatePredictedEvent] - OfficeLight predicted to become ON
2020-05-05 13:34:33.730 [vent.ItemStateChangedEvent] - OfficeLight changed from 0 to 100
If I switch it on from Alexa I get this in the log:
2020-05-05 13:36:06.544 [ome.event.ItemCommandEvent] - Item 'OfficeBulb' received command ON
2020-05-05 13:36:06.551 [vent.ItemStateChangedEvent] - OfficeBulb changed from OFF to ON
Note “OfficeLight” vs “OfficeBulb” which I didn’t notice before. In the REST API docs, I can add a tag to OfficeBulb but I can’t to OfficeLight - it just comes up with an error 405 - not editable.
I think I’ve fixed it. I’m not entirely sure what I did but I created a new switch item called OfficeMain/Office Main New. Then I went into the Thing and created a new link from the level control channel to the Office Main New item. Used the OfficeMain item in the RESP API to add a tag. Alexa then picked up Office Main New and now controls it.
The only thing I would say is that it’s very slow. 12 seconds from Alexa saying “Ok” to the light actually switching off. I can live with that. Most of my stuff is on sensors. The only time we really use Alexa for device control is when we go to bed. There’s a good night routine that turns all the lights off and it works better with voice control as the time is so variable.
I gonna have to make a note of this or I’ll never manage it again!
12s sound quite slow. My ZWave devices switch off within max. 2-3s (usually after less than 1s) when I say “Alexa, good night”.
Can you also see the time delay within the logfiles? For further testing you could create an item within an items file that is linked to the same channel and try to command this item with alexa. Make sure you choose a different label for this item so that alexa knows exactly which item needs to be adressed.
I’m just in the process of adding some more devices. The particular bulb that I chose to experiment with is probably on the limits in terms of distance to the Pi with the zigbee stick. I can see the delay in the log where the command is sent, then 12s later the device says that it’s done what was asked of it.
Hopefully, moving a load more devices over from Smartthing will make my Zigbee network more robust!