Closed JtwoA closed 1 year ago
Yes, the '?' is required to be at the end of the path. It could be the only character in the path also. Adding this should allow the add-on to work properly.
Pardon the ignorance - what path?
Nevermind - momentary brain lapse. All set. Data is flowing. Thanks!
Urgh, watching the logs go by and I see errors.
2023-06-09 18:30:49,225 ERROR : Failed to send {"/data/report/stationtype": "AMBWeatherV4.3.4", "PASSKEY": "xx:xx:xx:xx:xx:xx", "dateutc": "2023-06-09 22:30:47", "tempinf": "74.8", "humidityin": "54", "baromrelin": "29.670", "baromabsin": "29.794", "tempf": "80.2", "humidity": "53", "winddir": "56", "windspeedmph": "0.9", "windgustmph": "1.1", "maxdailygust": "9.2", "hourlyrainin": "0.000", "eventrainin": "0.000", "dailyrainin": "0.000", "weeklyrainin": "1.142", "monthlyrainin": "1.142", "totalrainin": "236.220", "solarradiation": "166.99", "uv": "1", "batt_co2": "1"} to http://supervisor/core/api/services/awnet_local/update with headers {'Authorization': 'Bearer 73e933520b75c096d431393a825ee6e6290b965171xxxxxxxxxxxxxx647167bdb0e901392fa67188eeddafbb0651bf818e527db61f37b375', 'content-type': 'application/json'}; b'400: Bad Request'
192.168.1.xxx - - [09/Jun/2023 18:30:49] "GET ?/data/report/stationtype=AMBWeatherV4.3.4&PASSKEY=xx:xx:xx:xx:xx:xx&dateutc=2023-06-09+22:30:47&tempinf=74.8&humidityin=54&baromrelin=29.670&baromabsin=29.794&tempf=80.2&humidity=53&winddir=56&windspeedmph=0.9&windgustmph=1.1&maxdailygust=9.2&hourlyrainin=0.000&eventrainin=0.000&dailyrainin=0.000&weeklyrainin=1.142&monthlyrainin=1.142&totalrainin=236.220&solarradiation=166.99&uv=1&batt_co2=1 HTTP/1.1" 200 0
Was the '?' put at the end of the Path? I edited my response earlier and failed to mark it edited.
Path in the app can also be set to just the '?' character.
Also, please see the docs at https://github.com/tlskinneriv/hassio-addons/blob/master/awnet/DOCS.md for more details on the add-on setup.
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
2023-06-09 19:11:24,681 INFO : Serving on http://localhost:80
2023-06-09 19:11:33,145 ERROR : Failed to send {"stationtype": "AMBWeatherV4.3.4", "PASSKEY": "redacted", "dateutc": "2023-06-09 23:11:31", "tempinf": "74.1", "humidityin": "52", "baromrelin": "29.687", "baromabsin": "29.811", "tempf": "80.1", "humidity": "57", "winddir": "123", "windspeedmph": "0.0", "windgustmph": "0.0", "maxdailygust": "9.2", "hourlyrainin": "0.000", "eventrainin": "0.000", "dailyrainin": "0.000", "weeklyrainin": "1.142", "monthlyrainin": "1.142", "totalrainin": "236.220", "solarradiation": "92.73", "uv": "0", "batt_co2": "1"} to http://supervisor/core/api/services/awnet_local/update with headers {'Authorization': 'Bearer fc23a0015617a1c8e8df18af2e47fbf8091100899116f67fxxxxxxxxxxxxxxxb8bd1d014f701aa8b29c94ee48f21c5e073a3e48', 'content-type': 'application/json'}; b'400: Bad Request'
192.168.1.xxx - - [09/Jun/2023 19:11:33] "GET ?stationtype=AMBWeatherV4.3.4&PASSKEY=redacted&dateutc=2023-06-09+23:11:31&tempinf=74.1&humidityin=52&baromrelin=29.687&baromabsin=29.811&tempf=80.1&humidity=57&winddir=123&windspeedmph=0.0&windgustmph=0.0&maxdailygust=9.2&hourlyrainin=0.000&eventrainin=0.000&dailyrainin=0.000&weeklyrainin=1.142&monthlyrainin=1.142&totalrainin=236.220&solarradiation=92.73&uv=0&batt_co2=1 HTTP/1.1" 200 0
App settings:
Use the "Next" button in the upper right to navigate to the "Customized" page
Configure the customized data upload with the following:
Protocol Type Same As: Ambient Weather (Y)
Server IP / Hostname: (your Home Assistant IP/hostname) (Y - server IP)
Path: ? (Literally the '?' character to send the data as a query string to the web server) (Y)
Port: (Port the add-on is listening on, default 7080) (Y)
Upload Interval: (user determined, how often to send data to Home Assistant) (Y)
Click "Save" at the bottom of the form (Y)
Use the "Finish" button in the upper right to complete configuration (No finish
button in iOS app version)
Looks like the add-on is set up correctly now but the service isn't listening.
Has the integration been set up with the correct MAC address? Have you restarted HA as a troubleshooting step after having the add-on working?
I edited the services.yaml
to have the MAC address. Confirmed it is correct. Restarted HA a few times but not sure if after the latest changes in the app (did restart the add-on) so I've done it again just now.
Same result.
It's pulling the data from the 2902A, it's falling down here:
ERROR : Failed to send <all the right data is present> to http://supervisor/core/api/services/awnet_local/update with headers {'Authorization': 'Bearer fc23a0015617a1c8e8df18af2e47fbf8091100899116f67f036262a4eb7randomGUIDbd1d014f701aa8b29c94ee48f21c5e073a3e48', 'content-type': 'application/json'}; b'400: Bad Request'
What's being configuring in services.yaml
? I did not write a YAML configuration processor in for this integration. The integration should be configured entirely from the UI.
I got no config dialogue in HA.
Interesting. After adding the integration in HACS (or copying the awnet_local
folder into your custom_components
folder) and restarting HA, you should have an option to select it on the page to add an integration in the UI.
Are there any errors showing for the custom_components.awnet_local
module in the HA logs? I don't have any issue getting the GUI dialog to show when adding the integration, and I'm running 2023.6.1 as well.
I've noticed sometimes when adding a new integration from HACS or elsewhere that sometimes I need to clear my web browser cache for it to show up in the pick list. Perhaps you're having the same issue if it's not showing in the list.
That did it!
Cleared the browser cache, restarted HA, relogged into HA, add integration
and it was there.
Thanks!
Integration Version: 1.0.0
Home Assistant Version: Home Assistant 2023.6.1 Supervisor 2023.06.1 Operating System 10.2 Frontend 20230608.0 - latest
Describe the bug Logs show error about query string
To Reproduce Steps to reproduce the behavior:
Expected behavior Successful polling
Screenshots
(Yes, the fourth octet was purposefully removed from the screenshot - it's present in the app)
Additional context "Configuration is performed via the Home Assistant user interface." - where is this done? I manually added MAC address to
services.yaml
Phone is iPhone 14p with AWNET v4.3.4 and Ambient Wx Stn 2902A
Debug log output from the integration (see Home Assistant docs for how to enable debug logging for an integration; integration name: "custom_components.awnet_local")