Node-RED nodes for hubitat

Yes, you can make variables persist after reboots with that node - I use it in some cases, but also have a persistent context store (for many other uses) so I usually just put my variables there.

1 Like

Be forewarned. NR mooch here, stealing all posted JSON for my 'Junk Yard' (IMO gotta be one of the best parts on node-red. Gawd :heart: copy/paste!!)

1 Like

a what?!?

I think @JasonJoel is indicating he uses the config node pointed out by @starcom for some of his context variables, while he writes others to the local filesystem.

2 Likes

@PPz it's actually the source code of the main hubitat dashboard page. Look closely at those links.

I saw the same in my logs too a while back. Not sure what caused it, but it was a non-issue.

Yes. To write it to the file system, you have to define a file system contextStorage in settings.

Sorry to go all jargon on everyone. :slight_smile:

4 Likes

Damn engineer!

2 Likes

Guilty as charged.

Although I was just in my once every 3 years staff meeting and my boss (who is over multiple groups of people) completely omitted my group from the presentation.

So maybe not for long? Lol

1 Like

Unfortunately, I tried to reproduce, but without success. I guess I don't trigger the same error that you have. For this I would need to have log (see the quote) of your error. You should be able to re-trigger with a FULL deploy or restart node-red.

I also tried to have 11 connections to websocket, but it didn't cause any issue


Screenshot from 2020-07-07 18-49-16

Thank you for trying. I will monitor and try to capture a better log. Last night I was seeing the error consistently. I'm just running NR on a Pi 3b and maybe it's struggling given it's also processing my dashboard.

1 Like

Having seen your dash I wouldn't doubt it :wink: (meant respectfully, very cool dash, except the creepy sleeping people) lol

1 Like

Your error looks like what I already observed when I did benchmark with simultaneous requests on HE.

  • If it happens on Node-RED re/start, then you probably have a node that is not initialized, but in this case, on the next event related to this device, it will re-initialize automatically
  • If it happen after sending a command with command node, then your command had failed.
    You maybe should see an error in your HE log (but not sure)

If it happens systematically (e.i. after each NR restart), then we should investigate it

@aaiyar you mentioned math....

Care to share some nuggets for my Junk Yard that might help with this one? A sample might help keep my tail from moving faster than my head. :wink:

1 Like

Thank you.
There were no particular errors in my log, including my NR devices. But I did not activate the Maker API logging debugging (changed that at the moment). I got another set of errors (photo). I will check the next day if I also have other errors.

You can try to go to the URL specify to see what is the response you have?
All response I saw, was JSON and the node parse the output with JSON. But maybe some driver doesn't return JSON response :man_shrugging:.
In this case, the node should be improved to try to catch exception and return response without decoding

I put the logging ON for Maker API and I didn't have any error. the "functions" are called without problems. So, I'll stick to that for the moment because all is working, and that's matter (whatever the command prompt messages).
The poll rate of my plc (60 registers) is done every 10 seconds but I don't need that speed for the results (mostly temperatures and power measurement). Should I lower the transfer speed to Hubitat (like every minute) to increase stability ?
I could insert a function to send data on changes only, even I keep the poll rate.
Good idea or just a waste of time ?

No I just need you to type the URL (from your log) in your browser and send me the result
It seems related to the fact that code try to decode result to JSON

http://192.168.1.101:80/apps/api/931/devices/2212/setTemperature/27?access_token=...

I confirm, it only impact output of the command node. Then if you have nothing plugged into, it impact nothing

master

id 2212 (pond Tb)

id 2243 (pond Ts)

Curious what you're using for a dashboard that's hosted on an rpi?

It's a custom dashboard built using html/javascript/css etc using Maker API and the eventsocket. I've posted about so you will find if you search my posts. The RPi hosts it using a standard Apache2 webserver. Cheers.