This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Problem getting <network> to save and get send messages to my web server
#1
I am trying to setup the GPS app to send info to my local python flask web service / sensor-data endpoint.

I've editted the .phyphox file to include this entry, then loaded into a new experiment and used QR to create my new experiment. However I do not see the network block in the generated XML nor do I see any updates to <>/config output. Can you see anything wrong?
...
<network>
<connection id="gps_stream" service="http/post" address="http:---.---.---.---/sensor-data" interval="1">
<send id="gps_latitude" type="buffer" datatype="number" keep="false">lat</send>
<send id="gps_longitude" type="buffer" datatype="number" keep="false">lon</send>
<send id="gps_longitude" type="buffer" datatype="number" keep="false">z</send>
</connection>
</network>
...


Attached Files
.phyphox   Kens 250207 GPS.phyphox (Size: 10.97 KB / Downloads: 36)
Reply
#2
So, you manually set up the XML and then uploaded it to the new editor to generate a QR code? In principle, that should work, but there might be easier ways to do it if you are editing the XML directly anyway. There is nothing special about the QR code - it just contains a URL to the phyphox file with "https" replaced by "phyphox" (and phyphox also accepts https, but the starting with phyphox:// means that many external QR code scanners also know to launch phyphox). So, one thing I like to do is keeping the XML file I am working on in a folder that is synchronized to a cloud storage (in my case owncloud or nextcloud, but Dropbox, iCloud, etc should work as well) and either create a public link for sharing that I put in a QR code or, while still developing, directly open the phyphox file on a phone from the app for the cloud storage. For testing this is much faster and in terms of sharing it allows you to update the phyphox file without changing QR codes (even better of course if you can put it on some webspace).

That being said, you are of course right that it should work and this is indeed a bug. And an embarrassing one at that: We have simply overlooked the network interface in the new editor because it was not in the old one and it does not fit into the existing tabs "main", "input", "output" etc.

I will put it on our todo list, but it may take a while as we are currently refactoring some parts of the new editor that were not as maintainable as we would like it to be - and this should definitely go into the new structure.
Reply


Forum Jump: