-
Notifications
You must be signed in to change notification settings - Fork 1
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
Revogi Strip provides Milliwatts #4
Comments
Great tx. I've been advised by another user of the same issue :) I'll fix it in 2023.8.0-beta2. |
Can you share the result of command GET 511 ? https://github.com/Superkikim/mh-maxsmart-powerstation/blob/master/cmd-511.md |
Thanks for your engagement in this improvement... here is an examplary output auf the 511 cmd {"response":511,"code":200,"data":{"watt":[106258,2927,0,0,0,6186],"amp":[475,0,0,140,0,58],"switch":[1,1,0,1,0,1]}} |
Damn these guys are stupid. They are providing milliwatts but they kept the label watt ! Seriously. I was thinking on how I can differentiate except on firmware version. Because I don't know the fw version that exists for the different OEM providers of this product. Maxsmart has ver 1.30 (local metadata) and 2.11 (cloud metadata). I see yours is Revogi with 3.x (cloud). Right now, the only check I make is on version 1.30. If not version 1.30, then I set watt from milliwatt and I set generic port names. Publishing right now on dev. Will be done in a minute. |
yes, the code quality is as bad as the security of this devices... amp = Ampere? This is also nonsense with these numbers... |
Please try the 2023.8.0-beta2 version published on dev branch. |
Ports are identified and translation works as well, but the POWER entities are gone now... |
File "/config/custom_components/maxsmart/sensor.py", line 87 I think this is the root cause |
yes it is... typo in the not equals... with "!=" all works fine... |
Stupid mistake 😆 Fixed with latest commit, retagged with same version |
By the way @lmaertin, looking at this, I wondered:
looking at this, is this right ? you have a device on slot 1 consuming at over 1000W ? |
it's 106 Watts... I found another bug in the division by 1000 in the dev branch. Please adapt the code as follows:
|
Thank you for your support Lukas. I did it the wrong way. trying to make calculation on a string. Anyway, it should be fixed. I have updated tag and release to the same version for now. Please redownload from HACS. Please enable "Show beta versions". I have published it as pre-release this time to be consistent. |
Works! Thank you so much |
Hey Lukas. Still have the REVOGI strips ? Could you share the raw answer from the udp call ? I'm currently refactoring the module (https://github.com/Superkikim/maxsmart) and trying to find a way to decide automatically if it should calculate the watts from milliwatts in that module rather than in the integration. I see two leads:
Second, I'm not a fan, because I wonder if an outlet could potentially provide 0.5W for example in some occasions. |
Would it be possible to distinguish based on the JSON string whether it looks like float or int (whether it has decimal dot like Btw I have Revogi SOW323, FW 3.49 and Cocoso SOW323 with FW 1.06 and both use ints (miliwatts/miliamps) like: The Cocoso seems to be just rebranded Revogi where for some reason they use different FW numbering (it is this one https://gzhls.at/blob/ldb/6/4/4/f/cd460345576de703ee13e6b0cd983f17beea.pdf) I did not get what do you need to get tested but if you explain I can try. |
The Revogi Strip provides the consumption in Milliwatts. Here /config/custom_components/maxsmart/sensor.py has to be adapted. My quickfix:
self._power_data = float(power_data['watt']/1000.0)
It seems sensor.py needs a switch case for the product variant.
The text was updated successfully, but these errors were encountered: