CATT (Domoticz on your Google Nest Hub display)

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

Moderator: leecollings

User avatar
FireWizard
Posts: 1897
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

CATT (Domoticz on your Google Nest Hub display)

Post by FireWizard »

Hi all,

As already discussed at viewtopic.php?f=67&t=30312, I would like to share the way Domoticz can be displayed on the Google Nest Hub (formerly Google Home Hub).

It is not documented, but the Google Nest Hub display is able to present, beside other things, also webpages and so you can display your Domoticz webpage on the Google Nest Hub. It is valid for external and internal webpages, both http and https.

You need CATT (Cast All The Things)

Go to: https://github.com/skorokithakis/catt
and install catt with pip3 install cat.
It runs only on Python 3 and not on Python 2.

It is installed in ~/.local/bin.

Run it with: catt cast_site https://www.domoticz.com
or you local address of the Domoticz interface.

See:

IMG_20191223_124210022_small.jpg
IMG_20191223_124210022_small.jpg (49.21 KiB) Viewed 16431 times
IMG_20191223_125547489_small.jpg
IMG_20191223_125547489_small.jpg (45.95 KiB) Viewed 16431 times
IMG_20191223_125608359_small.jpg
IMG_20191223_125608359_small.jpg (54.1 KiB) Viewed 16431 times
Your touch screen works without any problem.

The next step will be to make it in such a way that I can say: "Hey Google" (or "OK Google") "Show me Domoticz".

Suggestions, ideas, solutions, comments are welcome.
Last edited by FireWizard on Monday 23 December 2019 16:18, edited 3 times in total.
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by EdwinK »

(hate to forum-spammers)

Found it, but.. how can you install catt on the nest hub? I don't think I can 't SSH in to it
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
FireWizard
Posts: 1897
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by FireWizard »

Hi

@EdwinK

Catt is not installed on the Nest Hub, so it does not void your guarantee.
You can install it on any computer, which has Python 3 and pip3 installed.

I installed it on my Raspberry Pi, where also Domoticz is running on (and several other scripts).

Regards
Last edited by FireWizard on Thursday 16 January 2020 14:54, edited 1 time in total.
User avatar
DewGew
Posts: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by DewGew »

If you have https://github.com/DewGew/Domoticz-Google-Assistant running you can also see your security cam on nest hub
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by EdwinK »

Okay, then I must have done something wrong, because I don't see anything happen.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
TiXav
Posts: 41
Joined: Saturday 28 November 2015 22:25
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: France
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by TiXav »

Hello,
me, I use CATT for 1 month to cast a little html page to chromecast plugged to the TV (the html page show the camera gate snapshots when someone touch the doorbell)
after installation
I setup the doorbell switch to start this script:

Code: Select all

#!/bin/bash
catt cast_site https://toto.titi.com/tx.php
sleep 60
catt stop
I hope CATT works with google home mini speaker to play the doorbell sound and a little alert sound when the washing machine is finished (for my wife :-))
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by EdwinK »

Mmm... it's casting to one of my chromecast devices instead of to the nest hub.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
FireWizard
Posts: 1897
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by FireWizard »

Hi,

If you own more than 1 Chromecast, you have to tell CATT to which device to cast. Did you create a config file? See: https://github.com/skorokithakis/catt.

I have my security camera's included in Domoticz and they are shown in Domoticz as well.

Regards
User avatar
DewGew
Posts: 581
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by DewGew »

EdwinK wrote: Monday 23 December 2019 22:31 Mmm... it's casting to one of my chromecast devices instead of to the nest hub.
You dont have to use catt. First configure dzga Stream camera to chromcast then Stream your security camera using Google Home Hub
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by EdwinK »

Ok, trying that tomorrow :)
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
FireWizard
Posts: 1897
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by FireWizard »

DewGew said the following:
You don't have to use catt.
I fully understand that DewGew promotes his solution. I have read it, and it depends on what you try to achieve, whether it is useful. It offers possibilities. Fortunately we have often more options to reach our goal.

I think catt is a very nice and simple solution to cast movies, pictures and, in our case, web pages to the Google Nest Hub.
It is simple to install (pip3 install cat) and you can run a web page with "catt cast_site https://www.website.com".
To cast these things to the Google Nest Hub is beyond Googles intentions, but works nice.

The disadvantage is that you have to send a command from the command line. That means that you have to open on another device a shell and type the command. This is not, what we want. Actually we want, that we say: "Hey (or OK) Google, Domoticz Dashboard on" and that then the Domoticz Dashboard page is shown. DewGew also suggested that your security camera's can be shown. But, if you can access your stream by your browser, you can cast your stream from the security camera to your Google Nest Hub.

My first idea was to create a virtual switch, which would activate a script and that would issue the cast command. At the same time, it would have been possible to activate that switch with a remote command from MQTT.
It did not work, because of the rights Domoticz scripts use. See: https://www.domoticz.com/forum/viewtopi ... 07#p231907

My Domoticz and catt run on a Raspberry Pi and the MQTT server and Node Red run on a different Pi. The challenge is to get a command from the second RPi, from Node Red (running NORA) to the first RPi, which has catt installed.

I found an excellent piece of software, which does exactly what I need and even more. It is a nice companion for Domoticz, Node Red and MQTT.
The program is called mqtt-launcher. It is created by J P Mens and it is available on github: https://github.com/jpmens/mqtt-launcher.

Install it on the same hardware as catt has been installed.
As catt installs in the directory ~/.local/bin, I decided to install it in ~/.local/mqtt-launcher.

Install it with: cd .local and git clone https://github.com/jpmens/mqtt-launcher.

As the display of the Google Nest Hub is only 7", the web page of Domoticz is not very big and it is not easy to tab the different pages.
(Or my fingers are too big :D ) I decided to make a voice command for each of the different pages. As I use the "Floorplans" on my "Dashboard", I have created 6 pages:
- Floorplans
- LightSwitches
- Scenes
- Temperature
- Weather
- Utility
- Dashboard (is optional as it is identical to Floorplans, but disabled in my flow)

As I own also 5 Camera's, with can be accessed by http://<IP Adress>/video.cgi, I have included these as well.

Configuration:

First you have to create a config file for mqtt-launcher. See the example launcher.conf.example file.
It is possible to insert the command directly in the conf file, but I had some difficulties in sorting out, what is the command and what are the arguments. To be more flexible and to be able to give multiple commands, I decided to use a script file. This makes it also possible to use some kind of logging.
So the launcher.conf points to a local script file, which contains the catt command.

Find below the launcher.conf file:

Code: Select all

logfile         = '/home/pi/mqtt_launcher.log'
mqtt_broker     = '192.168.xx.yy              # default: 'localhost'. If using TLS, this must be set to the domain name signed by your TLS certificate.
mqtt_port       = 1883                         # default: 1883
mqtt_clientid   = 'mqtt-launcher-1'
mqtt_username   = 'your name'
mqtt_password   = 'your password'
mqtt_tls        = None                         # default: No TLS

