2021-11-12 07:00:02.527 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler@eeacfb': POST url 'https://alexa.amazon.com/api/tunein/queue-and-play?deviceSerialNumber=c57c1cf818834a34bd67dced232d8157&deviceType=A3C9PE6TNYLTCH&guideId=s258421&contentType=station&callSign=&mediaOwnerCustomerId=A38APXBDKA3JLQ' failed: Internal Server Error
When that url is placed in a browser, it returns:
<UnknownOperationException/>
This is after these events:
2021-11-12 07:00:01.385 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Echo_Group_Everywhere_RadioStationId' received command s258421
2021-11-12 07:00:01.391 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Echo_Group_Everywhere_Player' received command PLAY
2021-11-12 07:00:01.408 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Echo_Group_Everywhere_RadioStationId' predicted to become s258421
2021-11-12 07:00:01.416 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Echo_Group_Everywhere_Player' predicted to become PLAY
2021-11-12 07:00:01.431 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Echo_Group_Everywhere_RadioStationId' changed from to s258421
2021-11-12 07:00:01.431 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Echo_Group_Everywhere_Player' changed from PAUSE to PLAY
2021-11-12 07:00:06.170 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Echo_Group_Everywhere_RadioStationId' changed from s258421 to
2021-11-12 07:00:06.174 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Echo_Group_Everywhere_Player' changed from PLAY to PAUSE
My script (shown below) runs fine when I run it from the web interface:
val Number woyFall = 34 // Week of year school starts
val Number woySpring = 23 // Week of year school ends
val String BOB = "s35482"
val String FISH = "s28844"
val String KLOVE = "s33828"
val String CHRISTMAS = "s258421"
val String CHRISTIANROCK = "s18622"
rule "Start music in the morning"
when
Time cron "0 0 7 ? * MON-FRI"
then
var Calendar cal = Calendar.getInstance()
val Number woy = cal.get(Calendar.WEEK_OF_YEAR)
if (woy < woySpring || woy >= woyFall) {
var String station = FISH;
val Number currentMonth = now.getMonthValue
if (currentMonth >= 11)
station = CHRISTMAS
Echo_Group_Everywhere_RadioStationId.sendCommand(station)
Echo_Group_Everywhere_Player.sendCommand(PLAY)
GF_LivingRoom_Lamp.sendCommand(OFF)
GF_Office_EdsDeskLamp.sendCommand(ON)
GF_Bedroom_Light.sendCommand(ON)
}
end
No, nothing has changed. But Amazon has disabled that channel in the past (only for a few days, but…). It’s probably better to switch to textCommand with something like “Play Radio Foo on TuneIn”.
Spoke too soon. playMusicVoiceCommand works sporadically in spite of it being for amazon music and not tunein. startCommand (not textCommand which doesn’t exist) doesn’t work at all. I see the change in the log but it never does anything; verbally giving the command does.
2021-11-17 15:55:18.404 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Echo_Office_StartCommand' received command play k-love christmas radio on tunein radio
2021-11-17 15:55:18.408 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Echo_Office_StartCommand' predicted to become play k-love christmas radio on tunein radio
2021-11-17 15:55:18.424 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Echo_Office_StartCommand' changed from to play k-love christmas radio on tunein radio
2021-11-17 15:55:19.561 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Echo_Office_StartCommand' changed from play k-love christmas radio on tunein radio to
Things like things are really broken with the echo binding under 3.1. I’m hoping OH3.2 is released soon and that it fixes these issues. I wish amazon would stop breaking things for OH like this!
Unfortunately you didn’t answer my question: Is the thing UI configured ox textually configured? Did you upgrade from a previous version of openHAB and re-used the configuration?
It was configure via the UI a long time ago. This is an upgrade from OH2.5 to OH3.1 and the configuration was reused with the binding being reinstalled via the OH3 interface. Mind you, it stopped working under OH2.5 which is why I decided to upgrade to OH3.1 to see if it was fixed.
The channel is missing because unfortunately openHAB allows no updates to thing types. You have to delete and re-add the thing (you need to configure again, but if you keep the thingUID the same, I guess that al links stay in place).
The “channel stopped working” is unrelated to that and probably caused by Amazon.
FYI: the documentation doesn’t say anything about the necessity for redefining anything. The most it says is:
If the install of openHAB 3 detects an existing openHAB 2 install, then it will copy the configurations across and update using those files. There are several major differences between openHAB 2 and 3 which may mean that this will cause issues, let us know if you experience anything strange.
Why is this necessary? As a developer myself, I can’t imagine ever imposing this kind of burden on a user. If all goes well, it may only take 30 mins. However, if things end up being slightly different, I would then have hours of work redoing my entire system as it relates to echo. This kind of thing should at least be in the upgrade documentation as a very prominent warning. Had it been there, I may not have even bothered with an upgrade.