-
Notifications
You must be signed in to change notification settings - Fork 103
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
Create EnOceanStorage for storing learned devices #26
Comments
|
Actually, it's better to change |
Basic implementation started at storage. |
The current implementation doesn't actually implement the storage anywhere. @romor comments? |
I agree to your proposal. Since we probably will not require to have all devices learnt before their usage there is the need to also add devices with their EEP information externally. So there needs to be something like |
Hi, and i would proposed for structure
|
@Ethal Manufacturer ID is already defined in my current version, defaulting to None. @romor There will be those functions, as So in essence, I've now implemented |
Hmm, I'm struggling a bit with this. Therefore I'd like to restructure this to use devices = {
"01:64:18:39": {
"eep_rorg": 213,
"eep_func": 0,
"eep_type": 0,
"manufacturer_id": 124,
"transmitter_offset": 4
}
} This makes the implementation a bit simpler, while making it less human-readable (as the documentation is in hex). In my own opinion, there shouldn't be much reason to handle the file directly, and therefore I'd go with this solution. What do you think? |
I also would prefer the integer storage against the string version. I guess everyone going into such detail is also able to convert hex values. |
I would also like to store it as an integer, but unfortunately integer keys aren't allowed in JSON ;) |
Hi, |
Sorry for the late reply, been extremely busy. I might however remove the |
My current storage with the latest commits in storage-branch looks like this: {
"used_transmitter_offsets": [],
"storage_version": 1,
"devices": {
"01:81:B7:44": {
"eep_type": 5,
"eep_rorg": 165,
"eep_func": 2,
"manufacturer_id": null,
"id": [1, 129, 183, 68],
"transmitter_offset": null
},
"00:29:4A:50": {
"eep_type": 2,
"eep_rorg": 246,
"eep_func": 2,
"manufacturer_id": null,
"id": [0, 41, 74, 80],
"transmitter_offset": null
},
"01:94:B9:46": {
"eep_type": 1,
"eep_rorg": 212,
"eep_func": 1,
"manufacturer_id": 62,
"id": [1, 148, 185, 70],
"transmitter_offset": null
},
"01:80:A1:A0": {
"eep_type": 1,
"eep_rorg": 213,
"eep_func": 0,
"manufacturer_id": null,
"id": [1, 128, 161, 160],
"transmitter_offset": null
},
"01:94:E3:B9": {
"eep_type": 1,
"eep_rorg": 212,
"eep_func": 1,
"manufacturer_id": 62,
"id": [1, 148, 227, 185],
"transmitter_offset": null
},
"01:82:5D:AB": {
"eep_type": 1,
"eep_rorg": 213,
"eep_func": 0,
"manufacturer_id": null,
"id": [1, 130, 93, 171],
"transmitter_offset": null
}
}
} So in essence, EEP-information is saved once they're found (typically in teach-in messages). If they're not found, the |
More specific issue, derived from #15.
@romor wrote:
I'll start working on a storage, which would take care of this. According to some tests, JSON seems to be fastest way of storing the data, so I propose we use it to implement the storage.
My proposed structure is something similar to this:
Is there anything that should be altered or added in the first implementation phase? This structure should be created in a way that future needs can be quite easily added. Also, I included a
storage_version
, which can be used to create any required conversions.The text was updated successfully, but these errors were encountered: