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
How to get current state of device for custom website Topic is solved
Moderators: leecollings, remb0
- 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
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
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
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- 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
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!
- 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
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
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
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- 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
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!
. 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!


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