Page 1 of 1

Update a text block with status of home from a variable

Posted: Sunday 05 March 2017 2:16
by Zweef
Hi to you all!

I'm quite new with Domoticz. So I have a really noob question. :mrgreen:

I have made a variable with a string which represent the status of my home (Home, Sleeping, Away etc).
I want to show it in a text (or alert?) utility virtual device. How can I do that?

It seems I can't use blocks to do this. Anyone got suggestions?

Re: Update a text block with status of home from a variable

Posted: Sunday 05 March 2017 23:03
by Zweef
Found it! Let me share.....

It's possible by using Domoticz API.

1 - Enable access with no protection by adding 127.0.0.* in System Setup --> Local Networks (no username/password)
2 - Restart (in my case the Raspberry Pi 3)
3 - Add in Blocky --> Messages --> Open Url: with http://
4a - Text-sensor URL:
127.0.0.1:8080/json.htm?type=command&param=udevice&idx=IDX&nvalue=0&svalue=TEXT
4b - Alert-sensor URL:
127.0.0.1:8080/json.htm?type=command&param=udevice&IDX&nvalue=LEVEL&svalue=TEXT
- - Explanation of nvalue Level = (0=gray, 1=green, 2=yellow, 3=orange, 4=red)

Beware not to use space-characters in TEXT. Replase with space with %20, otherwise it will not work.

Tested it with Domoticz V3.5877 on Rapberry Pi 3.

See Yah!