How to do this?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
edwin1234
Posts: 330
Joined: Sunday 09 October 2016 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Nederland
Contact:

How to do this?

Post by edwin1234 »

I can do a call to my hs server like:

http://192.168.1.123/jsonapi.asp?action ... ice&id=$31
Then i get:
{"id": "$31", "name": "CV-ketel", "room": "Zolder", "floor": "", "dimmable": onwaar, "status": 2, "value": 68, "since": "8-1-2017 10:20:40", "type": "Plugwise: CV-ketel", "status_support": onwaar, "misc": "65536"}

How do i get for example the "value" 68 (wich is watt)
In domoticz?
Thanks
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: How to do this?

Post by Egregius »

Shell script executed by cron and jq to parse the json?
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: How to do this?

Post by G3rard »

You can use the HTTP/HTTPS Poller in the Domoticz hardware section. See the following url.
http://www.domoticz.com/forum/viewtopic ... 6&p=112529

There are some example LUA files which you can use in the scripts/lua_parsers directory.
In your case you can use the example_json.lua.

It's a great function and you can all control it from Domoticz, also the interval.
Recently some extra features have been added.
http://www.domoticz.com/forum/viewtopic ... 2&p=112629
Not using Domoticz anymore
edwin1234
Posts: 330
Joined: Sunday 09 October 2016 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Nederland
Contact:

Re: How to do this?

Post by edwin1234 »

Thanks for your answers.
Is it also possible with node red?
And if so can you give an example of a node red flow?

Thanks
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest