killroyboy / ambient2pwsweather

Pull weather data from AmbientWeather.net and push to PWSWeather
0 stars 0 forks source link

Ambient to weewx ? #1

Open logname opened 6 years ago

logname commented 6 years ago

Would you be interested in re-writing this to getting weather data into Weewx? I'm not a developer so totally useless in that area. I run a home automation system called Hubitat which runs local groovy code and can connect to cloud sources when required by the device. One of the users has created an app he calls Weather Switch that can turn on switches (virtual or real) based on weather data pulled from Weewx. I have it working but the issue is I lose connection with Ambientweather.net when I do that, and I really like their dashboard and features.

This is the only instance I found where anyone was pulling from ambient and sending it anywhere but a text file. If it were possible to get weather data from ambient to weewx, then it could be uploaded to PWSWeather as well as any number of places, as well as be used by Weather Switch on Hubitat and other home automation systems. I don't mind running another node server or pulling from the cloud.

What do you think?

killroyboy commented 6 years ago

@logname The only way I would be willing to do this is if Weewx has an existing API. Which, from what I could find, it does not. I don't have time to build an entire API for a utility that I don't use.

If you can find an existing API that I could post data into, then I can evaluate it and figure out how hard it would be to integrate.

logname commented 6 years ago

There's no API that I know of, but there's a plugin for weewx that I and many other use that can capture http traffic.

https://github.com/matthewwall/weewx-interceptor

killroyboy commented 6 years ago

I saw that plugin.

If I'm understanding it correctly, it wouldn't be that difficult to enhance this utility to send the data to a different url/port. You would then need to run a new interceptor instance running in "listen mode" that would handle the insertion into weewx.

The minor difficulty would be in ensuring the data is in a format that the interceptor would understand. If you can work that out and get me some documentation (or point me to a URL), I can enhance ambient2pwsweather.

logname commented 6 years ago

Well, my non developer brain is doing its best to manage the info. I did get a response from Patrick O'Brien, one of the developers that helped me setup the firewall script I'm using, that unfortunately doesn't allow me to also use Ambientweather.net, which is why I'm hoping you can help.

Here's some feedback and a link to the interceptor python code, and Pat also reminded me that there's a sample of the formatting on his site for ncat, which he uses to get data to Weewx using his socketlogger method.