the active energy field is pretty sussy but it's just a 4-byte integer sucked off as 2 2-byte ones, $ printf '%4s\n' $(printf '%s\n' obase=16 58932 60 | bc) | tr ' ' 0 | tac | paste -sd\\0 | bc
399634 and that's what the LCD shows too

sysv message queues? kinda slick with it; world's most insane interface, natch, but
also thanks to @ThePhD's n3030 i can have enum or_we_504_msgtype : long { in c and c++ with -std=c2x, which makes this much less insane

and yes the raw format is 3c 00 0f f5 for 3`994`895 (0x003cf50f), so two LSB u16s pasted together MSBly, which is PDP-11 middle-endian. plus ça change
falling edge trigger feasible if i manage to talk to the GPIO
also lol the integration time on this meter really fucks it, mathematically it comes out to 1mA, i measured 848μA with a jumper

as elucidated by the (entirety of!) OR-WE-504_MODBUS_Registers_list.pdf ive finally managed to dig up. lets see!!!!!
register 6 is what the manual says, register 15 is what it returns the address when reading. save me from this hell


in that you need to broadcast the address change, not just send it, and they explicitly say to send it to the device
hey, guess what doesn't work in modern mbpoll, that i remember glancing through when initially trying to connect…
Some RTU devices need to get initialized to a certain address via the 0x00 broadcast address. But currently RTU_SLAVEADDR_MIN is defined as 1
lol. lmfao.

![#!/bin/sh base=.1.3.6.1.4.1.8072.9999.9999.1 get() { case "${get#$base}" in .0) echo $get echo STRING echo hello world ;; .1) echo $get echo INTEGER echo 8675309 ;; *) echo NONE ;; esac } while :; do read -r op case "$op" in get) read -r get echo "get $get (${get#$base})" | logger get ;; getnext) read -r get echo "getnext $get (${get#$base})" | logger case "${get#$base}" in .0) get=$base.1 get ;; .1) echo NONE ;; *) get=$base.0 get ;; esac ;; set) read -r val echo "set $val" | logger echo not-writable ;; PING) echo PONG ;; *) echo "HUH $op" | logger ;; esac done $ snmpwalk -v1 -c public localhost .1.3.6.1.4.1.8072.9999.9999 NET-SNMP-MIB::netSnmpPlaypen.1.0 = STRING: "hello world" NET-SNMP-MIB::netSnmpPlaypen.1.1 = INTEGER: 8675309 Feb 08 02:50:04 tarta Debian-snmp[2678083]: getnext .1.3.6.1.4.1.8072.9999.9999.1 () Feb 08 02:50:04 tarta Debian-snmp[2678085]: getnext .1.3.6.1.4.1.8072.9999.9999.1.0 (.0) Feb 08 02:50:04 tarta Debian-snmp[2678087]: getnext .1.3.6.1.4.1.8072.9999.9999.1.1 (.1) #!/bin/sh base=.1.3.6.1.4.1.8072.9999.9999.1 get() { case "${get#$base}" in .0) echo $get echo STRING echo hello world ;; .1) echo $get echo INTEGER echo 8675309 ;; *) echo NONE ;; esac } while :; do read -r op case "$op" in get) read -r get echo "get $get (${get#$base})" | logger get ;; getnext) read -r get echo "getnext $get (${get#$base})" | logger case "${get#$base}" in .0) get=$base.1 get ;; .1) echo NONE ;; *) get=$base.0 get ;; esac ;; set) read -r val echo "set $val" | logger echo not-writable ;; PING) echo PONG ;; *) echo "HUH $op" | logger ;; esac done $ snmpwalk -v1 -c public localhost .1.3.6.1.4.1.8072.9999.9999 NET-SNMP-MIB::netSnmpPlaypen.1.0 = STRING: "hello world" NET-SNMP-MIB::netSnmpPlaypen.1.1 = INTEGER: 8675309 Feb 08 02:50:04 tarta Debian-snmp[2678083]: getnext .1.3.6.1.4.1.8072.9999.9999.1 () Feb 08 02:50:04 tarta Debian-snmp[2678085]: getnext .1.3.6.1.4.1.8072.9999.9999.1.0 (.0) Feb 08 02:50:04 tarta Debian-snmp[2678087]: getnext .1.3.6.1.4.1.8072.9999.9999.1.1 (.1)](https://staging.cohostcdn.org/attachment/80c05c02-4672-4d03-9ee9-d99975a89f98/a.png?width=675&dpr=1)

