Drops the CONF_GREETING option, the first-contact greeting logic and its
RuntimeData state, and all related strings/translations/README text. Any
greeting value left in an existing entry's options is simply ignored.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- messages_sent now increments when a message is queued (async_send_message),
not only when a delivery proof returns. LXMessage's delivery callback only
fires on a returned proof (LXMessage.py ~566), which many peers/methods never
send, so the "Messages sent" sensor was stuck at 0 for messages that were
actually delivered. The delivery callback now only emits the event.
- Implement the previously-inert "greeting" option: send it automatically the
first time each sender contacts HA (tracked per sender in RuntimeData).
- Clarify the notify entity (rename to "Send message" / "Отправить сообщение")
and document greeting + notify in strings/translations/README.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The interface-status poll was registered as a plain lambda, so
async_track_time_interval ran it in an executor thread, where its
_push_state()->async_dispatcher_send() call tripped HA's thread-safety guard.
Make refresh_interface_status a @callback (it only reads fast in-memory
interface attributes) and pass it to async_track_time_interval directly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Root cause of setup failure: Reticulum.__init__ calls signal.signal() with no
main-thread guard, but we (correctly) initialise off the event loop in an
executor thread, where signal.signal() raises ValueError. It failed after
setting the __instance singleton, which both broke setup and caused the
"Attempt to reinitialise Reticulum" error on every retry.
- Temporarily neutralise signal.signal during RNS init so init completes in the
executor, and so RNS does not hijack HA's SIGINT/SIGTERM (needed for clean
shutdown under Kubernetes).
- Unregister RNS's and LXMF's atexit exit handlers, which otherwise persist
state with blocking file I/O on the event-loop thread and detach HA's
stdout/stderr at interpreter exit (the loop-blocking warnings seen in logs).
- Persist RNS/LXMF state ourselves off-loop on the homeassistant_stop event.
Documents the remaining non-daemon RNS worker threads as a known shutdown note.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Custom integration connecting Home Assistant to a Reticulum network over a
TCPClientInterface and exchanging LXMF messages, with an Assist conversation
bridge, notify entity, sensors (incl. interface telemetry), buttons, services,
bus events and device triggers.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>