New Sure Petcare Binding for Cat/Pet Flap

Sorry have not have any time to watch this.
Are you still interested of the jar?

/Mike

1 Like

I am!

Sure Pet Care Binding Jar

Sending Command Refresh is not working.

/Mike

Saw now that you use a non standard way with a separate channel for refresh.

/Mike

Well, I installed the binding then added the things, which are online now. The problem is than things are not receiving any updates.
There is this warning log…

2020-02-09 10:16:15.001 [WARN ] [etcare.internal.SurePetcareAPIHelper] - Exception caught during pet status update: java.lang.NumberFormatException

Any ideas?

You have a number item where it should be text.

////  SurePetcare API Bridge
//// =======================================================================================================

Switch   SurePetcareAPIBridgeOnline    "Online state"   {channel="surepetcare:bridge:7f9f20ee:online"}
Switch   SurePetcareAPIBridgeRefresh   "Refresh"        {channel="surepetcare:bridge:7f9f20ee:refresh"}

//// =======================================================================================================
////  SurePetcare Flap Device
//// =======================================================================================================

Number   SurePetcareFlapDeviceId                  "Id"                              {channel="surepetcare:flapDevice:087f26b7:id"}
String   SurePetcareFlapDeviceName                "Name"                            {channel="surepetcare:flapDevice:087f26b7:name"}
String   SurePetcareFlapDeviceProduct             "Product type"                    {channel="surepetcare:flapDevice:087f26b7:product"}
Switch   SurePetcareFlapDeviceCurfewEnabled1      "Curfew enabled"                  {channel="surepetcare:flapDevice:087f26b7:curfewEnabled1"}
String   SurePetcareFlapDeviceCurfewLockTime1     "Curfew lock time"                {channel="surepetcare:flapDevice:087f26b7:curfewLockTime1"}
String   SurePetcareFlapDeviceCurfewUnlockTime1   "Curfew unlock time"              {channel="surepetcare:flapDevice:087f26b7:curfewUnlockTime1"}
Switch   SurePetcareFlapDeviceCurfewEnabled2      "Curfew enabled"                  {channel="surepetcare:flapDevice:087f26b7:curfewEnabled2"}
String   SurePetcareFlapDeviceCurfewLockTime2     "Curfew lock time"                {channel="surepetcare:flapDevice:087f26b7:curfewLockTime2"}
String   SurePetcareFlapDeviceCurfewUnlockTime2   "Curfew unlock time"              {channel="surepetcare:flapDevice:087f26b7:curfewUnlockTime2"}
Switch   SurePetcareFlapDeviceCurfewEnabled3      "Curfew enabled"                  {channel="surepetcare:flapDevice:087f26b7:curfewEnabled3"}
String   SurePetcareFlapDeviceCurfewLockTime3     "Curfew lock time"                {channel="surepetcare:flapDevice:087f26b7:curfewLockTime3"}
String   SurePetcareFlapDeviceCurfewUnlockTime3   "Curfew unlock time"              {channel="surepetcare:flapDevice:087f26b7:curfewUnlockTime3"}
Switch   SurePetcareFlapDeviceCurfewEnabled4      "Curfew enabled"                  {channel="surepetcare:flapDevice:087f26b7:curfewEnabled4"}
String   SurePetcareFlapDeviceCurfewLockTime4     "Curfew lock time"                {channel="surepetcare:flapDevice:087f26b7:curfewLockTime4"}
String   SurePetcareFlapDeviceCurfewUnlockTime4   "Curfew unlock time"              {channel="surepetcare:flapDevice:087f26b7:curfewUnlockTime4"}
String   SurePetcareFlapDeviceLockingMode         "Locking mode"                    {channel="surepetcare:flapDevice:087f26b7:lockingMode"}
Switch   SurePetcareFlapDeviceLowBattery          "Low battery"                     {channel="surepetcare:flapDevice:087f26b7:lowBattery"}
Number   SurePetcareFlapDeviceBatteryLevel        "Battery level"                   {channel="surepetcare:flapDevice:087f26b7:batteryLevel"}
Number   SurePetcareFlapDeviceBatteryVoltage      "Battery voltage"                 {channel="surepetcare:flapDevice:087f26b7:batteryVoltage"}
Switch   SurePetcareFlapDeviceOnline              "Online state"                    {channel="surepetcare:flapDevice:087f26b7:online"}
Number   SurePetcareFlapDeviceDeviceRSSI          "Signal strength device (rssi)"   {channel="surepetcare:flapDevice:087f26b7:deviceRSSI"}
Number   SurePetcareFlapDeviceHubRSSI             "Signal strength hub (rssi)"      {channel="surepetcare:flapDevice:087f26b7:hubRSSI"}

//// =======================================================================================================
////  SurePetcare Household
//// =======================================================================================================

Number   SurePetcareHouseholdId           "Id"         {channel="surepetcare:household:fcbc0e0c:id"}
String   SurePetcareHouseholdName         "Name"       {channel="surepetcare:household:fcbc0e0c:name"}
Number   SurePetcareHouseholdTimezoneId   "Timezone"   {channel="surepetcare:household:fcbc0e0c:timezoneId"}

//// =======================================================================================================
////  SurePetcare Hub Device
//// =======================================================================================================

Number   SurePetcareHubDeviceId            "Id"             {channel="surepetcare:hubDevice:f7d6336e:id"}
String   SurePetcareHubDeviceName          "Name"           {channel="surepetcare:hubDevice:f7d6336e:name"}
String   SurePetcareHubDeviceProduct       "Product type"   {channel="surepetcare:hubDevice:f7d6336e:product"}
String   SurePetcareHubDeviceLedMode       "Led mode"       {channel="surepetcare:hubDevice:f7d6336e:ledMode"}
String   SurePetcareHubDevicePairingMode   "Pairing mode"   {channel="surepetcare:hubDevice:f7d6336e:pairingMode"}
Switch   SurePetcareHubDeviceOnline        "Online state"   {channel="surepetcare:hubDevice:f7d6336e:online"}

//// =======================================================================================================
////  SurePetcare Pet
//// =======================================================================================================

Number        SurePetcarePetId                       "Id"                              {channel="surepetcare:pet:cc0397a6:id"}
String        SurePetcarePetName                     "Name"                            {channel="surepetcare:pet:cc0397a6:name"}
String        SurePetcarePetComment                  "Comments"                        {channel="surepetcare:pet:cc0397a6:comment"}
String        SurePetcarePetGender                   "Gender"                          {channel="surepetcare:pet:cc0397a6:gender"}
String        SurePetcarePetBreed                    "Breed"                           {channel="surepetcare:pet:cc0397a6:breed"}
String        SurePetcarePetSpecies                  "Species"                         {channel="surepetcare:pet:cc0397a6:species"}
Image         SurePetcarePetPhoto                    "Pet photo"                       {channel="surepetcare:pet:cc0397a6:photo"}
String        SurePetcarePetTagIdentifier            "Micro chip tag identifier"       {channel="surepetcare:pet:cc0397a6:tagIdentifier"}
String        SurePetcarePetLocation                 "Location"                        {channel="surepetcare:pet:cc0397a6:location"}
DateTime      SurePetcarePetLocationChanged          "Last location change time"       {channel="surepetcare:pet:cc0397a6:locationChanged"}
String        SurePetcarePetLocationTimeoffset       "Location change time offset"     {channel="surepetcare:pet:cc0397a6:locationTimeoffset"}
String        SurePetcarePetLocationChangedThrough   "Last location changed by"        {channel="surepetcare:pet:cc0397a6:locationChangedThrough"}
DateTime      SurePetcarePetDateOfBirth              "Pet birthday"                    {channel="surepetcare:pet:cc0397a6:dateOfBirth"}
Number:Mass   SurePetcarePetWeight                   "Pet weight"                      {channel="surepetcare:pet:cc0397a6:weight"}
String        SurePetcarePetFeederDevice             "Pet feeding device name"         {channel="surepetcare:pet:cc0397a6:feederDevice"}
DateTime      SurePetcarePetFeederLastFeeding        "Pet last feeding"                {channel="surepetcare:pet:cc0397a6:feederLastFeeding"}
Number:Mass   SurePetcarePetFeederLastChange         "Pet feeding last change"         {channel="surepetcare:pet:cc0397a6:feederLastChange"}
Number:Mass   SurePetcarePetFeederLastChangeLeft     "Pet feeding last change left"    {channel="surepetcare:pet:cc0397a6:feederLastChangeLeft"}
Number:Mass   SurePetcarePetFeederLastChangeRight    "Pet feeding last change right"   {channel="surepetcare:pet:cc0397a6:feederLastChangeRight"}

So , I tried to find the problem without success.
This are my items that were created in VSC with Openhab extention.
It is funny that none of the items is receiving any kind of update!
I dont know what to do anymore…
Any idea?

Here is the log with an warning at the end. I disabled and then enabled API Bridge through Paper ui.
After that there are no updates, just repeating warning: Exception caught during pet status update: java.lang.NumberFormatException

2020-03-23 20:10:01.721 [hingStatusInfoChangedEvent] - 'surepetcare:bridge:7f9f20ee' changed from UNINITIALIZED (DISABLED) to INITIALIZING

2020-03-23 20:10:01.758 [hingStatusInfoChangedEvent] - 'surepetcare:bridge:7f9f20ee' changed from INITIALIZING to UNKNOWN

2020-03-23 20:10:01.788 [hingStatusInfoChangedEvent] - 'surepetcare:household:fcbc0e0c' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING

2020-03-23 20:10:01.791 [hingStatusInfoChangedEvent] - 'surepetcare:hubDevice:f7d6336e' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING

2020-03-23 20:10:01.801 [vent.ItemStateChangedEvent] - surepetcare_bridge_7f9f20ee_online changed from OFF to ON

2020-03-23 20:10:01.806 [vent.ItemStateChangedEvent] - SurePetcareAPIBridgeOnline changed from OFF to ON

2020-03-23 20:10:01.816 [hingStatusInfoChangedEvent] - 'surepetcare:pet:cc0397a6' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING

2020-03-23 20:10:01.826 [hingStatusInfoChangedEvent] - 'surepetcare:flapDevice:087f26b7' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING

2020-03-23 20:10:01.842 [hingStatusInfoChangedEvent] - 'surepetcare:household:fcbc0e0c' changed from INITIALIZING to ONLINE

2020-03-23 20:10:01.867 [hingStatusInfoChangedEvent] - 'surepetcare:hubDevice:f7d6336e' changed from INITIALIZING to ONLINE

2020-03-23 20:10:01.872 [hingStatusInfoChangedEvent] - 'surepetcare:pet:cc0397a6' changed from INITIALIZING to ONLINE

2020-03-23 20:10:01.878 [hingStatusInfoChangedEvent] - 'surepetcare:flapDevice:087f26b7' changed from INITIALIZING to ONLINE

2020-03-23 20:10:02.689 [vent.ItemStateChangedEvent] - systeminfo_computer_openHABianPi_sensors_cpuTemp changed from 42.4 to 42.9

==> /var/log/openhab2/openhab.log <==

2020-03-23 20:10:03.898 [WARN ] [etcare.internal.SurePetcareAPIHelper] - Exception caught during topology cache update: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at path $.devices[1].control.curfew

==> /var/log/openhab2/events.log <==

2020-03-23 20:10:03.926 [hingStatusInfoChangedEvent] - 'surepetcare:bridge:7f9f20ee' changed from UNKNOWN to ONLINE

I think you are missing the bridge id for all the items
Atleast thats how my working config is set up

Number   SurePetcareFlapDeviceId                  "Id"                              {channel="surepetcare:flapDevice:087f26b7:id"} 
should be
Number   SurePetcareFlapDeviceId                  "Id"                              {channel="surepetcare:flapDevice:7f9f20ee:087f26b7:id"}

Thank for sugestion. After correcting all items and restarting the binding the same two warnings apear:
at the start:
020-04-20 17:12:02.446 [WARN ] [etcare.internal.SurePetcareAPIHelper] - Exception caught during topology cache update: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at path $.devices[1].control.curfew

and reapiting one:
2020-04-20 17:17:02.701 [WARN ] [etcare.internal.SurePetcareAPIHelper] - Exception caught during pet status update: java.lang.NumberFormatException

Hi @Osmii. What kind of flap do you have, cat flap or pet flap?
From the error message above, it seems the API returns a single curfew element, whereas the binding expects a list of curfews.
Have you set a curfew in the Sure Petcare App? If not, could you try adding a curfew and then remove it again?
If that doesn’t help, you might need to up the log level and send me the output of your API call.
Kind regards,
Rene

Hi Rene.
I have cat flap. I enebled and disabled curfew a few times with no respones from binding.
How do I up log level to se the output of API call?
Thank you!

Could you try to restart openhab, so that the binding gets properly restarted and check if you still get the same “java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at path $.devices[1].control.curfew” error message.

openhab-cli console
(enter password, default is “habopen”)

  • set the log level for the binding to DEBUG

openhab> log:set DEBUG org.openhab.binding.surepetcare.internal

  • restart the binding

openhab> bundle:restart org.openhab.binding.surepetcare

Here it is…


 2020-04-23 21:18:11.439 [DEBUG] [etcare.internal.SurePetcareAPIHelper] - API execution successful, response: {"data":[{"id":6381,"name":"Mi\u0161a","gender":0,"weight":"NaN","household_id":2948,"species_id":1,"tag_id":3281,"version":"Mw==","created_at":"2018-01-23T15:39:34+00:00","updated_at":"2018-01-23T15:41:11+00:00","status":{"activity":{"tag_id":3281,"device_id":68233,"where":1,"since":"2020-04-23T16:53:44+00:00"}}},{"id":6382,"name":"\u017du\u017eu","gender":0,"weight":"NaN","household_id":2948,"species_id":1,"tag_id":3282,"version":"Mw==","created_at":"2018-01-23T15:39:34+00:00","updated_at":"2018-01-23T15:41:35+00:00","status":{"activity":{"tag_id":3282,"device_id":68233,"where":2,"since":"2020-04-23T19:15:19+00:00"}}},{"id":6383,"name":"Kepek","gender":1,"weight":"NaN","household_id":2948,"species_id":1,"tag_id":3283,"version":"Mw==","created_at":"2018-01-23T15:39:35+00:00","updated_at":"2018-01-23T15:41:52+00:00","status":{"activity":{"tag_id":3283,"device_id":68233,"where":2,"since":"2020-04-23T12:12:45+00:00"}}},{"id":17072,"name":"Belka","gender":0,"household_id":2948,"species_id":1,"tag_id":12731,"version":"Mg==","created_at":"2018-08-09T14:55:53+00:00","updated_at":"2018-08-09T15:02:06+00:00","status":{"activity":{"tag_id":12731,"device_id":68233,"where":1,"since":"2020-04-23T18:12:09+00:00"}}}]}

2020-04-23 21:18:11.445 [WARN ] [etcare.internal.SurePetcareAPIHelper] - Exception caught during pet status update: java.lang.NumberFormatException

2020-04-23 21:18:11.447 [DEBUG] [nal.handler.SurePetcareBridgeHandler] - Updating pet status for: 2bf0dbd6

2020-04-23 21:18:11.449 [DEBUG] [ternal.handler.SurePetcarePetHandler] - Trying to update unknown pet: 2bf0dbd6

After that I renabled binding

