New 'StateReport' certified Alexa skill for Domoticz

Alexa, Google Home and Siri

Moderator: leecollings

Post Reply
User avatar
philchillbill
Posts: 399
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

New 'StateReport' certified Alexa skill for Domoticz

Post by philchillbill »

There's a new custom Alexa skill for Domoticz called StateReport. It's free :mrgreen: and you can find it at https://www.amazon.co.uk/dp/B095WXZ42B/ (it's also available from the .com, .ca and .com.au Amazon sites). It's only available in English for now but other locales may be added depending on popularity (the voice-model was manually created so will need specific translation for this).

StateReport facilitates querying the state of doors, windows, lights, appliances, meters/counters, thermostats and timers. It does that based on your room plan definitions.

A choice was made not to control or change anything in Domoticz via this skill, as that functionality is already adequately handled by both Controlicz and Alexicz under Amazon's Smart Home skill paradigm.

Most commands can be either generally or specifically applied, so you can ask "What windows are open?" for a list of all currently-open windows, or ask "Is the Bedroom Window open?" to narrow the search down.

Rather than just giving 1:1 representations of device states as answers (like a Smart Home skill does), StateReport aims to provide additional useful derived information for certain query categories:

* If a dimmable light is ON then its current dimming-percentage is mentioned.
* If an appliance (such as a washing machine) is ON then the LastUpdate timestamp is subtracted from the current server time to tell you how long the appliance has been on for.
* If a timer with random-switching is queried then the actual switching-time for today will be mentioned in the response.
* For Evohome thermostats, you will be told what zone(s) are calling for heat and what the current setpoint and actual temperatures are, together with the controller-mode and whether an until-time was specified for any overrides. That value is translated into a time-remaining calculation. The response will also mention the name and current temperature of both the coolest and warmest zones in your house.
* Meters are scanned to report the CounterToday values of each device. Normally used for meters/counters such as Gas, Water, Electricity.

Full instructions are at https://smartskills.tech/statereport/faq. The skill requires access to Domoticz from the cloud via https and a downloadable installer is available to automatically install and configure ngrok for you, including pushing new ngrok tunnel details to the skill when you reboot your server. If you already have a https URL for Domoticz because you have a reverse-proxy using nginx or Apache, this can be used instead.

The skill supports App-to-app account linking so it can be both enabled and linked with a single click from the setup instructions.

If your Echo has a screen, all commands will show APL feedback. The Help command will provide a list of example commands on-screen.

StateReport is free but the hosting still needs to be paid for so you are kindly encouraged to make a donation from the website. :D

Enjoy !
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
mdsflyer
Posts: 6
Joined: Saturday 04 September 2021 0:31
Target OS: Windows
Domoticz version:
Contact:

Re: New 'StateReport' certified Alexa skill for Domoticz

Post by mdsflyer »

Hi there, many thanks for this. Ive just downloaded it and installed. Would it be possible for the meters category to include the ability to state a percentage value. I have a water tank (we live in the countryside) which stores rainwater for our drinking water. It has an ultrasonic water level sensor which gives me a value as a percentage of how full the tank is. I've created a virtual dummy sensor in Domoticz which is listed as a general sensor which reads in percent. I've added it to a roomplan called "Meters" and currently when I ask Alexa for the Water Tank value she replies "Water Tank is reporting Unknown"

I'd be grateful if you could help me with this.
User avatar
philchillbill
Posts: 399
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: New 'StateReport' certified Alexa skill for Domoticz

Post by philchillbill »

mdsflyer wrote: Saturday 04 September 2021 0:39 Hi there, many thanks for this. Ive just downloaded it and installed. Would it be possible for the meters category to include the ability to state a percentage value. I have a water tank (we live in the countryside) which stores rainwater for our drinking water. It has an ultrasonic water level sensor which gives me a value as a percentage of how full the tank is. I've created a virtual dummy sensor in Domoticz which is listed as a general sensor which reads in percent. I've added it to a roomplan called "Meters" and currently when I ask Alexa for the Water Tank value she replies "Water Tank is reporting Unknown"

I'd be grateful if you could help me with this.
I've added a few debugging lines to the code so if you could try the command again I can see what's up.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
mdsflyer
Posts: 6
Joined: Saturday 04 September 2021 0:31
Target OS: Windows
Domoticz version:
Contact:

Re: New 'StateReport' certified Alexa skill for Domoticz

Post by mdsflyer »

Thanks for that, I added a dummy Gas Meter into Domoticz and that works correctly reporting the value as expected. I also added a dummy humidity sensor which also uses percentage. That results in an "Unknown" as well. I think that the meter category isnt able to express a value as a percentage as it is expecting a counter style value.
User avatar
philchillbill
Posts: 399
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: New 'StateReport' certified Alexa skill for Domoticz

Post by philchillbill »

mdsflyer wrote: Sunday 05 September 2021 0:53 Thanks for that, I added a dummy Gas Meter into Domoticz and that works correctly reporting the value as expected. I also added a dummy humidity sensor which also uses percentage. That results in an "Unknown" as well. I think that the meter category isnt able to express a value as a percentage as it is expecting a counter style value.
The interesting data to report on is in the JSON structure in one of the following parameters ['Status', 'CounterToday', 'Counter']. I just check on each of those in succession and if there's no match then 'Unknown' is the fallback. By changing this to ['Status', 'CounterToday', 'Counter', 'Data'] the percentages are reported as they are in the [Data] parameter within the object.

Give it a whirl now and you should be told the value.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
mdsflyer
Posts: 6
Joined: Saturday 04 September 2021 0:31
Target OS: Windows
Domoticz version:
Contact:

Re: New 'StateReport' certified Alexa skill for Domoticz

Post by mdsflyer »

Brilliant that fixed it, many thanks!! :-) This is a really useful feature for me, I've made a wee donation via the Smartskills website so you can have a beer on me.
User avatar
philchillbill
Posts: 399
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: New 'StateReport' certified Alexa skill for Domoticz

Post by philchillbill »

mdsflyer wrote: Monday 06 September 2021 0:33 Brilliant that fixed it, many thanks!! :-) This is a really useful feature for me, I've made a wee donation via the Smartskills website so you can have a beer on me.
Much appreciated :) Let me know if there are any other categories you'd like to see. I just made this based on what I do with Domoticz myself but I'll gladly extend with stuff that others need in their setup.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
mdsflyer
Posts: 6
Joined: Saturday 04 September 2021 0:31
Target OS: Windows
Domoticz version:
Contact:

Re: New 'StateReport' certified Alexa skill for Domoticz

Post by mdsflyer »

Many thanks I will do. I realised with the Echo I can setup a routine based on the phrase "What is the Water Tank Level" and then have that drive a customised action which is "Get the Water Tank level from state report". Although it seems minor I find it really useful as its more natural for me and certainly my wife to just ask Alexa for the water tank (or whatever device) level and not have to use the phrase "ask state report . . . . . . . .". I know its required with customised skills so not a criticism at all just a little work around I found that I thought might be of interest to others.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest