Update a text block with status of home from a variable Topic is solved

Moderator: leecollings

Post Reply
User avatar
Zweef
Posts: 17
Joined: Sunday 02 November 2014 16:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Update a text block with status of home from a variable

Post 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?
Domoticz on Raspberry Pi 3 using mainly Z-Wave

Other gateways:
Fibaro HC2
Athom Homey
User avatar
Zweef
Posts: 17
Joined: Sunday 02 November 2014 16:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

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

Post 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!
Domoticz on Raspberry Pi 3 using mainly Z-Wave

Other gateways:
Fibaro HC2
Athom Homey
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest