Completely stuck with node-red-contrib-google-smarthome

Hi folks,

Merry christmas to you all !!!!

I have to admit that I am very near a Node-RED burn out... Have been trying to fill gaps in the last years by developing lots of custom nodes. But now 4 years later I have a large amount of nodes, but my private home automation is so ridiculous basic compared to all others in this community. And when I want to add something to it, it is very time consuming and most of it just fails. The fun factor really disappeared for me at the moment.

So I would appreciate to get a bit of help here, to get me back on track...

Would like to use Google Assistant, to make it a bit easier for the familly to use Node-RED without user interface. A few months ago I succeeded to control a few devices using the node-red-contrib-google-smarthome node, but a couple of days later it didn't work anymore: the Google Assitant recongizes my sentences correctly (as I can see in the written texts that it logs), but for some reason it started giving me browser results instead of executing my actions. Found a lot of people on the web with the same problem, but no solution...

So I tried a lot of things this weekend, but I must have something wrong because now all my devices and rooms are gone in my Google Home app on my phone:

So now everything is screwed up...

I tried to visualize the setup a bit:

But as usual, Google assumes you own multiple phd's in computer science... So I have completely no clue anymore where it is failing. I tried the steps from the troubleshooting section, but some of the things are too obscure for me: e.g. no idea how to use the Google logs. I have renewed LetsEncrypt certificates, I can do the check via port 3001 on my router (although I have no clue at all what I need to enter in the fields that appear), and so on...

When I send a request_sync or report_state topic to the manager node, I get this error:

"HttpActions:requestSync(): no user logged!"

Have been debugging the code, but again no idea what it means ...

Would really appreciate if I could get some tips about where I can do some intermediate tests, to try to figure out which part in my setup is failing.

Thanks !!!
Bart

P.S. I know that there are other nodes available, but I like the approach of this one. So I am going to stick to this one...

1 Like

Maybe @ckhmer1 or @Caprico would be kind enough to take a look.

1 Like

Well, could this be the cause:

**WARNING: Beta code! (But we're getting there :slight_smile:

Breaking change: On upgrade to v0.1.0 you have to re-enter your credentials. See the release notes.*

Hey Walter,
Well that was my first issue at the time being. Hadn't read that, so I indeed lost my credentials. But after I recovered those, everything was working fine. No idea why the assistant started suddenly executing web searches, instead of calling my Node-RED actions. Was it because my LetsEncrypt certificates were expired, or something else. Will never know...

I believe that updated your credentials in the revised node back in September, and assume that it has worked fine since then.

Has all of this started since renewing your LetsEncrypt certificate. If so, it suggests that your smarthome server is not working correctly, as it needs to be over https.
If your smarthome server is not running correctly, then your voice commands will not work, and google will then assume it's a web search.

Did you try using reqbin.com to test? you should get a 'success' reply if you send a GET request to https://example.com:3001/check (with your hostname and smarthome port that's listed in the management node )

That is indeed something I started wondering about this morning. That node uses the Node-RED privkey.pem and cert.pem, but in a separate webserver. So most probably it doesn't automatically renew like we have implemented at the Node-RED startup.
So that might have been the problem, but I will never know because now nothing works anymore.

So I will have messed up my rooms and devices in HomeGraph. But I have removed all my smarthome nodes in my flow, and added them again after some time. I had expected/hoped they would have been synced with Google, since last weekend my changes (i.e. new devices) became visible in Google Home almost immediately, when I added a node for them in my flow...

Yes, indeed I got a success answer via reqbin.com for the check url.

And when you see the grey "Browser" block in my diagram above, that is the "Google smarthome test page" that I get after calling the same url but via a browser (instead of via reqbin.com). But not sure what I have to enter in all those input fields.

Moreover I executed the ssl test (as described) in their 'troubleshooting´ section, and that was also succesfull thanks to my LetsEncrypt certificate (which most probably has been loaded in their dedicated webserver due to my Raspberry reboot yesterday).

So I "think" that part is ok (now)...

So to be clear, is smarthome back working for you now.

No, the only thing that works is the check url and ssl check on port 3001. But that is it. My devices don't appear anymore on the Google Home app, and when I send a command to the manager node I get: "no user logged"...

Hi Bart,

Sorry to hear about your woes, I have been there myself many times! Look family we can do this now - only for it to fail. Stick with it you will get there.

I haven't used this node, while it looks powerful, to be honest due to my limited skills I was put off by the install requirements.
I have used node-red-contrib-googlehome just for a couple of RGB lights in one room. Its easy to setup so if you need a quick fix this my be an option in the short term.

I used Alexa for everything else as it seems to be better supported at the moment.

@smcgann99 : yes indeed I am aware that there are other nice nodes available for my Google Assistant. But I prefer to keep on using the smarthome node, because it doesn't depend on third party services. Although it will always depend on Google, which is already worse enough for me :wink:

Found in the logs from Google that my sync requests don't arrive anymore, so I started debugging the smarthome node. And indeeds it doesn't send the sync requests anymore to google. I have created an issue on Github, because this is now way out of my comfort zone...

@BartButenaers: I had the same feeling beginning of 2020. NodeRED is a fantastic tool. I love it. On the other hand specialized home automation tools like Home Assistant, ioBroker and openhab have been improving a lot recently and can now do the home automation specific tasks.

So in Februar I "added" Home Assistant. Both work seamlessly together - NodeRED as an add on in a docker environment - both on a Raspberry Pi 4, 4gb, ssd. In my opinion that's a perfect combination. 80% of my flows I could immediately replace with Home Assistant automations and integrations. I keep the complex NodeRED flows. But there are differences: Jinja templates instead of mustache, yaml instead of json and Lovelace dashboard (very easy to use) instead of dashboard, integrations and add on's instead of node packages.

For me Home Assistant and NoreRED is double fun :slight_smile:
Both are open source and have amazing communities.

Wish you a ... h a p p y New Year.

Hi @hklages,

I wish you a happy new year too, although it is probably a bit early :wink:

Finally got it working, after setting up everything from scratch. Had hoped to find some troubleshooting tips, to improve the smarthome node. Those guys have really done impressive development work to get this working. Don't know how they find their way in the complex Google API's...

But lost a lot of precious time "again". Had planned to finish a series of my new nodes during my Christmas holdidays, but that won't be possible anymore (although that might be a perfect solution for most people). Hopefully 2022 will become a better open-source year: my nodes were downloaded 205000 times in 2021, but I only received 1 major pull request. I cannot hide that I am very disappointed about that ... Although I must admit that the core of this community is VERY active and helpfull!!! A real joy to work together with them. Want to thank @Paul-Reed for all the time he has spend to help me with my Google Assistant problems!!

Until now I have been spending all my free evenings to try to do it 100% with Node-RED. Because personally I don't like to start linking multiple tools together. Will try to continue a bit further, but if things don't speed up soon with my personal home automation system (purely with Node-RED) I won't have much other choice than going that route. But that would mean that I would have to go for 100% HomeAssistant, which would be a pity for all the time I spend on my Node-RED developments so far.

But now we are way off-topic. My Google Assitant integration "seem" to be working now. So I am going to rework some of my flows, and then hopefully the entire familly can enjoy voice control in my house...

Case closed!

3 Likes

Case is closed, I saw that, just some final words, the big challenge is not to automate your home but to avoid automating your family, have that in mind!! I have seen examples where Google/Alexa basically is controlling family life

I too am 100% in Node-RED. And I manage to stay there with relative ease by choosing my devices carefully. I only rely on stable communication between Node-RED and the device, hence prefer stable protocols like KNX, MQTT, Loxone (which I had in my house before I started with Node-RED), etc.

F.e. I have some shellys here, but i do not use the shelly-specific nodes. I just switch them to MQTT and manage everything else from within Node-RED.

Or Philips Hue: I only use HUE node to communicate with the devices, but I do not configure any use cases in Hue Apps. Latter I again only do in Node-RED.

Voice Control? I use homekit-node and virtual devices to use HomePod Mini for minor voice control scenarios. Which works OK (given Siri is a Diva :smiley: ) ... I yet need to find a way to play text to the Minis though. Other than that it just works. And everything beyond communication is again managed in Node-RED.

I do appreciate all the work that people put into specialized nodes for various vendors. However, complexity increased significantly for my Smart Home, if I deep dived the functionality of those nodes. Which then led to my "strategy" to just manage a stable connection with such nodes and do everything else with Node-Red. Latter is not necessarily an easy way, however, it helps to create a consistent/unique user experience depending on use cases and not depending on device.

1 Like

Hey Walter,
Believe me I am far away from that scenario. Until now I have only automated the minimum, based on requests of my familly. Only stuff to make our life a bit more easy, or to monitor stuff (like water levels since we suffer a few times every year from water troubles).

Yes indeed that simplifies the flows a lot. And indeed some flow complexity can be reduced sometimes by using e.g. mqtt instead of specialized nodes. But sometimes not.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.