your first link , it says clearly that the screen scaping:
This method may cause your ObserverIP to crash!
but its OK to instead set the hub to send the data to a web site php script (that creates the json file that WD can then read in)
I have already outlined that above
Well… I have a, maybe, very good idea, but I can’t try it until I receive the unit.
If scraping is not a good idea, so I will try to implement a very simple “web server” socket based, listening the packets that IP Observer will send, and I think that I could parse and save this data to allow WD process it. So anybody hasn’t to use a webserver to receive the data. When I can test this, I say you Brian, so you could, or implement it on WD or use as separate program to pass the data to WD as 1-wire reader do.
you dont need to do any work
its all available
the php script is available
to run on a server
which creates a json file that you set WD to get from the server
Yes, I understant you, but I don’t want to mount a server on the WD computer, I don’t want to run a remote server that doesn’t work when there are a storm and maybe ADSL line goes down. I want a local program that take the data of the weather station and pass it to WD. It is very easy to implement, and much better than depending of other services.
the console version of the station does send data via direct TCP/IP socket connection (via the local WIFI)
and WD works with that
but the hub version does not do that
Well, it is really very very easy to parse incoming HTTP requests sent by IP Observer using a socket, no need to scrap screen, no need to start any server.
The code will be like this one. I am doing in C# UWP application, but is easy to do it in any other language.
Well, first version of a “micro IP Observer listener”.
No scrapping, only waiting at programed port. Receive data sended by IP Observer, parse it and save to a file with the same “ws1001.json” file format. You can choose location.
In the IP Observer you have to select “custom” server, and program the IP of the computer when this program runs, and the port that you put on listening program. The listening port is also programable, defect is 85 to leave untouched HTTP port (80) if you have any web server or other program that uses that port (like Skype).
I also have added ability into WD to act as a web server, i.e to listen for http direct IP connection
that ability is there as well
i.e the WiFi IP server->client
settings
in any case, if you could email me the file you have your software creating and set in WD to use (raw script data file)
I am not sure that “WiFi IP server->client” are working… I have tried putting on IP the own IP or the client IP, but neither of both seem to work. I also don’t understant why specity a IP, as it will be a server, so the IP must be set on client… I have changed also Port to 85 that I am using currently.
I attach the files that I am currently generating, and also the “server program” source Project (Visual Studio 2017 C++ with MFC).
I see whats wrong
there must have been a slight change to the json format
an extra space
I have accounted for that now
use a new .zip update of WD, ready now
I am not sure I have to put the file location on “URL” TextBox, or on “Select raw script data file”, but in any case I have put the same on both and it works. I try to improve a little my program to allow change update time, because now I change program to receive each 15 seconds. The IP Observer sends me another packet when I close the socket, so it receive more than 1 message per second if I don’t limit it!. I will let user to choose this maximun receiving rate.
I also add some parameters that PHP program calculate (but I don’t know if WD needs it!).
If you add this direct receiving Support to the WD, let me and then this program won’t need anymore.
Thanks in advance.
Ruben
PD: I have realized that on “WD title” appear: “Stationless, VWS data.csv”… is this ok? It is taking csv file or json file? (my program is actually generating both)
re the station type across the top of WD
try this:
exit WD
then in the wdisplay.ini settings file
find
[Weather Station Type]
and delete that whole section
then run WD
then select the Wifi pro station
and then select the raw json file your program updates (and make sure its ticked to use the wunderground json format)
WD does have an option to listen on port 80
that is the setting to use direct usb connection
(believe it or not)
you could try ticking that setting in WD and see if that works (and not having to run your program (do the wdisplay.ini reset of the station type settings as above…as a test)
Next test on Wifi pro station tab, selecting on WiFi IP server → client,
Set “enabled” checkbox, change port to 85 (I have this port on my station)
Put local IP (192.168.1.2)
View debug info… Nothing, nobody is connecting to this… tell TCP Conection to 192.168.1.2 (but this is not a server… client?)
Change IP to 192.168.1.6 (IP of Observer box).
View debug info… Same as before, nothing but tell Conection to 192.168.1.6.
Begin again:
Erase full [Weather Station Type] section again
Tab “WiFi Pro station”
Check “Stationless”
Check on “WiFi Station” the checkbox “Ambient/Digitech/Aercus…”
Leave checked the “Wunderground format” checkbox that is already checked.
Click button “Select raw script data file” and select the file that my application IP Observer Receiver is creating.
Save - Close All.
Run my app.
And now is all correctly working (same as before, using my application is all working).
The side effect is that after erasing the [Weather Station Type], the background of the WD is now black! instead of blue.
Ruben
PD1: You can add the IP Observer Receiver program to WD if you want for other people with this kind of stations.
PD2: I stay tunned if you include this functionality of receiving data directly from IP Observer.
I tested your program on a remote pc I have access to that has one of these stations, but the console version of the station
I had to install the run time libraries
it did not get any data
if I tried changing the port to 80 instead of 85 and clicked on the button next to that, the program closed
Oh!, the button is “Salir”, exit or close program. If you change port, have to restart the program to take effect.
In any case, have the console version also the possibility to change destination IP and port number? (I think that yes modifying the .ini of the console, isn’t it?)
Changing the port is desired, because port 80 maybe occupied by other programs like web server, Skype, etc.
how do you exit the program to save the port to 80?
there is no windows close button
if i change it to port 80 and then use the exit button , which I thought was a set button, then it starts up with port 85 still