I have read the documentation and found that the ‘alarms tab’ does not allow one to set a alarm for a high/low temperature reading (to compare values).
Is it possible to write a python script that will check the temperature every few minutes and send an alarm (email) out? Or even to read a Analog sensors value and send an alarm out if the value is too high or too low?
Can this alarm setting then be interfaced on the standard web interface in the ‘alarms tab’? This would be to allow the user to change the high and low alarm values easily.
Furthermore the standard web interface does not allow for authentication for the email servers. Can this also be coded in python to bypass the standard web email settings?
Doe the connectportX4 support realport?
Can python program be used to send data to a web page? Or must the data be sent out (displayed) in the command shell?
1a. There are a number of ways to approach writing a script that will send an email. I believe, for instance, that one could use the iDigi Dia framework in conjunction with the “smtp” presentation to do just this.
1b. Similarly, if the sample can be read by a Python script, it can be done. iDigi Dia continues to be a way to do so.
1c. The existing Digi web pages can not be extended in this way. I believe the script would need to serve its own configuration page. The embedded “digiweb” module is one way to serve pages in conjunction with the existing Digi web server at (by default) port 80.
Given that the email would be generated by the Python code, I believe it would necessarily need to manage authentication. I don’t know, offhand, how this would be done, unfortunately.
A “RealPort” driver can be used to connect to the serial port on an X4. Under normal circumstances, the serial port must not otherwise be in use, however. For instance, a Python script should not have the port open, the “set terminal” functionality to interact with our internal CLI should be disabled, etc.
Hrrm… there are a number of ways to approach what I think you are asking. Are you asking whether you can redirect the output from, for instance, a “print” statement and do something with the data? As noted before, there are a variety of mechanisms to push data across a network that could be coded into a Python application.
In 4 I was suggesting recreating a piece of the DigiWeb as they are able to display (push the data) temperature and light values, but just add High and Low value boxes to be used to send alarms. It seems this is possible though with my own custom_digiWeb.
It’s a shame they did not have this alarm feature on their web page - as I thought that something like this was common practice.
On another note:
I am looking into the differences between the “X4 Starter Kit ZB” and the “Wi-9P Starter Kit ZB”.
The only differences I can find is that the Wi-9P Starter Kit ZB has Wi-Fi and the “X4 Starter Kit ZB” does not. The “X4 Starter Kit ZB”'s connectportX4 is enclosed in a casing.
They both run python and both have ethernet ports.
So what else can the one do that the other cannot? What am I missing?
I cannot see too clearly on the picture - but is there development space for additional hardware for the embedded module (“Wi-9P Starter Kit ZB”) ? Is there a circuit diagram or schematic for this board? It looks like it has a battery and a header for connecting something on to it.
Is the embedded module virtually the ConnectPortx4?
A lot of questions, and I will allow others, with more detail, to clarify my response, but I wanted to try to give you a first, quick response.
At their core, the two products are similar. They run similar operating systems, and have processors in a similar processor family. Beyond that, their intended use is fairly different. The X4 is a self-contained product, with a fixed set of interfaces. The Wi-9P design is primarily for prototyping out of the box, working towards another, integrated hardware design.
The carrier board for the module is a development board. There is some space for prototyping, as I recall, but I believe the intention is simply to demonstrate how the interfaces from the module might be wired and used. I believe a schematic is posted on the Digi support site… others may be able to provide the direct links.
The embedded module runs software that allows it to be comparable to the X4 in functionality. Consistent configuration model, consistent user interfaces, consistent Python experience, etc. The two devices, however, have different processors (in the same family), different memory configurations, different potential peripheral interfaces (X4 has one dedicated serial port, for instance, as opposed to the number supported by the Wi-9p), and different target environments (one is a self-contained, deployable product; the other is intended to be integrated into a larger hardware design).