Hi there, I have re-used @btotharye 's fantastic homeassistant skill and created a new version to support fhem.de (FHEM is a GPL’d perl server for house automation which has a strong user-base in Germany).
This Skill should be regarded as “in development”, new functionality will be added soon. Testers and general feedback welcome…
How to install FHEM-SKILL
Install FHEM-SKILL by …
Before installation ensure you have python-dev package installed for your OS. For debian this would be apt-get install python-dev it is required for the levenstein package.
There have been some updates to the fhem-skill: besides the intents for turning on and off several entity types (light, switch, outlet), you now can also change the temperature (thermostat) and get status information (sensor, thermometer).
Use pypi-package “fhem” as new client-api (instead of my homegrown client)
This makes development much more comfortable, in addition the fhem-library has some interesting features like parsing fhem-events that may be useful in future releases of this skill
Improved device parsing with much better room detection
In my tests this had much better results than before, still there might glitches. Your feedback on this is highly welcomed.
When you already have the previous version installed a mycroft-msm update fhem-skill should get you the latest version.
In the Mycroft 2018 review the top 20 skills by number of invocation are listed. There is also a spreadsheet with all skills attached to the review where the fhem-skill is #42 of all ranked skills. I think that is not too bad considering that the fhem-skill was first published in second half of 2018 and the FHEM user base is rather low in the Mycroft community (comparing to other home automation systems like Homeassistant or OpenHab).
Thank you all for using my skill - I think its about time to move to the Mycroft Market now…
Hi Dominik,
I am not (yet) a FHEM user, so can only vaguely guess which type of data need to be given to Mycroft.
However, my guess is, there are privacy and security issues possible when handing the data over to home.mycroft.ai (or any other website for that matter).
Therefor, I recommend to offer an option where the needed data can be read from a local settings file on the Mycroft device. Same as has been implemented by Linuss for his email skill. I think that would increase your user base by those users which are more sensitive to privacy issues.
Would be glad, if you give that a thought and thus help to increase the security standard for mycroft skills. Thanks for listening.
I agree with your security and privacy concerns in general: Mycroft skills which require credentials for any public internet service should encrypt the credentials and even better have a option to store them only locally.
I did this for my Amazon music skill where you have to use the same credentials that you use for Amazon-shopping.
But for the FHEM-skill I don’t see that these concerns apply:
usually your FHEM server is not accessible from the internet
you do not need to protect your local FHEM-URL, but in case you do you should use a unique user/password scheme anyway
even if your data from home.mycroft.ai gets compromised the configuration data for FHEM is so specific no one can make any use of it - as long as you follow 1. and 2. above
In case you want to be super-safe you should take a look at the Mycroft personal backend - but it is still work in progress…
Thank you for the explanation.
As I said, I do not know enough about FHEM, so I will not continue the discussion with only theoretical concerns. But just for my own education:
Your skill does not require Mycroft to “go out” to the internet and access your FHEM controller from the outside? Does it send any commands to the home automation only within the local WLAN?
You set the Name/IP-Adress of your FHEM-Server in the skills configuration. If that is a address in your local network (usually that will be the case) the skill itself will not go “outside“.
Hey, super skill. I have many shutters that I control with Fhem would be possible with the command Open the Shutter or “set shutter to 60 Procent” to open the shutter. Or “are the shutters closed?” to call. I use KNX via module ROLLO.
Great proposal! My problem with implementation is that I don’t have any “smart shutters” that are controled by FHEM so I can not properly test such functionality.
Nevertheless I will put that feature on my list what to implement next.
Hi,
I was superhappy when I heard about this skill. I installed it immediately. Installation without problems - check, editing the FHEM global - check, setting generic device for my test device (homematic light switch) - check.
Then I testet Mycroft. Because Mycroft didn’t understand me well I was typing dirctly in the Mycroft CLI: if I typed something like “turn on Arbeitzimmer” Mycrofttold me - sorry, entity “Arbeitszimer” wasn’t found or Sorry I can’t find the fhem entity “Arbeitszimmer light” when typing turn on Arbeitszimmer light.
Did I miss something?
Thanks and regards,
TM
Hi Thorsten,
Welcome to the Mycroft forum and many thanks for trying out the FHEM-skill. The skill has some requirements to the configuration of your devices in FHEM:
device must be member in the “FHEM-Room” (that you specified in the skill settings at home.mycroft.ai)
device must have a attribute “genericDeviceType” with appropriate value set (e.g. “light” or “switch”)
When you don’t specify a room name the skill assumes that you want to control a device in the same room with the same name as the “placement” value set in the Mycrofts device location settings.
Hey, thaks for your response.
I solved it yesterday night …and it was neither the room nor the genericDevice.
Perhaps it helps someone else what was happening on my side:
I am using an extra fhemweb instance for internal uses where I don’t want the devices (external Buttons, Telephone-Buttons etc.) to use credentials. And because I didn’t want to enter credentials at the Mycroft FHEM Setup I wanted to use exactly that FHEMWEB. But that instance doesn’t have a CSRFTOKEN. So the skill ran into an error. Using the normal fhemweb immediately solves my problems.