Reading JSON data into a DTH?

Hi all,

I’m developing a DTH for RooWiFi, but it’s my first time, especially with Groovy.

I’ve experience in other Languages, but the proper way to form a Device Handler is new to me.

I’d like to be able to read a local LAN URL JSON data into a Device Handler, particularly battery level, and charging state. There is much more sensor data on the JSON, like Cliff Detection, Wall/Virtual Wall Detection, Dirt Detector, Distance, Angle, etc… but not sure how useful that is to SmartThings.

I’m not so sure how I’d go about reading that JSON into smartthings in order to apply the data to a Device Handler.

Any assistance would be greatly appreciated.

My Project Thread is here: [WIP] Roomba Control with RooWiFi

Thanks in advance!

Adam

This thread should get you going:

1 Like

You can check my implementation here: [RELEASE] Honeywell HPA250B Air Puriifier integration (through Raspberry Pi)

I am parsing a JSON in the parse method