-
Notifications
You must be signed in to change notification settings - Fork 38
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
FollowUpResponse - anyone? #476
Comments
Anyone tried this? |
Judging by the code, the correct command would be this:
Cannot test it though. I haven't found the correct (german) voice command to trigger a speed test. |
I got Google to understand my command. The last days I was at my parents apartment. I thought when I'm asking with my phone, which is connected to my account, it should work. But it didn't. Now I'm back in my apartment. Asking using my smart speaker, Google understands. But same results as you. "testing your network speed ..." and then nothing. But I'm afraid there is nothing we can do. I had a look at Google's issue tracker. Both problems are already known there. So it's not our fault, it must be fixed by Google. TestNetworkSpeed is known since 2021 and won't be fixed (source). GetGuestPassword is known since 2020 and is still pending (source). |
Hello @Caprico85 Please could you reopen this comment. The issue, first posted by @patrik-malina picked up my attention. I created a flow as shown below: You have to know my setup. I run OOKLA speed test on my server/gateway. To start a test I post a payload "on" with topic If I issue a command, like "Ok Google, what is my network speed?" the Google Smarthome Device node outputs the following: This is correct and I send a "on" command to the MQTT output node in order to start the test on the server/gateway. My Google Home Mini speaker, responds accordingly and that he/she will tell me the results shortly. Indeed, as soon as, I receive the result as shown below: I convert this to: I hear a bling and the result is nicely pronounced. So far so good, If I check the Google issue tracker, I see:
However 1 person responds, that he also noticed it on a Google Nest Hub, but as you already said, this is a long time ago and since then the Google Devices has been updated several times. However I noticed a few issues.
This will probably last until eternity (not tested). I do not see a possibility to return to a previous screen. If you touch the button on the screen it does the same but, you will not get a spoken answer. On the Hub, I do not get a presentation, as show by @patrik-malina in his first post.
Please find my complete flow below:
Regards |
I reopened the ticket. With your flow, I get the spoken response on my Nest Mini too. No idea what I did different on my first try. Nevertheless, I don't know what we could do to fix this. The data we send to Google seems to be correct, otherwise Google wouldn't be able to read or show any numbers. We cannot control the behaviour of the Nest devices though, This is all done by Google. Our only option would be to open another issue on the Google bug tracker and hope Google won't take forever to fix it (or immediately close the issue as duplicate). Greetings |
Hello @Caprico85 Thank you for reopening this issue. As said, with the Google Mini speaker it is working as expected. After some time I receive a response with the correct results. No idea, how to terminate that, as the test has been finished. I can swipe to the previous screen. After start-up I can swipe top-down and the press a Button, called "Connectivity" (with the Wifi symbol), but no values are shown. So the Nest acts the same as a Mini speaker, but the display is not really functioning. Not only the "Network" is using "followUpResponses". This afternoon, I have been able to make the "Lock/Unlock" work with followUpResponse, I consider to send you a PR for the two functionalities in the "Example" directory, as that will also solve the question in #143 and #435 I would really prefer to have more clarity about the issues with the Nest Hub, before doing that. Regards |
I will later. I'm on vaccination till monday. |
I hope you mean vacation (holiday). |
Ahahah, yes. Stupid autocorrect :) |
Yup. If I use your code, i got responses from mini and hub, but also blue dots animation never ends. |
this stops animation and shows result on mine hub |
This is for showing guest pass on hub |
This is mine final version for Router node. It does next:
If anyone is willing maybe to simplify this... I don't have more time. Code: |
Hello @Caprico85 and @patrik-malina Finally I found some time to look at this Network Test Issue. As Patrik uses a number of specific Home Assistant nodes, and as not many users use HA, (at least I do not), I tried to make a better example in order to create a new PR, I noticed a couple of things.
In order to terminate the ongoing network test, which is visible on a Google Nest Hub, you have to send the following:
However I think it is always better, both with a Mini and a Nest Hub, to send both:
and
So far so good. That is working as expected. In order to get the display on the Nest Hub show the Download and Upload speed, I have to send the following:
The example values are copied from the Google Smarthome page. This is nicely creating an updated display. However I receive an error @patrik-malina: Do you noticed the same. @Caprico85 I have no clue how to debug this, as I'm not able to find the error. Regards |
@FireWizard52 yes i had that error. It is due timestap must be in seconds not miliseconds. You need to divide it with 1000. |
Thank you, this solved my issue. I had noticed that you divided the current timestamp with 1000, but I did not copy it, as I did not see the necessity, because I overlooked it in the documentation and normally the Unix epoch time is equal to the number of seconds that have elapsed since 00:00:00 [UTC] on 1 January 1970. However in Node-RED the timestamp is in milliseconds and not seconds. Google documentation:
I have planned to update the example, so that it will also nicely terminate the Network Speed test on the Nest Hub display and also to display the correct values. And maybe to show an example with the Guest Network password. Once again, thank you for the hint. Regards |
Working as expected on my Nest Mini and my Nest Hub. I was almost certain that this is another one of the half-supported and half-broken devices in Google's smarthome section. But you really got it to work. Awesome work, @patrik-malina and @FireWizard52! |
Hello @Caprico85, I want to discuss one issue. The "Device" node, if configured as device type: "Network" always shows "Unknown". As the "Network" device has a number of attributes, such as Enabling/Disabling Guest Network, Selecting profiles, Network Usage, Regards |
#496 - Opened new Issue |
Changes published in v0.4.11 |
Anyone managed to setup followup response?
I'm trying to do response on network speed: https://developers.home.google.com/cloud-to-cloud/traits/networkcontrol
This is mine flow:
[{"id":"0599fe37b3a4c91c","type":"poll-state","z":"aa342ddbb02b2bce","name":"Guest net","server":"705207ff.d4d2f8","version":3,"exposeAsEntityConfig":"","updateInterval":"1","updateIntervalType":"num","updateIntervalUnits":"minutes","outputInitially":true,"outputOnChanged":true,"entityId":"switch.gosti","stateType":"habool","ifState":"","ifStateType":"str","ifStateOperator":"is","outputs":1,"outputProperties":[{"property":"gosti","propertyType":"msg","value":"","valueType":"entityState"}],"x":80,"y":2960,"wires":[["5dbcb7fa58731ffb"]]},{"id":"5dbcb7fa58731ffb","type":"function","z":"aa342ddbb02b2bce","name":"","func":"var newMsg = {payload: {}};\n\nnewMsg.payload.networkEnabled = true;\nnewMsg.payload.networkSettings = {ssid: \"Home\"};\n\nnewMsg.payload.guestNetworkEnabled = msg.gosti;\nnewMsg.payload.guestNetworkSettings = {ssid: \"Guests\"};\nnewMsg.payload.guestNetworkPassword = \"onlyforguests\";\n\nvar home = global.get(\"homeassistant\").homeAssistant.states['sensor.home'].state;\nvar home5 = global.get(\"homeassistant\").homeAssistant.states['sensor.home_5g'].state;\nvar iot = global.get(\"homeassistant\").homeAssistant.states['sensor.iot'].state;\n\nnewMsg.payload.numConnectedDevices = parseInt(home) + parseInt(home5) + parseInt(iot);\n\n\nreturn newMsg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":175,"y":2960,"wires":[["168a0d0abbcc097f"]],"l":false},{"id":"168a0d0abbcc097f","type":"google-device","z":"aa342ddbb02b2bce","client":"a65d046b0fe19232","name":"Router","nicknames":"Gateway; Network router; Acces point; Wifi; AP","topic":"","online":true,"room_hint":"Server room","device_type":"ROUTER","trait_appselector":false,"trait_channel":false,"trait_inputselector":false,"trait_mediastate":false,"trait_onoff":false,"trait_transportcontrol":false,"trait_modes":false,"trait_volume":false,"trait_toggles":false,"trait_brightness":false,"trait_colorsetting":false,"appselector_file":"applications_<id>.json","appselector_type":"str","channel_file":"channels_<id>.json","channel_type":"str","inputselector_file":"inputs_<id>.json","inputselector_type":"str","command_only_input_selector":false,"ordered_inputs":false,"support_activity_state":false,"support_playback_state":false,"command_query_onoff":"","supported_commands":["CAPTION_CONTROL","NEXT","PAUSE","PREVIOUS","RESUME","SEEK_RELATIVE","SEEK_TO_POSITION","SET_REPEAT","SHUFFLE","STOP"],"volume_max_level":100,"volume_can_mute_and_unmute":true,"volume_default_percentage":40,"level_step_size":1,"command_only_volume":false,"command_only_brightness":false,"command_only_colorsetting":false,"color_model":"temp","temperature_min_k":2000,"temperature_max_k":9000,"modes_file":"modes_<id>.json","modes_type":"str","command_query_modes":"","toggles_file":"toggles_<id>.json","toggles_type":"str","command_query_toggles":"","trait_camerastream":false,"hls":"","hls_app_id":"","dash":"","dash_app_id":"","smooth_stream":"","smooth_stream_app_id":"","progressive_mp4":"","progressive_mp4_app_id":"","webrtc":"","webrtc_offer":"","webrtc_ice_servers":"","webrtc_ice_servers_type":"str","auth_token":"","topic_filter":false,"passthru":false,"persistent_state":false,"trait_scene":false,"scene_reversible":true,"trait_timer":false,"trait_temperaturesetting":false,"max_timer_limit_sec":86400,"command_only_timer":false,"available_thermostat_modes":["off","heat","cool","on","heatcool","auto","fan-only","purifier","eco","dry"],"min_threshold_celsius":0,"max_threshold_celsius":40,"thermostat_temperature_unit":"C","buffer_range_celsius":2,"command_query_temperaturesetting":"","trait_temperaturecontrol":false,"tc_min_threshold_celsius":0,"tc_max_threshold_celsius":40,"tc_temperature_step_celsius":1,"tc_temperature_unit_for_ux":"C","tc_command_query_temperaturecontrol":"","trait_humiditysetting":false,"min_percent":0,"max_percent":100,"command_query_humiditysetting":"","trait_dock":false,"trait_locator":false,"trait_lockunlock":false,"trait_reboot":true,"trait_openclose":false,"discrete_only_openclose":false,"open_direction":[],"command_query_openclose":"","trait_startstop":false,"pausable":false,"available_zones":[],"trait_runcycle":false,"trait_softwareupdate":false,"trait_rotation":false,"supports_degrees":true,"supports_percent":true,"rotation_degrees_min":0,"rotation_degrees_max":360,"supports_continuous_rotation":false,"command_only_rotation":false,"trait_lighteffects":false,"default_sleep_duration":1800,"default_wake_duration":1800,"supported_effects":["colorLoop","sleep","wake"],"trait_statusreport":false,"trait_cook":false,"supported_cooking_modes":[],"food_presets_file":"foodPresets_<id>.json","food_presets_type":"str","trait_fanspeed":false,"reversible":false,"supports_fan_speed_percent":false,"fan_speeds_ordered":false,"command_only_fanspeed":false,"available_fan_speeds_file":"availableFanSpeeds_<id>.json","available_fan_speeds_type":"str","trait_sensorstate":false,"sensor_states_supported":[],"arm_levels_ordered":false,"trait_fill":false,"available_fill_levels_file":"availableFillLevels_<id>.json","available_fill_levels_type":"str","supports_fill_percent":false,"ordered_fill_levels":true,"trait_armdisarm":false,"available_arm_levels_file":"availableArmLevels_<id>.json","available_arm_levels_type":"str","trait_energystorage":false,"is_rechargeable":false,"query_only_energy_storage":false,"energy_storage_distance_unit_for_ux":"","trait_dispense":false,"supported_dispense_items_file":"supportedDispenseItems_<id>.json","supported_dispense_items_type":"str","supported_dispense_presets_file":"supportedDispensePresets_<id>.json","supported_dispense_presets_type":"str","trait_networkcontrol":true,"supports_enabling_guest_network":true,"supports_disabling_guest_network":true,"supports_getting_guest_network_password":true,"network_profiles":[],"supports_enabling_network_profile":false,"supports_disabling_network_profile":false,"supports_network_download_speedtest":true,"supports_network_upload_speedtest":true,"trait_objectdetection":false,"show_trait":"selected","advanced_settings":true,"ct_appselector":"","ct_armdisarm":"","ct_brightness":"","ct_camerastream":"","ct_channel":"","ct_colorsetting":"","ct_cook":"","ct_dispense":"","ct_dock":"","ct_energystorage":"","ct_fanspeed":"","ct_fill":"","ct_humiditysetting":"","ct_inputselector":"","ct_lighteffects":"","ct_locator":"","ct_lockunlock":"","ct_mediastate":"","ct_modes":"","ct_networkcontrol":"","ct_objectdetection":"","ct_onoff":"","ct_openclose":"","ct_reboot":"ackNeeded","ct_rotation":"","ct_runcycle":"","ct_scene":"","ct_sensorstate":"","ct_softwareupdate":"","ct_startstop":"","ct_statusreport":"","ct_temperaturecontrol":"","ct_temperaturesetting":"","ct_timer":"","ct_toggles":"","ct_transportcontrol":"","ct_volume":"","pin_appselector":"","pin_armdisarm":"","pin_brightness":"","pin_camerastream":"","pin_channel":"","pin_colorsetting":"","pin_cook":"","pin_dispense":"","pin_dock":"","pin_energystorage":"","pin_fanspeed":"","pin_fill":"","pin_humiditysetting":"","pin_inputselector":"","pin_lighteffects":"","pin_locator":"","pin_lockunlock":"","pin_mediastate":"","pin_modes":"","pin_networkcontrol":"","pin_objectdetection":"","pin_onoff":"","pin_openclose":"","pin_reboot":"","pin_rotation":"","pin_runcycle":"","pin_scene":"","pin_sensorstate":"","pin_softwareupdate":"","pin_startstop":"","pin_statusreport":"","pin_temperaturecontrol":"","pin_temperaturesetting":"","pin_timer":"","pin_toggles":"","pin_transportcontrol":"","pin_volume":"","x":300,"y":2960,"wires":[["8af865884a21aa33"]]},{"id":"4734f95023eb25b5","type":"function","z":"aa342ddbb02b2bce","name":"","func":"var newMsg = {payload: {}};\nvar d = new Date();\nvar token = flow.get(\"token\");\n\nvar dspeed = parseFloat(global.get(\"homeassistant\").homeAssistant.states['sensor.speedtest_download'].state);\nvar uspeed = parseFloat(global.get(\"homeassistant\").homeAssistant.states['sensor.speedtest_upload'].state);\n\nvar timestamp = d.getTime() / 1000;\n\nnewMsg.payload.lastNetworkDownloadSpeedTest = {\"downloadSpeedMbps\": dspeed, \"unixTimestampSec\": timestamp, \"status\": \"SUCCESS\"};\nnewMsg.payload.lastNetworkUploadSpeedTest = {\"uploadSpeedMbps\": uspeed, \"unixTimestampSec\": timestamp, \"status\": \"SUCCESS\"};\n\n//newMsg.payload.NetworkControl.priority = 0;\n//newMsg.payload.NetworkControl.followUpResponse = {\"status\": \"SUCCESS\", \"networkDownloadSpeedMbps\": dspeed, \"networkUploadSpeedMbps\": uspeed, \"followUpToken\": token};\n\nnewMsg.payload = { \"NetworkControl\": { \"priority\": 0, \"followUpResponse\": { \"status\": \"SUCCESS\", \"networkDownloadSpeedMbps\": dspeed, \"networkUploadSpeedMbps\": uspeed, \"followUpToken\": token } } }; \n\nreturn newMsg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":655,"y":2960,"wires":[["168a0d0abbcc097f"]],"l":false},{"id":"8af865884a21aa33","type":"switch","z":"aa342ddbb02b2bce","name":"","property":"command","propertyType":"msg","rules":[{"t":"eq","v":"TestNetworkSpeed","vt":"str"},{"t":"eq","v":"EnableDisableGuestNetwork","vt":"str"},{"t":"eq","v":"Reboot","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":415,"y":2960,"wires":[["39dcbd77d37f18e7"],["fb70d2e5bf65e64a"],["6fe6fdb7c5c79239"]],"outputLabels":["test","guest","reboot"],"l":false},{"id":"63e77ac7d24dbc5f","type":"api-call-service","z":"aa342ddbb02b2bce","name":"speed","server":"705207ff.d4d2f8","version":5,"debugenabled":false,"domain":"homeassistant","service":"update_entity","areaId":[],"deviceId":[],"entityId":["sensor.speedtest_download","sensor.speedtest_upload"],"data":"{}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"last","x":570,"y":2960,"wires":[["4734f95023eb25b5"]]},{"id":"fb70d2e5bf65e64a","type":"function","z":"aa342ddbb02b2bce","name":"","func":"var newMsg = {payload: {}};\n\nif (msg.payload.guestNetworkEnabled){\n newMsg.payload = \"on\" \n} else newMsg.payload = \"off\";\n\nreturn newMsg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":515,"y":3020,"wires":[["c8c84bd0ee50b509"]],"l":false},{"id":"6fe6fdb7c5c79239","type":"api-call-service","z":"aa342ddbb02b2bce","name":"reboot","server":"705207ff.d4d2f8","version":5,"debugenabled":false,"domain":"button","service":"","areaId":[],"deviceId":[],"entityId":["button.u6_lite_restart"],"data":"{}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":530,"y":3080,"wires":[[]]},{"id":"39dcbd77d37f18e7","type":"function","z":"aa342ddbb02b2bce","name":"","func":"var newMsg = {payload: {}};\nflow.set(\"token\", msg.params.followUpToken);\n\nnewMsg.payload.networkSpeedTestInProgress = true;\n\nreturn newMsg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":485,"y":2960,"wires":[["63e77ac7d24dbc5f"]],"l":false},{"id":"c8c84bd0ee50b509","type":"api-call-service","z":"aa342ddbb02b2bce","name":"toggle","server":"705207ff.d4d2f8","version":5,"debugenabled":false,"domain":"switch","service":"turn_{{payload}}","areaId":[],"deviceId":[],"entityId":["switch.gosti"],"data":"{}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":610,"y":3020,"wires":[[]]},{"id":"705207ff.d4d2f8","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"a65d046b0fe19232","type":"googlesmarthome-client","name":"Home","enabledebug":false,"default_lang":"en","usegooglelogin":false,"usehttpnoderoot":false,"port":"3001","httppath":"","ssloffload":true,"local_scan_type":"","local_scan_port":"","localport":"","accesstokenduration":"60","reportinterval":"60","request_sync_delay":"","set_state_delay":""}]
Also cannot trigger get guest wifi password command.
The text was updated successfully, but these errors were encountered: