Does anybody know if it is possible to get the values of the smart meter through a script instead of directly from the P1-port?
I am reading the P1-port with an Arduino-board that sends the values to my own website for further analysis/visualization. I can build a API that generates values in any given format (e.g. JSON). That is no problem, but how would I go about integrating the values in Domoticz?
Has anybody done this before? Kind of like a virtual P1-reader...
Get smart meter values through script
Moderator: leecollings
-
- Posts: 52
- Joined: Sunday 27 December 2015 19:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: The Netherlands
- Contact:
Re: Get smart meter values through script
Youre already sending html so you could send json urls to domoticz. First create dummy devices of the type needed (energy meter in this case). Then compose the json url using the idx number of the sensor. Test it in your browser and if the values are correctly updated implement them in your arduino code.
Verstuurd vanaf mijn ONEPLUS A3003 met Tapatalk
Verstuurd vanaf mijn ONEPLUS A3003 met Tapatalk
Re: Get smart meter values through script
Okay, that is another approach than I was thinking of, but it should work!Rolo wrote:Youre already sending html so you could send json urls to domoticz. First create dummy devices of the type needed (energy meter in this case). Then compose the json url using the idx number of the sensor. Test it in your browser and if the values are correctly updated implement them in your arduino code.
I didn't know about the json.htm url's, thanks for pointing me in that direction. I think I should be alright from here on, thank you!
Re: Get smart meter values through script
One more thing though: how often do you recommend to save the values? The P1-port gives me an update every 10 seconds, but I think that is a bit overkill.
In my Arduino-script I save the values once every minute. Anybody who wants to share how often they save the values?
In my Arduino-script I save the values once every minute. Anybody who wants to share how often they save the values?
Who is online
Users browsing this forum: No registered users and 1 guest