Node-RED nodes for hubitat

Thanks for sharing this example :slight_smile:

I don't see how your flow will be better with msg.deviceId input. Can you simulate it and compare with a up-to-date version of hubitat nodes to show us difference?

Where do you plan to set your deviceId? In the presenceFaker node topic?

If you need to have all presenceFaker node, then adding a node for each device associated seems logical to me.

There are one node to manage presence and another to manager a device. If you mix deviceId in other nodes, it just complicate the flow (IMO)

If the command node will set the topic to its name, then it should simplify your flow? (no need to set topic on presenceFaker or using device node)

You can also merge all Date/Time Formatter

As far as I can tell, they haven't made any changes since I ran into that issue. The problem would go away if they had a way to accept an HTTP POST, but since Maker API is limited to HTTP GET, we have to rely on URL encoding.

In my custom system, what I've done is I've created a really simple POST endpoint I can use for sending more complex messages to my speech devices.

1 Like

I was using the Node-Red on the PI and decided to upgrade to the latest version of the Hubitat and when I did I get the following error and cannot do anything? Is there a way to fix this? Thanks

image

I get the following : Flows stopped due to missing node types.

hubitat config

@fblackburn @leeonestop

Confirmed - here's the startup error on Node-RED after updating to 0.0.19

1 Mar 11:38:09 - [info] Waiting for missing types to be registered:
1 Mar 11:38:09 - [info] - hubitat config
1 Mar 11:38:09 - [info] Server now running at http://127.0.0.1:1880/

The simplest way (for me) was to revert back to my last backup and then kill/restart node-red.

Also experiencing problems with device event updates after upgrading to 0.0.19; looking at the "Edit habitat config node" properties panel, I see that an underscore is added to the Webhook configuration entry:

Screen Shot 2020-03-01 at 11.48.43 AM

If I delete it, it returns automatically. Is this related to the flow no longer getting events from the device nodes?

1 Like

Can you show me that Kill Command??

Sure. Get the PID for the node-red process using the command

ps ax | grep node-red | grep -v grep | cut -d' ' -f1

That will return something like this:

odroid@odroid:~$ ps ax | grep node-red | grep -v grep | cut -d' ' -f1
28415

where 28415 is the PID. Now run:

sudo kill -9 28415

That will kill node-red.

@leeonestop

Also - by last backup, I meant my last node-red backup. Not last hubitat backup.

I did as you suggested but it fail for me maybe I didn't a back up yet. Hopefully it will get fix or I will start over Thanks.

Backups are not automatic. I have a cron script to backup my node-red configuration every night.

I just set this up today and saw an update to 0.19 and it started to act up. Once I get it back to working I will do a backup nightly thanks.

1 Like

Here's the shell script I use - you'll have to edit the value of "backupdir" and "nodereddir" to match your installation ......

#!/bin/bash
#
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
backupdir=/mnt/backup/node-red-backup
backupfile=$backupdir/node-red-$(date +%d)-$(date +%m)-$(date +%Y).tar.gz
nodereddir=/home/odroid/.node-red/
#
find $backupdir/*.gz -mtime +30 -exec rm {} \;
tar czvf $backupfile $nodereddir
2 Likes

For those having issues with the new version:

From which version have you upgraded?
Can you export the hubitat config node?

Have you multiple server configured?

0.0.18

I don't know how to export just the config node?

Screen Shot 2020-03-01 at 12.43.09 PM

No just a single server.

I'm not able to reproduce your issues. Maybe is related to the Node-RED environment

Which version and package (docker, etc...) of Node-RED do you use?

If you try to remove these underscore, do it works or they come back?
If you cannot remove them, can you check if you have others configuration nodes: in the menu top right you have configuration nodes and you should see your config nodes

Do you have any output from the Node-RED server?

v1.0.3 - no docker. Directly running on Ubuntu/Arm on an odroid xu4.

OK I've just installed a fresh debian with node-red via npm and I see one issue with dependencies

give me some minutes to test and fix

EDIT: version 0.0.20 published, should be available soon

3 Likes

Same with me. Upgraded form 0.0.18 to 0.0.19. Every time I create a new webhook path, it appends a "_" at the end...

In my case, I'm still getting events, so the "_" may just be cosmetic...

However COMMANDS are not working. I see the msg going to the command block, and it spits out an output, but the end device in hubitat does nothing.

I'll wait for an updated version and try again.