Error after installing HA and some devices/services

Hi.
This is the secound time I have installed HA today (using Rasperi PI imager) on a new Raspberry PI 4 - 8GB.

After installing some devices (RFXCOM and Sonoff Zigbee 3,0 USB dongle)
And services like RFXTRX, Zigbee2mqtt, IKEA trådløs, Broadlink RM mini 3 and Philips Hue
I get some errors in the log-file… and another strange thing happends in Devices/Services…

I did not copy anything from the log-files from the first innstall… I thought it was me who had done something wrong and that the errors were due to me so I reinstalled everything again. But the same thing happened this time too

From Log-file:

Logger: homeassistant.helpers.storage
Source: helpers/storage.py:280
First occurred: 12:04:01 AM (1 occurrences)
Last logged: 12:04:01 AM

Error writing config for core.config_entries: Failed to serialize to JSON: /config/.storage/core.config_entries. Bad data at $.data.entries[7].data.devices.0b11000101fbf65a0a000070.device_id=DeviceTuple(packettype='11', subtype='0', id_string='1fbf65a:10')(<class 'homeassistant.components.rfxtrx.DeviceTuple'>
Logger: homeassistant.util.json
Source: util/json.py:76
First occurred: 12:04:01 AM (1 occurrences)
Last logged: 12:04:01 AM

Failed to serialize to JSON: /config/.storage/core.config_entries. Bad data at $.data.entries[7].data.devices.0b11000101fbf65a0a000070.device_id=DeviceTuple(packettype='11', subtype='0', id_string='1fbf65a:10')(<class 'homeassistant.components.rfxtrx.DeviceTuple'>

Full logs:

2022-07-12 00:04:01 ERROR (SyncWorker_0) [homeassistant.util.json] Failed to serialize to JSON: /config/.storage/core.config_entries. Bad data at $.data.entries[7].data.devices.0b11000101fbf65a0a000070.device_id=DeviceTuple(packettype='11', subtype='0', id_string='1fbf65a:10')(<class 'homeassistant.components.rfxtrx.DeviceTuple'>
2022-07-12 00:04:01 ERROR (MainThread) [homeassistant.helpers.storage] Error writing config for core.config_entries: Failed to serialize to JSON: /config/.storage/core.config_entries. Bad data at $.data.entries[7].data.devices.0b11000101fbf65a0a000070.device_id=DeviceTuple(packettype='11', subtype='0', id_string='1fbf65a:10')(<class 'homeassistant.components.rfxtrx.DeviceTuple'>

In Devices/Services:
Several of the services need to be reconfigured even if they have been configured previously. And IKEA has disappeared along with all the bulbs and smart plugs.

I think the last thing I did before things went wrong was configure “Sonoff Zigbee 3.0 …”

What causes the problem?

By the way, the same setup works just fine on my old Raspberry Pi 3b, but not on my new Raspberry Pi 4 …

Does anyone have any idea what might be wrong?

I installed HA on Raspberry Pi 3B and I have the exact same results. I added the RFXTRX integration and added some KAKU devices. After a reboot all devices show unavailable. I installed the latest version (2022.7.4). It seems that there is something wrong with the RFXTRX integration.
Everything is stored in a new 64GB SD card.

I think these are related:

Any of you guys solved this?

I am starting to get, and I don’t have any clues of the trigger that started this error.

Failed to serialize to JSON: /config/.storage/core.config_entries. Bad data at $.data.entries[114].data.scan_interval=0:01:00(<class ‘datetime.timedelta’>

114th is the last entry in ./storage/core.config_entries file, but there is no scan_interval item there.
There are scan_interval in other places but it is not in a format of 0:01:00, but in seconds like 30 or 300, which is mentioned to be the correct way to specify scan_interval in other threads.

somone solved this ?

I identified the cause.
It was the custom ddwrt integration that I installed recently,
https://community.home-assistant.io/t/custom-component-for-dd-wrt-routers/162423
that I believe has the scan_interval internally defined in a wrong format.

Deleting that integration, stopped the “Failed to serialize to JSON” message.
This solved also the inability to persist newly installed integrations after restart.

So @yanirel , you may want to check the integrations one by one starting from the recently installed ones.