topiclist = {

    # topic                     payload value           program & arguments

    "domoticz/dashboard":       {
                                     'on'               :   [ '/home/pi/.local/domoticz_Dashboard2nest_hub.sh' ],
                                     'off'              :   [ '/home/pi/.local/domoticz2nest_hub_stop.sh' ],
                                },

    "domoticz/floorplans":      {
                                     'on'               :   [ '/home/pi/.local/domoticz_Floorplans2nest_hub.sh' ],
                                     'off'              :   [ '/home/pi/.local/domoticz2nest_hub_stop.sh' ],
                                },

    "domoticz/lightswitches":   {
                                     'on'               :   [ '/home/pi/.local/domoticz_LightSwitches2nest_hub.sh' ],
                                     'off'              :   [ '/home/pi/.local/domoticz2nest_hub_stop.sh' ],
                                },

    "domoticz/scenes":          {
                                     'on'               :   [ '/home/pi/.local/domoticz_Scenes2nest_hub.sh' ],
                                     'off'              :   [ '/home/pi/.local/domoticz2nest_hub_stop.sh' ],
                                },

    "domoticz/temperature":     {
                                     'on'               :   [ '/home/pi/.local/domoticz_Temperature2nest_hub.sh' ],
                                     'off'              :   [ '/home/pi/.local/domoticz2nest_hub_stop.sh' ],
                                },

    "domoticz/weather":         {
                                     'on'               :   [ '/home/pi/.local/domoticz_Weather2nest_hub.sh' ],
                                     'off'              :   [ '/home/pi/.local/domoticz2nest_hub_stop.sh' ],
                                },

    "domoticz/utility":         {
                                     'on'               :   [ '/home/pi/.local/domoticz_Utility2nest_hub.sh' ],
                                     'off'              :   [ '/home/pi/.local/domoticz2nest_hub_stop.sh' ],
                                },

    "camera/1":                 {
                                     'on'               :   [ '/home/pi/.local/camera1-nest_hub.sh' ],
                                     'off'              :   [ '/home/pi/.local/domoticz2nest_hub_stop.sh' ],
                                },

    "camera/2":                 {
                                     'on'               :   [ '/home/pi/.local/camera2-nest_hub.sh' ],
                                     'off'              :   [ '/home/pi/.local/domoticz2nest_hub_stop.sh' ],
                                }, 

    "camera/3":                 {
                                     'on'               :   [ '/home/pi/.local/camera3-nest_hub.sh' ],
                                     'off'              :   [ '/home/pi/.local/domoticz2nest_hub_stop.sh' ],
                                }, 

    "camera/4":                 {
                                     'on'               :   [ '/home/pi/.local/camera4-nest_hub.sh' ],
                                     'off'              :   [ '/home/pi/.local/domoticz2nest_hub_stop.sh' ],
                                }, 

    "camera/5":                 {
                                     'on'               :   [ '/home/pi/.local/camera5-nest_hub.sh' ],
                                     'off'              :   [ '/home/pi/.local/domoticz2nest_hub_stop.sh' ],
As you can see: I have created for each MQTT command a topic (e.g. domoticz/dashboard), a payload to activate the cast (on) and to deactivate the cast (off) and the script to execute (e.g. /home/pi/.local/domoticz_Dashboard2nest_hub.sh).

As an example find below the example of the domoticz_Dashboard2nest_hub.sh.

Code: Select all

#!/bin/sh
/home/pi/.local/bin/catt cast_site http://192.168.10.50:8080/#/Dashboard >/dev/null &
Create your files for all configured commands and make them executable: chmod +x <filename>.

Result:

Code: Select all

pi@RPi2:~/.local $ ls -l
total 72
drwxr-xr-x 2 pi pi 4096 Dec 27 19:56 bin
-rwxr-xr-x 1 pi pi   91 Dec 28 18:09 camera1-nest_hub.sh
-rwxr-xr-x 1 pi pi   91 Dec 28 18:11 camera2-nest_hub.sh
-rwxr-xr-x 1 pi pi   91 Dec 28 18:12 camera3-nest_hub.sh
-rwxr-xr-x 1 pi pi   91 Dec 28 18:12 camera4-nest_hub.sh
-rwxr-xr-x 1 pi pi   91 Dec 28 18:13 camera5-nest_hub.sh
-rwxr-xr-x 1 pi pi   56 Dec 27 18:33 domoticz2nest_hub_stop.sh
-rwxr-xr-x 1 pi pi   98 Jan  1 14:13 domoticz_Dashboard2nest_hub.sh
-rwxr-xr-x 1 pi pi   99 Dec 27 16:56 domoticz_Floorplans2nest_hub.sh
-rwxr-xr-x 1 pi pi  102 Dec 28 16:40 domoticz_LightSwitches2nest_hub.sh
-rwxr-xr-x 1 pi pi   95 Dec 27 18:38 domoticz_Scenes2nest_hub.sh
-rwxr-xr-x 1 pi pi  100 Dec 27 18:40 domoticz_Temperature2nest_hub.sh
-rwxr-xr-x 1 pi pi   96 Dec 27 18:41 domoticz_Utility2nest_hub.sh
-rwxr-xr-x 1 pi pi   96 Dec 27 18:43 domoticz_Weather2nest_hub.sh
drwxr-xr-x 4 pi pi 4096 Dec 23 12:22 etc
drwx------ 4 pi pi 4096 Sep  2 12:07 lib
drwxr-xr-x 3 pi pi 4096 Jan  4 21:46 mqtt-launcher
drwxr-xr-x 4 pi pi 4096 Dec 23 12:22 share
I created also a script to stop the casting: domoticz2nest_hub_stop.sh.
Contents:

Code: Select all

#!/bin/sh
/home/pi/.local/bin/catt stop  >/dev/null &
Run /home/pi/.local/mqtt-launcher/mqtt-launcher.py &
Test your commands to start the casting of your web pages.

If you are satisfied you may kill mqtt-launcher.py.
In order to start this python script also after a reboot you may want to run it as a service (daemon).
To do so, create a file mqtt-launcher.service, with the following contents:

Code: Select all

[Unit]
Description=MQTT launcher
After = network-online.target

[Service]
Type=simple
WorkingDirectory=/home/pi/.local/mqtt-launcher
ExecStart=/usr/bin/python /home/pi/.local/mqtt-launcher/mqtt-launcher.py
Restart=always
RestartSec=1
User=pi
Group=pi

[Install]
WantedBy=multi-user.target
Copy this file to: /etc/systemd/system as follows:
sudo cp /home/pi/.local/mqtt-launcher/mqtt-launcher.service /etc/systemd/system
sudo systemctl start mqtt-launcher
If everything works fine you can enable it: sudo systemctl enable mqtt-launcher
You can stop the service with sudo systemctl stop mqtt-launcher and disable it with sudo systemctl disable mqtt-launcher

If you have created the script files, made them executable and configured your launcher.conf file, you are able to publish the correct payload (on) to the correct topic and your casting of the web page will start. Stop the casting by publishing the correct payload (off) to the topic.

In a next post I will explain the Node Red flow to control the Google Nest Hub.
Last edited by FireWizard on Thursday 16 January 2020 15:02, edited 1 time in total.
User avatar
FireWizard
Posts: 1897
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by FireWizard »

Please find below the Node Red flow to activate the casting of the various web pages and security camera's.

Screenshot_NR-Google Nest Hub1.png
Screenshot_NR-Google Nest Hub1.png (158.06 KiB) Viewed 16067 times

I have tested both Nora Switch node and the Nora Scene node.
As I wanted a test possibility. I decided to use the Nora Switch node, in order to start the casting and to terminate the casting of the various web pages.

As I use the "Floorplans" on my Dashboard, I currently do not use the "Dashboard". As you can see, it is present in the flow, but disabled.
All "Inject" nodes at the left are optional and used only for testing the casting of the various web pages and camera streams to the Google Nest Hub.

Please find below an example of the configuration of the "Inject" node for Floorplan (Plattegrond) On.


Screenshot_NR-Google Nest Hub2.png
Screenshot_NR-Google Nest Hub2.png (22.7 KiB) Viewed 16067 times

Select for "Payload" a string and insert the value, you have used in your mqtt-launcher configuration. In my case: "on".
The "Topic" should match the topic, as configured in the mqtt-launcher configuration(domoticz/floorplans)
The "Name" is up to the user.

The configuration for Floorplan (Plattegrond) Off is similar.


Screenshot_NR-Google Nest Hub3.png
Screenshot_NR-Google Nest Hub3.png (22.65 KiB) Viewed 16067 times

Will be continued in the next post.
Last edited by FireWizard on Thursday 16 January 2020 15:04, edited 2 times in total.
User avatar
FireWizard
Posts: 1897
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by FireWizard »

The next node to configure is the Nora Switch node.

Screenshot_NR-Google Nest Hub4.png
Screenshot_NR-Google Nest Hub4.png (24.91 KiB) Viewed 16062 times

The "Config" is a "one time event" and described in: https://flows.nodered.org/node/node-red-contrib-nora, but probably already configured.
The "Switch" is important and in fact it determines, how you call up the web page.
The "On Payload" and "Off Payload" should match the payloads, as configured in the mqtt-launcher configuration. In my case 'on" and "off".
The "Room Hint" is a little bit tricky, as the word "Hint" assumes, it is just text. However this Room Hint is used to group all devices in a single room.
You might want to use the room, where your Google Nest Hub is situated, e.g. Living Room. In this case, if you call "Hey" or "OK Google, Switch on all lights in the Living Room" it will, besides your lights, also cast all web pages of Domoticz to your Google Nest Hub. (Remember, we configured "Switches").
So I selected a non-existing room, "Domoticz".
The "Topic" is here mandatory and should match the topic, as configured in the mqtt-launcher configuration.
The "Name" of the node is up to the user.

In order to be able to inject a test payload (on or off), by means of the inject node, tick the box after "If msg arrives on input, pass through to output".

The next and last node is a MQTT output node to MQTT Launcher.

Screenshot_NR-Google Nest Hub5.png
Screenshot_NR-Google Nest Hub5.png (19.83 KiB) Viewed 16062 times
The "Server" is the name of your MQTT server and probably already configured.
The "Topic" should be empty, because the "Topic" has already been configured in the previous Nora Switch node.
The "Name" of the node is up to the user.

In this way you can talk to your Google Nest Hub and the different web pages are shown. The same with the stream of your camera's.

I'm open for comments, questions, suggestions and all other idea's.

Best Regards
karlzre
Posts: 26
Joined: Sunday 06 August 2017 18:48
Target OS: -
Domoticz version:
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by karlzre »

I can open domoticz on my Nest hub with voice using IFTTT webhook.
Just create a switch to execute the script.
User avatar
FireWizard
Posts: 1897
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by FireWizard »

Hi karlzre,

You wrote:
Just create a switch to execute the script.
I assume, that you have created a virtual switch in Domoticz, which should activate the script.
Did you manage to get around the problem with the rights of the script?

See: https://www.domoticz.com/forum/viewtopi ... 07#p231907

Regards
jeroenkl
Posts: 113
Joined: Sunday 14 July 2013 22:00
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: NL
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by jeroenkl »

karlzre wrote: Wednesday 08 January 2020 16:52 I can open domoticz on my Nest hub with voice using IFTTT webhook.
Just create a switch to execute the script.
How did you manage to get the script working?
User avatar
FireWizard
Posts: 1897
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by FireWizard »

Hi,

@jeroenkl

If you create a virtual sensor in Domoticz, controlled by an IFTTT Webhook, you can activate a script.
This script is relative simple, but it will run as root and not as the pi user.
See this post: https://www.domoticz.com/forum/viewtopi ... 07#p231907

Another disadvantage is that you have to open the Domoticz port to the Internet.
Domoticz has to be username/password protected.

Perhaps another solution will suit you better.

If you have Node Red installed, you can install a node, called webhookrelay.
In this case you don't have to open Domoticz or Node Red to the Internet.
From there you can use NR to execute the script or use MQTT.

See: https://flows.nodered.org/node/node-red ... bhookrelay.

I tested it successfully with 3 applets.

Regards
jeroenkl
Posts: 113
Joined: Sunday 14 July 2013 22:00
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: NL
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by jeroenkl »

FireWizard wrote: Friday 07 February 2020 18:53 Hi,

@jeroenkl

If you create a virtual sensor in Domoticz, controlled by an IFTTT Webhook, you can activate a script.
This script is relative simple, but it will run as root and not as the pi user.
See this post: https://www.domoticz.com/forum/viewtopi ... 07#p231907

Another disadvantage is that you have to open the Domoticz port to the Internet.
Domoticz has to be username/password protected.

Perhaps another solution will suit you better.

If you have Node Red installed, you can install a node, called webhookrelay.
In this case you don't have to open Domoticz or Node Red to the Internet.
From there you can use NR to execute the script or use MQTT.

See: https://flows.nodered.org/node/node-red ... bhookrelay.

I tested it successfully with 3 applets.

Regards
thxs!
wervisser
Posts: 29
Joined: Monday 28 November 2016 18:38
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by wervisser »

Did someone happen to come across the error message below?

Code: Select all

pi@raspberrypi:~ $ /usr/bin/python /home/pi/.local/mqtt-launcher/mqtt-launcher.py
Traceback (most recent call last):
  File "/home/pi/.local/mqtt-launcher/mqtt-launcher.py", line 37, in <module>
    import paho.mqtt.client as paho   # pip install paho-mqtt
ImportError: No module named paho.mqtt.client
If I start Python3.7 separately I can import paho, but not through the script. I have already adjusted the PATH variables to be able to access Python3.7, but that makes no difference. I also executed the command as '/usr/bin/python3.7' (which allows me to import paho manually), but that makes no difference.

Google does give some results, but I think I've already tried all of them. Any tips?
Last edited by wervisser on Friday 15 May 2020 22:57, edited 1 time in total.
User avatar
FireWizard
Posts: 1897
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: CATT (Domoticz on your Google Nest Hub display)

Post by FireWizard »

Hi,

@wervisser

1. Please use English as language on this forum, but you are lucky that many members are quite good in Dutch :)

2. The answer is in the error message.

Run:

Code: Select all

pip install paho-mqtt
Unfortunately mqtt-launcher is still Python 2
https://github.com/jpmens/mqtt-launcher

Regards
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest