Sending Text to HE with Special Characters

I would like to send details about the media being cast to my Google devices, currently using Tasker to achieve this on my phone and tablet. This mostly works, but some special characters are causing issues with how I have configured the HE end, so I am looking for any suggestions on how to handle these.

I don't want to limit peoples ideas with how I have set this up already, so will leave it open to people to suggest how best to send a string to the HE hub that may include spaces, comma's, etc. By that I mean, would some built-in feature handle this best, a Community App, etc.


Not sure what you're looking for but it sounds like url encode?

(E.g. simple device driver , maker API. But I'm not very knowledgeable about the HE platform)

Hehe, maybe I need to be more specific... :slightly_smiling_face:

I am trying to send text to a command via Maker API, but inclusion of a comma throws the command call, thinking I am sending a second command. I don't mind encoding it, and am expecting that to be the answer... But would like to avoid needing to interpret that in code I need to write, so would like to find a built-in option that translates that for me

I suspect a urlencoded value will be decoded automagically.
If not, it is just an easy url decode (which you do not have to implement yourself).
(Or perhaps I am slow and still do not get the question :wink: )

1 Like

Yeah, maybe I will post a few more details soon to give some context...

Bear in mind I am open to any suggestions to improve my choices here.... Not element of this solution is set in stone...

I have a virtual device that is using my Generic Attribute Driver, which includes a command to store a string in an attribute, accepting a single string value as a parameter. I am exposing this device in an instance of the Maler API built-in app, allowing that command to be called via a HTTP call, which I am calling via Tasker on my phone or tablet. I am passing to this command the title of the current media being cast to a Google device, e.g. a song title or Youtube clip, which can obviously include comma's or other special characters.

The problem comes when I try send a string value that includes a comma or other special characters.

I can change the call being made to encode the characters, and/or change the receiver (my driver), but, if possible, I would like to use an built-in function or app that could do this for me.

To be fair, I am expecting I need to URL encode the string in Tasker and move on, but just wanted to see if there was some magic solution already out there...

This isn't going to work with Maker API.

Yeah, also urlencoding did not work in a quick test (message got split).

I have been playing around with it as well this afternoon. For the driver I would prefer not to change to accommodate this, I just replaced a comma with a full-stop on the sender (Tasker on my phone). This didn't really pose too much of an issue as it is song titles being displayed on a dashboard, so can get away with it to some degree. For Album titles that I then want to look up online, I replace "," with two astericks followed by the word comma, followed by two more astericks. I then translate this in the driver back into ",", before then performing the online search.