Execute Shell Script on Pi

Has anyone figured out a way to execute a shell script on a remote Linux box from a virtual switch?


Yes I use node red to do this.

1 Like

I believe there is a bug being worked on so soon we should be able to telnet in to our pis.

Thank - I'll have a look at node-red. How did you tie this to a virtual switch in hubitat though?


Have the virtual switch be a http switch.

Setup the http endpoint in node red.

1 Like

Any chance you could share a working node-js workflow screenshot for something simple?

here is the flow I use for the alexa tts script

The node that passes the tts text to the alexa script

Great! So I have node red working and am able to execute a shell script from a url. Could you give me a few pointed on how to set up the virtual switch?

Thanks for your help!

I use this for basic http calls. If you need to pass any kind of parameters / data we will have to make modifications.

I plan to use a Raspberry Pi to display Hubitat Dashboard mounted on my wall. Is it possible to have Hubitat turn off the screen of the RPI when motion isn't present for 2 minutes? And then turn back on when motion resumes?

These commands can turn on and off the screen: Screenly - How to automatically turn off and on your monitor from your Raspberry Pi

Is it possible for Hubitat to execute these commands?

@ogiewon would the Hubitat HTTP Momentary Switch Drive work in this scenario? Perhaps I can create a pythons script that runs flask on the RPI. And then have Hubitat send a post command when motion is and isn't present? The RPI can then execute a .sh script to turn on and off the display.

That does seem like one possibility. Another would be to use my son’s OmniThing project to integrate a RPi with Hubitat. I know he uses OmniThing running on his Linux computer to run scripts to turn on/off his monitors.


Thanks for the info! Will look into it. Is OmniThings supported by Hubitat now?

There is a Hubitat specific Parent Driver. Everything else is shared between the two platforms, IIRC.

1 Like

From Github it looks like the Hubitat integration isn't ready.

Is that not the case?

Well, I ported my son’s ST Parent DTH to the Hubitat Driver. That’s what is in the OminiThing GitHub repo. I haven’t used it in a while, but it was working fine at the time. Give it a try.