Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Alexa, Google Home and Siri

Moderator: leecollings

pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

How to configure node-red for google assistant

Post by pvklink »

hi, here is my config in node red .
It works both ways, from domoticz to google and from google to domoticz.
you have to change the nora key in both devices, change the rooms in the devices and the device id's

this script is working for on/off devices

success!

Code: Select all

[
    {
        "id": "ff1ab690.7fb988",
        "type": "tab",
        "label": "test pvk nodered ga",
        "disabled": false,
        "info": ""
    },
    {
        "id": "5b802f42.439f6",
        "type": "switch",
        "z": "ff1ab690.7fb988",
        "name": "domoticz_idx_check",
        "property": "topic",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "1002",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "997",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 180,
        "y": 400,
        "wires": [
            [
                "233c4df8.0001b2",
                "3008424e.ff7c2e"
            ],
            [
                "8ac4121.3f617f",
                "3008424e.ff7c2e"
            ]
        ]
    },
    {
        "id": "4889f435.b43f8c",
        "type": "function",
        "z": "ff1ab690.7fb988",
        "name": "Function out On/Off",
        "func": "var idx = parseInt(msg.topic);\nif ( msg.payload === true )\n{\nmsg.payload = { \"command\": \"switchlight\", \"idx\": idx, \"switchcmd\": \"On\" };\n}\nelse if ( msg.payload === false )\n{\nmsg.payload = { \"command\": \"switchlight\", \"idx\": idx, \"switchcmd\": \"Off\" };\n}\nreturn msg\n",
        "outputs": 1,
        "noerr": 0,
        "x": 1073,
        "y": 480,
        "wires": [
            [
                "d001ff86.4058c"
            ]
        ],
        "info": "van msg.topic (dat is idx) \nen msg.payload = true or fale \neen domoticz mqtt bericht maken"
    },
    {
        "id": "d001ff86.4058c",
        "type": "json",
        "z": "ff1ab690.7fb988",
        "name": "",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 1035,
        "y": 629,
        "wires": [
            [
                "63bcc86e.eae6b8"
            ]
        ]
    },
    {
        "id": "8ac4121.3f617f",
        "type": "nora-switch",
        "z": "ff1ab690.7fb988",
        "devicename": "lamp_tv_links",
        "roomhint": "Woonkamer",
        "name": "lamp tv links",
        "passthru": false,
        "nora": "xxxx",
        "topic": "997",
        "onvalue": "true",
        "onvalueType": "bool",
        "offvalue": "false",
        "offvalueType": "bool",
        "x": 770,
        "y": 100,
        "wires": [
            [
                "4889f435.b43f8c",
                "e80c1f02.6a0ce"
            ]
        ]
    },
    {
        "id": "233c4df8.0001b2",
        "type": "nora-switch",
        "z": "ff1ab690.7fb988",
        "devicename": "Lantaarn",
        "roomhint": "Woonkamer",
        "name": "Lantaarn",
        "passthru": false,
        "nora": "xxxx",
        "topic": "1002",
        "onvalue": "true",
        "onvalueType": "bool",
        "offvalue": "false",
        "offvalueType": "bool",
        "x": 760,
        "y": 40,
        "wires": [
            [
                "4889f435.b43f8c",
                "e80c1f02.6a0ce"
            ]
        ]
    },
    {
        "id": "79bc0ca4.de6f54",
        "type": "comment",
        "z": "ff1ab690.7fb988",
        "name": "Useful links",
        "info": "https://www.domoticz.com/forum/viewtopic.php?f=69&t=27588\nhttps://flows.nodered.org/node/node-red-contrib-nora\nhttps://discourse.nodered.org/t/node-red-google-home-integration/4829\ndomoticz mqtt publish is / en out\nhttps://node-red-google-home.herokuapp.com/login\n\n\n{\n   \"Battery\" : 255,\n   \"RSSI\" : 12,\n   \"description\" : \"\",\n   \"dtype\" : \"Lighting 2\",\n   \"id\" : \"0E672C2\",\n   \"idx\" : 1002,\n   \"name\" : \"lantaarn\",\n   \"nvalue\" : 1,\n   \"stype\" : \"AC\",\n   \"svalue1\" : \"15\",\n   \"switchType\" : \"On/Off\",\n   \"unit\" : 3\n}\n\nzie ook flow voor de overige types zoals dimmers en scenes",
        "x": 110,
        "y": 40,
        "wires": []
    },
    {
        "id": "99c79ab.238b368",
        "type": "mqtt in",
        "z": "ff1ab690.7fb988",
        "name": "Bericht van domoticz (UIT) naar GA",
        "topic": "domoticz/out",
        "qos": "0",
        "datatype": "auto",
        "broker": "465cbf12.c733c",
        "x": 140,
        "y": 760,
        "wires": [
            [
                "d2403aae.6599f8"
            ]
        ]
    },
    {
        "id": "8cc7ec95.8a166",
        "type": "debug",
        "z": "ff1ab690.7fb988",
        "name": "debugging",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "x": 726,
        "y": 556,
        "wires": []
    },
    {
        "id": "d2403aae.6599f8",
        "type": "json",
        "z": "ff1ab690.7fb988",
        "name": "json convert",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 150,
        "y": 664,
        "wires": [
            [
                "c2f5ef39.2136f",
                "11d01ad2.fe5bb5"
            ]
        ]
    },
    {
        "id": "c2f5ef39.2136f",
        "type": "switch",
        "z": "ff1ab690.7fb988",
        "name": "switchtype_check",
        "property": "payload.switchType",
        "propertyType": "msg",
        "rules": [
            {
                "t": "cont",
                "v": "On/Off",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 170,
        "y": 564,
        "wires": [
            [
                "51ef0358.4f7b4c",
                "8cc7ec95.8a166"
            ]
        ]
    },
    {
        "id": "38ca2451.c7292c",
        "type": "comment",
        "z": "ff1ab690.7fb988",
        "name": "er is een pakket met switchtype On/Off",
        "info": "kijkt naar switchtype \"On/Off\"",
        "x": 470,
        "y": 564,
        "wires": []
    },
    {
        "id": "51ef0358.4f7b4c",
        "type": "function",
        "z": "ff1ab690.7fb988",
        "name": "convert message",
        "func": "msg.topic = msg.payload.idx\nif (msg.payload.nvalue == 1)\n{\n    msg.payload = true\n}\nelse if (msg.payload.nvalue === 0)\n{\n    msg.payload = false\n}\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 170,
        "y": 480,
        "wires": [
            [
                "5b802f42.439f6",
                "6cf9129.e9a20ec"
            ]
        ]
    },
    {
        "id": "e80c1f02.6a0ce",
        "type": "debug",
        "z": "ff1ab690.7fb988",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "x": 1040,
        "y": 80,
        "wires": []
    },
    {
        "id": "1a3fdd48.9efbd3",
        "type": "comment",
        "z": "ff1ab690.7fb988",
        "name": "GA heeft false of true nodig in de body",
        "info": "een GA bericht maken\nbevat msg.payload = false or true\ntopic = idx\ningeval een switch",
        "x": 490,
        "y": 480,
        "wires": []
    },
    {
        "id": "63bcc86e.eae6b8",
        "type": "mqtt out",
        "z": "ff1ab690.7fb988",
        "name": "Bericht van GA naar domoticz (IN) ",
        "topic": "domoticz/in",
        "qos": "1",
        "retain": "",
        "broker": "465cbf12.c733c",
        "x": 1122,
        "y": 744,
        "wires": []
    },
    {
        "id": "4bfdd274.023e6c",
        "type": "comment",
        "z": "ff1ab690.7fb988",
        "name": "uit domoticz naar google naar boven",
        "info": "bericht uit domoticz",
        "x": 481.5,
        "y": 761,
        "wires": []
    },
    {
        "id": "11d01ad2.fe5bb5",
        "type": "debug",
        "z": "ff1ab690.7fb988",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "x": 726.5,
        "y": 657,
        "wires": []
    },
    {
        "id": "6cf9129.e9a20ec",
        "type": "debug",
        "z": "ff1ab690.7fb988",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "x": 725.5,
        "y": 471,
        "wires": []
    },
    {
        "id": "3008424e.ff7c2e",
        "type": "debug",
        "z": "ff1ab690.7fb988",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "x": 728.5,
        "y": 394,
        "wires": []
    },
    {
        "id": "fb6542cd.d21da",
        "type": "nora-config",
        "z": "",
        "name": "nora pvk key",
        "group": "",
        "notify": false
    },
    {
        "id": "465cbf12.c733c",
        "type": "mqtt-broker",
        "z": "",
        "name": "mqttdomoticz",
        "broker": "localhost",
        "port": "1883",
        "clientid": "",
        "usetls": false,
        "compatmode": true,
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "willTopic": "",
        "willQos": "0",
        "willPayload": ""
    }
]
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
andersbz
Posts: 13
Joined: Sunday 03 April 2016 20:51
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Sweden
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by andersbz »

Thanks for the good example, works great
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by pvklink »

Also thanks to @waaren, he made an important script for it...
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
Gravityz
Posts: 587
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2022.2
Location: Netherlands
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by Gravityz »

Well i found this thread by accident.

i initially made the bridge from Domoticz to Google by using Domoticz-HAbridge-OpenHab-Google cloud connector
It works bidirectional but i wanted to make things simpler.

thanks @legacy1981, your flow was very clear and usefull
as far as i can see it works bidirectional.
Also thanks to the other contributors because i was playing with nodered for a couple of days and i could barely get thigs working from scrap.
These examples will give you a lot of insight how nodered works.

i stumbled up on a couple of things which might be usefull to know

Humidity can be added just like temperature(but of course google will call it temperature.(in openhab you needed to add it as a group)
in case of a combined sensor the svalue1 needs to be svalue2

your flow has implementation for both dimmers and switches.(nice)
However Hue lights report thing a little different with the result that they will always switch to 100% and not to the last selected value
i changed it to always switch to the last level.

here is the flow for both functions

Code: Select all

[{"id":"2caa4809.725158","type":"function","z":"7c0e1d2a.588314","name":"Function Dimmer HUE","func":"msg.topic = msg.payload.idx\nvar brightness = msg.payload.svalue1\nif (msg.payload.nvalue === 1)\n{\n    msg.payload = 100\n}\nelse if (msg.payload.nvalue === 0)\n{\n    msg.payload = 0\n}\nelse if (msg.payload.nvalue === 10)\n{\n    msg.payload = brightness\n}\nelse if (msg.payload.nvalue === 15)\n{\n    msg.payload = brightness\n}\n    return msg;","outputs":1,"noerr":0,"x":600,"y":480,"wires":[["dbbf6d5f.7171b"]]},{"id":"6a1d589b.3ec748","type":"function","z":"7c0e1d2a.588314","name":"Function in On/Off","func":"humidity = msg.payload.svalue2\nmode = \"eco\"\nmsg.payload.temperature = humidity\nmsg.payload.mode = mode\nreturn msg\n","outputs":1,"noerr":0,"x":730,"y":700,"wires":[["194df93c.c2e847"]]}]
Gravityz
Posts: 587
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2022.2
Location: Netherlands
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by Gravityz »

made a second change.

I noticed that whenever you change the flow and press deploy you loose the current status of all the devices.(and i can not believe this does not bother anybody because it is very annoying)

@waaren created a domoticz script which broadcasts the status when a virtual switch is switched.

I made a flow which calls on that switch and instantly restores the current status of the flow(all lights which were ON are shown as ON again including the levels).

here is the flow(change idx and ip address to match your settings)

Code: Select all

[{"id":"9eada173.2ec46","type":"inject","z":"7c0e1d2a.588314","name":"collect current light status","topic":"","payload":"Started!","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":"","x":150,"y":40,"wires":[["8bf5316c.1546f"]]},{"id":"8bf5316c.1546f","type":"http request","z":"7c0e1d2a.588314","name":"MQTT-Broadcast-Domoticz","method":"POST","ret":"txt","paytoqs":false,"url":"http://192.168.1.50:8084/json.htm?type=command&param=switchlight&idx=334&switchcmd=On","tls":"","persist":false,"proxy":"","authType":"","x":460,"y":40,"wires":[["3495cdb9.881a72"]]},{"id":"3495cdb9.881a72","type":"debug","z":"7c0e1d2a.588314","name":"","active":true,"tosidebar":true,"console":false,"complete":"false","x":710,"y":40,"wires":[]}]
here is the domoticz dzVents script. change the variables to adapt it to your situation
You also have to create a virtual switch and give it the name MQTT-Broadcast

Code: Select all

--[[ dumpMQTT for all switch type devices 

    this dzVents script sends current status of all switch-type devices with ()optionally) the string mqttsync in the descriptionfield to 
    the defined mqtt broker with the topic domoticz/out in the same json format as domoticz mqtt hardware sends it on a device update
    it uses the mosquitto_pub OS program for this.

    configurable items: 
                            MQTTBokerhost   // hostnamae or IP where MQTT Broker is active   ; defaults to localhost
                            mosquitto_pub   // location of full /path/executable             ; defaults to /usr/bin/moquitto_pub
                            MQTTTopic       // MQTT topic to be used                         ; defaults to domoticz/out
                            MQTTSyncTrigger // string in description-field of device to enable syncTrigger ; defaults to All switch type devices           

    Thanks to @Gravityz for the initial idea, testing-, and feedback.
    
]]--

local scriptTrigger = 'MQTT-Broadcast'

return 
{
    on = 
    {
        -- timer = {'every 10 minutes'}, -- when frequent broadcasts are required
        devices = { scriptTrigger },
    },

    logging = { level = domoticz.LOG_ERROR }, -- switch to LOG_DEBUG when not eoowrking as expected

    execute = function(dz)
        
       -- ************** Your settings (when not default) below this line *********************

        local MQTTBrokerHost  
        local MQTTTopic 
        local mosquitto_pub                   -- set to '/volume1/@appstore/mosquitto/bin/mosquitto_pub' for Synology NAS
        local MQTTSyncTrigger                -- only sync switches with this string in description field leave as nil when all need to be syncd

      -- ************** No changes required below this line ************************
      
       -- set defaults 
        _G.logMarker =  _G.logMarker or _G.moduleLabel -- set logmarker to scriptname
             
        local MQTTBrokerHost = MQTTBokerHost or 'localhost'
        local MQTTTopic = MQTTTopic or 'domoticz/out'
        local mosquitto_pub = mosquitto_pub or '/usr/bin/mosquitto_pub'
        local MQTTSyncTrigger = MQTTSyncTrigger ~= nil and MQTTSyncTrigger  
       
       local function osCommand(cmd)
            dz.log('Executing Command: ' .. cmd,dz.LOG_DEBUG)

            local fileHandle = assert(io.popen(cmd .. ' 2>&1 || echo ::ERROR::', 'r'))
            local commandOutput = assert(fileHandle:read('*a'))
            local returnTable = {fileHandle:close()}

            if commandOutput:find '::ERROR::' then     -- something went wrong
               dz.log('Error ==>> ' .. tostring(commandOutput:match('^(.*)%s+::ERROR::') or ' ... but no error message ' ) ,dz.LOG_ERROR)
            else -- all is fine!!
                dz.log('ReturnCode: ' .. returnTable[3] .. '\ncommandOutput:\n' .. commandOutput, dz.LOG_DEBUG)
            end

            return commandOutput,returnTable[3] -- rc[3] contains returnCode
        end

        local function composeMQTT(dv)
            local json = {}

           if dv.deviceSubType == 'Selector Switch' then
                json.LevelActions = dv.levelActions
                json.LevelNames = table.concat(dv.levelNames,'|')
                json.LevelOffHidden = dv.levelOffHidden
                json.SelectorStyle = "0"
                json.svalue1 = dv.levelVal
            elseif dv.switchType == 'Dimmer' then
                json.Level = dv.level 
            end

            if dv.color ~= '' then
                json.Color = dz.utils.fromJSON(dv.color) 
            end

            if not(json.svalue1) then
                for key, value in ipairs(dv.rawData) do
                    json['svalue' .. key] = value:match('%d+%.*%d*') 
                end 
            end

            json.battery = (dv.batteryLevel or 255)
            json.RSSI = (dv.signalLevel or 12) 
            json.description = (dv.description):sub(0,99)
            json.dtype = dv.deviceType
            json.id = dv.deviceId
            json.idx = dv.id
            json.name = dv.name
            json.nvalue = dv.nValue
            json.stype = dv.deviceSubType
            json.switchType = dv.switchType
            json.unit = (dv.unit or 1)

            json = dz.utils.toJSON(json)
            
            local jsonFormatted = json:gsub(',',',\n  '):gsub('}','\n }'):gsub('{','{ \n  '):gsub(':',' : ')
            dz.log('Composed json: ' .. jsonFormatted,dz.LOG_DEBUG)
            return ( mosquitto_pub ..  ' -h '.. MQTTBrokerHost  .. ' -t '  .. MQTTTopic .. " -m '" .. jsonFormatted .. "'")
        end

        -- Main code
        dz.devices().forEach(function(dv) -- loop over all devices in domoticz instance
            -- All switch like devices ( with ( optionally ) MQTTSyncTrigger in description )  
            if (dv.deviceType or ''):find('witch') and ( not(MQTTSyncTrigger) or dv.description:find(MQTTSyncTrigger)) then 
                dz.log(dv.id .. ', ' .. dv.name .. ', ' .. dv.deviceSubType,dz.LOG_DEBUG) 
                osCommand(composeMQTT(dv))
            end
        end)
    end
}
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by manjh »

Looks good, it is fairly simple to get commands from Google Home into Domoticz.
One thing that I can't figure out: how can I send a message from Domoticz back into a specific Google Home, as a spoken notification?
Also, is it possible to send to all attached Google Home devices?
Hans
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by manjh »

manjh wrote: Friday 22 November 2019 15:14 Looks good, it is fairly simple to get commands from Google Home into Domoticz.
One thing that I can't figure out: how can I send a message from Domoticz back into a specific Google Home, as a spoken notification?
Also, is it possible to send to all attached Google Home devices?
Anyone? I'm sure this must be simple, but somehow I can't get it to work...
Hans
Gravityz
Posts: 587
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2022.2
Location: Netherlands
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by Gravityz »

Did you try google home notify node

Seems this is made for it.
Do not have a google speaker
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by manjh »

Gravityz wrote: Monday 25 November 2019 7:57 Did you try google home notify node

Seems this is made for it.
Do not have a google speaker
Can't find that node. Does it need to be installed separately?
Hans
Gravityz
Posts: 587
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2022.2
Location: Netherlands
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by Gravityz »

yes.

you can install a lot of different nodes.
that is the coolest part about node-red

goto the 3 stripes in the top right
click manage palette
click on install and search for the things you need (in this case notify)

google home notify is the 5th one from the top.
there is another one with adjustable volume so check that one out also

in case there are more choices you can press the arrow instead of install to check out the node description.

perhaps do a search on google only to see what is available
google home should be easier then sonos but you have to read the description to see if they are talking about the google home app or the google home device

the ttb-ifttt is also very nice or a telegram node(had those installed but domoticz already has this functionality)
User avatar
FireWizard
Posts: 1863
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by FireWizard »

Hi,

The node-red-contrib-google-home-notify is no longer maintained. You should use now
node-red-contrib-cast. This node is for both Google Chromecast and Google Home.

Regards
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by EdwinK »

'Easy' they said. Can't figure it out. Maybe someday, someone will make a '.. for dummy's' for this.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by pvklink »

@fireWizard, that works easy from my node red to my chromecast (connect to my tv)

But when i stream to my other raspberry pi with google home services on it i get connection refused
Client error reported:connect ECONNREFUSED 192.168.20.31:8009

This pi with the google assiatant service on it , can speak via its internal speaker, so i can be done...
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
User avatar
FireWizard
Posts: 1863
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by FireWizard »

Hi

@EdwinK

Can you indicate for what part you need a kind a "Howto"
Is it:
- Installation of Node-Red
- Use of Node-Red
- Installation MQTT broker ( Mosquitto)
- Creating flows in Node-Red
- Creating flow with Nora for connection with Google Home
- Configuration of node-red-contrib-cast.

If you can indicate which information you need, we might be able to create a Howto for you.

@pvklink

At the moment I do not own a Chromecast, so I cannot try

Regards
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by EdwinK »

Since I don't know anything about the Node-Red thing, I actually need them all ;)
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by manjh »

manjh wrote: Tuesday 26 November 2019 16:00
Gravityz wrote: Monday 25 November 2019 7:57 Did you try google home notify node

Seems this is made for it.
Do not have a google speaker
Can't find that node. Does it need to be installed separately?
Found it. It is called Cast.
Hans
User avatar
FireWizard
Posts: 1863
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by FireWizard »

@EdwinK,

I wrote several times a guideline for Node-Red flows.
In the following thread I have a brief description om how to install Mosquitto and Node-Red.
https://www.domoticz.com/forum/viewtopi ... 61#p229061

Is this sufficient for you at this moment?

Regards
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by EdwinK »

I'll take a look
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Devious
Posts: 20
Joined: Sunday 30 December 2018 19:02
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: Oss NL
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by Devious »

i'm trying to get this to work.
i installed node-red and om able to link to my google home.
the programed switches appear in the google home app and i can switch them via the google home mini.
but the link with domoticz is failing.
the MQTT nodes are stuck at "Connecting"
so i tried to install MQTT (a few different guides but similar results)
pi@raspberrypi:~ $ sudo apt install mosquitto mosquitto-clients
Pakketlijsten worden ingelezen... Klaar
Boom van vereisten wordt opgebouwd
De statusinformatie wordt gelezen... Klaar
Sommige pakketten konden niet geïnstalleerd worden. Dit kan betekenen
dat u om een onmogelijke situatie gevraagd heeft, of, indien u
de distributie 'unstable' gebruikt, dat sommige benodigde pakketten nog gemaakt moeten worden of uit 'Incoming' verwijderd werden.
De volgende informatie kan misschien helpen de situatie op te lossen:

De volgende pakketten hebben niet-voldane vereisten:
mosquitto : Vereisten: libssl1.0.0 (>= 1.0.0) maar het is niet installeerbaar
mosquitto-clients : Vereisten: libmosquitto1 (= 1.6.8-0mosquitto1~jessie1) maar 1.5.7-1+deb10u1 zal geïnstalleerd worden
E: Kan problemen niet verhelpen, u houdt defecte pakketten vast.
pi@raspberrypi:~ $ sudo systemctl enable mosquitto
Failed to enable unit: Unit file mosquitto.service does not exist.
can anyone tell me what to check or do to get MQTT to work?
User avatar
FireWizard
Posts: 1863
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Domoticz Google Assistant integration with node-red Easy Free Controlicz alternative!

Post by FireWizard »

Which version of the Raspberry Pi do you use?
and
Which version of Raspbian, do you use? Stretch?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest