Adapter failing to pair?

I’ve been trying to edit the gpio-adapter code into an adapter that reads mqtt messages sent by the rtl_433 tool. So rtl_433 will publish JSON messages onto an mqtt topic, and my addon will subscribe to that topic.

But I seem to be doing something wrong. I pushed my WIP code to https://github.com/jgrgt/rtl-433-adapter It’s quite crappy at the moment due to me trying all kinds of things to get it to work.

Also, right now I ‘test’ by coding straight on my raspberry pi and restarting the gateway after every edit. This is flawed in multiple ways (not a lot of useful logging, no debugging possible) so I’m looking for a better way?

Another question: how do I reset my gateway’s things (including logs) to ‘empty’? Right now I need to disable the addon, re-enable it and remove the thing using sqlite3…

Any help is appreciated.

What hardware does this connect to?

The gpio adapter doesn’t really pair. It just adds pins that are configured. When you hit + in the UI to initiate pairing it will present any devices that that adapter has advertised that aren’t currently in the DB.

I normally do my development on the PC. This works really well for any type of USB dongle.

You also don’t need to restart the gateway. You can disbale and re-enable the addon (in settings->Addons). This will cause the addon to be reloaded. I now add runtime configurable debug. The zwave and zigbee adapters have this.

I created a PR: https://github.com/jgrgt/rtl-433-adapter/pull/1 which gets the adapter into a working state.

The biggest problem was that the TemperatureProperty needs units, minimum and maximum.

I also fleshed out the mqtt client portion and set things up so you could have multiple properties, each one subscribed to a different topic.

@dhylands Thanks a lot! I merged your PR and gave I’m indeed getting temperatures in the UI now, which was not happening before.

Now it’s time to investigate some of the configurability options…