I've been discussing the possibility to have the author of "ambient2pwsweather" modify his node.js service to allow input to Matthew Wall's Interceptor plugin. The idea is to allow the continued use of Ambientweather.net, while still capturing weather data for Weewx, so that it can be published to the supported weather services and used with Hubitat or other home automation systems. I'm already able to listen to my WS-0900-IP bridge and get the data into Weewx, but currently that comes at the cost of no longer being able to use Ambientweather.net or any of their services such as IFTTT, Alex Voice Services and Google Assistant.
Is there a guide for how the data must be formatted for input to the interceptor.py plugin? Hoping anyone with knowledge of interceptor or @mwall could comment please.
Here's what the ambient2pwsweather developer wrote:
"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."
--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/As-rZOD0_Lo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
Gary
import logging
logging.getLogger('socketIO-client').setLevel(logging.DEBUG)
logging.basicConfig()
from socketIO_client import SocketIO, LoggingNamespace
def on_connect():
print('connect')
with SocketIO('https://api.ambientweather.net/?api=1&applicationKey=YOUR_APPLICATION_KEY', 443, LoggingNamespace ) as socketIO:
socketIO.on('connect', on_connect)
with SocketIO('https://api.ambientweather.net/v1/devices?applicationKey=YOUR_APPLICATION_KEY&apiKey=YOUR_API_KEY', 443, LoggingNamespace ) as socketIO:
socketIO.on('connect', on_connect)
WARNING:socketIO-client:api.ambientweather.net:443/v1/devices/socket.io [engine.io waiting for connection] unexpected status code (401 {"error":"apiKey-missing"})
SocketIO(
'https://api.ambientweather.net/v1/devices/YOUR_MAC_ADDRESS', 443, LoggingNamespace,
params={'apiKey': 'YOUR_API_KEY', 'applicationKey': 'YOUR_APPLICATION_KEY' })
WARNING:socketIO-client:api.ambientweather.net:443/v1/devices/YOUR_MAC_ADDRESS/socket.io [engine.io waiting for connection] unexpected status code (404 {"name":"NotFound","message":"Page not found","code":404,"className":"not-found","errors":{}})
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
with SocketIO('https://api.ambientweather.net/v1/devices?applicationKey=YOUR_APP_KEY&apiKey=YOUR_API_KEY', 443, LoggingNamespace, verify=False ) as socketIO: socketIO.on('connect', on_connect)
/usr/local/lib/python2.7/dist-packages/urllib3/connectionpool.py:857: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning)
WARNING:socketIO-client:api.ambientweather.net:443/v1/devices/socket.io [engine.io waiting for connection] unexpected status code (401 {"error":"apiKey-missing"})
SocketIO(
'https://api.ambientweather.net/v1/devices/YOUR_MAC_ADDR', 443, LoggingNamespace,
verify=False,
params={'apiKey': 'YOUR_API_KEY', 'applicationKey': 'YOUR_APP_KEY' })
/usr/local/lib/python2.7/dist-packages/urllib3/connectionpool.py:857: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning)
WARNING:socketIO-client:api.ambientweather.net:443/v1/devices/YOUR_MAC_ADDR/socket.io [engine.io waiting for connection] unexpected status code (404 {"name":"NotFound","message":"Page not found","code":404,"className":"not-found","errors":{}})