I'm a newbie again... Yey!

Ahhh… TTS is something I’ve never used so I won’t be any help there… but I did read somewhere on here that someone is working on porting over BigTalker?

Looks like webCoRE isn’t recognising your audio device though… might just be a capability reference missing from the device driver or something?

I am just finally starting to use webCoRE, so I don’t know much, but are there any ways to reduce overhead? Silence the log output for example?

1 Like

No idea, sorry… I’m a power user of webCoRE but under the hood there is black magic that I’ll never understand lol

I have noticed that the most effective way to reduce latency is to design pistons in an efficient manner.
Did some googling and realized that Adrian has already explained this far better than I could in another thread.

The most efficient way is probably to separate tasks into related groups for each piston. I, for example, have a piston that handles all outside lights (about 15 of them) - it will blink them red when there’s an alert, turn them all white at night and shut them off at dawn, do color schemes on certain special days (can’t wait for July 1st to come to test my 4th of July part). Whenever I have to do something with one of those 15 lights, I do it, then execute the outdoor light piston to reset it to where the light should be. I have another that handles the bedroom lights. Another that handles the kitchen lights. I try to keep each piston concise on its task and make sure no two pistons overlap on their scope. The least pistons subscribing to any device, the better. Scratch that, the least SmartApps subscribing to any device, the better. If you have issues with ST becoming unstable, turn minimum detail logs on for all pistons and get a sense on how often they run. How long do they take to run? Are you using a loop without a wait in it? Enable pistons one by one and see what happens. Also, keep in mind that sending too many commands to devices at the same time floods your radio networks. There are options in webCoRE to inject an inter-command delay - if that is causing an issue.
.
Source: Efficient Piston design in webCoRE (to minimize resource utilization) - CoRE - SmartThings Community

As for platform features like logging, execution parameters etc., I am in the same boat as Robin and don’t fully understand how much of an impact they have. I’ll try to test that and report though.

1 Like

I may be wrong but I don’t think Hubitat support textToSpeech() yet.
SmartThings uses an AWS service called Amazon Polly as its voice interface and I believe a similar service is already on the Hubitat roadmap too. @bravenel: Please correct my if I am wrong.

When the Hubitat equivalent function is ready in a future update, I assume we would only need to update the function name in the webCoRE App code and then the speech feature should start working.

I hope pistons not using Speak are working fine for you.

1 Like

From the log it looks like the piston isn’t see a state change Comparison (enum) off changes = false so it isn’t getting to the actual execution. Are you looking to run it if it changes to both on/off? Maybe try changing the statement to changes to on as a test. You can also turn on Trace which will show the results of the conditional statements with the # that correlate to the log.

1 Like

It was just a test piston that I gen’d up. I thought I was picking something simple that was sure to work. Looks like I stumbled onto a trigger and an action that aren’t supported. Indeed, when I fixed the trigger to changes to on and the execution was to turn the switch off, it worked. Also, a test to trigger off motion and to turn a switch on, wait, turn it off is working.
.

Can you elaborate on this, particularly in reference to RM speech capability? I have RM rules that speak to LANnouncer devices. What is it about webCoRE that makes it unable to do what RM can do (other than Bruce is the RM author :slight_smile: )

I am also curious about the future of webCoRE. As mentioned above, the author is very unlikely to support any platform other than ST, so we are dealing with code that will atrophy on a system that has no incentive to accommodate it going forward. I found myself using webCoRE for just about everything on ST - some dead simple, some very complex. Without webCoRE, I don’t see how I can migrate some of the more complex automations; so I guess I will re-implement the simple automations with RM and hope/pray webCoRE works long enough that I can find a way with RM.

Thanks, all.

1 Like

I don’t think we need to worry about the webCoRE smartapps getting old… more a concern that access to the webCoRE server my get cut off!! So no editing or creating pistons!!

I’ve noticed when using ‘changes’ with webCoRE+Hubitat, that you have to initiate the piston with an initial change, before it starts working… obviously starts out as state = ‘null’.

A change from null to x does nothing… but then x to y works going forward.

This used to be the same on ST but Adrian found a workaround.

Biggest problem I see myself having with RuleMachine so far is that it can’t be triggered by multi-channel attributes… it only sees the first channel. Custom commands work for the actions though.

1 Like

AFAIK, flexible variables are not possible in RM. I use for devices and a lot for logging and speaking.

1 Like

I don’t think we need to worry about the webCoRE smartapps getting old… more a concern that access to the webCoRE server my get cut off!! So no editing or creating pistons!!

I may be wrong but I think Adrian has the web interface source released on GitHub in the ‘dist’ folder.
It may just be a matter of hosting the web UI files on some other server or even locally and then pointing the webCoRE code to it, to remove all dependencies from the current cloud setup.
I remember reading about this somewhere on the webCoRE forum. Haven’t tried it myself though.

2 Likes

Can you elaborate on this, particularly in reference to RM speech capability? I have RM rules that speak to LANnouncer devices. What is it about webCoRE that makes it unable to do what RM can do (other than Bruce is the RM author :slight_smile: )

I made this statement out of my experience with VLCThing. The driver doesn’t run on Hubitat for this reason (the function was not supported). I also found another member asking a similar question on this thread (textToSpeech()?). Not entirely sure though.
Maybe Bruce and elaborate more on this.

1 Like

Indeed @mattw has accomplished this: Using webCoRE with Hubitat

1 Like

I think what’s confusing is where the text to speech conversion is taking place.

With LANnouncer, a string is passed to the device which it then uses Android’s TTS settings to convert the string to speech on the device.

With SmartThing’s textToSpeech() method, a string is passed to a web service in the background which returns a URL to an audio stream that can be played back as media (with a DLNA capable device or VLCThing), so the conversion takes place in the cloud.

What’s working now is the first method of text to speech with conversion taking place on the device. Hubitat currently doesn’t have cloud services available to do this conversion for playback on media devices. I haven’t looked into webCoRE’s TTS method too much, but I’m guessing it just leverages ST’s textToSpeech() method, which would make it not available on Hubitat.

4 Likes

So what I’ve done on my more complex pistons is used other hub SmartThings integration and the virtual devices it creates in SmartThings along with webCoRE in SmartThings.

I then updated the SmartThings pistons to use the virtual devices.

Granted, this takes away the local processing for the more complex pistons, but it allowed me to get all of my devices on hubitat while I wait for all the code to catch up. Once the code is caught up I can easily migrate the pistons.

It also gives me the flexibility to swap between SmartThings webCoRE and hubitat webCoRE by pausing pistons that I’ve already migrated.

2 Likes

I have a webCoRE piston in Hubitat that speaks an alert on my LANnouncer tablet, so I don’t think that’s the problem here. But I guess to test the piston, maybe the original poster could try a light bulb/switch or something simpler that is definitely known to work?

I’ve had problems with some of my pistons, too, so I’m trying not to rely on webCoRE in Hubitat too much, but it was nice to more or less port over a few I had in ST. I’m not as well versed in Rule Machine and I’m not sure it can handle all the complications I threw at webCoRE, so I think writing/porting custom (Smart)Apps might be the best way forward for me with some of my automations, even though webCoRE made me very happy on ST that I didn’t have to do that anymore.

2 Likes

Can you post your LANnouncer DTH? I know nothing of groovy, but I ported the code I had on ST, with one line that threw an error; so not knowing what else to do, I just commented that line and it seems good. But I’d like a real Hubitat port if it’s out there.

I posted over in the main webCoRE thread that I’ve since encountered dashboard problems that prevent me from seeing any of my Hubitat pistons. I’m not able to experiment any further, for now, but I did get some success executing pistons that didn’t use speech.

I’m not using a “real”/official Hubitat port of the LANnouncer driver/DTH either—I just copied the one from ST and removed the “tiles” and “simulator” sections since Hubitat doesn’t use them (though even if they were left in, I don’t think it should throw an error). On line 266 of the original, there is also a reference to “physicalgraph”, which you’ll need to replace with “hubitat” in order to work on Hubitat. (This is the most common thing you’ll have to do to port any ST DTH to a Hubitat driver.)

I don’t use all features of the driver, mostly just TTS with actual text, so I’m not sure if everything else is working (though I don’t see why it wouldn’t), but this does all I need it to.

2 Likes

Download the Hubitat app