Skip to content

Upstream merge#19

Closed
litinoveweedle wants to merge 27 commits intowillglynn:devfrom
litinoveweedle:upstream_merge
Closed

Upstream merge#19
litinoveweedle wants to merge 27 commits intowillglynn:devfrom
litinoveweedle:upstream_merge

Conversation

@litinoveweedle
Copy link

  • added build chain
  • fixed cli args dependencies (port + tcp bug etc.)
  • fixed Node table Response bug
  • added reconnect function to serial/tcp source
  • added TCP keepalive support
  • added persistence JSON data store (for gateways and nodes info)
  • added new event to report detected gateways and nodes (persistence event)
  • changed existing power report event format - BREAKING change, both reports needs to be correlated in the higher layer)
  • added full fledged CHANGELOG.md (instead of Changes.md)
  • updated/modified cargo

added arm7
changed arm target to armhf
add GNU build targets
* implemented TCP keep alives

* reconnect logic implementation

* updated README for new  features

* read code de-duplication into function
* implemented TCP keep alives

* refactored TCP keepalive patch

* updated Cargo.lock

* fix keepalive retries compilation

* compilation fixes

* fix unused code

* fix arguments comments

* updated Help and README

* initial reconnect logic implementation

* compilation fixes, reformated

* updated README for new reconnect feature
unified buffer read
added reconnect logging

* reconnect logic de-duplication into function

* implement retry mechanism on connection open fail

* README typo fix

* improved cli arguments dependencies

* arg dependencies
updated Cargo.toml
set reconnect default timeout to 60
* fix invalid NodeTableResponse struct

* added infrastructure event in observe mode - to output in JSON gateway and node details (addresses, barcodes, versions etc.)

* added persistent storage

* Updated README to reflect implementation
* fix invalid NodeTableResponse struct

* added infrastructure even in observe mode - to output in JSON gateway and node details (addresses, barcodes, versions etc.)

* added persistent storage

* Updated README to reflect implementation

* Minor logging changes

* Release 0.2.0
@litinoveweedle
Copy link
Author

As discussed in #18 I did implemented agreed changes, there are still probably some things missing

@litinoveweedle
Copy link
Author

Please check that this is to your standards:

persistent_state.rs:

#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
pub struct PersistentStateEvent {
    pub event_type: String,
    pub gateways: BTreeMap<GatewayID, PersistentStateEventGateway>,
    pub nodes: BTreeMap<GatewayID, BTreeMap<NodeID, PersistentStateEventNode>>,
}

impl From<&PersistentState> for PersistentStateEvent {
    fn from(item: &PersistentState) -> Self {
        let event_type = "infrastructure_report".to_string();

@litinoveweedle
Copy link
Author

I can confirm, that it compiles and run in the observe raising 'infrastructure_report' events, I will need to test it also during day for 'power_report', but before discussed changes it was tested on two installations for several days without problems.

@willglynn
Copy link
Owner

Thanks! Closing in favor of #21.

@willglynn willglynn closed this Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants