[OBSOLETE] Node Red Bridge for X-10 Devices (Switches, Modules, Remotes, Sensors and Security Modules)

Looking at heyu and mochas a bit deeper and it’s shame that you can’t have all the features in one app. And given it’s all considered legacy, plus the weird licensing story heyu has, pretty much guarantees no one will do it. I kinda like heyu features now that I have looked better than mochad. But it doesn’t touch mochad in terms of speed. It’s milliseconds vs seconds.

What story is that?

When I issue commands from heyu to the CM11A, it generally responds fast. Within a second or less I see the light turn on.

So was doing some reading and the RF receiver is supposed to be in the milliseconds in terms of speed.
I hooked up my MR26A RF receiver and turned on the heyu monitor. No firecracker for transmit,it’s still in the garage. Here is what I got from heyu monitor:

B2 button ON from RF remote:
02/22 00:25:43 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:25:43 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:25:43 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:25:43 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:25:43 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:25:43 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:25:43 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:25:43 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:25:43 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:25:43 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:25:43 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:25:43 Poll received unknown value (1 bytes), leading byte = fe

B2 button OFF from RF remote:
02/22 00:26:57 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:26:57 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:26:57 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:26:57 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:26:57 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:26:57 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:26:57 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:26:57 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:26:57 Poll received unknown value (1 bytes), leading byte = fe

Didn’t get any activity from Security motion and security door/window sensors.

B4 button ON from RF remote:
02/22 00:38:08 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:38:08 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:38:08 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:38:08 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:38:08 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:38:08 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:38:08 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:38:08 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:38:08 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:38:09 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:38:09 Poll received unknown value (1 bytes), leading byte = 14
02/22 00:38:09 Poll received unknown value (1 bytes), leading byte = e7
02/22 00:38:09 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:38:09 Poll received unknown value (1 bytes), leading byte = 14
02/22 00:38:09 Poll received unknown value (1 bytes), leading byte = e7
02/22 00:38:09 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:38:09 Poll received unknown value (1 bytes), leading byte = 14
02/22 00:38:09 Poll received unknown value (1 bytes), leading byte = e7
02/22 00:38:09 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:38:09 Poll received unknown value (1 bytes), leading byte = 14
02/22 00:38:09 Poll received unknown value (1 bytes), leading byte = e7
02/22 00:38:09 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:38:09 Poll received unknown value (1 bytes), leading byte = 14
02/22 00:38:09 Poll received unknown value (1 bytes), leading byte = e7

B4 button OFF from RF remote:
02/22 00:39:32 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:39:32 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:39:32 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:39:32 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:39:32 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:39:32 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:39:32 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:39:32 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:39:32 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:39:32 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:39:32 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:39:32 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:39:32 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:39:32 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:39:32 Poll received unknown value (1 bytes), leading byte = fe

Turned B2 On again(didn’t capture and then held the DIM button for 2 secs:
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:56 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:57 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = fe
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 18
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = 94
02/22 00:41:58 Poll received unknown value (1 bytes), leading byte = fe

That means heyu is not parsing CP26 data correctly, I see similar errors on cp290 is it supported by heyu?

Hmm… will have to review the heyu setup… I thought it was indeed supported…saw some compile time paramaters and I accepted defaults. Will have to check on that.

Found this and wanted to run it by you to see if it was relevant to the solution we were looking for.

I was searching google: “heyu mqtt”

I saw this and some other links to software on github.

That is a fire and forget send. Sending is the easy part it’s setting up and managing devices as well and receive that’s tricky. But I think I have figured out how to support the same level of functionality in this solution for heyu. Now it’s a matter if finding time to sit in front of my computer at home to implement and test it

Awesome! Thanks so much! Whenever you have something you want me to test, just let me know.

Lets try this - obviously since I don’t have heyu or serial devices I have only tested with a jury-rigged simulator

Follow the instructions in the main post if you are using CM11 they make sure the switches are set to PL - I have added handling for firecracker as well so setting a switch to RF will construct the command for firecracker.

Use this flow for node red instead of the one in the original post - look for the 2 places where heyu is called and put the full path there

This has a bunch debug and hopefully if things don’t work it will help us identify the cause. I can clean that up once its stable.

Just like the mochad version this uses the CM11/Firecracker as a transciever - so it will send commands out listen to commands coming in from the wire.

let me know how this goes

Also note that from the ST side if you send multiple on or off commands only one is sent out, this is needed for debouncing in mochad, not really needed in heyu, but i don’t have time or intentions of changing the ST side of code for heyu, since that is stable and works well.

Took me a little bit to setup node.js and node-red and follow your directions. I think it’s setup correctly. I see heyu activity in the command prompt but getting errors.

I set a lamp module a B2 and a Remote B3 button to turn on an existing zigbee light already setup in smartthings.

1st error I see is:
25 Feb 03:20:56 - [error] [file in:Read ST setting after restart] Error: ENOENT: no such file or directory, open ‘/home/johnny/.red-st-connect.conf’

When trying to turn on Lamp with remote I see:
5 Feb 03:38:59 - [error] [function:Setup http request] Can’t continue. Don’t know where Smartthings hub is.

Full log below:

Welcome to Node-RED

24 Feb 19:38:19 - [info] Node-RED version: v0.18.3
24 Feb 19:38:19 - [info] Node.js version: v8.9.4
24 Feb 19:38:19 - [info] Linux 4.4.0-112-generic x64 LE
24 Feb 19:38:19 - [info] Loading palette nodes
24 Feb 19:38:20 - [warn] ------------------------------------------------------
24 Feb 19:38:20 - [warn] [node-red/rpi-gpio] Info : Ignoring Raspberry Pi specific node
24 Feb 19:38:20 - [warn] ------------------------------------------------------
24 Feb 19:38:20 - [info] Settings file : /home/johnny/.node-red/settings.js
24 Feb 19:38:20 - [info] User directory : /home/johnny/.node-red
24 Feb 19:38:20 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
24 Feb 19:38:20 - [info] Flows file : /home/johnny/.node-red/flows_AthlonX4.json
24 Feb 19:38:20 - [info] Creating new flow file
24 Feb 19:38:20 - [info] Server now running at http://127.0.0.1:1880/
24 Feb 19:38:20 - [info] Starting flows
24 Feb 19:38:20 - [info] Started flows
25 Feb 03:20:55 - [info] Stopping flows
25 Feb 03:20:55 - [info] Stopped flows
25 Feb 03:20:55 - [info] Starting flows
25 Feb 03:20:55 - [info] Started flows
25 Feb 03:20:56 - [error] [file in:Read ST setting after restart] Error: ENOENT: no such file or directory, open '/home/johnny/.red-st-connect.conf’
25 Feb 03:21:01 - [warn] [function:Parse heyu Messages] in - starting heyu_relay
02/25 03:21:01 Monitor started

25 Feb 03:21:01 - [info] [function:Parse heyu Messages] t1
25 Feb 03:38:59 - [warn] [function:Parse heyu Messages] in - 02/25 03:38:59 rcvi addr unit 3 : hu B3 (no_alias)
02/25 03:38:59 rcvi func On : hc B
02/25 03:38:59 rcvi addr unit 3 : hu B3 (no_alias)
02/25 03:38:59 rcvi func On : hc B

25 Feb 03:38:59 - [info] [function:Parse heyu Messages] t1
25 Feb 03:38:59 - [warn] [function:Parse heyu Messages] m1a - b:3
25 Feb 03:38:59 - [warn] [function:Parse heyu Messages] m2
25 Feb 03:38:59 - [warn] [function:Parse heyu Messages] m2a - b:on
25 Feb 03:38:59 - [error] [function:Setup http request] Can’t continue. Don’t know where Smartthings hub is.
25 Feb 03:39:04 - [warn] [function:Parse heyu Messages] in - 02/25 03:39:04 rcvi addr unit 3 : hu B3 (no_alias)
02/25 03:39:04 rcvi func On : hc B

25 Feb 03:39:04 - [info] [function:Parse heyu Messages] t1
25 Feb 03:39:04 - [warn] [function:Parse heyu Messages] m1a - b:3
25 Feb 03:39:04 - [warn] [function:Parse heyu Messages] m2
25 Feb 03:39:04 - [warn] [function:Parse heyu Messages] m2a - b:on
25 Feb 03:39:04 - [error] [function:Setup http request] Can’t continue. Don’t know where Smartthings hub is.
25 Feb 03:39:07 - [warn] [function:Parse heyu Messages] in - 02/25 03:39:07 rcvi addr unit 3 : hu B3 (no_alias)
02/25 03:39:07 rcvi func On : hc B

25 Feb 03:39:07 - [info] [function:Parse heyu Messages] t1
25 Feb 03:39:07 - [warn] [function:Parse heyu Messages] m1a - b:3
25 Feb 03:39:07 - [warn] [function:Parse heyu Messages] m2
25 Feb 03:39:07 - [warn] [function:Parse heyu Messages] m2a - b:on
25 Feb 03:39:07 - [error] [function:Setup http request] Can’t continue. Don’t know where Smartthings hub is.
25 Feb 03:39:10 - [warn] [function:Parse heyu Messages] in - 02/25 03:39:10 rcvi addr unit 3 : hu B3 (no_alias)
02/25 03:39:10 rcvi func On : hc B

25 Feb 03:39:10 - [info] [function:Parse heyu Messages] t1
25 Feb 03:39:10 - [warn] [function:Parse heyu Messages] m1a - b:3
25 Feb 03:39:10 - [warn] [function:Parse heyu Messages] m2
25 Feb 03:39:10 - [warn] [function:Parse heyu Messages] m2a - b:on
25 Feb 03:39:10 - [error] [function:Setup http request] Can’t continue. Don’t know where Smartthings hub is.
25 Feb 03:39:27 - [warn] [function:Parse heyu Messages] in - 02/25 03:39:27 rcvi addr unit 3 : hu B3 (no_alias)
02/25 03:39:27 rcvi func On : hc B
02/25 03:39:27 rcvi addr unit 3 : hu B3 (no_alias)
02/25 03:39:27 rcvi func On : hc B

25 Feb 03:39:27 - [info] [function:Parse heyu Messages] t1
25 Feb 03:39:27 - [warn] [function:Parse heyu Messages] m1a - b:3
25 Feb 03:39:27 - [warn] [function:Parse heyu Messages] m2
25 Feb 03:39:27 - [warn] [function:Parse heyu Messages] m2a - b:on
25 Feb 03:39:27 - [error] [function:Setup http request] Can’t continue. Don’t know where Smartthings hub is.
25 Feb 03:39:32 - [warn] [function:Parse heyu Messages] in - 02/25 03:39:32 rcvi addr unit 3 : hu B3 (no_alias)
02/25 03:39:32 rcvi func On : hc B

25 Feb 03:39:32 - [info] [function:Parse heyu Messages] t1
25 Feb 03:39:32 - [warn] [function:Parse heyu Messages] m1a - b:3
25 Feb 03:39:32 - [warn] [function:Parse heyu Messages] m2
25 Feb 03:39:32 - [warn] [function:Parse heyu Messages] m2a - b:on
25 Feb 03:39:32 - [error] [function:Setup http request] Can’t continue. Don’t know where Smartthings hub is.
25 Feb 03:40:55 - [warn] [function:Parse heyu Messages] in - 02/25 03:40:55 rcvi addr unit 2 : hu B2 (no_alias)
02/25 03:40:55 rcvi func On : hc B

25 Feb 03:40:55 - [info] [function:Parse heyu Messages] t1
25 Feb 03:40:55 - [warn] [function:Parse heyu Messages] m1a - b:2
25 Feb 03:40:55 - [warn] [function:Parse heyu Messages] m2
25 Feb 03:40:55 - [warn] [function:Parse heyu Messages] m2a - b:on
25 Feb 03:40:55 - [error] [function:Setup http request] Can’t continue. Don’t know where Smartthings hub is.
25 Feb 03:41:08 - [warn] [function:Parse heyu Messages] in - 02/25 03:41:08 rcvi addr unit 2 : hu B2 (no_alias)
02/25 03:41:08 rcvi func Off : hc B

25 Feb 03:41:08 - [info] [function:Parse heyu Messages] t1
25 Feb 03:41:08 - [warn] [function:Parse heyu Messages] m1a - b:2
25 Feb 03:41:08 - [warn] [function:Parse heyu Messages] m2
25 Feb 03:41:08 - [warn] [function:Parse heyu Messages] m2a - b:off
25 Feb 03:41:08 - [error] [function:Setup http request] Can’t continue. Don’t know where Smartthings hub is.

Restarted and new errors now.

Tried to activate smarthings zigbee light from x-10 remote code b3 - Not working
Tried to activate lamp module B2 from smartthings app and errors.

See log:
25 Feb 04:16:24 - [info] Starting flows
25 Feb 04:16:24 - [info] Started flows
25 Feb 04:16:29 - [warn] [function:Parse heyu Messages] in - starting heyu_relay
02/25 04:16:29 Monitor started

25 Feb 04:16:29 - [info] [function:Parse heyu Messages] t1
25 Feb 04:16:45 - [warn] [function:Parse heyu Messages] in - 02/25 04:16:45 rcvi addr unit 3 : hu B3 (no_alias)
02/25 04:16:45 rcvi func On : hc B

25 Feb 04:16:45 - [info] [function:Parse heyu Messages] t1
25 Feb 04:16:45 - [warn] [function:Parse heyu Messages] m1a - b:3
25 Feb 04:16:45 - [warn] [function:Parse heyu Messages] m2
25 Feb 04:16:45 - [warn] [function:Parse heyu Messages] m2a - b:on
25 Feb 04:16:45 - [info] [function:Setup http request] Please ignore the message properties override warning
25 Feb 04:16:45 - [warn] [http request:http request to ST] Warning: msg properties can no longer override set node properties. See bit.ly/nr-override-msg-props
25 Feb 04:17:33 - [warn] [function:Parse heyu Messages] in - 02/25 04:17:33 rcvi addr unit 2 : hu B2 (no_alias)
02/25 04:17:33 rcvi func On : hc B

25 Feb 04:17:33 - [info] [function:Parse heyu Messages] t1
25 Feb 04:17:33 - [warn] [function:Parse heyu Messages] m1a - b:2
25 Feb 04:17:33 - [warn] [function:Parse heyu Messages] m2
25 Feb 04:17:33 - [warn] [function:Parse heyu Messages] m2a - b:on
25 Feb 04:17:33 - [info] [function:Setup http request] Please ignore the message properties override warning
25 Feb 04:17:33 - [warn] [http request:http request to ST] Warning: msg properties can no longer override set node properties. See bit.ly/nr-override-msg-props
25 Feb 04:17:46 - [info] [exec:send command to heyu] error:Error: Command failed: /mnt/95e54214-5640-4b99-9f5b-0e17e1fa7af9/home/johnny/Downloads/heyu-2.10.1/heyu heyu off b2

Usage: heyu [options] (Enter ‘heyu help’ for commands.)

25 Feb 04:18:04 - [info] [exec:send command to heyu] error:Error: Command failed: /mnt/95e54214-5640-4b99-9f5b-0e17e1fa7af9/home/johnny/Downloads/heyu-2.10.1/heyu heyu on b2

Usage: heyu [options] (Enter ‘heyu help’ for commands.)

25 Feb 04:18:08 - [info] [exec:send command to heyu] error:Error: Command failed: /mnt/95e54214-5640-4b99-9f5b-0e17e1fa7af9/home/johnny/Downloads/heyu-2.10.1/heyu heyu off b2

Usage: heyu [options] (Enter ‘heyu help’ for commands.)

25 Feb 04:18:17 - [warn] [function:Parse heyu Messages] in - 02/25 04:18:17 rcvi addr unit 2 : hu B2 (no_alias)
02/25 04:18:17 rcvi func Off : hc B

25 Feb 04:18:17 - [info] [function:Parse heyu Messages] t1
25 Feb 04:18:17 - [warn] [function:Parse heyu Messages] m1a - b:2
25 Feb 04:18:17 - [warn] [function:Parse heyu Messages] m2
25 Feb 04:18:17 - [warn] [function:Parse heyu Messages] m2a - b:off
25 Feb 04:18:17 - [info] [function:Setup http request] Please ignore the message properties override warning
25 Feb 04:18:17 - [warn] [http request:http request to ST] Warning: msg properties can no longer override set node properties. See bit.ly/nr-override-msg-props
25 Feb 04:18:45 - [error] [http request:http request to ST] no response from server
25 Feb 04:18:45 - [error] [http request:http request to ST] Error: socket hang up
25 Feb 04:19:33 - [error] [http request:http request to ST] no response from server
25 Feb 04:19:33 - [error] [http request:http request to ST] Error: socket hang up

OK, lets try to get this done one step at a time, First let’s get the B2 going from the ST app.

Let’s find out if the config file is there. Since there is no error for the conf file in the second set, I think I may have to put a restart in the instructions. Let’s find out for sure, do this on the linux machine:

cat /home/johnny/.red-st-connect.conf 

post what you see there, we will use this info later for the other side.

Now go to the node red flow, double-click on the ‘parse send message’ node so it opens in edit mode. This is in the last flow that starts with the ‘/push’ node, replace heyu in quotes on line 12 with a space so it should look like this:

    msg.payload  = " ";
    msg.payload += obj.device.substring(0,2) == "RF" ? " f" :" "; 

make sure there is a space between the quotes in line 12

let me know if you can use the ST app to turn the B2 module on/off or if there are errors

returns this: {“ip_for_st”:“192.168.1.9”,“port_for_st”:“39500”}
The error msgs about can’t finding smartthings hub are gone since 1st reboot.

Removed heyu and added the space. It’s working now from the smarthings app.
One thing I noticed is if I turn B2 on or off B2 key via remote the on/off button in smartthings doesn’t get updated to reflect the current state but the info shows in the monitor that the remote triggered it…

Now the next step. I tried to hit the B3 key on the remote, which I mapped to a zigbee light. I think I hit it 3 times. Here is full log from the beginning of today’s tests:

johnny@AthlonX4 ~ $ node-red
25 Feb 15:00:34 - [info]

Welcome to Node-RED

25 Feb 15:00:34 - [info] Node-RED version: v0.18.3
25 Feb 15:00:34 - [info] Node.js version: v8.9.4
25 Feb 15:00:34 - [info] Linux 4.4.0-112-generic x64 LE
25 Feb 15:00:35 - [info] Loading palette nodes
25 Feb 15:00:36 - [warn] ------------------------------------------------------
25 Feb 15:00:36 - [warn] [node-red/rpi-gpio] Info : Ignoring Raspberry Pi specific node
25 Feb 15:00:36 - [warn] ------------------------------------------------------
25 Feb 15:00:36 - [info] Settings file : /home/johnny/.node-red/settings.js
25 Feb 15:00:36 - [info] User directory : /home/johnny/.node-red
25 Feb 15:00:36 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
25 Feb 15:00:36 - [info] Flows file : /home/johnny/.node-red/flows_AthlonX4.json
25 Feb 15:00:36 - [info] Server now running at http://127.0.0.1:1880/
25 Feb 15:00:36 - [info] Starting flows
25 Feb 15:00:36 - [info] Started flows
25 Feb 15:00:41 - [warn] [function:Parse heyu Messages] in - starting heyu_relay
02/25 15:00:41 Monitor started

25 Feb 15:00:41 - [info] [function:Parse heyu Messages] t1
25 Feb 15:11:01 - [info] Stopping flows
25 Feb 15:11:01 - [info] Stopped flows
25 Feb 15:11:01 - [info] Starting flows
25 Feb 15:11:01 - [info] Started flows
25 Feb 15:11:03 - [warn] [function:Parse heyu Messages] in - 02/25 15:11:03 Monitor started

25 Feb 15:11:03 - [info] [function:Parse heyu Messages] t1
25 Feb 15:12:34 - [warn] [function:Parse heyu Messages] in - 02/25 15:12:34 sndc addr unit 2 : hu B2 (no_alias)

25 Feb 15:12:34 - [info] [function:Parse heyu Messages] t1
25 Feb 15:12:35 - [warn] [function:Parse heyu Messages] in - 02/25 15:12:35 sndc func On : hc B

25 Feb 15:12:35 - [info] [function:Parse heyu Messages] t1
25 Feb 15:12:41 - [warn] [function:Parse heyu Messages] in - 02/25 15:12:41 sndc addr unit 2 : hu B2 (no_alias)

25 Feb 15:12:41 - [info] [function:Parse heyu Messages] t1
25 Feb 15:12:41 - [warn] [function:Parse heyu Messages] in - 02/25 15:12:41 sndc func Off : hc B

25 Feb 15:12:41 - [info] [function:Parse heyu Messages] t1
25 Feb 15:12:44 - [warn] [function:Parse heyu Messages] in - 02/25 15:12:44 sndc addr unit 2 : hu B2 (no_alias)

25 Feb 15:12:44 - [info] [function:Parse heyu Messages] t1
25 Feb 15:12:44 - [warn] [function:Parse heyu Messages] in - 02/25 15:12:44 sndc func On : hc B

25 Feb 15:12:44 - [info] [function:Parse heyu Messages] t1
25 Feb 15:12:46 - [warn] [function:Parse heyu Messages] in - 02/25 15:12:46 sndc addr unit 2 : hu B2 (no_alias)

25 Feb 15:12:46 - [info] [function:Parse heyu Messages] t1
25 Feb 15:12:47 - [warn] [function:Parse heyu Messages] in - 02/25 15:12:47 sndc func Off : hc B

25 Feb 15:12:47 - [info] [function:Parse heyu Messages] t1
25 Feb 15:12:59 - [warn] [function:Parse heyu Messages] in - 02/25 15:12:59 rcvi addr unit 2 : hu B2 (no_alias)
02/25 15:12:59 rcvi func On : hc B

25 Feb 15:12:59 - [info] [function:Parse heyu Messages] t1
25 Feb 15:12:59 - [warn] [function:Parse heyu Messages] m1a - b:2
25 Feb 15:12:59 - [warn] [function:Parse heyu Messages] m2
25 Feb 15:12:59 - [warn] [function:Parse heyu Messages] m2a - b:on
25 Feb 15:12:59 - [info] [function:Setup http request] Please ignore the message properties override warning
25 Feb 15:12:59 - [warn] [http request:http request to ST] Warning: msg properties can no longer override set node properties. See bit.ly/nr-override-msg-props
25 Feb 15:13:08 - [warn] [function:Parse heyu Messages] in - 02/25 15:13:08 rcvi addr unit 2 : hu B2 (no_alias)
02/25 15:13:08 rcvi func Off : hc B

25 Feb 15:13:08 - [info] [function:Parse heyu Messages] t1
25 Feb 15:13:08 - [warn] [function:Parse heyu Messages] m1a - b:2
25 Feb 15:13:08 - [warn] [function:Parse heyu Messages] m2
25 Feb 15:13:08 - [warn] [function:Parse heyu Messages] m2a - b:off
25 Feb 15:13:08 - [info] [function:Setup http request] Please ignore the message properties override warning
25 Feb 15:13:08 - [warn] [http request:http request to ST] Warning: msg properties can no longer override set node properties. See bit.ly/nr-override-msg-props
25 Feb 15:13:11 - [warn] [function:Parse heyu Messages] in - 02/25 15:13:11 rcvi addr unit 2 : hu B2 (no_alias)
02/25 15:13:11 rcvi func On : hc B

25 Feb 15:13:11 - [info] [function:Parse heyu Messages] t1
25 Feb 15:13:11 - [warn] [function:Parse heyu Messages] m1a - b:2
25 Feb 15:13:11 - [warn] [function:Parse heyu Messages] m2
25 Feb 15:13:11 - [warn] [function:Parse heyu Messages] m2a - b:on
25 Feb 15:13:11 - [info] [function:Setup http request] Please ignore the message properties override warning
25 Feb 15:13:11 - [warn] [http request:http request to ST] Warning: msg properties can no longer override set node properties. See bit.ly/nr-override-msg-props
25 Feb 15:13:11 - [warn] [function:Parse heyu Messages] in - 02/25 15:13:11 sndc addr unit 2 : hu B2 (no_alias)

25 Feb 15:13:11 - [info] [function:Parse heyu Messages] t1
25 Feb 15:13:12 - [warn] [function:Parse heyu Messages] in - 02/25 15:13:12 sndc func On : hc B

25 Feb 15:13:12 - [info] [function:Parse heyu Messages] t1
25 Feb 15:13:16 - [warn] [function:Parse heyu Messages] in - 02/25 15:13:16 sndc addr unit 2 : hu B2 (no_alias)

25 Feb 15:13:16 - [info] [function:Parse heyu Messages] t1
25 Feb 15:13:17 - [warn] [function:Parse heyu Messages] in - 02/25 15:13:17 sndc func Off : hc B

25 Feb 15:13:17 - [info] [function:Parse heyu Messages] t1
25 Feb 15:13:19 - [warn] [function:Parse heyu Messages] in - 02/25 15:13:19 sndc addr unit 2 : hu B2 (no_alias)

25 Feb 15:13:19 - [info] [function:Parse heyu Messages] t1
25 Feb 15:13:19 - [warn] [function:Parse heyu Messages] in - 02/25 15:13:19 sndc func On : hc B

25 Feb 15:13:19 - [info] [function:Parse heyu Messages] t1
25 Feb 15:13:25 - [warn] [function:Parse heyu Messages] in - 02/25 15:13:25 rcvi addr unit 2 : hu B2 (no_alias)
02/25 15:13:25 rcvi func Off : hc B

25 Feb 15:13:25 - [info] [function:Parse heyu Messages] t1
25 Feb 15:13:25 - [warn] [function:Parse heyu Messages] m1a - b:2
25 Feb 15:13:25 - [warn] [function:Parse heyu Messages] m2
25 Feb 15:13:25 - [warn] [function:Parse heyu Messages] m2a - b:off
25 Feb 15:13:25 - [info] [function:Setup http request] Please ignore the message properties override warning
25 Feb 15:13:25 - [warn] [http request:http request to ST] Warning: msg properties can no longer override set node properties. See bit.ly/nr-override-msg-props
25 Feb 15:13:32 - [warn] [function:Parse heyu Messages] in - 02/25 15:13:32 sndc addr unit 2 : hu B2 (no_alias)

25 Feb 15:13:32 - [info] [function:Parse heyu Messages] t1
25 Feb 15:13:32 - [warn] [function:Parse heyu Messages] in - 02/25 15:13:32 sndc func Off : hc B

25 Feb 15:13:32 - [info] [function:Parse heyu Messages] t1
25 Feb 15:14:59 - [error] [http request:http request to ST] no response from server
25 Feb 15:14:59 - [error] [http request:http request to ST] Error: socket hang up
25 Feb 15:15:02 - [warn] [function:Parse heyu Messages] in - 02/25 15:15:02 rcvi addr unit 3 : hu B3 (no_alias)
02/25 15:15:02 rcvi func On : hc B

25 Feb 15:15:02 - [info] [function:Parse heyu Messages] t1
25 Feb 15:15:02 - [warn] [function:Parse heyu Messages] m1a - b:3
25 Feb 15:15:02 - [warn] [function:Parse heyu Messages] m2
25 Feb 15:15:02 - [warn] [function:Parse heyu Messages] m2a - b:on
25 Feb 15:15:02 - [info] [function:Setup http request] Please ignore the message properties override warning
25 Feb 15:15:02 - [warn] [http request:http request to ST] Warning: msg properties can no longer override set node properties. See bit.ly/nr-override-msg-props
25 Feb 15:15:05 - [warn] [function:Parse heyu Messages] in - 02/25 15:15:05 rcvi addr unit 3 : hu B3 (no_alias)
02/25 15:15:05 rcvi func On : hc B

25 Feb 15:15:05 - [info] [function:Parse heyu Messages] t1
25 Feb 15:15:05 - [warn] [function:Parse heyu Messages] m1a - b:3
25 Feb 15:15:05 - [warn] [function:Parse heyu Messages] m2
25 Feb 15:15:05 - [warn] [function:Parse heyu Messages] m2a - b:on
25 Feb 15:15:05 - [info] [function:Setup http request] Please ignore the message properties override warning
25 Feb 15:15:05 - [warn] [http request:http request to ST] Warning: msg properties can no longer override set node properties. See bit.ly/nr-override-msg-props
25 Feb 15:15:08 - [error] [http request:http request to ST] no response from server
25 Feb 15:15:08 - [error] [http request:http request to ST] Error: socket hang up
25 Feb 15:15:11 - [error] [http request:http request to ST] no response from server
25 Feb 15:15:11 - [error] [http request:http request to ST] Error: socket hang up
25 Feb 15:15:25 - [error] [http request:http request to ST] no response from server
25 Feb 15:15:25 - [error] [http request:http request to ST] Error: socket hang up
25 Feb 15:17:02 - [error] [http request:http request to ST] no response from server
25 Feb 15:17:02 - [error] [http request:http request to ST] Error: socket hang up
25 Feb 15:17:05 - [error] [http request:http request to ST] no response from server
25 Feb 15:17:05 - [error] [http request:http request to ST] Error: socket hang up
^C25 Feb 15:23:23 - [info] Stopping flows
25 Feb 15:23:23 - [info] Stopped flows
johnny@AthlonX4 ~ $

Yeah that’s cause the info is not getting to ST - once that starts working it should reflect that.
Now is your ST hub at 192.168.1.9 ? do you have it at a fixed address?

The config file shows that the hub registered with 192.168.1.9 address – the errors below show that the hub didn’t accept the notifications from the node server -
a couple of things can cause this.

  1. your hub is no longer at the address that was registered, you should be able to in your router and check that
  2. you may have another device handler that using the mac address of your linux computer, in this case the messages would get routed to that DH
  3. There is some bug in my code, will have to wait a couple of days before I can check that

You should verify that no other DH in ST is using the mac address of the linux computer. Then look turn on live logging in ST IDE and see what the various apps connected to this solution show you in the logs the answer now is probably on the ST side.

I am not home now, but I logged into the IDE and it shows the hub at that address and with a good last ping today. So while it is not set as a fixed IP address right now, I am pretty sure it is still at that address.

I do have a bunch of things i was playing with before starting what we have been working on. These all use the PC.
Here is a device handler list:
enishoca : X-10 Node Red Device enishoca/SmartThingsX (master) Published Actuator, Switch

mujica : DLNA Player Published Actuator, Music Player, Polling, Refresh, Sensor, Speech Synthesis, Switch

north3221 : Kodi-Client north3221/north3221SmartThings (master) Published Media Controller, Momentary, Music Player

pstuart : Generic Video Camera pstuart/Generic-Video-Camera (master) Published Configuration, Refresh, Switch, Video Camera, Video Capture

statusbits : VLC Thing statusbits/smartthings (master) Published Actuator, Music Player, Polling, Refresh, Speech Synthesis, Switch

vervallsweg : cast-web vervallsweg/smartthings (master) Unpublished Actuator, Audio Notification, Music Player, Polling, Refresh, Speech Synthesis, Switch

The last one (castweb) runs a node.js script running on port 3000

How can I see if the DH is using the mac address of the computer? I went to the devices list and look at the device network ID and don’t see a duplicate value.

To see the live logging, just click the link in the IDE and go about my tests?

yep you just look at the network id - if you dont see the mac address of the unix anywhere you are good - mac address usually are 6 hex digits in the for 01:A0:B1:33:43:44

yes to see live logging you just click the link on the IDE press the buttons on the X10 remote and capture what you see - there will probably be a lot of stuff in the main log, but as logs come in you will see filter links on the top of the browser and it should be obvious which ones relate to what we are looking at

Deleted the extra devices and still get error messages. Been looking at live logging as well.

I think it might be the code. Here is the log:

28 Feb 21:18:11 - [info] [function:Parse heyu Messages] t1
28 Feb 21:18:11 - [warn] [function:Parse heyu Messages] m1a - b:3
28 Feb 21:18:11 - [warn] [function:Parse heyu Messages] m2
28 Feb 21:18:11 - [warn] [function:Parse heyu Messages] m2a - b:off
28 Feb 21:18:11 - [info] [function:Setup http request] Please ignore the message properties override warning
28 Feb 21:18:11 - [warn] [http request:http request to ST] Warning: msg properties can no longer override set node properties. See bit.ly/nr-override-msg-props
28 Feb 21:19:50 - [error] [http request:http request to ST] no response from server
28 Feb 21:19:50 - [error] [http request:http request to ST] Error: socket hang up
^[[1;2B28 Feb 21:19:57 - [error] [http request:http request to ST] no response from server
28 Feb 21:19:57 - [error] [http request:http request to ST] Error: socket hang up
28 Feb 21:20:01 - [error] [http request:http request to ST] no response from server
28 Feb 21:20:01 - [error] [http request:http request to ST] Error: socket hang up

See this error is saying it can’t talk to ST, not that the payload has a problem. I haven’t touched that part of the flow and it is the same as in the old flow. So the only thing possible is that there is a connectivity issue between ST and this machine. That is why we need to check logs from ST.

You mentioned in one of the earlier posts that the ST IP is not nailed down, that is kind of iimportant becaue over time if your router changes the IP for ST node-red wont be able to find it.

Can you please run this this command on your linux mint machine

telnet 192.168.1.9 39500

should see something line this - this will tell us that your linux machine can connect to ST or if there something blocking it.

Trying 92.168.1.9...
Connected to st-24fd5b0000020ce8.
Escape character is '^]'.

Its kinda hard for me to test this since I don’t have the device and have to take down my mochad system to test it - anyhow I tested it using a simulator and sent the same strings you are sending, and it works fine for me.

Also don’t see any parsing errors in your logs, the debug log seems to indicate timeout to ST server. The way http works for ST, even if the app isn’t running on ST hub it still consumes the message so you should never see this error.

Ran this command before starting node red and then again after it was started and i confirmed I was able to turn the X-10 lamp on and off from the things list in the phone app. Seemed to work correctly in both cases.
johnny@AthlonX4 ~ $ telnet 192.168.1.9 39500
Trying 192.168.1.9…
Connected to 192.168.1.9.
Escape character is ‘^]’.
Connection closed by foreign host.
johnny@AthlonX4 ~ $ telnet 192.168.1.9 39500
Trying 192.168.1.9…
Connected to 192.168.1.9.
Escape character is ‘^]’.
Connection closed by foreign host.
johnny@AthlonX4 ~ $

That is a bummer - I have updated the flow in the gist with some additional debugging nodes - would be great if you can try it. when you get it going, expand the debug message in the node-red debug panel that starts with curly message, it will show us what is being packed to send to ST