API Domoticz (my.domoticz)

Moderator: leecollings

Post Reply
Knibor
Posts: 112
Joined: Sunday 20 May 2018 12:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: NL
Contact:

API Domoticz (my.domoticz)

Post 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
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: API Domoticz (my.domoticz)

Post 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&param=udevice&nvalue=0&svalue=<temp>&idx=<idx>

You can find this information here
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Knibor
Posts: 112
Joined: Sunday 20 May 2018 12:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: NL
Contact:

Re: API Domoticz (my.domoticz)

Post 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.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: API Domoticz (my.domoticz)

Post 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 :D )
mydomoticz
mydomoticz
mydomoticz API.png (107.86 KiB) Viewed 2935 times
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Knibor
Posts: 112
Joined: Sunday 20 May 2018 12:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: NL
Contact:

Re: API Domoticz (my.domoticz)

Post 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" ?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: API Domoticz (my.domoticz)

Post 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>
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Knibor
Posts: 112
Joined: Sunday 20 May 2018 12:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: NL
Contact:

Re: API Domoticz (my.domoticz)

Post by Knibor »

It Works :D thanks for the info
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests