Speaking as someone who has been around the block with OpenHab, and I do have an Amazon developer account, your initial effort is a bit “bare bones”.
I think it’s a great start, and I’m glad that you made the effort. I was also looking to implement the same kind of thing (now that the Amazon Dots are really cheap -well except for here in Canada). That’s what led me to find your post.
What is really needed is a write up (with full code) of a working example.
That will encourage people to try it, then expand on it - and who knows where it will go from there.
The really cheap dots are an exciting development, and I think you could lead the way to a great implementation. There are other efforts, but they are very limited, or complex.
You don’t even need to POST to my.Openhab the way you describe (sorry I don’t like my.openhab), there are easier ways, but Amazons security is the usual stumbling block.
A full fledged example would be a great start. In the mean time I’ll try to figure this out myself - I program a lot in Python, and I’m not sure what you mean with “write your code here” (I mean I understand that you need to write methods handleDiscovery and handleControl with arguments context and event, then return Json header and payload), but what specifically these would look like, would help.
It looks like your using requests to POST/GET (which is what I do) is this Python 2.7 or 3.2? Can you GET the status of a switch/dimmer and have Alexa tell you what it is?
How do you identify the item? Believe me trying to differentiate between “light” and “lights” is not that simple, does Alexa handle that, or do we have to handle that?
Do you need one context per item? Group? Both? Is an event, a value, or on/off?, open/close? What’s the json look like? (I’ll go read the Amazon examples, which may make it clear), but a simple Openhab specific example would save people having to go to other places to get quick answers. You’ll lose them at that point.
Looking forward to your next post!