Page 1 of 1

how to share p1 smartmeter usb with HA?

Posted: Wednesday 28 February 2024 15:48
by mrdomotica
Hi, Is there a possibility to share the P1 usb smartmeter reader, output, which is connected to my rPi and connected to Domoticz with a HA(homeassistant) system running on a different machine in the same LAN? I have ser2net running. Not sure if or how to share the data. Any help would be appreciated. Thanks :)

Re: how to share p1 smartmeter usb with HA?

Posted: Thursday 29 February 2024 11:09
by mrdomotica
Ok found out myself. Now I have it both in HA and Domoticz.

Using Ser2net just add a new line to the config:
This is in may config file:

Code: Select all


BANNER:banner:\r\nser2net port \p device \d [\s] (Debian GNU/Linux)\r\n\r\n

2000:telnet:600:/dev/ttyS0:9600 8DATABITS NONE 1STOPBIT banner
2001:telnet:600:/dev/ttyS1:9600 8DATABITS NONE 1STOPBIT banner
3000:telnet:600:/dev/ttyS0:19200 8DATABITS NONE 1STOPBIT banner
3001:telnet:600:/dev/ttyS1:19200 8DATABITS NONE 1STOPBIT banner

# Example /etc/ser2net.conf for proxying USB/serial connections to DSMR smart meters
5001:raw:600:/dev/ttyUSB0:115200 NONE 1STOPBIT 8DATABITS XONXOFF LOCAL -RTSCTS
In HA just enter the IP and port in my case: local-ip-address:5001 and off you go!

Re: how to share p1 smartmeter usb with HA?

Posted: Thursday 29 February 2024 12:14
by HvdW
Interesting.
I have a Domoticz running on the RPI (bullseye) plus a Homeassistant running in Docker on another RPI.
Just installed ser2net on RPI.
Where is ser2net.conf ?
Or use /etc/ser2net.yaml
And how to please.

Re: how to share p1 smartmeter usb with HA?

Posted: Wednesday 08 May 2024 20:11
by kimot
HA don't have any something like json api to send current state of P1 from Domoticz?