Search found 13 matches

by infoed
Tuesday 07 October 2025 19:12
Forum: dzVents
Topic: OpenURL HTTP postdata string behaviours with Tibber API
Replies: 12
Views: 239

Re: OpenURL HTTP postdata string behaviours with Tibber API

This is out of scope of this issue. This one is solved. I know the conts of the domticz P1*costs calculations. Another issue.
by infoed
Tuesday 07 October 2025 18:46
Forum: dzVents
Topic: OpenURL HTTP postdata string behaviours with Tibber API
Replies: 12
Views: 239

Re: OpenURL HTTP postdata string behaviours with Tibber API

No, it aint. Tibber API data is richer, P! does not have tibber prices
by infoed
Tuesday 07 October 2025 17:14
Forum: dzVents
Topic: OpenURL HTTP postdata string behaviours with Tibber API
Replies: 12
Views: 239

Re: OpenURL HTTP postdata string behaviours with Tibber API

Solved it the help of Tibber Dev en Gemini ;-)

To fix this, you need to escape the inner double quotes with a backslash (\). This tells the JSON parser to treat them as literal quote characters inside the string, rather than as the end of the string.

So, with CURL it will be ...after ...
by infoed
Tuesday 07 October 2025 11:42
Forum: dzVents
Topic: OpenURL HTTP postdata string behaviours with Tibber API
Replies: 12
Views: 239

Re: OpenURL HTTP postdata string behaviours with Tibber API

According to the tibber API doc, I have to wrap the query in a JSON object.
This is on their page https://developer.tibber.com/docs/guides/calling-api:


In order to issue this query to the server you will have to wrap the query in a JSON object:

{
"query": "{ viewer { name }}"
}
Note that the ...
by infoed
Tuesday 07 October 2025 11:13
Forum: dzVents
Topic: OpenURL HTTP postdata string behaviours with Tibber API
Replies: 12
Views: 239

Re: OpenURL HTTP postdata string behaviours with Tibber API

Thanks for the quick respons. Indeed, the postData is one string:
postData = '{"query": "{viewer{homes{consumption(resolution:DAILY,last: 31 ,after:"MjAyNS0wOS0wMQ" ){nodes{from cost unitPrice consumption}}}}}"}'

When I remove the quotes on the "after" keyword (like this after: MjAyNS0wOS0wMQ) it ...
by infoed
Tuesday 07 October 2025 10:08
Forum: dzVents
Topic: OpenURL HTTP postdata string behaviours with Tibber API
Replies: 12
Views: 239

OpenURL HTTP postdata string behaviours with Tibber API

I'm using the OpenURL postdata string to send a GraphQL command to the Tibber API.
Tibber has a developer site https://developer.tibber.com/explorer where you can test if the postdata string is correct, that is, produces JSON result.

I come across that a GraphQL command in de tibber developer works ...
by infoed
Thursday 11 September 2025 12:32
Forum: dzVents
Topic: dynamice pricing with /json.htm?type=command&param=graph&sensor=counter&idx=IDX&range=
Replies: 3
Views: 115

Re: dynamice pricing with /json.htm?type=command&param=graph&sensor=counter&idx=IDX&range=

Solved! Thanks for the quick reply.
I found out that the enever plugin comes with 2*2 kind of pricing custom sensors : for electra and gas, daily and hourly. The daily ones fetches 24 items at the time (00:00) but these sensors are not update during the day because the pricing remains the same ...
by infoed
Tuesday 09 September 2025 12:11
Forum: dzVents
Topic: dynamice pricing with /json.htm?type=command&param=graph&sensor=counter&idx=IDX&range=
Replies: 3
Views: 115

dynamice pricing with /json.htm?type=command&param=graph&sensor=counter&idx=IDX&range=

I have a Dzvents script working with the json api call to retrieve electricity and gas data from my P1 meter, I'm using Tibber as dynamic e. provider.
Using 2024.7 in a docker container.

To collect the daily pricing in the historic data of electra and gas devices I have set the "dynamic price ...
by infoed
Wednesday 20 November 2024 16:05
Forum: dzVents
Topic: Access multiple json.item objects
Replies: 2
Views: 3255

Access multiple json.item objects

Hi,
I 'm looking for a way to process multiple HTTP resonses of different openurl results.

E.g :
Open 2 different graph API calls for 2 different devices (idx 1 and idx2)

url1 = dz.settings['Domoticz url'] .. '/json.htm?type=command&param=graph&sensor=counter&range=year&idx=' .. id1
dz.openURL ...
by infoed
Monday 28 October 2024 17:29
Forum: dzVents
Topic: Script that uses "Counter Incremental" Energy
Replies: 6
Views: 2011

Re: Script that uses "Counter Incremental" Energy

Thank you for advising to a recent version. I'm testing it right now.

Do you know how its daily totals are being calculated within the monthly tables?
I'm expecting a sum of 24 calculations: 24* hourly price * hourly usage-delivery?
by infoed
Monday 28 October 2024 11:54
Forum: dzVents
Topic: Script that uses "Counter Incremental" Energy
Replies: 6
Views: 2011

Re: Script that uses "Counter Incremental" Energy

I am looking for a custom device in which I can store the hourly costs of gas / electric.

I read that I should not use a counter incremental but a normal energy counter.
But those counters are using the energy rates as defined with the setup.

I would like to store the hourly prices in a custom ...
by infoed
Wednesday 23 October 2024 12:36
Forum: dzVents
Topic: historical data from db
Replies: 2
Views: 3092

Re: historical data from db

Be aware that the content of the results of the json API calls may have changed!

I updated from DOM 2024.1 to 2024.7.

In some of the JSON API results with energy meters with more then one counter , in version 2024.1 there's the "v" and in 2024.7 changed in "v1".
E.g result for P1 smart meter with ...
by infoed
Monday 21 October 2024 14:56
Forum: Suggestions
Topic: Energy, Gas, Water JSON/API question/answer suggestion.
Replies: 7
Views: 6516

Re: Energy, Gas, Water JSON/API question/answer suggestion.

Hi, I'm looking for one API call where I can see the daily usage and the counters for both the "result" as the "prevresult" payload.
Purpose is to get an calculation of yearly usage based on "to day".

I've noticed that sometimes the dayly usage calculation, every night by domitcz, is returning ...