Jump to content
  • 0

MQTT on the new SMH


Deewee
 Share

Question

Hi Guys,

Does anyone have a how-2 to setup MQTT on the new SMH?

I don't want to do cloud integration for home assistant, as my fiber connection ISP is problematic. I was told to do it from the website, but for the life of me I can not find it op the local hosted website or the Emoncms website.

Any pointers will be appreciated.

 

Regard,

Johan

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

So I just went back to ICC, as that did exactly what I needed, Click on settings, then setup MQTT.

Extremely glad I did a SD-Card clone before the install.

No need to go out to the internet and battle to keep traffic local to the site. My Home assistant is far to involved to redo everything due to MQTT now sitting somewhere in the cloud and not local.

image.thumb.png.52248b29af25aa8e33619ebc0039caeb.png

Link to comment
Share on other sites

  • 0
On 2021/07/27 at 7:38 PM, Deewee said:

Hi Guys,

Does anyone have a how-2 to setup MQTT on the new SMH?

I don't want to do cloud integration for home assistant, as my fiber connection ISP is problematic. I was told to do it from the website, but for the life of me I can not find it op the local hosted website or the Emoncms website.

Any pointers will be appreciated.

 

Regard,

Johan

Hi Johan,  Simply open the IP of your pi in your browser on port 1800 (or http://localhost:1800 directly on the pi).  This will open up Node-Red.  Once done, check top right, you can import a flow.  Copy and paste this:

 

[{"id":"170007fc.3c6cc8","type":"tab","label":"Home Assistant Configuration","disabled":false,"info":""},{"id":"239e97ec.204da","type":"mqtt in","z":"170007fc.3c6cc8","name":"SMH Raw Data","topic":"OpenData/InverterValues","qos":"2","datatype":"auto","broker":"abfc8f86.48ee18","x":240,"y":120,"wires":[["bd7b01ef.66cbf8"]]},{"id":"ea1eb994.6f6cf8","type":"mqtt out","z":"170007fc.3c6cc8","name":"Output to Home Assistant","topic":"","qos":"","retain":"","broker":"8a6e45db.4c4e6","x":1270,"y":120,"wires":[]},{"id":"bd7b01ef.66cbf8","type":"json","z":"170007fc.3c6cc8","name":"Convert to Json Object","property":"payload","action":"","pretty":false,"x":470,"y":120,"wires":[["f4015c3.12fa12"]]},{"id":"f4015c3.12fa12","type":"split","z":"170007fc.3c6cc8","name":"Split the MQTT Topic","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"key","x":740,"y":120,"wires":[["5aab81c9.40946"]]},{"id":"5aab81c9.40946","type":"change","z":"170007fc.3c6cc8","name":"Set the topic of each value","rules":[{"t":"set","p":"topic","pt":"msg","to":"\"inverter/\" & key","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":120,"wires":[["ea1eb994.6f6cf8"]]},{"id":"6d2307ec.ae9ed8","type":"comment","z":"170007fc.3c6cc8","name":"How to Configure Output to Home Assistant","info":"# How to configiure:\n\n1.  Doubleclick the Output to Home Assistant Icon (Node).\n2.  Edit the properties of the MQTT server (click the pen icon).\n3.  Enter the IP address for your home assistant server.\n4.  Click on the security tab and enter your username and password for Home Assistant\n5.  Click Update once done, and then Done.\n6.  Click the Deploy Icon (top right of the screen) to enable SMH to start posting to Home Assistnat\n7.  DONE!","x":1270,"y":80,"wires":[]},{"id":"abfc8f86.48ee18","type":"mqtt-broker","z":"","name":"SMH","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"8a6e45db.4c4e6","type":"mqtt-broker","z":"","name":"Home Assistant","broker":"10.11.12.250","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

 

Load it up, and you will see a Home Assistant config.  Once there you will see a comment about how to connect it to HA, which is really just to specify the IP of your home assistant, and it's MQTT username and password. 

 

Please revert back if you struggle.  It works GREAT.  When you are done with everything, simply click deploy, and you can close the browser.  That's how easy it is.

 

And this is the result (taken from www.centurionsolar.co.za website).  Johan there helped me to make mine look just about the same:

525886746_ScreenShot2021-06-03at07_40_02.thumb.png.ef2f44ee9837582da9c3cb213d244354.png

 

Edited by Dexitt
Forgot to add screenshot of the result.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...