Voice Control

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.

Moderator: leecollings

Dageezah
Posts: 8
Joined: Wednesday 06 November 2013 9:18
Target OS: Linux
Domoticz version:
Contact:

Voice Control

Post 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.
thebeetleuk
Posts: 115
Joined: Saturday 21 December 2013 23:50
Target OS: Linux
Domoticz version:
Location: Scotland
Contact:

Re: Voice Control

Post by thebeetleuk »

How did you set this up?
My Setup: Pi, RFXtrx433, HomeEasy: 13 Dimmers & 4 Sockets, 2 motion-sensors, 3 magnetic switches, 1 OWL Electricity Sensor, 3 Oregon Temp Sensor.
simonrg
Posts: 329
Joined: Tuesday 16 July 2013 22:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8807
Location: North East England
Contact:

Re: Voice Control

Post 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.
Raspberry Pi 2 B - 2A@5V PSU - Raspbian + Domoticz + RFXtrx(89), LightwaveRF House(dimmers, sockets, wireless/mood switches), Owl CM113, 4 LaCross Temp / Humidity Sensors, 4 Siemens PIR, Smappee, Solaredge, ESP8266
Dageezah
Posts: 8
Joined: Wednesday 06 November 2013 9:18
Target OS: Linux
Domoticz version:
Contact:

Re: Voice Control

Post 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.
simonrg
Posts: 329
Joined: Tuesday 16 July 2013 22:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8807
Location: North East England
Contact:

Re: Voice Control

Post 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?
Raspberry Pi 2 B - 2A@5V PSU - Raspbian + Domoticz + RFXtrx(89), LightwaveRF House(dimmers, sockets, wireless/mood switches), Owl CM113, 4 LaCross Temp / Humidity Sensors, 4 Siemens PIR, Smappee, Solaredge, ESP8266
Dageezah
Posts: 8
Joined: Wednesday 06 November 2013 9:18
Target OS: Linux
Domoticz version:
Contact:

Re: Voice Control

Post 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.
simonrg
Posts: 329
Joined: Tuesday 16 July 2013 22:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8807
Location: North East England
Contact:

Re: Voice Control

Post 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?
Raspberry Pi 2 B - 2A@5V PSU - Raspbian + Domoticz + RFXtrx(89), LightwaveRF House(dimmers, sockets, wireless/mood switches), Owl CM113, 4 LaCross Temp / Humidity Sensors, 4 Siemens PIR, Smappee, Solaredge, ESP8266
Dageezah
Posts: 8
Joined: Wednesday 06 November 2013 9:18
Target OS: Linux
Domoticz version:
Contact:

Re: Voice Control

Post 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.
Dageezah
Posts: 8
Joined: Wednesday 06 November 2013 9:18
Target OS: Linux
Domoticz version:
Contact:

Re: Voice Control

Post by Dageezah »

Oh sorry yep the server is running on my Mac in my house - it listens on specific ports for Siri.
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Voice Control

Post 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 )
fwehrle
Posts: 41
Joined: Tuesday 11 February 2014 18:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Voice Control

Post by fwehrle »

You can also do it with tasker and autovoice. But it's a bit less powerfull than SARAH.
pvm
Posts: 550
Joined: Tuesday 17 June 2014 22:14
Target OS: NAS (Synology & others)
Domoticz version: 4.10538
Location: NL
Contact:

Re: Voice Control

Post by pvm »

Too bad it is windows only
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
brian
Posts: 5
Joined: Saturday 04 April 2015 18:04
Target OS: Linux
Domoticz version: beta
Location: Italy
Contact:

Re: Voice Control

Post 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!
simonrg
Posts: 329
Joined: Tuesday 16 July 2013 22:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8807
Location: North East England
Contact:

Re: Voice Control

Post 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.
Raspberry Pi 2 B - 2A@5V PSU - Raspbian + Domoticz + RFXtrx(89), LightwaveRF House(dimmers, sockets, wireless/mood switches), Owl CM113, 4 LaCross Temp / Humidity Sensors, 4 Siemens PIR, Smappee, Solaredge, ESP8266
Dageezah
Posts: 8
Joined: Wednesday 06 November 2013 9:18
Target OS: Linux
Domoticz version:
Contact:

Re: Voice Control

Post 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
simonrg
Posts: 329
Joined: Tuesday 16 July 2013 22:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8807
Location: North East England
Contact:

Re: Voice Control

Post by simonrg »

Dageezah wrote: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
:lol: 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. :roll:

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. :o
Raspberry Pi 2 B - 2A@5V PSU - Raspbian + Domoticz + RFXtrx(89), LightwaveRF House(dimmers, sockets, wireless/mood switches), Owl CM113, 4 LaCross Temp / Humidity Sensors, 4 Siemens PIR, Smappee, Solaredge, ESP8266
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Voice Control

Post 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
pvm
Posts: 550
Joined: Tuesday 17 June 2014 22:14
Target OS: NAS (Synology & others)
Domoticz version: 4.10538
Location: NL
Contact:

Voice Control

Post by pvm »

The node.js has to run on a Mac? Can also run on pi?
I would really like Siri /homekit integration
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Voice Control

Post 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.
simonrg
Posts: 329
Joined: Tuesday 16 July 2013 22:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8807
Location: North East England
Contact:

Re: Voice Control

Post 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. :)
Raspberry Pi 2 B - 2A@5V PSU - Raspbian + Domoticz + RFXtrx(89), LightwaveRF House(dimmers, sockets, wireless/mood switches), Owl CM113, 4 LaCross Temp / Humidity Sensors, 4 Siemens PIR, Smappee, Solaredge, ESP8266
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest