Control your AVM FritzBox Home devices over AWS Lambda by your own private developer skill.
The current version has a lot of restrictions and missing functionality, no Java SDK, etc.
There is no fritzbox internal OAuth and your connection data must be managed by a cloud OAuth service or additional hardware in your home network. Alternatives can be found here: https://www.eclipse.org/smarthome/
To run this fritzbox home skill you need to do two things. The first is to deploy the fritz-home-skill code in lambda, and the second is to configure your private Alexa skill to use Lambda.
- Go to the AWS Console and click on the Lambda link. Note: ensure you are in 'us-east' / 'irland' or you wont be able to use Alexa with Lambda.
- Click on the Create a Lambda Function or Get Started Now button.
- Skip the blueprint
- Name your Lambda Function - sample: "Fritz-Home-Skill".
- Select the runtime as Java 8
- Download the latest release jar package from (https://github.com/comtel2000/fritz-home-skill/releases).
- Select Code entry type as "Upload a .ZIP file" and then upload the 'fritz-home-skill-[VERSION]-jar-with-dependencies.jar' file from the build directory to Lambda
- Set the Handler as 'org.comtel2000.fritzhome.skill.FritzHomeSpeechletRequestStreamHandler' (this refers to the Lambda RequestStreamHandler file in the zip).
- Create a basic execution role and click create.
- Leave the Advanced settings as the defaults. Click Save (not Save and Test).
- Click "Next" and review the settings then click "Create Function"
- Click the "Event Sources" tab and select "Add event source"
- Set the Event Source type as Alexa Skills kit and Enable it now. Click Submit.
- Copy the ARN from the top right to be used later in the Alexa Skill Setup.
- Fill the environment variables with your application id (amzn1.sdk...) dyndns provider or myfritz.net url and create a Fritzbox user with the permission home automation.
- Go to the Alexa Console and click Add a New Skill.
- Create your language by select Add new Language (the current version only supports german)
- Set "FritzHome" as the skill name and "fritzbox" as the invocation name, this is what is used to activate your skill. For example you would say: "Alexa, ask fritzbox for device list."
- Select the Lambda ARN for the skill Endpoint and paste the ARN copied from above. Click Next.
- Copy the Intent Schema from the included IntentSchema.json.
- Add Custom Slot Type with name: 'DEVICE_NAMES' and copy the names from the included device_names.txt. Click Add.
- Copy the Utterances from the included Utterances.txt. Click Next.
- Go back to the skill Information tab and copy the appId. Paste the appId into the environment variable 'FRITZHOME_APPID', this step makes sure the lambda function only serves request from your private and authorized source.
- Enable your private test account and skip Publish stuff -> This skill is enabled for testing on your account
- The skill is now available as your own private skill, done.
User: "Alexa, frage Fritzbox nach der Temperatur im Büro."
Alexa: "Die Temperatur beträgt 22,3 Grad Celsius."
User: "Alexa, frage Fritzbox nach der Geräteliste."
Alexa: "Das Geräte xy ist eingeschaltet, die Temp..."
User: "Alexa, öffne Fritzbox und schalte Gerät Büro an."
Alexa: "Ok."
User: "Alexa, öffne Fritzbox und schalte Gruppe Außenbeleuchtung aus."
Alexa: "Ok."
User: "Alexa, frage Fritzbox nach dem Energieverbrauch von Flurlicht."
Alexa: "Der aktuelle Energieverbrauch von Flurlicht liegt bei 10 Watt."
Trademarks:
All trademarks and logos are the property of their respective owners.
This project is an unofficial pice of software and has nothing in common with the AVM FRITZ!Box (AVM Computersysteme Vertriebs GmbH).
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.