Originally posted by aldo
View Post
So here's what I did, set a GOPATH env variable to a base directory where you want it (either in that terminal session, or in /etc/profile.d, or /etc/profile, etc.) It's kind of annoying tbh, but looks like something GoLang may have standardized on. I set it to me home/USERNAME/src directory, and it nested everything under there, however you can put it into any directory your username has access too. Once you do that, when you do the go get command, it will put it in the $GOPATH/bin/rtlamr path. Once done, to make debugging easier, copy that rtlamr file to the same directory as these scripts and config file and you can run them all from there.
I've run it from the HS3 box for testing, however long term will run it for a dedicated Pi on the network. For now it could be run via cron. It can also be run as a service if you're interested. I hadn't done this yet as it was logging some useless header info every time it ran, so figured at some point I'd clean it up rather than clog the log.
If you want to use MQTT, then yes, you'll need an mqtt server running on that box or somewhere on the network. However if you end up using mysql commands, then it'll make the MQTT pieces OBE.
Slight tangent: I switched to using MQTT as got tired of having lots of different protocols and standards for doing communication. I had 1 wire devices, an unsupported TED1000 power monitor, ESP8266, NodeMCU, etc. With MQTT it's a fairly simple and well documented messaging protocol, so lends it's self ideally to a common devices messaging ability. It's not perfect, but fit my needs quite happily
Long term I'll probably get this up on to Github, here's the 1wire to MQTT forked version I did a year or so ago: https://github.com/mloebl/mqtt-owfs-temp
Comment