2020-04-23 21:23:45.075 [DEBUG] [e.internal.SurePetcareHandlerFactory] - createHandler - create handler for org.eclipse.smarthome.core.thing.internal.BridgeImpl@ad2b6a69

2020-04-23 21:23:45.108 [DEBUG] [iscovery.SurePetcareDiscoveryService] - Starting Sure Petcare household discovery

2020-04-23 21:23:45.113 [DEBUG] [iscovery.SurePetcareDiscoveryService] - Scheduled topology-changed job every 12 hours

==> /var/log/openhab2/events.log <==

2020-04-23 21:23:45.135 [hingStatusInfoChangedEvent] - 'surepetcare:bridge:7f9f20ee' changed from UNINITIALIZED (DISABLED) to INITIALIZING


2020-04-23 21:23:45.178 [DEBUG] [nal.handler.SurePetcareBridgeHandler] - Initializing Sure Petcare bridge handler.

2020-04-23 21:23:45.185 [DEBUG] [nal.handler.SurePetcareBridgeHandler] - Login to SurePetcare API with username: 

2020-04-23 21:23:45.185 [DEBUG] [e.internal.SurePetcareHandlerFactory] - createHandler - create handler for org.eclipse.smarthome.core.thing.internal.ThingImpl@b5708fd

2020-04-23 21:23:45.186 [DEBUG] [e.internal.SurePetcareHandlerFactory] - createHandler - create handler for org.eclipse.smarthome.core.thing.internal.ThingImpl@13a7d6e3

2020-04-23 21:23:45.189 [DEBUG] [nal.handler.SurePetcareDeviceHandler] - Created device handler for type surepetcare:flapDevice

2020-04-23 21:23:45.192 [DEBUG] [etcare.internal.SurePetcareAPIHelper] - current MAC address: , device id: 

2020-04-23 21:23:45.186 [DEBUG] [e.internal.SurePetcareHandlerFactory] - createHandler - create handler for org.eclipse.smarthome.core.thing.internal.ThingImpl@d519babf

2020-04-23 21:23:45.186 [DEBUG] [e.internal.SurePetcareHandlerFactory] - createHandler - create handler for org.eclipse.smarthome.core.thing.internal.ThingImpl@ccd98eff

2020-04-23 21:23:45.204 [DEBUG] [nal.handler.SurePetcareDeviceHandler] - Created device handler for type surepetcare:hubDevice

==> /var/log/openhab2/events.log <==

2020-04-23 21:23:45.229 [hingStatusInfoChangedEvent] - 'surepetcare:bridge:7f9f20ee' changed from INITIALIZING to UNKNOWN

2020-04-23 21:23:45.246 [hingStatusInfoChangedEvent] - 'surepetcare:household:fcbc0e0c' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING

2020-04-23 21:23:45.255 [hingStatusInfoChangedEvent] - 'surepetcare:hubDevice:f7d6336e' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING

2020-04-23 21:23:45.265 [hingStatusInfoChangedEvent] - 'surepetcare:pet:2bf0dbd6' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING

2020-04-23 21:23:45.270 [hingStatusInfoChangedEvent] - 'surepetcare:household:fcbc0e0c' changed from INITIALIZING to ONLINE

2020-04-23 21:23:45.275 [hingStatusInfoChangedEvent] - 'surepetcare:flapDevice:087f26b7' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING


2020-04-23 21:23:45.284 [hingStatusInfoChangedEvent] - 'surepetcare:pet:2bf0dbd6' changed from INITIALIZING to ONLINE

2020-04-23 21:23:45.288 [hingStatusInfoChangedEvent] - 'surepetcare:hubDevice:f7d6336e' changed from INITIALIZING to ONLINE

2020-04-23 21:23:45.293 [hingStatusInfoChangedEvent] - 'surepetcare:flapDevice:087f26b7' changed from INITIALIZING to ONLINE



==> /var/log/openhab2/openhab.log <==

2020-04-23 21:23:45.434 [DEBUG] [etcare.internal.SurePetcareAPIHelper] - Login successful, token: 
2020-04-23 21:23:45.436 [DEBUG] [nal.handler.SurePetcareBridgeHandler] - Login successful, updating topology cache

2020-04-23 21:23:46.012 [DEBUG] [etcare.internal.SurePetcareAPIHelper] - API execution successful, response: {
2020-04-23 21:23:46.023 [WARN ] [etcare.internal.SurePetcareAPIHelper] - Exception caught during topology cache update: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at path $.devices[1].control.curfew

2020-04-23 21:23:46.026 [DEBUG] [nal.handler.SurePetcareBridgeHandler] - Cache update successful, setting bridge status to ONLINE

2020-04-23 21:23:46.033 [DEBUG] [nal.handler.SurePetcareBridgeHandler] - Updating 4 connected things

==> /var/log/openhab2/events.log <==

2020-04-23 21:23:46.033 [hingStatusInfoChangedEvent] - 'surepetcare:bridge:7f9f20ee' changed from UNKNOWN to ONLINE

==> /var/log/openhab2/openhab.log <==

2020-04-23 21:23:46.035 [DEBUG] [nal.handler.SurePetcareBridgeHandler] - Thing: surepetcare:flapDevice, id: 087f26b7

2020-04-23 21:23:46.038 [DEBUG] [nal.handler.SurePetcareBridgeHandler] - Thing: surepetcare:household, id: fcbc0e0c

2020-04-23 21:23:46.042 [DEBUG] [.handler.SurePetcareHouseholdHandler] - Trying to update unknown household: fcbc0e0c

2020-04-23 21:23:46.045 [DEBUG] [nal.handler.SurePetcareBridgeHandler] - Thing: surepetcare:pet, id: 2bf0dbd6

2020-04-23 21:23:46.048 [DEBUG] [ternal.handler.SurePetcarePetHandler] - Trying to update unknown pet: 2bf0dbd6

==> /var/log/openhab2/events.log <==

2020-04-23 21:23:46.052 [vent.ItemStateChangedEvent] - surepetcare_bridge_7f9f20ee_online changed from OFF to ON

==> /var/log/openhab2/openhab.log <==

2020-04-23 21:23:46.052 [DEBUG] [nal.handler.SurePetcareBridgeHandler] - Thing: surepetcare:hubDevice, id: f7d6336e

==> /var/log/openhab2/events.log <==

2020-04-23 21:23:46.056 [vent.ItemStateChangedEvent] - SurePetcareAPIBridgeOnline changed from OFF to ON

==> /var/log/openhab2/openhab.log <==

2020-04-23 21:23:46.055 [DEBUG] [nal.handler.SurePetcareBridgeHandler] - Bridge topology polling job every 36000 seconds

2020-04-23 21:23:46.059 [DEBUG] [nal.handler.SurePetcareBridgeHandler] - Pet status polling job every 300 seconds

==> /var/log/openhab2/events.log <==

2

2020-04-23 21:24:45.113 [DEBUG] [iscovery.SurePetcareDiscoveryService] - Starting Sure Petcare discovery scan

2020-04-23 21:24:45.121 [DEBUG] [iscovery.SurePetcareDiscoveryService] - Starting device discovery for bridge surepetcare:bridge:7f9f20ee

==> /var/log/openhab2/events.log <==

I got the same " Expected BEGIN_ARRAY but was BEGIN_OBJECT at path $.devices[1].control.curfew" error.
The JSON response from API contains an object with three attributes:
“control”:{“curfew”:{“enabled”:true,“lock_time”:“19:00”,“unlock_time”:“08:00”},“fast_polling”:true}

I had a look at the code, that just tries to get an array of these informations. I would suggest to check if it’'s an Array or an Object and proceed setting the data the matching way.

I don’t have an environment for openhab to try it,so please help to fix it.
I would like to send a telegeram message if battery is getting low and a few other nice things.

@Oensel, @Osmii, I’ve just committed a fix in the code which should deal with the inconsistency in the JSON API. The binding will now deserialize correctly if a single curfew object is returned as well as an array of curfews.
As my API call always returns an array, I couldn’t fully test it except for a unit test. Please could you have a try with the latest commit.

Thanks,
Rene

1 Like

Thanks for your quick response.
I tried hard to get eclipse to work with openhab, but failed.
So, I can just test it, if someone builds a compiled jar for me.

Hi Bastian
Here is a compiled version: https://drive.google.com/open?id=1BUMoDO1Nk1MVm8xLwX4ST3OWCr6kRmFt

1 Like

My household object and the hub are discovered automatically. Just the flap itself throws an exception.

I got this Exception because my JSON doesn’t contain all the data you try to read:

2020-05-01 11:48:17.645 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable 
ended with an exception:
java.lang.NullPointerException: null
    at org.openhab.binding.surepetcare.internal.dto.SurePetcareDevice.getThingProperties(SurePetcareDevice.java:71) ~[?:?]
    at org.openhab.binding.surepetcare.internal.discovery.SurePetcareDiscoveryService.deviceDiscovered(SurePetcareDiscoveryService.java:175) ~[?:?]
    at java.util.ArrayList.forEach(ArrayList.java:1257) ~[?:1.8.0_222]
    at org.openhab.binding.surepetcare.internal.discovery.SurePetcareDiscoveryService.startScan(SurePetcareDiscoveryService.java:130) ~[?:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_222]
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:1.8.0_222]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_222]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:1.8.0_222]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

