I would like to “guess” if my home is occuped or not, only with the electrical consumption.
I worm my home with electric, and i always keep one the heating (because my home is in a very cold place…)
If nothing changes between when you are at home and when you are not at home, then it will not be possible to know when you are at home and when you are not.
Therefore, you must find something special that happens only when you are at home, and detect that.
But I think the most reliable way will be an infra-red “occupancy detector” that can sense the body heat of a person in a room - and you will need one in each room that you normally use.
Are you asking how to detect occupancy to control the heating or are you asking how to detect occupancy from the heating by measuring it’s energy consumption?
Home Assistant has a number of integrations that do this very well - phones connected to Wi-Fi is the most commonly used. You can then use that to control other things (and make that sensor available externally).
No, there are no api calls like that. You would need to write a little script that did something like
(psuedo code)
x = wget https://emoncms.org/feed/value.json?id=1
if x > threshold
status = "occupied"
else
status = "vacant"
print status
You will need to add some work to the wget, I can’t remember the options offhand, I used to do it alot but haven’t done it for a while so wouldn’t trust my memory. The response will probably need sanitising or formatting to a numeric value since it will be a (json) string that’s returned