Looks like the same information I entered (Post 66 above, under Ā« Summary Ā»::
Any errors in your logs? What do you see with debug logging enabled?
Looks like the same information I entered (Post 66 above, under Ā« Summary Ā»::
Any errors in your logs? What do you see with debug logging enabled?
There are two things you need to set up. One is the IP device in the SofaBaton app like you've described to send a message to your Hubitat. The URL you in your writeup seemed to be missing the last bit that I think is required (//yourhubip:39501/route)
The second is a virtual device on your Hubitat that is configured with a driver like the example Mike provided to handle the message sent from the remote and then perform some work based on the contents of the message.
Thanks SO much!!! Maybe you have hit what I'm just not getting.
//yourhubip:39501/route
What goes in the route field?
Thanks SO much!!! Maybe you have hit what I'm just not getting.
//yourhubip:39501/route
What goes in the route field? That's blank in examples?
Just leave it alone, the hub doesn't need it, but the SofaBaton app won't send the data unless it or some other path is there, bug on their end...
Thanks. Guess I'm back to ground zero why this isn't working then.
did you follow the instructions exactly as noted in the hubitat example driver?
Get that example working before you make any changes.
If you can get a screenshot of your configuration in the SofaBaton app and post it here that might help us troubleshoot your issue. Also, if you're using Android I have found that the setup needs to be a little different in order to get the connection between the remote and the driver to work.
From the log...it's not happy with the on/off commands from the device...it appears to just send a numbered button push.
Somewhere I saw a comment about needing to add some device info to the driver...is there something I need to modify?
Level
Clear filters
dev:7192025-04-29 11:17:24.618 AM
error
org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_driver_hubitat_Sofabaton_X1S_1249.on() is applicable for argument types: () values:
dev:7192025-04-29 11:17:22.856 AM
error
org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_driver_hubitat_Sofabaton_X1S_1249.off() is applicable for argument types: () values:
dev:7192025-04-29 11:17:20.617 AM
info
Sofabaton Button 1 Pushed
AFAICT, thatās basically what this driver does.
It allows you to send an http command from SofaBaton to Hubitat, which is then interpreted as a virtual button press.
What you do with other Hubitat apps or devices once this SofaBaton integration button is pushed, is up to you and your AV needs.
Itās possible to configure more than one button this way if needed.
What are you trying to turn on? An LG TV in the same room as your SofaBaton hub? Or in another room?
If that message was in your logs, then it sounds like you got your virtual button press. Now you can set up a rule with that button press as the trigger and perform any actions you need in Hubitat.
(It's much easier for others to understand your log entries if you post a screenshot)
As @OldChicagoPete indicates screenshots are easier to read.
That said, from the error above, it sounds to me like it was expecting something but didnāt get it. Hopefully, someone that understands these errors can chime inā¦
This is what ChatGPT tells me based on the error text:
//ChatGPT
This error means your Hubitat driver (likely Sofabaton X1S) is trying to call a method named on()ābut that method doesnāt exist in your driver code.
Error Breakdown:
⢠MissingMethodExceptionNoStack: Groovy (Hubitat uses Groovy) canāt find a method youāre calling.
⢠No signature of method: ...on(): Youāre calling on() with no arguments, but the method isnāt defined.
⢠applicable for argument types: () values:: Confirms itās being called with no parameters.
Common Causes:
1. You forgot to define def on() in your driver.
2. Youāre using a command in the app that expects the driver to support on(), like for switches or lights.
3. The driver might be pretending to be a capability that requires on()/off(), e.g., Switch, but hasnāt implemented those methods.
How to Fix:
⢠If the driver claims to support capability "Switch" (or similar), you must define:
def on() {
// your logic here
}
def off() {
// your logic here
}
⢠If your device isnāt a switch, either:
⢠Remove the capability from the driver.
⢠Or stub out the on() method to avoid errors, even if it does nothing.
Want me to review your driver code to confirm the fix?
//ChatGPT
THANKS TO ALL!
There's a lot here. I really appreciate your time. I can't get to this tonight...but will start looking at this in the morning. Thanks again.
Could this be an indication of something wrong on my Hubitat side. It's my understanding that the communication with SofaBaton is one way. I admit that's a guess from the little I know. In a post above of the EVENT tab for the device...I don't have all the same fields populating. It also never shows an on/off button push.
Does SofaBaton "return" the missing fields? THX!
I can copy and paste the API links in the app into a browser and it runs the activity I want.
I also think I'm missing a concept here. If I can only add a button as a device...what ties it to an activity?
Hubitat can start any SofaBaton activity. As far as I know however, it cannot send button presses. (Ex.: Volume, channel, etc.)
Once a button is created in SofaBaton, it can be used within the start or end scripts of an activity. It can also be mapped to one of the existing remote buttons.
Thanks for the clarification. I hope to have time to work on this over the weekend again.
Just to be sure I'm not in way over my head...when you refer to "scripts"...you simply mean configuring activities with the app interface? Correct?
While it would be nice to have even more control...all I really need is to launch activities from Hubitat. I may not even really use the remote itself since all my TV's are "front ended" with AppleTV devices. I really like the simplicity of the remote.
Do you mean use Hubitat to trigger SofaBaton activities?
Then you really donāt need to spend any time messing around with this Hubitat driver.
As I said above, this driver allows you to use a SofaBaton activity to trigger a Hubitat automation.
Thatās literally the opposite direction of communication, to be as clear as possible.
To launch a SofaBaton activity from Hubitat, all you need to do is use SofaBatonās native mobile app to enable your SofaBaton hubās API interface.
Once enabled, youāll see a list of webhooks for each of your SofaBaton activities, both turn on and turn off.
Copy and paste the webhook for the activity you want to turn on or off from the SofaBaton mobile app into a Hubitat rule machine action. The type of rule machine action needed is āsend http get.ā
This can be repeated with as many activity webhooks as you need.
No Hubitat drivers required.
OMG...thx! This one precise statement clarified what I had been missing.
"Thatās literally the opposite direction of communication, to be as clear as possible."
It wasn't clear to me at all.
This all started in another thread looking for a BlueTooth equivalent of an IR extender and a user sent me to this chain. Many also are looking to get rid of their Harmony remotes. It a shame the interaction isn't more bi-directional...but I can do all I need with just an http command. Funny, but it explains pretty well why what I was losing my mind over wasn't working!
Though it seems odd that the app has a field for "sending" a button number...
If it can't send them...is there a use for them. I don't get the on / off either if Hubitat can only receive commands...but it probably has more to do with testing a log message...or something I guess?
The driver allows Hubitat to receive button commands from the remote. I use that to allow SofaBaton to tell Hubitat what activity was started, or if it was turned off.
I notice this remote has no numbers. I rarely use channel numbers anymore, however there are times when number entry is needed. For instance, in the UK when using Virgin Media TiVo or TV360, it's not possible to disable the parental control PIN. Attempting to watch a recorded program that was shown after the watershed time requires the PIN to be entered to start playback. I just leave this as 1,2,3,4 so can tap it in very quickly but how would you do it with the Sofabaton? Sometimes a PIN needs to be entered when pairing devices or authorising access too.