Managed meters

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
Barberousse
Posts: 140
Joined: Wednesday 02 December 2015 21:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Managed meters

Post by Barberousse »

Hello,

I create this topic to discuss the development of "managed" meters.

Following discussion in these PR :

https://github.com/domoticz/domoticz/pull/2271
https://github.com/domoticz/domoticz/pull/2272
https://github.com/domoticz/domoticz/pull/2417

And recently rejected PR :

https://github.com/domoticz/domoticz/pull/3877

The need : I have now access to official API of French Managed Linky meters. I can grab consumption and production data. These are not realtime data but data from the day before and the whole history. I want to :
  • Introduce data in Domoticz log from a Python plugin, for user to see their consumption easily from Domoticz interface
  • Prevent Domoticz to call UpdateMeter() and AddCalendarUpdateMeter() to do change on this device because it's done from the plugin
First I proposed some patch on existing device, this was not very clean so I created a new device : sTypeManagedCounter, very close to sTypeRFXMeterCount.

To be able to manage production data and 2 tariffs, the PR #3877 create another new device, to be consistent. For @gizmocuz, I should not create another device (I understand, it's cumbersome).

What would be the good strategy for my PR to be accepted: stick to P1 smart meter existing device, and add an option (a bit like #2272 but with no interface, option only accessible from plugins?) to prevent calendar update ?

If I want to be consistent, I would delete the sTypeManagedCounter counter (I think I'm the only one to use it today with https://github.com/guillaumezin/DomoticzLinky) and stick to RFX Meter Counter the same way.

What do you think?
User avatar
FireWizard
Posts: 1905
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Managed meters

Post by FireWizard »

Hi,

Isn't an idea to implement a node in Node Red?

See: https://github.com/PhilBri/Node-Linky.

From there you can send it to Domoticz, e.g. by using MQTT.

Regards
Barberousse
Posts: 140
Joined: Wednesday 02 December 2015 21:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Managed meters

Post by Barberousse »

FireWizard wrote: Thursday 27 February 2020 16:15 Isn't an idea to implement a node in Node Red?
But how would I insert data in Domoticz history if no device permits that? The problem is not node-red/MQTT/Lua/Python/etc, the problem is to find a way to write Domoticz history DB using an acceptable and easily maintainable way.
User avatar
FireWizard
Posts: 1905
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Managed meters

Post by FireWizard »

Hi,

You wrote:
But how would I insert data in Domoticz history if no device permits that?
Sorry, I did not understand your question and the exact goal, as I do not know your Linky equipment.

If your goal is to insert data, collected in the past, in the Domoticz database, that is not possible.

However, if you create a virtual sensor of the type you need, you can write from Node Red, with e.g. MQTT, to that specific sensor.
In this case, Domoticz will build up historical data, as for all other type of sensors. But therefore you need more or less real-time data.

I understand, that you only will receive data from the previous day and not real-time.
In that case the received data is old and so you have to look for another solution to create a graph. Perhaps Influxdb and Grafana?
But actually the problem is at Linky and not Domoticz.

Regards
Last edited by FireWizard on Sunday 01 March 2020 23:22, edited 1 time in total.
Barberousse
Posts: 140
Joined: Wednesday 02 December 2015 21:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Managed meters

Post by Barberousse »

FireWizard wrote: Sunday 01 March 2020 20:58 If you goal is to insert data, collected in the past, in the Domoticz database, that is not possible.
Yes it is: some PR introducted sTypeManagedCounter for that, cf. Managed counter in https://www.domoticz.com/wiki/Developin ... hon_plugin

My question was about how to do the same thing a more generic way. I'm pushing some changes for that here: #3955
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest