Enabled In the settings, send information to the emoncms system. But on my system 20s (0 bank 0-15 + 1 bank 0-3) got values only 0-13. Where are the others?
What version of DIYBMS controller code are you running ?
I mean the controller code from github - is it the dark themed one?
Ok, looking at the DIYBMS code it should be working!
I’m not completely sure on how the MQTT stuff works inside emoncms - can somebody suggest ways to trace MQTT traffic into emoncms ?
Perhaps this is done like this:
$ mosquitto_sub -v -u ‘emonpi’ -P ‘emonpimqtt2016’ -t ‘emon/#’
I’ll try to see
I don’t have mosquitto_sub on my emonpi install
I assume the web page shows all 20 modules without a problem?
We’ve had some issues with this in the past, often where people have lots of modules running and the ESP controller doesn’t seem to be able to keep up with the amount of data I’m trying to send over the network.
Yes, there are no problems with the web page.
I saw a miracle. It looks like one data packet managed to get through to the server once.
Perhaps it is worth sending data in parts so as not to load the processor?
p.s. I write from different computers, so different accounts
Yes, quite probably. What time frequency have you set up on the feeds/inputs on emoncms?
I’ve captured this issue on GITHUB, [Controller fails to send all module details over MQTT · Issue #37 · stuartpittaway/diyBMSv4Code · GitHub]
I’ve also just made the code changes in the branch [https://github.com/stuartpittaway/diyBMSv4Code/tree/HysteresisRules]
If you can try compiling that and putting it on the controller and see how you get on. This release also includes all the new relay rule changes.
Thanks in the coming days I will try and write the result
You can also change the default values of the topic in the code to emon/diybms. Without the obligatory “emon/” key, the values will not get into the input.
Link to documentation https://guide.openenergymonitor.org/technical/mqtt/
sudo apt install mosquito-clients
I’d suggest it might be the time taken to process the MQTT publish commands. What QOS do you use?
I cannot remember when I did the JSON decoding for emoncms, if I included the means of using multiple depths of JSON.
You could do it as a single publish. Note the Inputs are
topic_subtopic_sensor. If you built that as a single JSON payload, it would speed things up.
Just watch for the payload character limit!!!
This reduces the load on emoncms and the MQTT Broker as well.
You could just reduce the name to V, Ti, Te, B to save characters.
I confirm, everything worked as it should. All 20 values now come in chunks and it works. The cut-off and turn-on voltage of the relay was also set to 82000. Thank you!
Is it possible to add a setting to the MQTT choice of what to send (voltage, inttemp, exttemp,bypass)
I’m sure I can get that working, would you mind raising an issue on GitHub requesting it?