autodesk-platform-services / aps-iot-extensions-demo

APS DataViz Extensions Demo:Visualizing IoT sensor data.
https://aps-iot-extensions-demo.autodesk.io
MIT License
11 stars 6 forks source link

can't find a function that changes the color of the entire room. #9

Closed hoso3392 closed 1 year ago

hoso3392 commented 1 year ago

I would like to change the color according to the temperature in each room unit, as presented in the following URL. https://aps.autodesk.com/en/docs/dataviz/v1/developers_guide/examples/heatmap/create_heatmap_for_rooms/

However, the code provided does not reflect the color change.(As of February 26, 2023) Please let me know how I can make it reflect.

petrbroz commented 1 year ago

Can you please explain what you mean by the code provided does not reflect the color change? Is the heatmap not displaying varying colors depending on your sensor data? If not, can you please provide more details about your specific setup?

hoso3392 commented 1 year ago

I'd like to create a visualization screen that reflects the heatmap in the room like the Live demo.

However, when I set up the prepared code with reference to the README and executed it locally, I was able to display the 3d model and sensor time-series data, but was unable to implement the function of changing the color of the room according to the sensor values. (See image below)

I'd like to know if modifying the aps-iot-extensions-demo code will reflect this or if I need to implement additional functions.

I'm sorry if I am not understanding and asking strange questions. I'd like to know your solution. Screenshot

hoso3392 commented 1 year ago

Supplemental aps-iot-extensions-demo/public/extensions/SensorHeatmapsExtension.js Comment out line 161 of // this._dataVizExt.registerSurfaceShadingColors('temp', [0x00ff00, 0xffff00, 0xff0000]); reflected no change in the view.

yiskang commented 1 year ago

Since I cannot see heat map visible in your snapshot, did you change the objectId of the sensors in services/iot.mocked.js?

It represents the room dbids. Revit rooms are not visible in Revit 3D views, Model Derivative generates it by user-specified generated Master view option, so rooms’ dbids would be inconsistent in each SVF/SVF2 translation.

In addition, the view you load must be the master view. Revit rooms exist in the master view only.

hoso3392 commented 1 year ago

Thank you very much, I have not changed the value of the objectId in services/iot.mocked.js.

One thing I am wondering is what method can I use to get the value of APS_MODEL_VIEW that I need to specify in aps-iot-extensions-demo/public/config.js? Maybe I am not specifying the value correctly.

yiskang commented 1 year ago

Thank you very much, I have not changed the value of the objectId in services/iot.mocked.js.

One thing I am wondering is what method can I use to get the value of APS_MODEL_VIEW that I need to specify in aps-iot-extensions-demo/public/config.js? Maybe I am not specifying the value correctly.

It's the Revit master view's viewableID. You can find it in the manifest response.

Or you can follow my suggestion at the https://github.com/autodesk-platform-services/aps-iot-extensions-demo/issues/6 and https://gist.github.com/salahelfarissi/784796c339ea39ec917f919db6f203fc.

hoso3392 commented 1 year ago

Execute the following source code to convert to SVF, and then run I changed the value of APS_MODEL_URN in public/config.js "autodesk-platform-services/aps-tutorial-postman/ModelDerivative_07/" https://github.com/autodesk-platform-services/aps-tutorial-postman/tree/master/ModelDerivative_07

and I took your advice and made some modifications to the code.

Or you can follow my suggestion at the https://github.com/autodesk-platform-services/aps-iot-extensions-demo/issues/6 and https://gist.github.com/salahelfarissi/784796c339ea39ec917f919db6f203fc.

Finally, the heatmap was reflected successfully. Thank you very much!

Screenshot from 2023-03-17 17-12-30