<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sia-server/main.go, branch v0.2.0</title>
<subtitle>IoT backend server</subtitle>
<id>https://cgit.xengineering.eu/sia-server/atom?h=v0.2.0</id>
<link rel='self' href='https://cgit.xengineering.eu/sia-server/atom?h=v0.2.0'/>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/'/>
<updated>2026-03-27T13:30:51Z</updated>
<entry>
<title>Add version to start / stop log messages</title>
<updated>2026-03-27T13:30:51Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2026-03-27T13:30:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=5b64946098839d3df679bdc7ef1c4cc4e692323a'/>
<id>urn:sha1:5b64946098839d3df679bdc7ef1c4cc4e692323a</id>
<content type='text'>
This makes it more transparent which version is executed.
</content>
</entry>
<entry>
<title>Add Shelly / TP-Link device discovery</title>
<updated>2026-03-26T20:34:16Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2026-03-26T20:02:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=0ec5e0034891075ca0c70c6d29e20442c8ddb46e'/>
<id>urn:sha1:0ec5e0034891075ca0c70c6d29e20442c8ddb46e</id>
<content type='text'>
This announces Shelly and TP-Link devices with an empty MQTT message.
This makes it possible that a client can display the available devices.
</content>
</entry>
<entry>
<title>Add TP-Link HS100 support</title>
<updated>2026-03-26T16:46:54Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2026-03-26T16:46:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=5c7284640a6f0ddc0aa80178d5a3b91a5123b6c8'/>
<id>urn:sha1:5c7284640a6f0ddc0aa80178d5a3b91a5123b6c8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refactor and add routing concept</title>
<updated>2026-03-25T20:09:11Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2026-03-25T19:33:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=476db7047a9c650057c034c647ea66f3c38e8a53'/>
<id>urn:sha1:476db7047a9c650057c034c647ea66f3c38e8a53</id>
<content type='text'>
This scales better when additional receiving routes will be added.
</content>
</entry>
<entry>
<title>Add MQTT subscription for /cover/&lt;id&gt;/movement</title>
<updated>2026-03-25T20:09:11Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2026-03-23T19:53:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=1bd2833f81379f25b29ab5d929f14e51700fa471'/>
<id>urn:sha1:1bd2833f81379f25b29ab5d929f14e51700fa471</id>
<content type='text'>
This let's the Sia server receive cover movement commands. For now they
are simply logged.
</content>
</entry>
<entry>
<title>Fix warning about OS signal listener</title>
<updated>2026-03-23T15:55:47Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2026-03-22T09:49:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=730907f34002ded0bbb3e1b57b48a8168fddcfdb'/>
<id>urn:sha1:730907f34002ded0bbb3e1b57b48a8168fddcfdb</id>
<content type='text'>
An unbuffered channel triggers a warning here. This can easily be fixed
by switching to a buffered channel with buffer length 1.
</content>
</entry>
<entry>
<title>Do not print start banner on usage</title>
<updated>2025-12-20T14:03:33Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T14:03:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=fe3d36791e3fa97d4f03639b6c7f8a2d61e28a0b'/>
<id>urn:sha1:fe3d36791e3fa97d4f03639b6c7f8a2d61e28a0b</id>
<content type='text'>
Before this commit the start banner `+++ Started Sia server +++` was
printed before the usage instructions. The stop banner was not printed.

The intended behaviour is to print none of them. This is not
implemented.
</content>
</entry>
<entry>
<title>Disable log timestamps</title>
<updated>2025-12-20T13:30:37Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T13:30:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=c76a967bce0bb182ae2a5d81f5bd940869aa464f'/>
<id>urn:sha1:c76a967bce0bb182ae2a5d81f5bd940869aa464f</id>
<content type='text'>
The primary target environment is a systemd-based Linux system. There
the logging system of the operating system will timestamp the log
messages.
</content>
</entry>
<entry>
<title>Implement passing user configuration</title>
<updated>2025-12-20T13:20:42Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T13:20:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=167772b87698cce479090dbe5bd3d1cc7c1bc808'/>
<id>urn:sha1:167772b87698cce479090dbe5bd3d1cc7c1bc808</id>
<content type='text'>
This allows overwriting values of the default configuration with custom
ones.
</content>
</entry>
<entry>
<title>Use default config</title>
<updated>2025-12-20T13:11:13Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T13:11:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=224d52d1033d8ccce5087c9bee5a63457830a13a'/>
<id>urn:sha1:224d52d1033d8ccce5087c9bee5a63457830a13a</id>
<content type='text'>
The default config JSON is embedded as bytes into the executable.
Instead of constants the default values are now parsed from these
embedded bytes.
</content>
</entry>
<entry>
<title>Separate Homematic code</title>
<updated>2025-12-20T12:47:56Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T12:47:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=6978bf0635372b0330629469fb86ddb640cdd863'/>
<id>urn:sha1:6978bf0635372b0330629469fb86ddb640cdd863</id>
<content type='text'>
Similar to a previous refactoring of the MQTT-related code this removes
all Homematic logic to a dedicated file.

The only connection to the outside is the `tx chan MQTTMessage` channel
and the `HomematicRun()` function.

This makes the code more modular.
</content>
</entry>
<entry>
<title>Separate MQTT logic</title>
<updated>2025-12-20T12:27:42Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T12:27:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=96299467958aaffdbef5cb8ae780d3abeddfcaba'/>
<id>urn:sha1:96299467958aaffdbef5cb8ae780d3abeddfcaba</id>
<content type='text'>
This reduces the coupling between the MQTT-related code and everything
else to a single `tx` channel of type `MQTTMessage`.

This improves the code quality significantly.
</content>
</entry>
<entry>
<title>Raise to QoS 1</title>
<updated>2025-12-20T12:23:17Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T12:23:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=faf9fb7a8c5e8b31e9c1104b42d7e550e986ca61'/>
<id>urn:sha1:faf9fb7a8c5e8b31e9c1104b42d7e550e986ca61</id>
<content type='text'>
This ensures the state updates reach the broker. QoS 2 is not required
since multiple reception of the same state will not make a difference.
</content>
</entry>
<entry>
<title>Switch ClientId to `siaserver`</title>
<updated>2025-12-20T12:18:55Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T12:18:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=2b4b4235d692b32f5dc18e1fda39917365857336'/>
<id>urn:sha1:2b4b4235d692b32f5dc18e1fda39917365857336</id>
<content type='text'>
The old version `sia-server` was problematic since the MQTT
specification [1] ensures only this list of valid characters:

    0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ

For every other character the broker might support this or not.

[1]: https://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718031
</content>
</entry>
<entry>
<title>Publish state in retained mode</title>
<updated>2025-12-20T12:09:40Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T12:09:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=df3d898644f5b7164ea2ba1baf84ed82c20d31c4'/>
<id>urn:sha1:df3d898644f5b7164ea2ba1baf84ed82c20d31c4</id>
<content type='text'>
This ensures the MQTT broker caches the state when it is sent by Sia and
sends it via MQTT to new MQTT clients.

Thus no state polling is required by the MQTT client.
</content>
</entry>
<entry>
<title>Reduce polling period to 50 ms</title>
<updated>2025-12-20T12:05:09Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T12:05:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=7bc3ce328d61c1afe138802ded812d718b056257'/>
<id>urn:sha1:7bc3ce328d61c1afe138802ded812d718b056257</id>
<content type='text'>
The human reaction time is roughly 100 ms. The Nyquist-Shannon
sampling theorem [1] is used for an approximation how often it is
required to sample without humans noticing any delays.

[1]: https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem
</content>
</entry>
<entry>
<title>Add cache implementation</title>
<updated>2025-12-20T12:00:52Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T12:00:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=853e3fd5f2b4e622d4e35c0e3c2fad6c358cb8ae'/>
<id>urn:sha1:853e3fd5f2b4e622d4e35c0e3c2fad6c358cb8ae</id>
<content type='text'>
This avoids frequent MQTT messages containing the same state.
</content>
</entry>
<entry>
<title>Add continuous polling execution</title>
<updated>2025-12-20T11:55:57Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T11:55:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=8205200e73ff45c09aaa67dacb7ceb9b33845f5d'/>
<id>urn:sha1:8205200e73ff45c09aaa67dacb7ceb9b33845f5d</id>
<content type='text'>
This state polls the device states with 500 milliseconds period and
publishes the state on every poll.
</content>
</entry>
<entry>
<title>Refactor with Poll() function</title>
<updated>2025-12-20T11:51:01Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T11:51:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=d5b189640ccbd8ed14154fe0f21712194c8e319d'/>
<id>urn:sha1:d5b189640ccbd8ed14154fe0f21712194c8e319d</id>
<content type='text'>
This function allows to reduce the lines of code in main() further.
</content>
</entry>
<entry>
<title>Refactor with Start() and Stop()</title>
<updated>2025-12-20T11:46:28Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T11:46:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=feced16cf361a085de9a6f97d7491412261cf8b8'/>
<id>urn:sha1:feced16cf361a085de9a6f97d7491412261cf8b8</id>
<content type='text'>
This reduces the lines of code of the main() function significantly and
groups all start and stop actions.
</content>
</entry>
<entry>
<title>Add logging for init and de-init steps</title>
<updated>2025-12-20T11:42:04Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T11:42:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=6b876c1e22b72cfaa91b2a3064a1f1c4fe7380ed'/>
<id>urn:sha1:6b876c1e22b72cfaa91b2a3064a1f1c4fe7380ed</id>
<content type='text'>
This helps to debug potential issues.
</content>
</entry>
<entry>
<title>Run go fmt</title>
<updated>2025-12-20T11:37:52Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T11:37:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=f415a8dcc1354c489b8297a46f8420d8936aedd5'/>
<id>urn:sha1:f415a8dcc1354c489b8297a46f8420d8936aedd5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refactor MQTT connect / disconnect</title>
<updated>2025-12-20T11:33:00Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T11:33:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=2567ffcba09eecc30eb97f0ef503fedf2e7d9182'/>
<id>urn:sha1:2567ffcba09eecc30eb97f0ef503fedf2e7d9182</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Change topic structure</title>
<updated>2025-12-20T11:27:47Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T11:27:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=5396eae035dfe02bc25d756972eeab81104c674c'/>
<id>urn:sha1:5396eae035dfe02bc25d756972eeab81104c674c</id>
<content type='text'>
The new structure for the contact states is the following.

    &lt;prefix&gt;/contact/&lt;id&gt;/state

The reasoning is:

- `&lt;prefix&gt;` allows using multiple (Sia) services on the same broker
- `contact` as device type indicates contact-specific semantics
- `&lt;id&gt;` makes different contacts distinguishable
- `state` is the actual payload
</content>
</entry>
<entry>
<title>Change topic prefix to `sia`</title>
<updated>2025-12-20T11:23:21Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T11:23:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=d5062a0eec968982e86b9db5294ee6a006cae09a'/>
<id>urn:sha1:d5062a0eec968982e86b9db5294ee6a006cae09a</id>
<content type='text'>
The old prefix `sia-server` was longer and not completely correct. The
topics under this prefix never belong more to the server or the clients.
Thus only `sia` seams to be a good solution.
</content>
</entry>
<entry>
<title>Refactor with OPENCCU constant</title>
<updated>2025-12-20T11:18:41Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T11:18:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=046bf759b26612b642bb7e427bae6041ce61c905'/>
<id>urn:sha1:046bf759b26612b642bb7e427bae6041ce61c905</id>
<content type='text'>
This unifies the HOST and PORT constants used so far and removes the
need for a fmt.Sprintf() call.
</content>
</entry>
<entry>
<title>Publish contact state with MQTT</title>
<updated>2025-12-20T11:14:01Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-20T11:14:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=03ceb4e5babba95c9ec60da580fbeac465aa0938'/>
<id>urn:sha1:03ceb4e5babba95c9ec60da580fbeac465aa0938</id>
<content type='text'>
This demonstrates the ability to take information from the Homematic
system to MQTT. It is a major proof of concept step towards a minimal
viable product (MVP) Sia server.
</content>
</entry>
<entry>
<title>Adopt homematic-go example</title>
<updated>2025-12-10T20:14:38Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-10T20:14:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=f9fac85222892e45554a2cc49dd93455a374ef68'/>
<id>urn:sha1:f9fac85222892e45554a2cc49dd93455a374ef68</id>
<content type='text'>
This requests a list of devices from the Homematic central device and
then queries the state of every `SHUTTER_CONTACT`.

This is a good starting point for the server logic.
</content>
</entry>
<entry>
<title>Add hello world as main.go</title>
<updated>2025-12-08T20:08:46Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2025-12-08T20:08:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/sia-server/commit/?id=661a5b240af93e14cad722525a746e3f46370515'/>
<id>urn:sha1:661a5b240af93e14cad722525a746e3f46370515</id>
<content type='text'>
This is just a minimal starting point for the repository.
</content>
</entry>
</feed>
