Build1 distinct publisher3 min readPublished
PR #5554 adds com.codename1.home so application code asks for BRIGHTNESS instead of carrying a HomeKit characteristic and a Matter cluster, with the port taking on the unit conversions and the availability states that come with them.
The Engineer · Build desk

Compiled by The EngineerSomething wrong?How this is made
Everything else here hangs off one call. `SmartHome.getInstance()` never returns null [10]. On a port with no smart-home backend you get a fallback object that reports `NOT_SUPPORTED`, and on a supported port you get more specific states, so an empty accessory graph is not mistaken for a configured home with no devices [10]. A never-null singleton that answers `NOT_SUPPORTED` is duller than a null check and considerably harder to forget.
The availability read is deliberately awkward. Codename One tells you to read it from the completion path even when `refresh()` fails [11]. On iOS the initial value is `NOT_STARTED`, because connecting to HomeKit is what reveals the authorization and home state [12]. There is no synchronous way to ask whether you are allowed in. The published sample routes six availability values into five remediation calls: provider setup, authorization request, home settings, the ecosystem app, and an add-device-only UI [13][14].
The arithmetic explains why the layer exists. Matter brightness is a 0 to 254 level [4], and the API turns proportional values into percentages [8]. Divide 254 by 100 and you get roughly 2.54 Matter levels per percentage point [22], which means a percentage cannot round-trip back to the level you started from. That is why `TraitValue` keeps the platform ordinal alongside the canonical value wherever the conversion loses detail [8]. Air quality gets the same treatment, because HomeKit and Matter do not agree on how many levels there are [7]. Temperature getters go further and require the expected unit, so a Celsius reading cannot be picked up as Fahrenheit by accident [9].
Not every question has an answer, and the API reports that state rather than guessing. Matter has no single thermostat setpoint in automatic mode [6], and the post is explicit that the model reports cases where the platforms cannot give the same answer [23]. Writes inherit the same honesty. Turning off every light can succeed for three accessories and fail for one unreachable bulb, and the result carries each row instead of collapsing into one boolean [19].
The portability claim is still a claim about someone else's application. It transfers if your feature list is expressible as traits and services, and if you are content to drive UI from what the port models. It does not transfer if you need a platform-specific characteristic the trait vocabulary does not cover, because then you are back to two code paths plus an abstraction in the middle. The argument the post makes is narrower than "write once": application code should ask for brightness rather than carry both platform identifiers and two sets of value rules [24].
On Android, the practical shape of this release is commissioning. `COMMISSIONING_ONLY` is the normal result without Google Home developer setup, and Play services can still add a Matter accessory to the user's Google Home [15]. So you can onboard hardware today and read it later.
One asymmetry still comes through the abstraction. HomeKit can push trait changes while the application is in the foreground, other backends require polling, and `TraitSubscription.isPushDelivery()` tells you which model you were handed [21]. The UI needs a refresh path that works under both, and you write that path once whether or not anyone is pushing.
Ranked by verification strength, evidence, and original report placement.
The Google Home accessory graph is not part of this release, because reporting full availability would make the same enum value mean different things on Android and iOS.
HomeKit can push trait changes while the application is in the foreground, other backends require polling, and TraitSubscription.isPushDelivery() tells the application which model it received.
Where push delivery is unavailable the post says to call drainChange, and the published text breaks off at that point.
PR #5554 adds com.codename1.home, a portable model for listing accessories, reading and writing traits, watching changes, running scenes, and commissioning Matter devices.
Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase.
A HomeStructure contains rooms and accessories, each accessory contains services, and each service exposes traits such as ON_OFF, BRIGHTNESS, or TARGET_TEMPERATURE.
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 31, 2026
Follow any of these and your For You feed starts watching them — no settings page required.
build
Returning Unit is a promise to tell you nothing about how the call can fail1 distinct publisher
build
Codename One builds the watch as its own application rooted at codename1.watchMain1 distinct publisher
build
A green @DataJpaTest can prove only that Hibernate handed back the same object1 distinct publisher
build
An ADR routes refund eligibility to three plain-Java rules the CI can actually assert1 distinct publisher
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Specific, checkable, and entirely the issuer's word
Every detail — the 0-to-254 level, the five remediation branches, the refused sub-floor write — comes from one post written by the people who wrote the code. That is the best possible source for design intent and the weakest possible one for whether it behaves as described on real hardware. The specificity is what keeps this from scoring lower: named enums, named methods and runnable samples are falsifiable, and the post volunteers its own limits. No device tests, no second developer, no issue thread.
Code exists; users do not appear
The one observable event is the package landing. Nobody is shown building with it — no sample app in the wild, no developer count, no accessory the port has been driven against. And the release ships with a hole in the middle of its own headline: Google Home reduces to commissioning, and even reaching that graph later demands a Cloud project and a console registration each app must obtain for itself.
Headline outruns the release; the body catches it
'One Java API for HomeKit, Matter, and Google Home' promises three ecosystems, and paragraph after paragraph then explains that the Google Home graph is not here, that COMMISSIONING_ONLY is the normal Android answer, and that success can mean an accessory joined a home the app cannot address. The gap is small and it is in the title, not the argument — a post willing to say the framework cannot create your credentials is not inflating much.
The maintainer marketing its own pull request
This is a framework vendor's release note on a developer channel, complete with a 'What is Codename One?' insert, a link to codenameone.com and a pointer to the weekly release overview. Nobody in the chain has reason to stress-test the claims. The counterweight is that the same author documents the parts that do not work yet, which is not how pure promotion reads.
Confident about what was announced, not about how it behaves
What the package claims to do is settled: one document, unambiguous, from the authors. Everything downstream is open. Whether the conversions hold across real accessories, whether polling backends stay responsive, whether the Android graph ever arrives — none of it can be judged from here, and the text itself breaks off mid-sentence, so even the published account is incomplete.