Last week I found a brilliant YouTube from Dabble Lab that explains how to use the CLI and how to get some Alexa templates to get started with your own skills development on Amazon. I have been battling with both the CLI and the IAM site for several months now. Today I have “User: arn:aws:iam::123456789123:user/debugUser is not authorized to perform: iam:CreateRole on resource: arn:aws:iam::012345678912:role/ask-lambda-basic-starter” when I try to deploy from CLI. At least can I see what user I am using. This will help a lot! I will now try to find CreateRole on IAM. The “helpful” 2017 AWS IAM setup videos are grossly out of date and I have been COMPLETELY CONFUSED by their tutorials. There are users, groups and roles to do my head in but I can’t find the required “CreateRole” mentioned in the message. There are heaps of others which are difficult to read in the drop-downs because the columns don’t expand. I added a group and a role but didn;t work so deleted.
Now I an trying this way which failed because you can’t create the create-role until you have one. Chicken or egg!
OK just watched ASK-CLI installation to see if I did that right. No clues there. Just another 2 hours wasted today.
I often follow enlightening code install pages only to find that perfectly good instructions have since been corroded: by time, removed URLs, version updates etc. I have spent many DAYS following such installations only to get to a “Gotcha” halt point. Continue reading Code Time Bombs
Wow I just installed Let’s Encrypt from my cPanel and magic! My site is HTTPS now. Three cheers for Open Source and it’s millions of programmers. I also contribute as a grain of sand to the Open Source beach from time to time.
Now… if only I can do it for my Raspberry Pi mosquito broker to satisfy Amazon and let Alexa at my home smarts!
What a wonderful device I purchased a couple of months ago, an Amazon Dot. But like a lot of women she can be quite frustrating to interface with! I am in New Zealand and followed the procedures outlined here for purchasing and here for setting up outside the US. Setting up is not trivial but when these instructions are followed you have a working Alexa on local time.
I recently purchased and erected a louvre roof from China which includes two controlled louvre areas and three curtains. All these are controlled by five 433MHz wireless controllers. Naturally, I would like Alexa to control these and I know she can. She needs a little help to talk to them but this is solved by Broadlink with their brilliant Smart Universal Remote Control. After getting one of these I was able to program all five louvre roof remotes (and my TV & sound system) into the Android IHC app and control them from my mobile phone. I can also set scenes where I can open or close all five with one command.
Alexa Mqtt Bridge
I also run a Raspberry Pi Zero W as an MQTT server/broker in my home and naturally I need to have Alexa talk to this in order to interface with my home IoT devices. I implemented this NPM module and can open and close garage doors with a command like “Alexa, Geoff garage on”. By using this magic module, Alexa thinks the bridged device is a light.
Node-RED Alexa Home Skill Bridge
I looked briefly at this solution but it requires registration with a third party service and I want to use my in-house server. See www.npmjs.com
Alexa talks to Broadlink – but not yet
Alexa talks to MQTT Broker – but not how I would like it
I knocked up this quick & dirty solution just before leaving my cat for a weekend away. Ashly (cat) is quite happy with us going away for a few days AFAIK but is now geriatric and on thyroid medication so I decided to address this. I needed a wooden box with a lid I could hinge so I used an old drawer I was throwing out. I sawed a couple of cuts in the back, drilled holes and used cut-off nails for hinge pins. I pulled out a 12V solenoid from my parts box and bent up a bracket to mount this on. I just used my bench power supply for a 12V supply. The flap is vertical so needed a spring to ensure it opened. Only trampoline springs in my spring box!! Ball point pen spring considered, finally remembered a couple of neodymium magnets I have so I mounted these with cable straps so they repelled each other and this works a treat! Finally, the brains; a Sonoff S20 WiFi wall socket with a timer setting on E-Welink on my phone to turn on the power supply at feed time and another a minute later to turn it off. Tested it through a cycle then loaded it with food and medication and shot off for a weekend family reunion. It was weighed down with a pot plant (anti-cat tamper) on an outside table in a covered veranda along side his bed and water. Ashly would be very aware of it because it had no baseboard and the wet food smell would be emanating.
I can actually control those wall switches from my mobile phone but had not previously tried that before so did it the timer way. Got home Sunday, bingo! Evidence of cat pig-out and most food gone.
My wife recently bought a Colloidal Silver Generator from Health House here in NZ. It is simple to use but requires some attention. We make 1 litre a time in a “quart” preserving jar. Basically our brew needs a get-going period followed by several electrode reversals. The electrodes are wiped clean with a paper towel between cycles. What a great opportunity for me to semi-automate this process! I chose an ESP8266 product and used a Wemos D1 Mini 4MB from Banggood. It grabs its power from the generator supply using a buck converter to give 5V supply. A dual relay board to switch the polarity of the electrodes. There is also a Buzzer Module an LED indicator and a push button. During operation status information is given.
short beep at 1 minute intervals – waiting for fizz
led flashes at 1 second intervals shows cycle number
short beep and led flash at 1 second intervals – clean electrodes then press button
led flash continuous 1 second ON and 1 second OFF when complete
I have been playing recently with an Emic–2 Text-to-Speech module. You can buy these from your favourite web store. My USB serial board was probably from AliExpress. Get one with the 3.3V/5V level selection switch for more versatility with different products you may wish to connect to. I use Windows 10 so I downloaded Termite, a simple free RS232 communications tool that enables me to send commands to the text-to-speech module via the USB UART board. Communication parameters are 9600,n,8,1. You need to power the Emic-2 module from a 5 Volt supply capable of half an Ampere because it idles at about 300 mA and peaks to about 500 mA when using a small speaker connected to the on-board amplifier..
The voice output lacks the quality of Siri, Alexa, Cortana or Google Assistant type products, but does a good job of converting text to speech on a self contained module with no computer assistance. Here is an English sample wav file.
I will connect it to my MQTT server via an Arduino Nano or Mini in a future project for making announcements when required from my smart-home project.
I am working on smart home projects for my house using ESP8266, nRF24L01, Raspberry Pi, Arduino, etc.! So far I have a working MQTT server and an ESP-01 attached to my panfan which gives me local weather stats and will start background audio/music/sea-sounds in adjacent rooms to eliminate embarrassment of the current bathroom user. I have a package due tomorrow from Adafruit to help with this. I also want it to let me know my upcoming appointments from Google Calendar.
My second MQTT device is a Wemos D1 Mini Pro board from Banggood that is (almost) controlling and monitoring my double door steel garage located apart from the house. WiFi is poor inside the garage so I will mount the electronics box on the inside of the steel panelling and use an external elbow rod antenna.
It will be configured to transfer real-time interrupt messages so that vehicles, people or stray animals may be identified. I have this triggered from a IR detector so the beam only activates (using power) when something is near. This saves heaps of 24/7 beam energy (45 mA).