emoncms / device

Emoncms device module
GNU Affero General Public License v3.0
2 stars 17 forks source link

Creation of device templates with virtual feeds does not work #51

Open TrystanLea opened 4 years ago

TrystanLea commented 4 years ago

See: https://community.openenergymonitor.org/t/what-is-the-feed-template-for-a-device-with-a-virtual-feed/13297

MyForest commented 4 years ago

Thanks @TrystanLea - you've done a great job at capturing the essence of the problem with that template.

For posterity I've captured the current behaviour in the device initialization wizard so you've got a tangible thing to show progress against :)

image

I used your device file. I'll copy it here just in case the forum link goes stale if the forum software changes.

{
    "name": "VirtualFeedTest",
    "category": "VirtualFeedTest",
    "group": "VirtualFeedTest",
    "description": "VirtualFeedTest",
    "inputs": [
        {
            "name": "raw_input_1",
            "description": "raw_input_1",
            "processList": [
                {
                    "process": "log_to_feed",
                    "arguments": { "type": "ProcessArg::FEEDID", "value": "raw_feed_1" }
                }
            ]
        }
    ],

    "feeds": [
        {
            "name": "raw_feed_1",
            "type": "DataType::REALTIME",
            "engine": "Engine::PHPFINA",
            "interval": "10",
            "unit": "W"
        },
        {
            "name": "virtual_feed_1",
            "type": "DataType::REALTIME",
            "engine": "Engine::VIRTUALFEED",
            "processList": [
                {
                    "process": "source_feed_data_time",
                    "arguments": {
                        "type": "ProcessArg::FEEDID",
                        "value": "raw_feed_1"
                    }
                }
            ],
            "unit": "W"
        }
    ]
}