-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compatibility with MQTT server / home assistant #48
Comments
Actually it is weird you'd bring this up, because I just talked with someone else a couple of weeks ago about streaming the data to other systems and I wondered why I didn't already have MQTT built into the HeaterMeter. It is on me todo list now, except it will be a MQTT client, not a server. |
thanks for reply. it's possible to repair link to google photos in wiki section? |
It is non-trivial to fix them, since Google Photos doesn't allow linking photos. I've looked at trying to replace them with another image host that allows linking to photos, has albums, and will autogenerate thumbnails in arbitrary resolutions but I couldn't find one easily so figured it wasn't worth the time to stand up and maintain my own image hosting. The photos are all still there in the new Google Photos albums, but the individual hotlinks for each photo doesn't work. Some of the wiki pages have an album link, and if you can't find it on a specific page let me know and I can update it with the appropriate link. It is hard to keep track of them all. |
Ok, thanks. App HeaterMeter on Apple App Store is yours? |
I've actually not heard of that one, but it looks nice. There's also Pit Meter and Pit Droid (for Android) but I'v e not worked on any of these, they are community-created. |
I'll add my vote to adding an MQTT client! Now that I have just finished building my unit I was about to write a Python script to scrape that info and publish it to my MQTT broker. |
I was hoping to get it in this week but it needs webui to be able to configure it, upload certificates, etc, so it is a bigger project than just getting the package into the build. Also we had that whole deal with migrating to the new webhosting that sort of is still in progress so this is still on my todo list. |
I just got mine built yesterday so have no idea about the web hosting issues. Testing last night was amazing. Minimal overshoot after a bit of PID adjustment and stable, stable temps. I'm in no great rush for the MQTT stuff, I still have to figure out all the stuff that is already there! I'd be happy to give my opinion on things MQTT if you are looking for beta testers. As far as configuration, please allow the user to specify a 'root' of the topic tree that the HM topics would nest under. That would allow easy integration into topic structures that people may already have on their broker, i.e. 'myHouse/automation/outside'. |
any progress with MQTT client developing? |
Nope, not yet. This ticket will be updated when there's an update on the situation. |
The latest snapshot includes a MQTT client in the form of mosquitto_pub and mosquitto_sub. Publishing the streaming status is as easy just piping the output of lmclient into mosquitto_pub:
There's no webui for configuring the server or topic or MQTT login information/certificate, but it should be easy to start working with it with just the line above. |
Amazing work, I would like to test it. and is the mosquitto_pub is this one? |
Yup it is that same mosquitto_pub, which should have TLS support in it too through the existing OpenSSL but I did not test that. And yeah just SSH in and run that command with the latest snapshot and you should start seeing streaming updates on the MQTT server. If it works and you want it all the time, it can just be added to the rc.local script to start at startup. |
I can confirm it works using mosquito MQTT on home assistant. I've added this to my startup lmclient @lmss,1 | mosquitto_pub -h 192.168.1.174 -p 1883 -u "someuser" -P "somepass" -i "heatermeter" -t "heatermeter/hmstatus" -l Its a good idea to have the clientid defined here (the 'i' pararmeter) So currently there is no commands I can set from the MQTT consumer side (home assistant) |
Great, glad it works! Yeah currently the only way to change anything is through the HTTP API. I'm not sure this will change, at least for a while, because once you start accepting commands you also need authentication, which then needs configuration UI, and so on and becomes a lot of work in addition to creating another API framework which now doubles the amount of work every time new settings are added. Home Assistant can definitely do the HTTP API calls though so you should be able to easily make an MQTT to HTTP gateway if you want to be able to control the HeaterMeter over MQTT. |
About authentication. I see the problem with doubling the work though. |
That's a good point, for some reason I was thinking it would have to be a separate connection coming back, but of course one could publish and subscribe on the same outgoing connection. I blame time-change-related morning confusion. I'm going to leave this ticket open because I'd like to expand on this functionality in the future. |
Here's a discussion about a reboot problem that sounds similar, although the kernel versions don't line up with yours. Perhaps it was a patch that was applied to multiple kernel versions. https://www.raspberrypi.org/forums/viewtopic.php?t=264374 As for /etc/rc.local not executing on boot, seems like the most common cause is permissions, which you've already fixed. Other possible causes are the rc system not actually pointed to the rc.local, and in your case since you're trying to do network access, it's possible that the network isn't up yet. Here's one of many discussions about rc.local appearing to not work: https://www.raspberrypi.org/forums/viewtopic.php?t=95101 |
The Issue system is not for technical support. Please discontinue discussion of your problem here and take it to the support forums. rc.local always runs on boot, there is no need to change any permissions. It is likely the reason you can't reboot is because the lmclient command is a BLOCKING command in the startup script. I'll look at providing assistance tomorrow, but for now please take discussion to the forums. |
Hi,
it's possible have temperature value in home assistant using MQTT server?
it could be useful to have all data also when you are outside house...in long time BBQ...
The text was updated successfully, but these errors were encountered: