添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

I finally managed to get the logs of my devices going into a nice data table on the asset dashboard. Can I somehow get this same overview on an insights dashboard?
image 1736×1252 154 KB

Unfortunately not yet. It is not on the short term planning, but it is on the list.
Depending on your skillset you could add the widget yourself and open a pull request :slight_smile:

Hi @cheezymcsquibble , I love the way you configured your columns. Can you please share the headerConfig or what was needed to display the attribute so nicely in the history?

Thanks a lot!

Thanks for your reply. Still, for some reason, on my side it doesn’t want to display data and I also get an error: invalidAttribute
image 792×189 4.01 KB These are my attribute settings:
image 1193×457 6.98 KB

Any ideea @Don @Rich ?

Thanks a lot everyone!

had the exact same issue on another attribute with ValueDescriptor as ENUM
public enum ModeValueType {
AUTO,

public static final ValueDescriptor<ModeValueType> MODE_VALUE_TYPE_VALUE_DESCRIPTOR =
        new ValueDescriptor<>("modeValueType", ModeValueType.class);
public static final AttributeDescriptor<ModeValueType> MODE_VALUE_TYPE_ATTRIBUTE_DESCRIPTOR =
        new AttributeDescriptor<>("mode",
                MODE_VALUE_TYPE_VALUE_DESCRIPTOR,
                new MetaItem<>(MetaItemType.LABEL, "Controller Mode"));

// new MetaItem<>(MetaItemType.STORE_DATA_POINTS, true)

Same error, same 500

I see now the manager logs:
Error for mode (enum type):
ERROR [WebService task-2 ] rnate.engine.jdbc.spi.SqlExceptionHelper : ERROR: invalid input syntax for type boolean: ““AUTO””

Error for JSON:
ERROR [WebService task-4 ] rnate.engine.jdbc.spi.SqlExceptionHelper : ERROR: invalid input syntax for type boolean: “{“reason”: “sunrise”, “status”: false}”

Still…no ideea where does this come from, yet

Still no idea what’s going on…

I keep getting this error when I select the history for the below Attribute:

public static final AttributeDescriptor<BaseJsonNode> STATUS =
        new AttributeDescriptor<>("status",
                ValueType.JSON,
                new MetaItem<>(MetaItemType.READ_ONLY),
                new MetaItem<>(MetaItemType.LABEL, "Status"),
                new MetaItem<>(MetaItemType.STORE_DATA_POINTS, true));

2023-03-31 10:45:04.974 FINE [WebService task-2 ] remote.manager.asset.AssetStorageService : Asset query took 4ms: return count=1
2023-03-31 10:45:04.989 WARN [WebService task-2 ] rnate.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 22P02
2023-03-31 10:45:04.989 ERROR [WebService task-2 ] rnate.engine.jdbc.spi.SqlExceptionHelper : ERROR: invalid input syntax for type boolean: “{“reason”: “sunrise”}”
2023-03-31 10:45:04.989 FINE [WebService task-2 ] container.persistence.PersistenceService : Rolling back failed transaction, cause follows
org.hibernate.exception.DataException: error executing work

same thing happens also if I try JSON_Object.

Any clue @Don @Rich ?

Thanks a lot!

@cheezymcsquibble would you be so kind to please share with me your JSON attribute declaration in JAVA and the JSON format example?

Thank you!

Now I see it’s coming from @martin.peeters work:

public String getSQLQuery(String tableName, Class<?> attributeType) {
    boolean isNumber = Number.class.isAssignableFrom(attributeType);
    if (isNumber) {
        return "select timestamp, value::text::numeric from " + tableName + " where ENTITY_ID = ? and ATTRIBUTE_NAME = ? and TIMESTAMP >= ? and TIMESTAMP <= ? order by timestamp desc";
    } else {
        **return "select timestamp, (case when VALUE::text::boolean is true then 1 else 0 end) from " + tableName + " where ENTITY_ID = ? and ATTRIBUTE_NAME = ? and TIMESTAMP >= ? and TIMESTAMP <= ? order by timestamp desc";**

From what I see here, it only supports boolean and integers. How did @cheezymcsquibble do it then?

Hi guys!

I indeed see this issue occuring as well.
As @accabog mentioned, only boolean and number values are supported in the type: all query.
With the introduction of the new downsample algorithms, some of the queries require number values to work. Apparently when requesting all datapoints, I forgot to remove type check.

I’ll directly work on it as it’s quite a breaking bug.
I will add more tests for it as well, to prevent issues in the future with the datapoints.
It will take a few days, but I will let you know when it’s fixed @cheezymcsquibble @accabog :wink:

Thanks for reporting it in a detailed thread, helps a lot! :grin:

Hi @martin.peeters, thanks for the fix. At a first glance it appears to be fixed, but there are some issues unfortunately.
I have these 3 attributes with saved data points:
image784×339 6.89 KB When I select “Controller Mode”, nothing appears:
image772×346 3.98 KB Controller Mode is an Enum.

When I select “Status”, “Controller Mode” info appears:
image781×356 6.55 KB And when I select again “Controller Mode”, “Status” values appear (JSON)
image764×361 7.23 KB

So I think you’re almost there but either some index or some caching make it misbehave.

Thanks again for looking into this and fixing it. Hopefully it’ll be just an easy fix.

Best regards!

No problem! I indeed did an update last friday and forgot to send a message here :wink:

When testing we indeed saw some rendering issues with the attribute history.
As you mentioned, it is broken the first time you load it, and after some interaction it is fixed again.
(or at least, most of the times :sweat_smile:)

It is a frontend UI bug only, and shouldn’t be hard to fix.
Have been busy with a lot of different bugs recently, and will add this one to the list haha
Will let you know when I got a fix ready.

Has this bug been resolved? My Weather Sensor attribute is also experiencing the same thing