Node Red nbrowser and Home Assistant

Has anyone used nbrowser in the node red home assistant addon? I am wanting to scrape my power bill amount owing by logging into my power account and scraping it. Unfortuantely, my power company doesn’t have an API. I’ve installed nbrowser from the palette and I am passing in the url and my credentials but the flow looks to just stop when it hits nbrowser. Any help here would be greatly appreciated!

Have you tried outputting the response?

It’s going to be impossible for anyone to help you here if you don’t even include a picture of your flow.

Thanks for replying @fanuch

My flow is straight forward. Here is a picture of the flow:

And here is an export of the flow:

[{"id":"364d9b1e.b641b4","type":"tab","label":"Scrape Utility Bills Copy","disabled":false,"info":""},{"id":"89b819a4.7e6348","type":"nbrowser","z":"364d9b1e.b641b4","name":"","methods":[{"name":"gotoURL","func":"goto","params":[{"type":"str","value":"https://mypoweraccount.saskpower.com/MyAccount/Login","typeDefault":"str"}]},{"name":"wait","func":"wait","params":[{"type":"str","value":"20","typeDefault":"str"}]},{"name":"type","func":"type","params":[{"type":"str","value":"#signInName","typeDefault":"str"},{"type":"msg","value":"emailaddress","typeDefault":"str"}]},{"name":"type","func":"type","params":[{"type":"str","value":"#password","typeDefault":"str"},{"type":"msg","value":"password","typeDefault":"str"}]},{"name":"click","func":"click","params":[{"type":"str","value":"#next","typeDefault":"str"}]},{"name":"getText","func":"getText","params":[{"type":"str","value":"#VTX_AccountOverview > div:nth-child(3) > div > div.col-sm-5 > div:nth-child(1) > div.panel-body.noform > table > tbody > tr:nth-child(4) > td.total.right","typeDefault":"str"},{"type":"output","value":1,"typeDefault":"output"}]},{"name":"getText","func":"getText","params":[{"type":"str","value":"#VTX_AccountOverview > div:nth-child(3) > div > div.col-sm-5 > div:nth-child(1) > div.panel-body.noform > div.payment_message","typeDefault":"str"},{"type":"output","value":2,"typeDefault":"output"}]}],"prop":"nbrowser","propout":"payload","object":"msg","objectout":"msg","close":true,"show":true,"ssl":true,"outputs":2,"x":640,"y":80,"wires":[["745c7cd5.d87874"],["745c7cd5.d87874"]]},{"id":"dd7fc8c9.9aa1c8","type":"credentials","z":"364d9b1e.b641b4","name":"SaskPower Credentials","props":[{"value":"emailaddress","type":"msg"},{"value":"password","type":"msg"}],"x":410,"y":80,"wires":[["89b819a4.7e6348","f0a7b72.9810748","ceb0116b.fda6b","3b1c53f6.1195ac"]]},{"id":"c385d12e.c0ce5","type":"inject","z":"364d9b1e.b641b4","name":"Get SaskPower Bill","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"https://mypoweraccount.saskpower.com/MyAccount/Login","payloadType":"str","x":150,"y":80,"wires":[["dd7fc8c9.9aa1c8"]]},{"id":"745c7cd5.d87874","type":"debug","z":"364d9b1e.b641b4","name":"Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":810,"y":80,"wires":[]},{"id":"f0a7b72.9810748","type":"debug","z":"364d9b1e.b641b4","name":"URL","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":590,"y":140,"wires":[]},{"id":"ceb0116b.fda6b","type":"debug","z":"364d9b1e.b641b4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"emailaddress","targetType":"msg","x":630,"y":180,"wires":[]},{"id":"3b1c53f6.1195ac","type":"debug","z":"364d9b1e.b641b4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"password","targetType":"msg","x":620,"y":220,"wires":[]}]

I’ve removed my credential for obvious reasons :slight_smile:

The flow never gets to Output… it just stops at nbrowser. I’m starting to wonder if I can’t run nbrowser inside the add-on within Home Assistant.

Have you dealt with this problem. I have the same.

+1

I also spent significant amount of time, trying to get node-red + nbrowser working in HA without luck. It seems nbrowser is no longer maintained.

Is there any alternative to nbrowser?

+1

did you guys find a fix or an alternative solution ?

cheers,

+1 also having the same problem

It seeems to be a generic nbrowser issue. I installed node-red on my pc directly and tried running nbrowser.
I got:
[red] Uncaught Exception:
23 May 11:51:47 - TypeError: Cannot read property ‘then’ of undefined
at nbrowser_worker (C:\Users\mypath\node_modules\node-red-contrib-nbrowser\nbrowser\nbrowser.js:367:19)
at Timeout._onTimeout (C:\Users\mypath\node_modules\node-red-contrib-nbrowser\nbrowser\nbrowser.js:431:21)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)

Did anyone find an alternative solution?