Giter VIP home page Giter VIP logo

Comments (25)

wsobel avatar wsobel commented on August 18, 2024

from cppagent.

neildes2 avatar neildes2 commented on August 18, 2024

Devices = Devices.xml
AllowPut = true
AllowPutFrom = localhost
Port = 5000
ReconnectInterval = 1000
BufferSize = 17
MaxAssets = 1024
SchemaVersion = 2.3
ShdrVersion = 1
SuppressIPAddress = false
MonitorConfigFiles = false
WorkerThreads = 2
JsonVersion = 1
DisableAgentDevice = false
ConversionRequired = true
IgnoreTimestamps = true
Pretty = true
PreserveUUID=true
FilterDuplicates=yes

Adapters {

machine1 {
Url = mqtt://127.0.0.1/
MqttPort = 1883
MqttUserName = user1
MqttPassword = "p1"
Topics = "machine1/ingress/#"
MqttClientId = client-1

}
}

Logger Configuration

logger_config
{
logging_level = trace
}

from cppagent.

neildes2 avatar neildes2 commented on August 18, 2024

shdr adapter disconnect sets all tags to UNAVAILABLE.

2024-06-13T14:50:00.973341Z (0x000057d4) [debug] Connector::reader->Connector::reconnect->Connector::close: Disconnected from adapter, setting all values to UNAVAILABLE

But mqtt adapter (Broker) disconnect does not.

from cppagent.

neildes2 avatar neildes2 commented on August 18, 2024

Should this be a param? ON/OFF Use case...broker is 2nd adapter for sensors? USe case...Broker is primary adapter and should set all tags to UNAVAILABLE.

Maybe an adapter level parameter 'Primary=true'
Which ever adapter is the primary, if it gets disconnected, it sets all tags to UNAVAILABLE

from cppagent.

wsobel avatar wsobel commented on August 18, 2024

This sounds reasonable behavior. I will take a look and see what it is doing now. May be a couple of days.

from cppagent.

wsobel avatar wsobel commented on August 18, 2024

The disconnect behavior is built into the agent. Must not be forwarding disconnect from broker signal.

Is this when the broker disconnects or when the source disconnects from the broker?

from cppagent.

neildes2 avatar neildes2 commented on August 18, 2024

In this test case, I pulled the network cable causing the disconnect from the broker. For the shdr test, I just turned off my local adapter.

from cppagent.

wsobel avatar wsobel commented on August 18, 2024

Thanks. I'll disconnect my broker and test the behavior.

from cppagent.

wsobel avatar wsobel commented on August 18, 2024

@neildes2 Please test

from cppagent.

neildes2 avatar neildes2 commented on August 18, 2024

Downloading and testing now....

from cppagent.

neildes2 avatar neildes2 commented on August 18, 2024

This issue is NOT resolved.

tested on Agent v2.3.0.11

All tags do NOT reset to UNAVAILABLE upon mqtt broker ingest disconnect.

from cppagent.

wsobel avatar wsobel commented on August 18, 2024

from cppagent.

neildes2 avatar neildes2 commented on August 18, 2024

when I tested the shdr adapter, the device AVAILABILITY tag went UNAVAILABLE. When I tested with broker adapter, it did not.

from cppagent.

wsobel avatar wsobel commented on August 18, 2024

from cppagent.

neildes2 avatar neildes2 commented on August 18, 2024

The shdr adapter, when disconnected, set AVAILABILITY to UNAVAILABLE

from cppagent.

wsobel avatar wsobel commented on August 18, 2024

from cppagent.

neildes2 avatar neildes2 commented on August 18, 2024

Just tested v2.3.0.13. When I disable my wireless connection, the broker adapter disconnects and the agent states...."] MqttClientImpl::disconnected: Disconnected from adapter, setting all values to UNAVAILABLE". But the device Tags all remain stale at AVAILABILITY=AVAILABLE and EXECUTION = ACTIVE. Even the AGENT device AVAILABILITY remains AVAILABLE

from cppagent.

neildes2 avatar neildes2 commented on August 18, 2024

Devices = Devices.xml
AgentDeviceUUID = "3519a48b-814b-3425-a12d-ef250947ab3d"
PreserveUUID = true
Port = 5000
BufferSize = 17
MaxAssets = 1024
SchemaVersion = 2.2
ShdrVersion = 1
SuppressIPAddress = false
DisableAgentDevice = false
MonitorConfigFiles = false
WorkerThreads = 2
JsonVersion = 1
ConversionRequired = true
IgnoreTimestamps = true
Pretty = true
HeartBeat = 60000

from cppagent.

wsobel avatar wsobel commented on August 18, 2024

Are you using the docker hub image?

from cppagent.

neildes2 avatar neildes2 commented on August 18, 2024

No. Downloading the WINDOWS compiled agent from this repo

from cppagent.

wsobel avatar wsobel commented on August 18, 2024

Agent device should be available. If the agent is running.

from cppagent.

neildes2 avatar neildes2 commented on August 18, 2024

If I have TWO adapters defined that feed to one device, and only ONE of them gets disconnected, what happens?
If I have TWO adapters defined that feed to SEPARATE devices, and only ONE of them gets disconnected, what happens?

from cppagent.

wsobel avatar wsobel commented on August 18, 2024

If two adapters are associated with the device, the data items set by each adapter will become unavailable if it disconnects. The others will not. Availability is controlled by the first adapter using AutoAvailable=true (default). This will allow the adapter to control the Availability data item.

I think any adapter with AutoAvailable true will try to set Availability when it disconnects. If availability is directly set by an adapter, then it will be associated with only that adapter.

The source of the data and the disconnect only effect the data items associated with the adapter. The code marks all data items and the last adapter they received data from.

from cppagent.

wsobel avatar wsobel commented on August 18, 2024

Use AutoAvailable = true in the adapter config to make the Availability change to UNAVAILABLE when disconnected.

I found some issues with the adapter data item connection. Just created a new PR.

from cppagent.

neildes2 avatar neildes2 commented on August 18, 2024

works as expected now! Great work.

from cppagent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.