That's a misreading. None of those spells say "does not affect objects". They just don't specify, leaving it up to the DM to describe what happens when you let off a fireball in the king's luxuriously furnished bedchamber.Out of curiosity I've been going through the spells and noting how each would effect the Eldritch cannon and treating it as a magical object it is surprisingly tough to take out by spells. Outside of a short list that call out that they can target and damage objects, almost all being fire spells like burning hands, fireball, and fire storm, combined with blanket condition immunity.
I mean I did explicitly call out fireball as being one of the exceptions compared to something like spiritual weapons which is unable to Target the cannon at all the same way you can't use the spell to bash down a door. Then you have shatter which you would assume would be a good pick vs the cannon but it has clear text stating that it only effects non magical objects. Further down the list melfs acid arrow and chain lighting with different but clear text to allow targeting the cannon.That's a misreading. None of those spells say "does not affect objects". They just don't specify, leaving it up to the DM to describe what happens when you let off a fireball in the king's luxuriously furnished bedchamber.
Mending heals it. But that's out of combat.... effects from spells that call out to solely effect creatures like plant growth or spirit guardian. On the other hand the Eldritch cannon cannot be targeted by buffs or healing spells at all.
definitely something to keep an eye on.
Very true but spells like healing word have no effect. I think a player would have pretty good grounds to call foul if a DM rules that the cannon can be targeted as a creature for hostile spells but are not allowed to cast beneficial spells on them.Mending heals it. But that's out of combat.

(Dungeons & Dragons)
Rulebook featuring "high magic" options, including a host of new spells.