MQTT Setup for Windows

236 views
Skip to first unread message

Soggy Paws

unread,
Mar 3, 2021, 1:53:37 AMMar 3
to electrodacus
I need a little guidance making the final leap to connect the Electrodacus with wifi to an MQTT broker on my computer.

I have installed mosquitto 2.0.8 on Windows 7.  Connected to a local wifi access point.  Computer IP address is 192.168.8.114
Electrodacus (latest model with ESP32 Wifi module running Version: 0.3-dirty) is connected to the same access point. It's IP address is http://192.168.8.141/ and when I put in 
http://192.168.8.141/index.html in my browser window on the computer, I see the Electrodacus html file.

Have a mosquitto.conf file set up with a password file and 2 users.

Have used this tutorial to confirm that my broker is running and I can subscribe and publish something from both users.

(basically get 3 cmd windows running, one is the broker, one is the subs, and one is the pub)

Broker startup: 
c:\Program Files\mosquitto>mosquitto -c mosquitto.conf -v

Subscribe:
c:\Program Files\mosquitto>mosquitto_sub -h localhost -p 1883 -u XXXXX -P XXXXXXX -t temperature

Publish:
c:\Program Files\mosquitto>mosquitto_pub -h localhost -p 1883 -u XXXXX -P XXXXXXX -t temperature -m 45

I see the right things happening on the broker console when I start up, and when I subscribe.  When I publish, I see a "45" come up on the subscribe screen.  I have verified the electrodacus username and password is working/configured properly in the password file.

Here is my Electrodacus configuration screen.
Wifi Settings Screen with MQTT.jpg
Based on what I understand, I should be able to subcribe to "sbms" and see *something* coming from the sbms?  But I don't get anything.

When the broker starts up, it says this:
c:\Program Files\mosquitto>mosquitto -c mosquitto.conf -v
1614753834: mosquitto version 2.0.8 starting
1614753834: Config loaded from mosquitto.conf.
1614753834: Opening ipv6 listen socket on port 1883.
1614753834: Opening ipv4 listen socket on port 1883.
1614753834: mosquitto version 2.0.8 running
1614753884: New connection from ::1:62269 on port 1883.
1614753884: New client connected from ::1:62269 as auto-2017FC54-7D68-5B0B-E026-
E3FFF1B7DC43 (p2, c1, k60, u'sherry').
1614753884: No will message specified.
1614753884: Sending CONNACK to auto-2017FC54-7D68-5B0B-E026-E3FFF1B7DC43 (0, 0)
1614753884: Received SUBSCRIBE from auto-2017FC54-7D68-5B0B-E026-E3FFF1B7DC43
1614753884:     sbms (QoS 0)
1614753884: auto-2017FC54-7D68-5B0B-E026-E3FFF1B7DC43 0 sbms
1614753884: Sending SUBACK to auto-2017FC54-7D68-5B0B-E026-E3FFF1B7DC43
1614753944: Received PINGREQ from auto-2017FC54-7D68-5B0B-E026-E3FFF1B7DC43
1614753944: Sending PINGRESP to auto-2017FC54-7D68-5B0B-E026-E3FFF1B7DC43

When I finally got a listener set up in the configuration file
listener 1883
and restarted the broker, I got a query from Windows about letting it through the firewall.  I selected "on my local network only".

Still not receiving anything from the Electrodacus.
Do I need to update the firmware in the ESP32??  (OMG, please don't say yes.)

Thanks
Sherry

Robert Tagscherer

unread,
Mar 3, 2021, 2:36:28 AMMar 3
to electrodacus
Hi Sherry,

I'm not sure about the windows firewall, can you try connecting from another machine? It is strange that no connection attempt is logged.

I think the topic will be /sbms as the prefix is set to /

Kohala Jim

unread,
Mar 3, 2021, 12:37:05 PMMar 3
to electrodacus
you could also try wildcarding the broker output by using "#" and see if there's any traffic

Soggy Paws

unread,
Mar 3, 2021, 8:44:11 PMMar 3
to electrodacus
Robert, so it looks like my setup is correct?  Do I need to power cycle the wifi after saving the settings?  I will try from another computer, but I guess that means I need to install mosquitto on another computer.  Is there an Android app that would send MQTT stuff to test this?
Sherry

Kohala Jim,
Please explain your suggestion in a little more detail.  Do I put a # in the wifi setup?
Or some setting in the conf file?
Sorry I'm really a noob just wandering around in the dark at this point.  I'm amazed I've gotten this far.
Thanks for any suggestions!

Sherry

Soggy Paws

unread,
Mar 3, 2021, 9:53:58 PMMar 3
to electrodacus
OK, I installed MQTT Tester on my Android phone and connected to the boat network, and then the MQTT broker using the electrodacus credentials and I can see the connection on the broker screen, and publish something and see it reflected on the broker screen.  So it's not the firewall.
I finally figured out how to reset the Wifi (disable, then re-enable on the wifi screen on the Electrodacus) (my husband has been doing the hands on with the 'dacus, so not familiar with the menus there), that seemed to do the trick.  I now see something coming in to my broker from the electrodacus!  On to step 2 (hooking up Node Red to decode and display what's coming in).
Sherry

Kohala Jim

unread,
Mar 3, 2021, 10:56:41 PMMar 3
to electrodacus
You're halfway home now that your getting posts to your broker...

My "sandbox" Node-RED UI for the SBMS0 is posted below.
The 1 Hz MQTT update payload seemed to bog down my Pi 3B+ and dashboard, and I've added smoothing at Robert's suggestion. It's been running smooth and responsively ever since.
I also included the resulting "sandbox" dashboard view as well (in the green highlight)

My SBMS0 is powered up only with a simulated battery via a resistive voltage divider just for piloting and sandbox purposes.
There's no substitute for repeated build and deploy testing with lots of "debugging"
Enjoy the journey and the rich data visualizations that Node-RED can bring.
My next challenge is to begin abstracting data objects in Node- RED and setting up more customized automation.
Also having a blast with Tasmota Rules and other hacks I'm piecing together.




Soggy Paws

unread,
Mar 4, 2021, 12:23:38 AMMar 4
to electrodacus
That's really cool.  I've done one other node-red implementation, but still really a novice.  Would you mind sharing your node-red flows file with me? It would save me a lot of time figuring out how to parse things and do the smoothing.  I know I can't just plop your flows file and have it work, but I can fix what won't work.
Thanks!

Kohala Jim

unread,
Mar 4, 2021, 8:59:31 PMMar 4
to electrodacus
Tried attaching my SBMS Flow export as a text file and I'm foiled by the forum manager:



Here's the export content in the post body:

[{"id":"cac8f16b.f8fae","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"ebfd0e5c.ab454","type":"ui_chart","z":"cac8f16b.f8fae","name":"Voltage Trend","group":"5a69374f.fc8a28","order":6,"width":"6","height":"3","label":"Cells (mV)","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"12","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"x":1120,"y":240,"wires":[[]]},{"id":"c847da07.08ab38","type":"change","z":"cac8f16b.f8fae","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.soc","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":280,"wires":[["23683a26.487e26"]]},{"id":"aabe2316.7ac82","type":"json","z":"cac8f16b.f8fae","name":"","property":"payload","action":"","pretty":false,"x":210,"y":60,"wires":[["5efe273a.c1bc38","c847da07.08ab38","88687900.0bce38","ef7a3d8c.2538f","e620b550.9f2e98","208cadb3.a5c752","8fbbb982.c021b8","f033dffa.c133","dcf7fc37.dc78b","b4c18d92.d7a09","99929596.d07f08","ca526e00.989ff"]]},{"id":"9f8453ef.4d00b","type":"ui_level","z":"cac8f16b.f8fae","group":"5a69374f.fc8a28","order":7,"width":"6","height":"1","name":"SOC","label":"Battery SOC%","colorHi":"#49e600","colorWarn":"#ffee00","colorNormal":"#b3002d","colorOff":"#595959","min":0,"max":100,"segWarn":"","segHigh":"","unit":"","layout":"sh","channelA":"","channelB":"","decimals":0,"animations":"soft","shape":"2","colorschema":"rainbow","textoptions":"default","colorText":"#eeeeee","fontLabel":"","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":true,"hideValue":false,"tickmode":"auto","peakmode":false,"property":"payload","peaktime":3000,"x":829,"y":282,"wires":[]},{"id":"5efe273a.c1bc38","type":"change","z":"cac8f16b.f8fae","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.cellsMV[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":120,"wires":[["954401e0.dd22a"]]},{"id":"88687900.0bce38","type":"change","z":"cac8f16b.f8fae","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.cellsMV[1]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":160,"wires":[["71ccdb8e.2e7ee4"]]},{"id":"ef7a3d8c.2538f","type":"change","z":"cac8f16b.f8fae","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.cellsMV[6]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":200,"wires":[["ac9f08c6.1ba7e8"]]},{"id":"e620b550.9f2e98","type":"change","z":"cac8f16b.f8fae","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.cellsMV[7]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":240,"wires":[["9d42d91d.375ba8"]]},{"id":"8fbbb982.c021b8","type":"change","z":"cac8f16b.f8fae","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.flags.CFET","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":360,"wires":[["ec20a8fd.e10a68"]]},{"id":"f033dffa.c133","type":"change","z":"cac8f16b.f8fae","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.flags.DFET","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":400,"wires":[["d1ef7d18.f17a8"]]},{"id":"dcf7fc37.dc78b","type":"change","z":"cac8f16b.f8fae","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.flags.EOC","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":440,"wires":[["ec17bbbf.6a9638"]]},{"id":"b4c18d92.d7a09","type":"change","z":"cac8f16b.f8fae","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.flags.LVC","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":480,"wires":[["2cd35046.01f76"]]},{"id":"208cadb3.a5c752","type":"change","z":"cac8f16b.f8fae","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.tempInt","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":320,"wires":[["b1ae4e1f.58362"]]},{"id":"a9729d7f.1e425","type":"debug","z":"cac8f16b.f8fae","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1110,"y":320,"wires":[]},{"id":"99929596.d07f08","type":"change","z":"cac8f16b.f8fae","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.currentMA.battery","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":520,"wires":[["bd35f6fc.25c4d8"]]},{"id":"ca526e00.989ff","type":"change","z":"cac8f16b.f8fae","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.currentMA.extLoad","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":560,"wires":[["8bb65035.15c65"]]},{"id":"2b5f5c77.ae69b4","type":"mqtt in","z":"cac8f16b.f8fae","name":"SBMS0","topic":"solar/sbms","qos":"2","datatype":"auto","broker":"c9a5885a.133998","x":70,"y":60,"wires":[["aabe2316.7ac82"]]},{"id":"df40b7c5.682dc8","type":"change","z":"cac8f16b.f8fae","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"mV1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":849,"y":122,"wires":[["5272826e.98d5fc","ebfd0e5c.ab454"]]},{"id":"5ee48cf7.242444","type":"ui_text","z":"cac8f16b.f8fae","group":"5a69374f.fc8a28","order":1,"width":"3","height":"1","name":"Cell 1","label":"Cell 1","format":"{{msg.payload}} mV","layout":"col-center","x":809,"y":62,"wires":[]},{"id":"c88385f4.933e38","type":"change","z":"cac8f16b.f8fae","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"mV2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":849,"y":162,"wires":[["5272826e.98d5fc","ebfd0e5c.ab454"]]},{"id":"2c632546.bb73ca","type":"ui_text","z":"cac8f16b.f8fae","group":"5a69374f.fc8a28","order":2,"width":"3","height":"1","name":"Cell 2","label":"Cell 2","format":"{{msg.payload}} mV","layout":"col-center","x":929,"y":62,"wires":[]},{"id":"3e02d5a2.44397a","type":"change","z":"cac8f16b.f8fae","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"mV7","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":849,"y":202,"wires":[["5272826e.98d5fc","ebfd0e5c.ab454"]]},{"id":"a69f4c7f.6d5f5","type":"ui_text","z":"cac8f16b.f8fae","group":"5a69374f.fc8a28","order":3,"width":"3","height":"1","name":"Cell 7","label":"Cell 7","format":"{{msg.payload}} mV","layout":"col-center","x":1049,"y":62,"wires":[]},{"id":"cb6b9b39.270018","type":"change","z":"cac8f16b.f8fae","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"mV8","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":849,"y":242,"wires":[["5272826e.98d5fc","ebfd0e5c.ab454"]]},{"id":"c65fca99.816e18","type":"ui_text","z":"cac8f16b.f8fae","group":"5a69374f.fc8a28","order":4,"width":"3","height":"1","name":"Cell 8","label":"Cell 8","format":"{{msg.payload}} mV","layout":"col-center","x":1169,"y":62,"wires":[]},{"id":"bd08fa5c.4ab4c8","type":"ui_led","z":"cac8f16b.f8fae","order":9,"group":"5a69374f.fc8a28","width":"3","height":"1","label":"CFET","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#8d8b8b","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"CFET","x":829,"y":362,"wires":[]},{"id":"1fd2a182.fbc8ae","type":"ui_led","z":"cac8f16b.f8fae","order":10,"group":"5a69374f.fc8a28","width":"3","height":"1","label":"DFET","labelPlacement":"right","labelAlignment":"right","colorForValue":[{"color":"#888686","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"DFET","x":829,"y":402,"wires":[]},{"id":"c287ef6.bab7a1","type":"ui_led","z":"cac8f16b.f8fae","order":11,"group":"5a69374f.fc8a28","width":"3","height":"1","label":"EOC","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#8d8b8b","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"EOC","x":829,"y":442,"wires":[]},{"id":"f6e72a87.04ed88","type":"ui_led","z":"cac8f16b.f8fae","order":12,"group":"5a69374f.fc8a28","width":"3","height":"1","label":"LVC","labelPlacement":"right","labelAlignment":"right","colorForValue":[{"color":"#888686","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"LVC","x":829,"y":482,"wires":[]},{"id":"1c55ea12.059636","type":"ui_level","z":"cac8f16b.f8fae","group":"5a69374f.fc8a28","order":8,"width":"6","height":"1","name":"Int Temp","label":"SBMS Temp°C","colorHi":"#e60000","colorWarn":"#ffee00","colorNormal":"#27b300","colorOff":"#595959","min":"0","max":"50","segWarn":"","segHigh":"","unit":"","layout":"sh","channelA":"","channelB":"","decimals":0,"animations":"soft","shape":"2","colorschema":"rainbow","textoptions":"default","colorText":"#eeeeee","fontLabel":"","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":true,"hideValue":false,"tickmode":"auto","peakmode":false,"property":"payload","peaktime":3000,"x":839,"y":322,"wires":[]},{"id":"610398a5.840968","type":"ui_gauge","z":"cac8f16b.f8fae","name":"Battery","group":"5a69374f.fc8a28","order":13,"width":"3","height":"3","gtype":"donut","title":"Battery","label":"mA","format":"{{value}}","min":"-100","max":"100","colors":["#d21919","#e6e600","#06cb1d"],"seg1":"","seg2":"","x":839,"y":522,"wires":[]},{"id":"910cd66f.4b1628","type":"ui_gauge","z":"cac8f16b.f8fae","name":"Ext Load","group":"5a69374f.fc8a28","order":14,"width":"3","height":"3","gtype":"donut","title":"Ext Load","label":"mA","format":"{{value}}","min":"-100","max":"100","colors":["#d21919","#e6e600","#06cb1d"],"seg1":"","seg2":"","x":839,"y":562,"wires":[]},{"id":"5272826e.98d5fc","type":"ui_chart","z":"cac8f16b.f8fae","name":"Voltage Bars","group":"5a69374f.fc8a28","order":5,"width":"6","height":"3","label":"Cells (mV)","chartType":"horizontalBar","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"x":1109,"y":162,"wires":[[]]},{"id":"954401e0.dd22a","type":"smooth","z":"cac8f16b.f8fae","name":"","property":"payload","action":"mean","count":"60","round":"0","mult":"multi","reduce":true,"x":580,"y":120,"wires":[["5ee48cf7.242444","df40b7c5.682dc8"]]},{"id":"71ccdb8e.2e7ee4","type":"smooth","z":"cac8f16b.f8fae","name":"","property":"payload","action":"mean","count":"60","round":"0","mult":"multi","reduce":true,"x":580,"y":160,"wires":[["2c632546.bb73ca","c88385f4.933e38"]]},{"id":"ac9f08c6.1ba7e8","type":"smooth","z":"cac8f16b.f8fae","name":"","property":"payload","action":"mean","count":"60","round":"0","mult":"multi","reduce":true,"x":580,"y":200,"wires":[["a69f4c7f.6d5f5","3e02d5a2.44397a"]]},{"id":"9d42d91d.375ba8","type":"smooth","z":"cac8f16b.f8fae","name":"","property":"payload","action":"mean","count":"60","round":"0","mult":"multi","reduce":true,"x":580,"y":240,"wires":[["c65fca99.816e18","cb6b9b39.270018"]]},{"id":"23683a26.487e26","type":"smooth","z":"cac8f16b.f8fae","name":"","property":"payload","action":"mean","count":"60","round":"0","mult":"multi","reduce":true,"x":580,"y":280,"wires":[["9f8453ef.4d00b"]]},{"id":"b1ae4e1f.58362","type":"smooth","z":"cac8f16b.f8fae","name":"","property":"payload","action":"mean","count":"60","round":"0","mult":"multi","reduce":true,"x":580,"y":320,"wires":[["1c55ea12.059636"]]},{"id":"ec20a8fd.e10a68","type":"smooth","z":"cac8f16b.f8fae","name":"","property":"payload","action":"max","count":"60","round":"0","mult":"multi","reduce":true,"x":580,"y":360,"wires":[["bd08fa5c.4ab4c8"]]},{"id":"d1ef7d18.f17a8","type":"smooth","z":"cac8f16b.f8fae","name":"","property":"payload","action":"max","count":"60","round":"0","mult":"multi","reduce":true,"x":580,"y":400,"wires":[["1fd2a182.fbc8ae"]]},{"id":"ec17bbbf.6a9638","type":"smooth","z":"cac8f16b.f8fae","name":"","property":"payload","action":"max","count":"60","round":"0","mult":"multi","reduce":true,"x":580,"y":440,"wires":[["c287ef6.bab7a1"]]},{"id":"2cd35046.01f76","type":"smooth","z":"cac8f16b.f8fae","name":"","property":"payload","action":"max","count":"60","round":"0","mult":"multi","reduce":true,"x":580,"y":480,"wires":[["f6e72a87.04ed88"]]},{"id":"bd35f6fc.25c4d8","type":"smooth","z":"cac8f16b.f8fae","name":"","property":"payload","action":"mean","count":"60","round":"0","mult":"multi","reduce":true,"x":580,"y":520,"wires":[["610398a5.840968"]]},{"id":"8bb65035.15c65","type":"smooth","z":"cac8f16b.f8fae","name":"","property":"payload","action":"mean","count":"60","round":"0","mult":"multi","reduce":true,"x":580,"y":560,"wires":[["910cd66f.4b1628"]]},{"id":"5a69374f.fc8a28","type":"ui_group","name":"Off-Grid Power Monitor","tab":"342ae5e1.a2feca","order":1,"disp":true,"width":"6","collapse":false},{"id":"c9a5885a.133998","type":"mqtt-broker","name":"MQTT Broker","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"342ae5e1.a2feca","type":"ui_tab","name":"Node-RED Dashboard","icon":"tv","order":1,"disabled":false,"hidden":false}]


Soggy Paws

unread,
Mar 5, 2021, 7:39:35 PMMar 5
to electrodacus
Great, that should be very helpful!  I did make a little progress yesterday--I got the SOC displayed!  But this should speed things up a bit.  Thanks a lot!
Sherry

Kohala Jim

unread,
Mar 5, 2021, 9:02:20 PMMar 5
to electrodacus
Single message dashboard widgets are easy once you parse the underlying payloads with JSON
The multi-input dashboard widgets had me stumped until I finally saw the "topic:payload" dependency, then everything clicked using the change node topic injection.
Would love to see where you land and if you're considering data storage into Influx where you can extract history via Grafana.

Soggy Paws

unread,
Mar 7, 2021, 9:48:03 PMMar 7
to electrodacus
Just so everyone can see what's possible with MQTT (output from the latest Wifi module code), and node-red (a non-programming visual "language" and real data... I'm still massaging this display, and trying to figure out how to save the data in a database (maybe Influxdb) on Windows.  But it is very revealing to see the individual cells in a graphical format just after the end of charge.  In the graph, you can see the blue line being depressed (the Electrodacus is balancing cell #2, which is our perpetually high cell).  With changing one setting on a configuration for the graphing "node", you can set the timeline for the graph to 12 hrs, 6 hrs, or X hrs, and it auto-ranges the data.  Right now it's set for 3 hrs so we could blow up the end of charge curves.  Tomorrow we'll do one with balancing turned off, just to get an accurate picture of the true cell curve for each cell.
node-red early shot.jpg

A few things that aren't on the dashboard yet
- Battery temp sensor (we just got ours hooked up last night, and I haven't had a chance to add it in)
- Battery total voltage
- More of the Flags showing
- Some kind of historical data (either a CSV type log that can be pulled into Excel, or searched, or something fancier like a database)

I am working on a "how-to" document for getting this set up on Windows, which I'll make available soon.  I'll also likely have some info on setting up on Raspberry Pi, as I've done this for my RPi also on a different project. But there are tons of how-to's for RPi, not so much for Windows.  If anyone is interested in a not-quite-finished version of how to set this up now, let me know.

Kohala Jim

unread,
Mar 7, 2021, 11:07:40 PMMar 7
to electrodacus
Looking good!
Where did you land with your smoothing interval?

T McNamara

unread,
Mar 8, 2021, 7:32:47 AMMar 8
to electrodacus
Great Work
I would be interested -what do you need to send me the doc as I am new to google-groups
Terry

Soggy Paws

unread,
Mar 8, 2021, 7:38:54 AMMar 8
to electrodacus
I have different intervals... the cells and battery and amps are at 10.  The SOC and temps are at 30.  The LED's don't work right if you have any interval, because they come in at true/false and end up at 1/0 in the smoothing algorithm, but the LED wants them at true/false.
I added some functions instead of change nodes to do some math... including summing the cells to get a battery voltage, and turning the mV and mA into V and A, etc.  I'll send you my flows file when I get a little more done, so you can see what I've done.  My layout is different because I'm not trying to push all my electrical stuff onto one page.  I've got a tab for Port Alternator, one for Stbd Alternator, and one for the Battery.

Matt Baker Design

unread,
Mar 10, 2021, 8:51:48 AMMar 10
to electrodacus
All of this How-To Mqtt is much appreciated! Thanks for detailed setup instructions. I have the wifi working, but just getting a broker setup for mqtt is someone mystifying.  

John Gibson

unread,
Jun 7, 2021, 9:20:52 AM (5 days ago) Jun 7
to electrodacus
Soggy,

Spent some time on your website, exceptionally great information and I learned a lot.  I just received my SBMS0 and am building a system for a home made overland rig with node red at the core of controls.  I was wondering if you would be willing to share your NR flow with me as a jump start to my development.  Thank you in advance.

Jhon

unread,
Jun 10, 2021, 9:39:27 AM (2 days ago) Jun 10
to electrodacus
I want to try and do something similar this coming fall, looking forward to the howto's especially for the Pi.  Project plans have changed, wife wants a (summer) "garden office" (Glorified garden shed with solar and insulation) Will be building over this summer.

Soggy Paws

unread,
Jun 10, 2021, 9:00:23 PM (2 days ago) Jun 10
to electrodacus
John, I did email you a zipped copy of my latest Flows file.  Happy to share with anyone else.
Sherry

Reply all
Reply to author
Forward
0 new messages