baumi's blog

baumi's personal blog … Linux, OS X, Windows, Random things, …

November, 2022

KOSTAL PIKO + KSEM G2 modbus API access etc.

KOSTAL KSEM G2 (modbus TCP) grid power total: 1) In device configuration, enable ModBus TCP slave 2) Install mbpoll 3) Read power meter using command line: mbpoll -t 3:int16 -r 2,4 192.168.1.12 Simple bash parsing example: mbpoll -r 2,4 192.168.1.12 -1 -q > /tmp/mbpoll.txt grid=$(grep “\[2\].*” -m 1 /tmp/mbpoll.txt | cut -d ‘:’ -f 2 […]