Here is the json.
"name":"Delta Upstairs Attic",
"script":"var tempvar1 = p59.value;\nvar tempvar2 = p58.value;\nreturn tempvar1 - tempvar2;",
I will start with a simple explanation and add any further detail if needed. I have a Meta Data Source with a point that calculates a very simple difference between two context data points. The script validates during the set up, but the point does not calculate when saved. It works fine if I only use one data point context and a hard number but not two context data points. It does not matter from what other data sources I use, it always fails with two context points. I can have both checked for context, or just one, but still no go. The naming is fine or it wouldn't validate. So I am at a loss with this very simple point.
Any further info needed?
Thanks in advance.
PS - I also searched this forum for anything, and did not find much.
Version is 3.7.x with all updates completed a few days ago.
@terrypacker ok, let me see if I have resolved this correctly or if you have a better method. In meta points, I can create binary points to be set upon Event Detectors. I can then create more meta points to combine those binary meta points into logical statements that can then be assigned Event Detectors. This would effectively be the same as a Compound Event Detector. This will work, albeit kind of an ugly solution.
Is this the best way to handle it or is there a better way?
At first I was hoping there was a way to add Event Detectors as context to a meta point, but not that I could see.
Thanks as always for your help.
Yes it is a broad question about a useful capability, so I figured it was something you had already answered, but did not see anything in the documentation or the forum. Specifically, what I am trying to do is create logic statements on triggered event detectors to create multiple event detection actions. I will check out the meta data point scripts. Thanks for the direction.
In the Original Mango Automation, there was a concept of compound events. In this concept you could create logic statements with multiple events which result in a separate event that could be handled. I do not see this idea discussed in the documentation unless I missed something. Is there any recommendations with Mango M2M to solve this issue?
You have run into a common problem that I see all the time. The swapped word issue is defaulted differently by different Modbus master clients. So modpoll can look correct because it assumed (defaulted) the order correctly. As a general rule, if the numbers are not coming out correct swap the words to see if that helps. Other troubleshooting techniques would be to retrieve each individual word and assemble them manually and see if that helps resolve the issue. Furthering the issue, I have found that device documentation can greatly lack in describing the order of their numbers. Of course all of this depends on getting the correct register number resolved first.
I'm glad you got it resolved.
I have a saying that applies, " It's difficult until you know how"
I understand there is alot to learn. I promise you it is worth it to put the effort. Mainly because the power of Linux far exceeds the power of Windows, but it does come at a cost. That cost is time digging, trying, and eventually succeeding.
The alternative if you just want to get up and running is to get a regular Windows computer. Windows IoT is a special beast. You may run into big troubles there. Of course you may not, so feel free to try, but just know Windows IoT could be a challenge as great as learning Linux. Of course I always recommend just trying to see if it works. I think you will find much more support for Linux than you will for Windows IoT and I mean that in a general sense, not just Mango.
Good Luck in your endeavours!
There are multiple embedded computers to choose other than Rpi. Nothing against Rpi, I use them quite a bit, but for Mango I would use a minimum of 2GB memory and then run the board headless with no Xorg GUI. I have chosen a board with 4GB of memory and it was a little over $50 US. However it did take 3-4 weeks to ship. It's the Pine Rock64 with 4GB. I am not using emmc yet, but that would be the next step for me. I only have about 10 points right now, but the custom displays are performing well.
I also tested on a Solid Run embedded computer with 2GB and headless with no Xorg GUI and it worked well also. In all cases, including Rpi, you will need to restrict the memory for the JVM. Check the forum here at Mango, you will find the way to do it.
I would add that Java performance on Linux is better than Windows. Oracle generally recommends Linux on most of their products. Specifically they recommend Oracle Linux, which 95% the same to Red Hat. All that to say that I would probably take the time to learn Linux if you want to use Mango. It's actually not that hard.
Good Luck in your endeavours.