Your Code:

public Map<@NonNull String, String> getThingProperties() {
    Map<@NonNull String, String> properties = super.getThingProperties();
    properties.put("householdId", householdId.toString());
    properties.put("productType", productId.toString());
    properties.put("productName", ProductType.findByTypeId(productId).name);
    properties.put(Thing.PROPERTY_MAC_ADDRESS, macAddress);
    properties.put(Thing.PROPERTY_SERIAL_NUMBER, serialNumber);
-->        properties.put(Thing.PROPERTY_HARDWARE_VERSION, status.version.device.hardware);
    properties.put(Thing.PROPERTY_FIRMWARE_VERSION, status.version.device.firmware);
    if (pairingAt != null) {
        properties.put("pairingAt", pairingAt.toString());
    }
    return properties;
}

my JSON:

{
"id":243375,
"parent_device_id":101922,
"product_id":3,
"household_id":22048,
"name":"Salems H\u00fctte ",
"mac_address":"95D99CFEDFAC3754",
"index":0,
"version":"MjYxMw==",
"created_at":"2019-03-02T14:54:30+00:00",
"updated_at":"2020-05-01T07:51:32+00:00",
"pairing_at":"2019-06-18T19:54:34+00:00",
"control":
{
	"curfew": 
	{
		"enabled":true,
		"lock_time":"19:00",
		"unlock_time":"08:00"
	},
	"fast_polling":true
},
"parent":
{
	"id":102753,
	"product_id":1,
	"household_id":22048,
	"name":"Salem",
	"serial_number":"H005-0101797",
	"mac_address":"0000801F1231B146",
	"version":"NzAzNg==",
	"created_at":"2018-05-18T11:11:59+00:00",
	"updated_at":"2020-05-01T07:51:32+00:00"
},
"status":
{
	"battery":5.864999999999999,
	"locking":
	{
		"mode":4,
		"curfew":
		{
			"delay_time":0,
			"lock_time":"19:00",
			"permission":2,
			"unlock_time":"08:00",
			"locked":false
		}
	}
	,"version":
	{
		"lcd":{"hardware":1,"firmware":1},
		"rf":{"hardware":4,"firmware":0.16}
	},
	"learn_mode":false,
	"online":true,
	"signal":{"device_rssi":-88.33333333333333,"hub_rssi":-86}
},
"tags":[{"id":22345,"index":0,"version":"MA==","created_at":"2019-06-18T19:54:42+00:00","updated_at":"2020-03-11T16:06:58+00:00"}]

}