Enable detached mode and add ability to skip exposing individual channels on Shelly 2 and 2.5#307
Enable detached mode and add ability to skip exposing individual channels on Shelly 2 and 2.5#307BMDan wants to merge 3 commits intoalexryd:masterfrom
Conversation
|
Does this "skipping" maybe conflict with #306 ? |
Yup. We're going a similar direction, though. If either of these get merged, the other of us should just rebase. Alternatively, IMHO, yours is a clearly better implementation, but I prefer my own data structure (maps where the keyspace is dense, small and numeric give me fits 🤣 ). If you switch to arrays to describe the channels, I'd rebase atop yours immediately. |
|
I actually considered using an array, but the problem is that you can't configure channel 3 without configuring channel 0, 1, 2 then. What's your opinion on that? |
My approach is to allow |
|
Thats a clever idea! I can see to adopt that asap 😊 |
|
I just checked my code. Appart from the JSON schema and README, I think array syntax and |
|
@BMDan Great addition. I would love to see the same for Shelly UNI |
|
I ended up abandoning this project in favor of https://github.com/mongoose-os-apps/shelly-homekit, which seems to be far more stable, if a bit more of a bear to set up initially. @alexryd is still welcome to merge the code, of course, but I won't be updating it further. |
This PR enables device configurations like this (for two 2.5s):
[ { "id": "0123456789ABCD", "channels": [ {}, { "type": "detachedContactSensor" } ] }, { "id": "FEDCBA986754", "type": "detachedContactSensor", "channels": [ { "type": "skip" } ] } ]It also enhances logging in a few useful spots, and adds a hint for how to get
describeto work for those who have enabled HTTP auth.Tested only insofar as my little setup enables me to test. I apologize in advance for the crimes I have doubtless committed against idiomatic Node; I plead ignorance and a genuine belief that working, ugly code is better than no code at all.
Closes #87
Relevant to (but doesn't yet close) #219