-
Notifications
You must be signed in to change notification settings - Fork 8
Collect all weather data from the Gateway #676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
283e62e
b69515e
accfc33
0eb9837
8f3479c
5d97c1d
786b58f
62e945f
dba6817
0bd47f3
8f8318f
cd47ef7
a419843
a5c81a3
ed33552
056ac48
e4af18a
b47cd50
6067b22
5bf9c87
2d42d51
5735dd2
5561f35
acd0cee
11f9287
653e1e7
f52bbb5
1d4ffb8
5b14d73
6488ec9
898ccf8
aa74d4f
5d0022c
ec9bbc2
d90bc59
32922e8
9250faf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -581,17 +581,24 @@ | |
| "name": "Adam", | ||
| "select_regulation_mode": "heating", | ||
| "sensors": { | ||
| "outdoor_temperature": 7.81 | ||
| "solar_irradiance": 157.5 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Item count verification failed - discrepancy found The actual count of items in the JSON is 440, but there is no
🔗 Analysis chainLGTM! Verify the updated item count. The weather data structure has been properly added to the gateway section, and the sensors field has been updated accordingly. The changes align with the PR objectives to collect weather data. Run the following script to verify the item count: Also applies to: 587-593, 601-601 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify that the item_count matches the actual number of items in the JSON
# Expected: The item_count should match the number of items in the JSON
# Count all items in the JSON (excluding the item_count itself)
jq '[.. | select(type == "string" or type == "number" or type == "boolean") | tostring] | length' fixtures/adam_multiple_devices_per_zone/all_data.json
Length of output: 157 Script: #!/bin/bash
# Let's verify the item_count field in the JSON
jq '.item_count' fixtures/adam_multiple_devices_per_zone/all_data.json
Length of output: 75 |
||
| }, | ||
| "vendor": "Plugwise", | ||
| "weather": { | ||
| "humidity": 75, | ||
| "outdoor_temperature": 7.81, | ||
| "weather_description": "cloudy", | ||
| "wind_bearing": 40.0, | ||
| "wind_speed": 8.2 | ||
| }, | ||
| "zigbee_mac_address": "ABCD012345670101" | ||
| } | ||
| }, | ||
| "gateway": { | ||
| "cooling_present": false, | ||
| "gateway_id": "fe799307f1624099878210aa0b9f1475", | ||
| "heater_id": "90986d591dcd426cae3ec3e8111ff730", | ||
| "item_count": 369, | ||
| "item_count": 374, | ||
| "notifications": { | ||
| "af82e4ccf9c548528166d38e560662a4": { | ||
| "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -173,9 +173,16 @@ | |
| "select_gateway_mode": "full", | ||
| "select_regulation_mode": "heating", | ||
| "sensors": { | ||
| "outdoor_temperature": 9.19 | ||
| "solar_irradiance": 3.0 | ||
| }, | ||
| "vendor": "Plugwise", | ||
| "weather": { | ||
| "humidity": 90, | ||
| "outdoor_temperature": 9.19, | ||
| "weather_description": "rain", | ||
| "wind_bearing": 291.0, | ||
| "wind_speed": 6.26 | ||
| }, | ||
| "zigbee_mac_address": "000D6F000D5A168D" | ||
| }, | ||
| "e2f4322d57924fa090fbbc48b3a140dc": { | ||
|
|
@@ -288,7 +295,7 @@ | |
| "cooling_present": false, | ||
| "gateway_id": "da224107914542988a88561b4452b0f6", | ||
| "heater_id": "056ee145a816487eaa69243c3280f8bf", | ||
| "item_count": 177, | ||
| "item_count": 182, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Item count in JSON file needs correction The declared
🔗 Analysis chainVerify the updated item count. The item count has been increased from 177 to 182, which aligns with the addition of new weather attributes. Let me try a different approach to count the items correctly. Let's try one more approach to understand the structure and count the items correctly. Let's verify the exact item count by checking all the properties in the JSON structure. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify that the item count matches the actual number of items
# Count all unique keys in the JSON structure
jq '[.. | objects | keys[]] | unique | length' fixtures/adam_plus_anna_new/all_data.json
Length of output: 93 Script: #!/bin/bash
# Let's check the actual structure of the JSON file first
jq 'keys' fixtures/adam_plus_anna_new/all_data.json
# Then count the total number of items in the main data array
jq '.data | length' fixtures/adam_plus_anna_new/all_data.json
Length of output: 146 Script: #!/bin/bash
# Let's examine the actual content structure
jq '.devices | length' fixtures/adam_plus_anna_new/all_data.json
# Also check the gateway structure
jq '.gateway | keys' fixtures/adam_plus_anna_new/all_data.json
# Count all non-null values in the entire JSON structure
jq '[.. | select(. != null)] | length' fixtures/adam_plus_anna_new/all_data.json
Length of output: 339 Script: #!/bin/bash
# Count all properties in the JSON structure
jq '[paths(scalars)] | length' fixtures/adam_plus_anna_new/all_data.json
# Also let's see the previous version's count for comparison
git show HEAD^:fixtures/adam_plus_anna_new/all_data.json | jq '[paths(scalars)] | length'
Length of output: 176 |
||
| "notifications": {}, | ||
| "reboot": true, | ||
| "smile_name": "Adam" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
The item count of 249 in the JSON file is incorrect and should be updated to 287
The verification reveals that there are actually 287 items in the data structure (excluding the "item_count" field itself). This count represents all the actual data fields (strings, numbers, and booleans) within the JSON structure. The current value of 249 is outdated and needs to be corrected to reflect the actual count.
🔗 Analysis chain
Verify the updated item count.
The item count has increased from 244 to 249, which aligns with the addition of new weather attributes.
Let's verify if the item count matches the actual number of items:
Let me verify the specific structure of the JSON to understand why there's a discrepancy between the stated count (249) and our initial count (288).
Let me check the actual count of items that should be included based on the data structure, excluding metadata fields like "item_count" itself.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 124
Script:
Length of output: 821
Script:
Length of output: 392