Google Assistant -> Domoticz Using IFTTT

Client tools or tools that can connect with Domoticz. Tools for Windows, iOS, Android, Linux etc.

Moderator: leecollings

Post Reply
JoeBot
Posts: 3
Joined: Saturday 20 January 2018 21:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Google Assistant -> Domoticz Using IFTTT

Post by JoeBot »

Hi,

I just wanted to share my solution to Google Home/Assistant. The main reason for this is because:
  • I didn't want to open any ports on my router
  • I didn't want to use Ngrok or similar because that creates a publicly available URL (plus It costs to have a fixed URL)
  • I tried the Telegram solution, but I couldn't get it to startup automatically and no more development is being done
https://github.com/Joe-houghton/PushBulletDomoticz

There is Install instructions on the GitHub page.
Basically it uses PushBullet through IFTTT.

I will be updating the program with more functionality. Let me know if you have any issues or feature requests.

Enjoy,

Joe
EDsteve
Posts: 26
Joined: Thursday 13 October 2016 11:43
Target OS: Linux
Domoticz version:
Contact:

Re: Google Assistant -> Domoticz Using IFTTT

Post by EDsteve »

Thanks for that. Works like a charm.
Also very useful for people who only have a 3G/4G router which doesn't have port forwarding options. So now i can finally control my Home via email messages from outside.
blacksn0w
Posts: 99
Joined: Friday 10 March 2017 22:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Germany
Contact:

Re: Google Assistant -> Domoticz Using IFTTT

Post by blacksn0w »

Great solution, my feeling while sharing my credentials with a service like Controlicz were never good, since no one can guarantee me that there will no breach or loss of data in the Web Service.
Migration done, hello Home Assistant.
shaavik
Posts: 1
Joined: Wednesday 21 March 2018 21:24
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Google Assistant -> Domoticz Using IFTTT

Post by shaavik »

I have used the installation guide from the github on my Synology NAS, but I have the following error :
Traceback (most recent call last):
File "PBDomoticz.py", line 6, in <module>
from pushbullet import Listener
File "/usr/lib/python2.7/site-packages/pushbullet/__init__.py", line 2, in <module>
from .pushbullet import Pushbullet
File "/usr/lib/python2.7/site-packages/pushbullet/pushbullet.py", line 10, in <module>
from .filetype import get_file_type
File "/usr/lib/python2.7/site-packages/pushbullet/filetype.py", line 21, in <module>
import magic
File "/usr/lib/python2.7/site-packages/magic.py", line 155, in <module>
dll = ctypes.util.find_library('magic') or ctypes.util.find_library('magic1') or ctypes.util.find_library('cygmagic-1')
File "/usr/lib/python2.7/ctypes/util.py", line 242, in find_library
raise RuntimeError("can not find library %s" % name)
RuntimeError: can not find library magic

pip list :
certifi (2018.1.18)
chardet (3.0.4)
idna (2.6)
libmagic (1.0)
pip (9.0.2)
pushbullet.py (0.11.0)
python-magic (0.4.15)
requests (2.18.4)
setuptools (39.0.1)
six (1.11.0)
urllib3 (1.22)
websocket-client (0.47.0)
wheel (0.30.0)

What is wrong ? Does the package work on non windows OS ?
kevster
Posts: 26
Joined: Tuesday 06 December 2016 23:14
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: UK
Contact:

Re: Google Assistant -> Domoticz Using IFTTT

Post by kevster »

@JoeBot not working for me.

I have a couple of issues not working for me

1) I had to add 'from collections import namedtuple' to stop initial error

2) When I run the script I get:

got this far
got a pb instance

I then type the command:
#command Off 1233

Nothing happens.

Can you advise ?

Thanks
JoeBot
Posts: 3
Joined: Saturday 20 January 2018 21:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Google Assistant -> Domoticz Using IFTTT

Post by JoeBot »

Hi @kevsterd, I have also replied on GitHub to your question, but I will also put my reply here so that others can benefit from the conversation.

Thanks for your input. I think that I missed the namedtuple import when copying over to github (I do this manually so not to include my api key etc). Thanks for letting me know.

As for why it is not working -

I also noticed that there was an import missing (json). I have adding this now, try with the latest code.
1233 seems a very high number, are you sure that this is correct? Using the menu in the Domoticz web interface and select Setup -> Devices. Use the number that is in the Idx column.
JoeBot
Posts: 3
Joined: Saturday 20 January 2018 21:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Google Assistant -> Domoticz Using IFTTT

Post by JoeBot »

Ok, kevsterd's issue is sorted now.
There were two issues
1) The program only works when sent from IFTTT, you cannot manually type into the terminal to trigger events
2) There was an issue when no scenes were set up. I have fixed this now
kevster
Posts: 26
Joined: Tuesday 06 December 2016 23:14
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: UK
Contact:

Re: Google Assistant -> Domoticz Using IFTTT

Post by kevster »

@JoeBot

Yep thanks for your help and fixing the bugs. Working fine for me now. Now need to see what I can do with it !

As a side issue, can the results be piped back up the chain (domo > pushbullet > IFTTT > Google Home) as the results from a call.

I was thinking like 'OK Google, whats the temprature in greenhouse" ... ?
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: Google Assistant -> Domoticz Using IFTTT

Post by pvklink »

I use two raspberry 3b
One with the latest raspbian and domoticz
One with a working google home sdk so i can talk to my devices. I installed your py-file here.

Hi joe,

I also installed the py-file, python was allready in place with the latest raspbian.
when i start PBDomoticz.py, it seems to listen for pushes, but nothings happens when i make a IFTT cal to #command On 181
I dont see anything happens on the py service, no errors, nothing!
Do i have to set something in my firewall, routers, port forwarding?
Or can i check some file for errors?

Peter
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
manguty
Posts: 2
Joined: Wednesday 03 June 2015 7:22
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Contact:

Re: Google Assistant -> Domoticz Using IFTTT

Post by manguty »

Hi JoeBot,
I follow the isntructions, but I have the followin message when I run: "python /home/pi/scripts/PushBulletDomoticz/PBDomoticz.py"
The error message is:

"Traceback (most recent call last):
File "/home/pi/scripts/PushBulletDomoticz/PBDomoticz.py", line 7, in <module>
from pushbullet import Listener
ImportError: No module named pushbullet"

Can you guess where the error come from?
Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest