Page 1 of 1
API Domoticz (my.domoticz)
Posted: Thursday 02 May 2019 23:24
by Knibor
Hi, can someone explain me, how to readout a temperature sensor in Domoticz from someone else his API in (my.domiticz.com)
I created a virtual temperature sensor.... but how to connect it to an API from (my.domoticz.com) and a specific temp. sensor ?
Thanks
Re: API Domoticz (my.domoticz)
Posted: Friday 03 May 2019 0:55
by waaren
Knibor wrote: ↑Thursday 02 May 2019 23:24
Hi, can someone explain me, how to readout a temperature sensor in Domoticz from someone else his API in (my.domiticz.com)
I created a virtual temperature sensor.... but how to connect it to an API from (my.domoticz.com) and a specific temp. sensor ?
Thanks
Not sure I understand what you are looking for but reading a domoticz device:
http://IP:port/json.htm?type=devices&rid=<idx>
setting a temperature:
http://ip:port/json.htm?type=command¶m=udevice&nvalue=0&svalue=<temp>&idx=<idx>
You can find this information
here
Re: API Domoticz (my.domoticz)
Posted: Friday 03 May 2019 18:54
by Knibor
Hi, thanks for the feedback.
I want to read a value that is stored in the API from the Domoticz (my.domotics.com)
I have two rasp pi with Domoticz, the first rasp pi is connected with the API from Domoticz, if I understand correctly, all the IDX values and switch states from the first rasp pi are "stored" in this API.
With the second Rasp pi I want connect with this API and readout a temperature value with idx=48.
Re: API Domoticz (my.domoticz)
Posted: Friday 03 May 2019 22:56
by waaren
Knibor wrote: ↑Friday 03 May 2019 18:54
Hi, thanks for the feedback.
I want to read a value that is stored in the API from the Domoticz (my.domotics.com)
I have two rasp pi with Domoticz, the first rasp pi is connected with the API from Domoticz, if I understand correctly, all the IDX values and switch states from the first rasp pi are "stored" in this API.
With the second Rasp pi I want connect with this API and readout a temperature value with idx=48.
When logged on to mydomoticz, I can use the same API calls as I use on my primary system. (btw; just noticed my battery was completely drained for this device

)

- mydomoticz
- mydomoticz API.png (107.86 KiB) Viewed 2937 times
Re: API Domoticz (my.domoticz)
Posted: Saturday 04 May 2019 1:03
by Knibor
Hi, I tried but get no output. in the example "url" what is ..red highlighted..is this the "MyInstanceId" or "MyDomoticz API Sleutel"
And should I use after /my.domoticz/ "my" ?
Re: API Domoticz (my.domoticz)
Posted: Saturday 04 May 2019 1:45
by waaren
Knibor wrote: ↑Saturday 04 May 2019 1:03
Hi, I tried but get no output. in the example "url" what is ..red highlighted..is this the "MyInstanceId" or "MyDomoticz API Sleutel"
And should I use after /my.domoticz/ "my" ?
It is the MyInstanceId
So it is
https://my.domoticz.com/my/<MyInstanceI ... e&rid=<idx>
Re: API Domoticz (my.domoticz)
Posted: Saturday 04 May 2019 22:27
by Knibor
It Works

thanks for the info