Closed genestealer closed 1 year ago
This is very stange, When I tried REQUEST_DIAGNOTICS {"command":166}
Responses:
1
2
3
4
5
Summary
D: DIAGNOTICS
V: VOLTAGE
Setting: SET_VALVE_STATE Auto (default) {"command":165,"data":2}
1
2
3
4
5
Set Temp {"command":244,"data":25} works just fine.
1
2
3
4
5
There does appear to be some strange behaviour going on there. I think some DEBUG log information may help to diagnose the issue. Can you take a look at node-red-log and let me know the level of information you are seeing?
Note, I left it overnight and they did all report their battery voltages at some point! Note the voltage timestamps.
Note, I have had no interaction with them today, no new commands or anything.
I also updated and pushed a new version of my code with the Battery level correct : // (($volt - $low) / ($high - $low)) 100; value_template: "{{ (((value_json.VOLTAGE - 2.2) / (3.2 - 2.2)) 100) | round(0) }}"
I'm trying to understand what is going on. I know the eTRVs are an absolute pig to send a message to. I explain that here; it seems such a bad design by energenie, especially when the devices never send acknowledgements for certain commands.
The other thing that I do is I store any details sent back from the devices in memory and then re-output them back to node-red, hence the reason for me including timestamps against some of the data values. For my MQTT edition I'm thinking of not doing this, utilising the retained feature in MQTT to achieve the same effect.
The level of debug information output in the log file can be increased; but this requires an edit, I've added instruction on how to do that in the wiki here: https://github.com/Achronite/node-red-contrib-energenie-ener314rt/wiki/FAQ
I suggest that you increase the debug log, and then repeat your test and paste the log-file back here.
Output log: with TRACE_POSIX enabled.
Log output with request voltage sent to all TRV's Updated to add more log
The debug log stops before a successful DIAGNOSTICS is returned, can you find the bit where a TRV sends back a response with the DIAGNOSTICS included?
At this point the command and retries should be removed from the message for that particular TRV and it will stop retrying. Also can you please paste the log in a code block next time, that should stop it expanding the JSON.
By the way I'm currently working on a hardware SPI driver version - early tests show that it is much more reliable.
My apologies, I didn't realise you wanted a debug response. I will do that now.
On Mon, 9 Jan 2023, 4:10 pm Achronite, @.***> wrote:
The debug log stops before a successful DIAGNOSTICS is returned, can you find the bit where a TRV sends back a response with the DIAGNOSTICS included.
— Reply to this email directly, view it on GitHub https://github.com/Achronite/energenie-ener314rt/issues/24, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHXLQUKZUEXXK7FHR32A2LWRQZ53ANCNFSM6AAAAAATUDKA2Q . You are receiving this because you authored the thread.Message ID: <Achronite/node-red-contrib-energenie-ener314rt/issues/66/1375876928@ github.com>
Not all of them returned a debug response.
I've spotted a bug, It looks like sometimes a TRV can respond multiple times to a DIAGNOSTICS request. Each time a DIAGNOSTICS is returned it decrements the number of overall CachedCmds by 1. When the CachedCmds reaches 0 it drops out of the dynamic polling mode, meaning that is less likely for the other devices that have not responded by that point to receive a DIAGNOSTICS message during it's very small receive window.
I believe it is a relatively simple fix, are you OK me uploading to my development branch for you to test it?
OK fix has been upload to the development branch of the energenie-ener314rt repo, along with an improvement on radio FIFO clearing I spotted whilst building the mqtt application. Let me know if you need instructions on how to test it.
NOTE: you will need to edit trace.h
again if you want debug back.
Thank you so much! Yes please if you're able to tell me what is the best route to swap over to the development branch.
Try commands like this (I'm not 100% on these but you get the idea, you could use a different dir and then copy over the C source dir, etc...
sudo apt-get install git
cd ~/.node-red/node_modules/node-red-contrib-energenie-ener314rt/node_modules
git clone -b develop https://github.com/Achronite/energenie-ener314rt.git
cd energenie-ener314rt
node-gyp configure build
restart node-red
@genestealer Have you had time to test this yet?
Hi, Yes I am running the new version, which seems to be working, although I need to delve into it a little bit more detail to see if the commands are working as expected. I hope you'll have chance to look at this in the next few days.
On Fri, 13 Jan 2023, 10:30 pm Achronite, @.***> wrote:
@genestealer https://github.com/genestealer Have you had time to test this yet?
— Reply to this email directly, view it on GitHub https://github.com/Achronite/energenie-ener314rt/issues/24#issuecomment-1382469621, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHXLQQ5Z3ZPWYBOUJTX2CDWSHJPLANCNFSM6AAAAAATVZHMAE . You are receiving this because you were mentioned.Message ID: @.***>
The only real help I can offer for eTRVs not receiving commands is for you to switch to using the hardware SPI driver code, which may help increase the Rx hit rate.
It is going to be published as v0.6.0, most likely this week; it is on the develop branch at the moment; but don't use this as I'm trying to debug a tricky issue with someone; and there are extra debugs in the code at the moment.
The hardware driver version is now safe to download and use from the develop branch. See README for how to enable it.
@genestealer Please let me know if it increases your hit rate for eTRVs.
The hardware driver version is now safe to download and use from the develop branch. See README for how to enable it.
@genestealer Please let me know if it increases your hit rate for eTRVs.
Brilliant, thank you, will download the develop branch and see how is behaves wit the hardware SPI driver code.
I've just released it into master branch now as v0.6.0
I've just released it into master branch now as v0.6.0
Fantastic! Sorry, it's been a busy week, still catching up on things.
I've just released it into master branch now as v0.6.0
Sorry for the silly question, but how would be best to install the new V0.6.0?
I see "~/.node-red $ sudo npm update" only shows V0.5.0 / 0.5.1
I took a guess, but would like to know if this is the best way, or if there is a better way?
Sorry, was out last night. The reason it did not update was it depends on v0.5.x, my new version is 0.6.0, so it wont upgrade automatically. If you want to force an upgrade the easiest way is to edit the package.json
for node-red-contrib.,. file and change the dependency line:
"name": "node-red-contrib-energenie-ener314rt",
"version": "0.5.1",
"description": "Node-red module for energenie ENER314-RT board for raspberry pi",
"dependencies": {
"energenie-ener314rt": "0.6.x"
},
npm install, would then download 0.6.0.
Ive been concentrating on mqtt-energenie-ener314rt this week (this already depends on 0.6), but I'm planning on going back and updating the node-red module sometime over the next couple of days. I've had 0.6.0 in test in my node-red installation, and everything seems to be OK. But I still need to update the readme; keep an eye on the development branch for the forthcoming changes...
Released new v0.6.0 node-red package just now. You should be able to update via palette soon
Thank you, the new SPI interface seems to be working great.
I seem to be seeing an issue with the MIHO013 eTRV, with the REQUEST_VOLTAGE {"command":226} command not working
No Voltage
![image](https://user-images.githubusercontent.com/5207490/211166088-4037ad96-2dd0-450d-b89f-f3168bf0e5e1.png)
Attempt 2: Ready for bulk commands:![image](https://user-images.githubusercontent.com/5207490/211166093-c6a77c3d-52d6-4256-9547-9961b1a5fcaf.png)
Requesting voltage:![image](https://user-images.githubusercontent.com/5207490/211166102-f7bf9021-8ec3-4cee-b59e-5db91e1efab0.png)
1st to respond, but with no voltage, note the REQUEST_VOLTAGE {"command":226}![image](https://user-images.githubusercontent.com/5207490/211166196-78db9bd5-dd97-46e0-92d7-69dbdd7a7a20.png)
2nd to respond, same issue. 3rd to respond did come back with three messages and two contain the voltage![image](https://user-images.githubusercontent.com/5207490/211166368-3f1c7c79-b63e-454c-8afe-82068e30e770.png)
4th returns a voltage 5th does not![image](https://user-images.githubusercontent.com/5207490/211166412-faaa4587-7a36-4181-9a50-d16eeeed943a.png)
Finally 6th, does not return voltage.![image](https://user-images.githubusercontent.com/5207490/211166448-50d54148-454d-489f-821c-30dd4b872d31.png)
In Summary:![image](https://user-images.githubusercontent.com/5207490/211166575-6ccd0bbe-87e6-458b-8ad0-003c8a97f5d5.png)