P1 Smart Meter with LAN interface reading from MQTT?

Moderator: leecollings

Post Reply
SterkeJerke
Posts: 18
Joined: Friday 01 February 2019 20:57
Target OS: Linux
Domoticz version:
Contact:

P1 Smart Meter with LAN interface reading from MQTT?

Post by SterkeJerke »

Hi,

I have bought this smart meter: https://smartgateways.nl/product/slimme ... i-gateway/
So i use the Smartmeter with LAN interface option. Unfortunalty this is not very stable.
The devices reboots after 7 telnet sessions have been made (hardware limit).

But... the device is cable of sending its info every 10 seconds to MQTT. I have MQTT running form my Zigbee2mqtt.

Only really no clue on how to make the P1 Hardware read MQTT.

Any one?
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: P1 Smart Meter with LAN interface reading from MQTT?

Post by FireWizard »

Hi, @SterkeJerke,

Can you install MQTT Explorer (see: http://mqtt-explorer.com/).
Connect to your MQTT broker and check what you receive from your device.

Let us know.

Regards
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: P1 Smart Meter with LAN interface reading from MQTT?

Post by waltervl »

This smart meter gateway does not need MQTT to be coupled to Domoticz see the page https://smartgateways.nl/slimme-meter-u ... -domoticz/
I think, looking at the instructions for Smartgateway MQTT, that it can not be directly coupled to Domoticz through MQTT as it does not support AutoDiscover. And I am even not sure if Domoticz MQTT AutoDiscover supports a smart meter. SO you will have to go the Node-Red route there to get the MQTT data of smart gateway into Domoticz.
https://smartgateways.nl/slimme-meter-u ... r-p1-mqtt/
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
SterkeJerke
Posts: 18
Joined: Friday 01 February 2019 20:57
Target OS: Linux
Domoticz version:
Contact:

Re: P1 Smart Meter with LAN interface reading from MQTT?

Post by SterkeJerke »

FireWizard wrote: Sunday 13 February 2022 21:54 Hi, @SterkeJerke,

Can you install MQTT Explorer (see: http://mqtt-explorer.com/).
Connect to your MQTT broker and check what you receive from your device.
Sure: First a printscreen:
dsmr.PNG
dsmr.PNG (35.33 KiB) Viewed 3542 times

Code: Select all

dsmr
	reading
		electricity_equipment_id = 4530303637303035363436363131383230
		gas_equipment_id = 4730303738353635363030303731313230
		electricity_tariff = 0002
		electricity_delivered_1 = 1611.56
		electricity_returned_1 = 42.05
		electricity_delivered_2 = 1732.77
		electricity_returned_2 = 89.50
		electricity_currently_delivered = 0.70
		electricity_currently_returned = 0.00
		phase_currently_delivered_l1 = 93.00
		phase_currently_delivered_l2 = 604.00
		phase_currently_delivered_l3 = 6.00
		phase_currently_returned_l1 = 0.00
		phase_currently_returned_l2 = 0.00
		phase_currently_returned_l3 = 0.00
		phase_voltage_l1 = 229.00
		phase_voltage_l2 = 226.30
		phase_voltage_l3 = 228.40
		phase_power_current_l1 = 0.00
		phase_power_current_l2 = 2.00
		phase_power_current_l3 = 0.00
		electricity_hourly_usage = 0.00
		gas_hourly_usage = 0.00
	consumption
		gas
		delivered = 756.51
	smart_gateways
	update_available = false
	running_firmware_version = 2022021402
	available_firmware_version = 2022021402
	mac_address = 84_CC_A8_2F_9A_20
	wifi_rssi = -68
	startup_time = 2022-02-14T18:51:16Z
	
	
SterkeJerke
Posts: 18
Joined: Friday 01 February 2019 20:57
Target OS: Linux
Domoticz version:
Contact:

Re: P1 Smart Meter with LAN interface reading from MQTT?

Post by SterkeJerke »

waltervl wrote: Monday 14 February 2022 9:29 This smart meter gateway does not need MQTT to be coupled to Domoticz see the page https://smartgateways.nl/slimme-meter-u ... -domoticz/
Correct, and at this moment I am using it without MQTT, this works ok. Only thing is (see https://smartgateways.nl/firmware-changelog/)

The gateway supports up to 7 telnet sessions. If a new telnet session is created because, for example, home assistant or domoctixz is rebooted, a new telnet session is created. The old one will not. After 7 sessions the gateway accepts no more new ones. This is a limitation of the hardware. The new firmware resolves this by automatically rebooting the gateway once all telnet sessions are in use. It is recommended to switch from telnet to mqtt. In practice this is a lot more stable.

waltervl wrote: Monday 14 February 2022 9:29 I think, looking at the instructions for Smartgateway MQTT, that it can not be directly coupled to Domoticz through MQTT as it does not support AutoDiscover.
Sorry a bit out of my knowledge. Been doing a quick google, but sorry. If this needs to be built in the device, I could try and contact the supplier, if you give some more info..
waltervl wrote: Monday 14 February 2022 9:29 And I am even not sure if Domoticz MQTT AutoDiscover supports a smart meter.
Neither am I, hence the question.
waltervl wrote: Monday 14 February 2022 9:29 SO you will have to go the Node-Red route there to get the MQTT data of smart gateway into Domoticz.
https://smartgateways.nl/slimme-meter-u ... r-p1-mqtt/
Sure, but native support would be nice.
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: P1 Smart Meter with LAN interface reading from MQTT?

Post by FireWizard »

Hello @SterkeJerke,

You wrote:
Sure, but native support would be nice.
You should not expect that the MQTT Output of the Smart Gateway will be supported very soon, Domoticz supports already 2 types of interfaces with the Smart meter (USB and serial over LAN).

The output of MQTT Explorer matches with what is shown in the Smart Gateway documentation.

In order to get the data into Domoticz, you will have to convert this output to the format Domoticz understands. Node-RED is the tool to use for that.

Are you able to install Node_RED.
See: https://nodered.org/docs/getting-started/raspberrypi

I suggest you take some time and watch some of the videos, which has been created by the developers of Node RED.
See: https://www.youtube.com/channel/UCQaB8N ... Ab8PPCLLAA
For a small investment of your time, you will learn a lot.

If you have NR installed, can you indicate, which of the topics, you want to read-out in Domoticz?

Regards
Last edited by FireWizard on Sunday 03 March 2024 21:24, edited 2 times in total.
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: P1 Smart Meter with LAN interface reading from MQTT?

Post by waltervl »

SterkeJerke wrote: Monday 14 February 2022 18:13
waltervl wrote: Monday 14 February 2022 9:29 This smart meter gateway does not need MQTT to be coupled to Domoticz see the page https://smartgateways.nl/slimme-meter-u ... -domoticz/
Correct, and at this moment I am using it without MQTT, this works ok. Only thing is (see https://smartgateways.nl/firmware-changelog/)

The gateway supports up to 7 telnet sessions. If a new telnet session is created because, for example, home assistant or domoctixz is rebooted, a new telnet session is created. The old one will not. After 7 sessions the gateway accepts no more new ones. This is a limitation of the hardware. The new firmware resolves this by automatically rebooting the gateway once all telnet sessions are in use. It is recommended to switch from telnet to mqtt. In practice this is a lot more stable.

Do you have a lot of trouble then with this limit of 7 telnet sessions? It will perhaps be easier to wait for the new firmware of the smart gateway and reboot the smart gateway every now and then.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
connectix
Posts: 7
Joined: Thursday 01 September 2016 13:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: P1 Smart Meter with LAN interface reading from MQTT?

Post by connectix »

I am the developer of the smart gateways. For domoticz you can use telnet and it’s stable. Mqtt with domoticz works also but you have to program it yourself. You can also use the rest-api to read all the values in json.

http://connectix_smartmeter.local:82/smartmeter/api/read

Max 7 telnet sessions is a limit espressif (creator of the esp32) hardware put on the device. This cannot be changed. If this is a problem, try to keep reboots to your domoticz server at a minimum. The gateway is programmed to reboot when the telnet session limit is reached as a workaround to solve this.
mancide
Posts: 29
Joined: Wednesday 17 May 2017 0:18
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Belgium - Ghent
Contact:

Re: P1 Smart Meter with LAN interface reading from MQTT?

Post by mancide »

Hi,

I have both zwave and zigbee working with the "MQTT auto discovery client gateway".
I was trying to get my watermeter to work with MQTT also. I see the values coming appearing in MQTT explorer.
I can't figure out how to get the values from MQTT into domoticz. MQTT auto discovery client gateway does not work.

Can someone explain why this does not work?
Is "MQTT auto discovery client gateway" doing some extra work?
Is it specific for zwavejs2MQTT and zigbee2MQTT?
Raspberry Pi 3B v1.3 - 16GB SDcard - Raspbian Bullseye
Aeotec Z-Stick Gen5 (ZW090) -> Z-Wave JS UI -> mosquitto
RFXCOM RFXtrx433E
Unifi controller -> Domoticz-Unifi-Presence plugin
Nest thermostat
SAJ solar convertor
Smart Gateway Gas/water meter
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: P1 Smart Meter with LAN interface reading from MQTT?

Post by waltervl »

Zwave-JS-UI and Zigbee2MQTT also make discovery topics in the mqtt homeassistant folder. That make sure Domoticz can discover the devices and create and relate it to domoticz devices.

You could try to use the mqttmapper plugin to relate your watermeter mqtt topics to Domoticz devices.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests