How to get current state of device for custom website Topic is solved

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
LordMax
Posts: 35
Joined: Saturday 10 April 2021 21:24
Target OS: Windows
Domoticz version: 2021.1
Contact:

How to get current state of device for custom website

Post by LordMax »

Hi!

I am making a home controller where I want to have a small domoticz controller imlemented. I have a fully working domoticz server but I cannot figure out how to get the current state of a switch. How do I do that? Thanks beforehand!

Best regards Max
User avatar
waltervl
Posts: 5851
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: How to get current state of device for custom website

Post by waltervl »

You can get the status of a domoticz device with a http Json API call. https://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s

But as your question is a little bit vague for me you better explain in more detail what you want to achieve.
Perhaps a floorplan https://www.domoticz.com/wiki/Floorplans
or the dashboard can also be good enough for you. https://www.domoticz.com/wiki/Managing_ ... #Dashboard
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
LordMax
Posts: 35
Joined: Saturday 10 April 2021 21:24
Target OS: Windows
Domoticz version: 2021.1
Contact:

Re: How to get current state of device for custom website

Post by LordMax »

Thanks! I was late editing this post but I managed to solve this myself but it via the wiki. I read the status from the json file and now it works!
User avatar
waltervl
Posts: 5851
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: How to get current state of device for custom website

Post by waltervl »

Great, in your PM you asked for the security status. That you als get with a http API cal: https://www.domoticz.com/wiki/Domoticz_ ... rity_state

PS I do not answer donoticz related questions in PM as other people can not learn from it. Also there are no stupid questions so everything can be asked and answered on the forum :-)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
LordMax
Posts: 35
Joined: Saturday 10 April 2021 21:24
Target OS: Windows
Domoticz version: 2021.1
Contact:

Re: How to get current state of device for custom website

Post by LordMax »

Ok! I wasnt sure if I could make a new post out of it, Ive posted a lot lately but I appriciate the help so much on this forum! :D. Now I am just trying to make a highcharts on my home controller from the /json.htm?idx=xxx&range=day&sensor=temp&type=graph JSON file. But I am having a hard time formatting the JSON file so that the graph looks like it does in domoticz. Any help would be very appriciated :). Thanks beforehand!
Post Reply

Who is online

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