Comments (4)
This does appear to be an issue. It appears that the changes in the initialization and dynamic update of the device blew away the static UUID replacement. I have added a test and will fix the issue.
from cppagent.
Can you upload your device.xml and agent.xml so I can check. The only thing I can think of is the Adapter
should be the device name or specify the Device
in the adapter block. That way the agent knows which device to modify.
If there is only one device, the UUID may apply to the default device. I'll check if it is more explicit in the initialization phase.
Adapters {
DeviceName {
UUID = NEW-UUID
Host = ....
Port = 7878
}
}
from cppagent.
In case still required and helpful.
Here the content of device.xml
:
<MTConnectDevices>
<Devices>
<Device uuid="DHT-GEN" id="dht" name="ESP8266-DHT">
<!-- General information -->
<Description>
Humidity and Temperature Sensor (DHT)
</Description>
<DataItems>
<DataItem category="EVENT" id="avail" type="AVAILABILITY"/>
</DataItems>
<!-- Components -->
<Components>
<!-- Sensor -->
<Sensor id="sensor">
<!-- Configuration -->
<Configuration>
<SensorConfiguration>
<FirmwareVersion>0.1</FirmwareVersion>
<Channels>
<Channel number="1" name="Temperature">
<Description>Temperature in celcius</Description>
</Channel>
<Channel number="2" name="Humidity">
<Description>Relative humidity</Description>
</Channel>
</Channels>
</SensorConfiguration>
</Configuration>
<!-- DataItems -->
<DataItems>
<DataItem category="SAMPLE" id="Temp" type="TEMPERATURE" units="CELCIUS"/>
<DataItem category="SAMPLE" id="Humi" type="HUMIDITY_RELATIVE" units="PERCENT"/>
</DataItems>
</Sensor>
</Components>
</Device>
</Devices>
</MTConnectDevices>
and the agent config file:
AgentDeviceUUID = $MTC_AGENT_UUID
Devices = device.xml
Port = 5000
SchemaVersion = 2.0
Adapters {
Adapter {
UUID = DHT-001
Host = $ADAPTER_IP
Port = $ADAPTER_PORT
}
}
Files {
schemas {
Path = /mtconnect/data/schemas
Location = /schemas/
}
styles {
Path = /mtconnect/data/styles
Location = /styles/
}
Favicon {
Path = /mtconnect/data/styles/favicon.ico
Location = /favicon.ico
}
}
DevicesStyle {
Location = /styles/styles.xsl
}
StreamsStyle {
Location = /styles/styles.xsl
}
logger_config
{
logging_level = info
output = file /home/agent/log/mtc_agent.log
}
The agent keeps reporting DHT-GEN
instead of the expected DHT-001
.
Our use case is that the device information model device.xml
is a generic one (in a device model repository) for a DHT type sensor, and as the actual devices are deployed, the agents are configured with their unique UUIDs.
from cppagent.
Thanks, I'll fix the issue and verify with the files.
from cppagent.
Related Issues (20)
- Blank observation for open text events like program have spaces in output
- PERIODS in tag names (MQTT Egress) HOT 7
- Change the schema version for the stylesheets to match the version of the schema being used for the agent.
- Make 'sender' configurable to support docker HOT 2
- Add * uuid: to the README and make sure all the other adapter commands are documented HOT 5
- `device` REST param does not work HOT 9
- Unclear logging at startup when using Docker HOT 1
- Ubuntu 20.04: Error building test package HOT 25
- * uuid command handling in agent not as expected HOT 19
- AgentConfiguration::monitorThread message reports wrong number of seconds
- Crash when editing device dataitem in DeviceModel HOT 4
- XML Schema validation with lxml HOT 1
- Simple WebSockets for subscriptions HOT 3
- Add validation transform to support 2.5 quality attribute for observations.
- MQTT INGRESS connection not working on V2.3.0.4 HOT 5
- How to set initial dataitem value in the stream HOT 2
- Agent Reconnecting to Broker repeatedly HOT 20
- Condition ID format and example not matching on Agent version 2.3? HOT 25
- DELETEing an already deleted asset responds with old asset value; expected MTConnectError HOT 10
- Check why asset counts are not being reported in agent HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppagent.