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) - #6 by ady624 - webCoRE - 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

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.