Page 1 of 2
Voice Control
Posted: Thursday 16 April 2015 23:22
by Dageezah
I have been wanting to develop some way of controlling my Domoticz via voice... I have tried several ways, Jasper, Google API, etc etc.. and finally I have a solution.
I am using Apple HomeKit, Home access server using Node.js (on Mac) and then just say "Hey Siri, turn on the living room lights"
It works well, but rather than waffling on for ages - if anyone wants to follow this solution I could help guide in the right direction to get it working for you.
Re: Voice Control
Posted: Thursday 16 April 2015 23:39
by thebeetleuk
How did you set this up?
Re: Voice Control
Posted: Thursday 16 April 2015 23:45
by simonrg
Certainly interesting so you don't need to buy anything Homekit compliant, you just join Homekit to Node-js on your Domoticz box and it talks to Domoticz.
Ideally, if you could write a wiki page to explain it that would be great, or point us at the relevant bits.
I just need to get my head around it, as this seems to effectively make everybody into a Homekit developer allowing you to connect anything to Homekit.
Re: Voice Control
Posted: Friday 17 April 2015 0:08
by Dageezah
Just a quick response, as I am off now - I can add more tomorrow.... I perhaps should have mentioned... you need an apple developer license.
The main work is done by
https://github.com/KhaosT/HAP-NodeJS
But then you need to create an app (easily based on the HomeKit demo on the apple developer site)
https://github.com/KhaosT/HomeKit-Demo
Once this is all set up you need to edit the accessorie.js files to either use the LightwaveRF wifi link...
Code: Select all
var execute = function(accessory,characteristic,value) {
var message;
if (value) {
message = new Buffer("139,!R1D1F1|Living Room lights|On\n");
} else {
message = new Buffer("140,!R1D1F0|Living Room lights|Off\n");
}
var client = dgram.createSocket("udp4");
client.send(message, 0, message.length, 9760, "192.168.0.10",
function(err, bytes) {
console.log(err);
client.close();
}
);
}
OR for Domoticz use the Node.js HTTP post function to the same link as when you click the switch button on the dashboard.
Re: Voice Control
Posted: Friday 17 April 2015 0:17
by simonrg
Thanks.
Does an Apple developer license cost?
Will every installation need to write an application or could somebody write an application which we could customise from a configuration file for our own set up?
Re: Voice Control
Posted: Friday 17 April 2015 0:32
by Dageezah
Unfortunately yes it costs £79 per year although you can use a simulator in Xcode to test everything. That or you could prob go down the jailbreak route.
As for configuration it's all done on the server, the app on the phone is very basic - shows a list of devices on the server then you add it with a PIN number.
Re: Voice Control
Posted: Friday 17 April 2015 0:45
by simonrg
Thanks.
Dageezah wrote:As for configuration it's all done on the server, the app on the phone is very basic - shows a list of devices on the server then you add it with a PIN number.
Which server? Your server or Apple's server?
If it's my / your server, then can't I just use your app and configure it to point to my server?
Re: Voice Control
Posted: Friday 17 April 2015 16:00
by Dageezah
To be honest I'm not sure - I would need to submit my app to the App Store - which you can bet it wouldn't get accepted as the HAP server isn't exactly legit by apples standards. I will take a look into it this weekend.
Re: Voice Control
Posted: Friday 17 April 2015 16:01
by Dageezah
Oh sorry yep the server is running on my Mac in my house - it listens on specific ports for Siri.
Re: Voice Control
Posted: Friday 17 April 2015 16:33
by Thomasdc
I don't own anything from Apple
I also am looking/ experimenting with voicecontrol
first I started with " S.A.R.A.H" (there is an domoticz plugin for it) this actually worked really well (English, i didnt get i to work in dutch, im not sure why not)
but now i saw something with 'VoxCommando" -- >
https://www.youtube.com/watch?v=ewCRJZKFW34#t=108
see also:
http://voxcommando.com/
and I started experimenting with this (this i did get to work in dutch also)
nice thing about voxCommando is the app for android/iphone so you can make any mobile device (ex. wall mounted tablet) a mic for your system (what seemed a bit complicated with S.A.R.A.H )
Re: Voice Control
Posted: Friday 17 April 2015 22:04
by fwehrle
You can also do it with tasker and autovoice. But it's a bit less powerfull than SARAH.
Re: Voice Control
Posted: Saturday 18 April 2015 11:26
by pvm
Too bad it is windows only
Re: Voice Control
Posted: Sunday 19 April 2015 11:47
by brian
Dageezah wrote:To be honest I'm not sure - I would need to submit my app to the App Store - which you can bet it wouldn't get accepted as the HAP server isn't exactly legit by apples standards. I will take a look into it this weekend.
Hi all, after spending a whole day searching, I just found the HomeKitDemo app on Cydia via this repo:
http://repo.peng-u-in.de/
Thanks @Dageezah, I can now turn on and off my lights in Domoticz via Hey Siri!
Re: Voice Control
Posted: Sunday 19 April 2015 13:44
by simonrg
I would like to link up telegram to voice recognition, the idea is you would send a voice message via telegram to your telegram client on your Domoticz Raspberry Pi, Domoticz would execute the command and then send written and audio confirmation of success.
I might actually get telegram to send back the recognised command, which is then only executed when you say "Make It So" or send a text message Yes back - this would avoid the wrong command being executed, but not require limiting commands just in case.
It looks like it is all quite possible with telgram
http://www.domoticz.com/wiki/Installing ... ion_System and something like Jasper
http://jasperproject.github.io/, just need the time to configure it all.
Re: Voice Control
Posted: Sunday 19 April 2015 21:01
by Dageezah
Fyi
http://www.sharecast.com/news/lightwave ... 47275.html looks like lightwaverf are going to implement Siri home kit - luckily for me most of my kit is lightwaverf so I may be ok
Re: Voice Control
Posted: Sunday 19 April 2015 22:24
by simonrg
Yes, but we are talking about LightWaveRF, the company that are very good at pre-announcing - new heating range announced in 2011 released in late 2014. A friend has now got the heating kit and it does what it says on the packet, but it was a long wait.
However, bearing in mind hackers have already pre-packaged this for a Raspberry Pi then it shouldn't really take too long, fingers crossed.
I have just got my LightwaveRF wifi link back after 2 years from a long term loan and so if it was possible now, I could also use it as a reverse interface into the rest of Domoticz, but sending RF codes from the wifi link to the RFXCOM. A few too many links in the chain but it could work.
Re: Voice Control
Posted: Monday 20 April 2015 18:59
by pepijn
Dageezah wrote:I have been wanting to develop some way of controlling my Domoticz via voice... I have tried several ways, Jasper, Google API, etc etc.. and finally I have a solution.
I am using Apple HomeKit, Home access server using Node.js (on Mac) and then just say "Hey Siri, turn on the living room lights"
It works well, but rather than waffling on for ages - if anyone wants to follow this solution I could help guide in the right direction to get it working for you.
It works fine, I already started this but never finished it. I implemented Siri on several other ways before. (Like using Googolplex) but the 'native' HomeKit way works really great. Specially now Siri understands Dutch.
I just need to find a way to generate the accessories js. Now I need to create them manually. Any suggestions are welcome!
Pepijn
Voice Control
Posted: Monday 20 April 2015 19:17
by pvm
The node.js has to run on a Mac? Can also run on pi?
I would really like Siri /homekit integration
Re: Voice Control
Posted: Monday 20 April 2015 19:59
by pepijn
pvm wrote:The node.js has to run on a Mac? Can also run on pi?
I would really like Siri /homekit integration
No it runs on any platform supporting nodejs. So yes it runs on a pi.
Re: Voice Control
Posted: Monday 20 April 2015 23:54
by simonrg
pepijn wrote:...... but the 'native' HomeKit way works really great. ......
Am I right that in order to use "the 'native' HomeKit way", I would need to either buy an Apple developer license and write my own app or Jailbreak my iPhone (which I can't do as other software I have to use won't run on a Jailbroken iPhone)?
It would be really nice if somebody could write a simple wiki page to summarise this thread at least as to what approaches there are and what is needed to do them, as some things are not so obvious to me, that no doubt are obvious to people who have already done them.