Closed jhartlep closed 1 year ago
Hey there @fabaff, mind taking a look at this issue as it has been labeled with an integration (mystrom
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
mystrom documentation mystrom source (message by IssueLinks)
Can you do a request to both http://{host}/api/v1/info
and http://{host}/info.json
?
Sure:
http://{host}/api/v1/info
{
"version": "4.0.4",
"mac": "[MAC_ADDRESS]",
"ssid": "[SSID]",
"ip": "[IP_ADDRESS]",
"mask": "255.255.240.0",
"gw": "192.168.1.1",
"dns": "192.168.1.252",
"static": false,
"connected": true,
"type": 105,
"connectionStatus": {
"ntp": true,
"dns": true,
"connection": true,
"handshake": true,
"login": true
}
}
http://{host}/info.json
{
"version": "4.0.4",
"mac": "[MAC_ADDRESS]",
"ssid": "[SSID]",
"ip": "[IP_ADDRESS]",
"mask": "255.255.240.0",
"gw": "192.168.1.1",
"dns": "192.168.1.252",
"static": false,
"connected": true,
"type": "WRS",
"name": "WiFi RGB Strip",
"connectionStatus": {
"ntp": true,
"dns": true,
"connection": true,
"handshake": true,
"login": true
}
}
~And http://{host}/api/v1/device/{mac}
?~
nvm, you already sent that
Right, I made this PR with a change I think should work but I need you to verify it (since I don't have MyStrom devices).
Are you able to pull the core project from github and then copy homeassistant/components/mystrom
to your HA instance at /config/custom_components/mystrom
. Then go into /config/custom_components/mystrom/manifest.json
and add
{
...
"version": "0.0.0"
}
Then apply the code change I did in this PR. And restart HA.
HA will then run the modified component over the core one, enabling you to verify the fix.
First,
Ok, I did clone the homeassistant core into the /tmp folder (branch dev), copied the homeassistant/component/mystrom
folder from this checkout into /config/custom_components/mystrom
.
And I changed the manifest.json from the copied folder and applied your PR.
But after a restart of HA, i still get Unsupported myStrom device type: 105 From the log I see, that HA does not use the modified version of this integration: Source: components/mystrom/init.py:51
Why does HA not use the modified version?
Ooh, you forgot the comma after "requirements": [...],
Facepalm...
Ok, now I get this error: "Device [IP_ADDRESS] ([MAC_ADDRESS]) is not a myStrom bulb nor myStrom LED Strip" (Source: custom_components/mystrom/init.py:44)
Right, then we end up with the same problem as in https://github.com/home-assistant/core/issues/95995. I am currently working on a fix for that aswell. It looks like it's checking support but before it actually requested the variables to check support with.
I think I have a fix. Made some unit tests for it and I am confident that this will at least solve these 2 issues. (And hopefully doesn't bring us to another). The fix is now in branch #96004 (wanted to have a separate PR for each bug, but now both are having the same bug). The fix is now a bit bigger, maybe doing a wget on https://raw.githubusercontent.com/home-assistant/core/ef8494b4a9a1d10272c1e5903822ad716835d797/homeassistant/components/mystrom/__init__.py
to replace the __init__.py
in the component would be easier
Great, it works! No errors in the protocol and I can switch the light on and of:
Many thanks!
The PR for this fix is now merged. I am putting it on the 7.2 milestone, so then the fix will be in the official release. After updating to 7.2 (whenever that's released), don't forget to remove the custom component :).
Fixed by #96004.
Device Type 103 is also not jet supported
myStrom WiFi Button Plus, supports: "single": "", "double": "", "long": "", "touch": "", "generic"
Home Assistant 2023.7.3 Logs: Unsupported myStrom device type: 103
curl http://{host}/api/v1/device/[MAC] { "[MAC]": { "type": "wheel", "battery": true, "reachable": true, "meshroot": false, "charge": false, "voltage": 4.71, "fw_version": "2.74.38", "single": "[ID of the button]", "double": "[ID of the button]", "long": "[ID of the button]", "touch": "[ID of the button]", "generic": "[ID of the button]", "connectionStatus": { "ntp": true, "dns": false, "connection": false, "handshake": false, "login": false}, "name": ""} }
curl http://{host}/api/v1/info
{
"version": "2.74.38",
"mac": "[MAC]",
"type": 103,
"ssid": "[SSID]",
"ip": "[IP]",
"mask": "[MASK]",
"gw": "[GW]",
"dns": "[DNS]",
"static": false,
"connected": true,
"signal": 66
}
Please create a new issue
The problem
The new myStrom integration is great! But unfortunally, the myStrom strip is not supported. In the log I get "Unsupported myStrom device type: 105".
When I call
curl http://[IP_ADDRESS]/api/v1/device/[MAC_ADDRESS]
, I get this answer:It would be great, if this integration would support this too.
What version of Home Assistant Core has the issue?
core-2023.7.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
myStrom
Link to integration documentation on our website
https://www.home-assistant.io/integrations/mystrom
Diagnostics information
Logger: homeassistant.components.mystrom Source: components/mystrom/init.py:51 Integration: myStrom (documentation, issues) First occurred: 07:28:39 (1 occurrences) Last logged: 07:28:39
Unsupported myStrom device type: 105
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response