Page 1 of 1

Set Text device font colour through json url

Posted: Friday 17 April 2020 21:16
by calania
Hello, firstly, yes I know this isn't a dzvents question even though I posted it under that forum group but I couldn't find another topic that it would match under and I hope that you guys could help me anyway.

I have a text device that is controlled by an ardiuno going to the url
json.htm?type=command&param=udevice&idx=266&nvalue=0&svalue=Stuck
Everything about it works however I found in this forum post https://www.domoticz.com/forum/viewtopic.php?t=26520 that you can set the font colour off a text device using a Lua script. I just wonder if this is possible to integrate into the URL above (without making new a lua script) so that "Stuck" is for example in red.

Re: Set Text device font colour through json url  [Solved]

Posted: Friday 17 April 2020 22:03
by waaren
calania wrote: Friday 17 April 2020 21:16 I have a text device that is controlled by an ardiuno

Everything about it works however I found that you can set the font colour off a text device using a Lua script. I just wonder if this is possible to integrate into the URL above (without making new a lua script) so that "Stuck" is for example in red.
this works for me:

Code: Select all

/json.htm?type=command&param=udevice&idx=266&nvalue=0&svalue=<font%20color="red">Stuck</font>

Re: Set Text device font colour through json url

Posted: Friday 17 April 2020 23:09
by calania
Well that was easier than I expected, worked perfectly. Thanks for the help!