Set Text device font colour through json url  [Solved]

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
calania
Posts: 20
Joined: Friday 17 April 2020 21:02
Target OS: Windows
Domoticz version:
Contact:

Set Text device font colour through json url

Post 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.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

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

Post 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>
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
calania
Posts: 20
Joined: Friday 17 April 2020 21:02
Target OS: Windows
Domoticz version:
Contact:

Re: Set Text device font colour through json url

Post by calania »

Well that was easier than I expected, worked perfectly. Thanks for the help!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest