# SNMP Kimera driver to read and write float

**URL:** <https://forum.inductiveautomation.com/t/snmp-kimera-driver-to-read-and-write-float/18469>\
**Category:** 3rd Party Modules\
**Created:** [June 14, 2018, 3:03pm UTC](https://forum.inductiveautomation.com/t/snmp-kimera-driver-to-read-and-write-float/18469 "2018-06-14T15:03:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![guipinper](https://avatars.discourse-cdn.com/v4/letter/g/ce73a5/32.png) [@guipinper](https://forum.inductiveautomation.com/u/guipinper)\
**Post date:** [June 14, 2018, 3:03pm UTC](https://forum.inductiveautomation.com/t/snmp-kimera-driver-to-read-and-write-float/18469/1 "2018-06-14T15:03:00Z")

</div>

I’m using the Kimera driver to connect Ignition to a Wiener crate but I’m not being able to read nor write floats to a SNMP tag. I can r/w with integers.  
**About reading** : When I try to read I always get the value “9” which is probably associated with the hexadecimal string being sent by the crate. It has more or less the same structure (9f:78:04:44:7a:00:00) where the first 3 bytes are associated with the type of tag and the last 4 bytes are the value itself. I manage to find a way to convert this into a float by using the python struct module

```auto
import struct
value = str(currentValue.value).replace(':','')[6:]
res = struct.unpack('!f', value.decode('hex'))[0]	
system.tag.write('[.]Raw Tag Hex Converted',float(res))

```

This works fine actually.

The real problem arises when I try **to write** to the same tag and same value (9f:78:04:44:7a:00:00) with or without the “:”.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/c433c6cd0a91b46fe971b9121863503e2905e99d.png)

I tried encoding it has utf8 but without success.

```auto

value = '\x9f\x78\x04\x44\x7a\x00\x00'
value = value.encode('utf8')
system.tag.write('LZ System Test/Wiener Crates/outputVoltage1',value)

```

With Wireshark I can see the actual packages that are being sent and the hex “9f” is somehow converted to “3f 3f” which I believe is the real problem. The other bytes are sent properly.

Do you guys know anything about this?

Ignition version: 7.9.7  
Kymera SNMP Driver version: 1.9.0 (b1387)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 14, 2018, 3:38pm UTC](https://forum.inductiveautomation.com/t/snmp-kimera-driver-to-read-and-write-float/18469/2 "2018-06-14T15:38:04Z")

</div>

If reading the tag yields a string containing the hex characters delimited by colons, I’d expect you’d have to write a string of the same format, not the raw bytes. But maybe you need to contact Kymera support…
