Closed Cuball0 closed 3 years ago
It was quite trivial to get the P1 port working to log the counters and some power consumption. This makes for a neat energy monitor. It can be used to turn on/off some simple appliances.
I think the S1 port is meant to more precisely control inverters or loads on a line cycle by cycle basis.
Yes, P1 port monitoring works fine (a lot of examples from our dutch friends).
But I was looking for maybe some ideas like the product smappee is doing. Detecting appliances based on the electrical characteristics...
Do you think there are useful uses-cases for home use ?
If the S1 receiver code is not shared, I guess this is intentional.
You can build a small Python script to get the hex data from the S1 port. It should be trivial to parse the 45-byte telegrams into something useable. Unfortunately, it is difficult to find an USB-RS485 transciever capable of 2Mbps baud rate.
Code posted below if you want to try:
import serial
from serial import Serial
#• 1 start bit
#• 8 data bits
#• No parity bit
#• 1 stop bit
#
#52 samples per 50Hz cycle.
#Sampling rate = 2600 Hz.
#Telegram = 45 bytes of info
#communication uses 8N1 = 1 start bit + 8 (info) bits + 1 stop bit = 10 bits / f ield
#telegram = 45 byte x 10 bits = 450 bits
#Bitrate (fixed) = 2Mbps
#1 bit = 1 / 2Mbps = 0.5 us
#telegram = 450 x 0.5us = 225 us.
#Telegram - rate:
# Fsampling = 2600 Hz
# 1 telagram each 1/2600Hz = 384 us
#Telegram message definition (see all details pag 10 - 16)
ser = Serial('/dev/ttyUSB1', bytesize=serial.EIGHTBITS, stopbits=serial.STOPBITS_ONE, parity=serial.PARITY_NONE, baudrate=2*1000*1000, timeout=120)
msg = bytearray()
while True:
print( "--" )
print( ser.read(45).hex() )
Hello,
Do you have an example of a S1 Receiver? And maybe some ideas on what fun stuff we could do with it ?