-
Notifications
You must be signed in to change notification settings - Fork 66
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
New Power meter support: HTTP(S) + JSON (Shelly 3EM, Tasmota, Volkszähler etc.) #153
Conversation
cf40e78
to
0f88cce
Compare
Hello @berni2288 I am suprised and impressed.... this is exactly what I missed some minutes ago when I started playing with this OpenDTU-branch.... I will test. |
0f88cce
to
852ae06
Compare
I've just rebased the branch on the latest changes of development branch to fix a crash :) You also have to run |
I got that, no problem. Here are my testing results: First: while playing around with the JSON path examples, I figured out that one of the json examples is not properly formatted:
I have a tasmota-driven SML power meter adapter.
The actual power consumption is the "L1" value, so the
gives the correct result. Translated to the new power meter input dialog I get this result: The whole http get response data is 124 bytes - is that really too much? |
Thanks, I'll change the examples. The response buffer is 2000 bytes I think, are you sure that your URL does not require authentication? |
Yes, the tasmota device does not need authentication. The
where you can see the response is 126 byte. |
I have saved your json to my webserver and hit the Test button and I get "Success! Power: 145.94W". So it works for me. Can you maybe try the following CURL command?
Thanks! |
Exactly the same:
the same with
|
I looked at commit dfeafb2 - looks good! I think I need some debug output on the console to see more. I have to fetch the DTU from above and connect USB... |
You can also find a Web Console in the menu "Info". You can replace this code in src/HttpPowerMeter.cpp:
with:
Then you get the beginning of the response body in the UI directly. |
Hmm.... tried with the last commit and I receive
WTF could be wrong here? |
The Content-Length header is not always returned by a web server
Thanks @madmartin . That helped me to identify the problem and I've fixed it now. Can you test again now? thanks! |
@berni2288 Success, it works! Good job! One small fix to make the console output more readable: add CR+LF
|
Thanks for testing! |
I can´t find the power meter settings page as posted above.. what am I doing wrong? Or where can i find these settings? Do I have to activate Dynamics Power Limit first? I checked everything, nowhere to find the menu |
@STE2k You have to reload the WebUI in the browser! Otherwise the browser continues to use the cached WebUI and code. Internet says:
To hard refresh on Firefox, there are also two easy hotkey commands you can use:
|
Working, OMG.. I´m the noob. Thx |
No problem. |
That just reminded me to delete old branches. Please use the |
I have the same problem, and can not find the new menu items |
Please refer to the |
It's finally implemented :)